Muster
|
#include <binomial.h>
Public Member Functions | |
binomial_embedding (int size, int root=0) | |
Construct a binomial rank embedding with size nodes, rooted at root. More... | |
int | relative_rank (int rank) const |
This permutes ranks in case the root is not zero. More... | |
int | reverse_relative_rank (int rank) const |
Reverse rank permutation. More... | |
std::vector< int > | children (int rank) const |
Same as get_children, but returns vector. More... | |
int | parent (int rank) const |
Get the parent of a particular rank. More... | |
int | size () const |
int | root () const |
template<class OutputIterator > | |
void | get_children (int rank, OutputIterator o) const |
This allows you to putting children into any structure that supports output iterators. More... | |
Definition at line 9 of file binomial.h.
binomial_embedding | ( | int | size, |
int | root = 0 |
||
) |
Construct a binomial rank embedding with size nodes, rooted at root.
Definition at line 9 of file binomial.cpp.
vector< int > children | ( | int | rank | ) | const |
Same as get_children, but returns vector.
Definition at line 21 of file binomial.cpp.
|
inline |
This allows you to putting children into any structure that supports output iterators.
Definition at line 28 of file binomial.h.
int parent | ( | int | rank | ) | const |
Get the parent of a particular rank.
Definition at line 27 of file binomial.cpp.
int relative_rank | ( | int | rank | ) | const |
This permutes ranks in case the root is not zero.
Definition at line 13 of file binomial.cpp.
int reverse_relative_rank | ( | int | rank | ) | const |
Reverse rank permutation.
Definition at line 17 of file binomial.cpp.
|
inline |
Definition at line 24 of file binomial.h.
|
inline |
Definition at line 23 of file binomial.h.