ttg 1.0.0
Template Task Graph (TTG): flowgraph-based programming model for high-performance distributed-memory algorithms
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ttg::BinarySpanningTree Class Reference

a binary spanning tree of integers in the [0,size) interval More...

#include <tree.h>

Public Member Functions

 BinarySpanningTree (int size, int root)
 
 ~BinarySpanningTree ()=default
 
const auto size () const
 
const auto root () const
 
int parent_key (const int child_key) const
 
std::pair< int, int > child_keys (const int parent_key) const
 

Detailed Description

a binary spanning tree of integers in the [0,size) interval

This is a binary spanning tree of the complete graph of the [0,size) set of keys, rooted at a particular key.

Definition at line 18 of file tree.h.

Constructor & Destructor Documentation

◆ BinarySpanningTree()

ttg::BinarySpanningTree::BinarySpanningTree ( int  size,
int  root 
)
inline

Definition at line 20 of file tree.h.

Here is the call graph for this function:

◆ ~BinarySpanningTree()

ttg::BinarySpanningTree::~BinarySpanningTree ( )
default

Member Function Documentation

◆ child_keys()

std::pair< int, int > ttg::BinarySpanningTree::child_keys ( const int  parent_key) const
inline
Parameters
[in]parent_keythe key of the parent
Returns
the pair of child keys (-1 if there is no child)

Definition at line 41 of file tree.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parent_key()

int ttg::BinarySpanningTree::parent_key ( const int  child_key) const
inline
Parameters
[in]child_keythe key of the child
Returns
the parent key (-1 if there is no parent)

Definition at line 33 of file tree.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ root()

const auto ttg::BinarySpanningTree::root ( ) const
inline
Returns
the root of the tree

Definition at line 29 of file tree.h.

Here is the caller graph for this function:

◆ size()

const auto ttg::BinarySpanningTree::size ( ) const
inline
Returns
the size of the tree

Definition at line 27 of file tree.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: