#include <lemon/hypercube_graph.h>
Inherits GraphExtender< lemon::HyperCubeGraphBase >.
Inheritance diagram for HyperCubeGraph:
dim
binary length. Two nodes are connected in the graph if the indices differ only on one position in the binary form.
ids
is chosen to int
because efficiency reasons. This way the maximal dimension of this implementation is 26.
Public Member Functions | |
HyperCubeGraph (int dim) | |
Construct a graph with dim dimension. | |
int | dimension () const |
Gives back the number of the dimensions. | |
bool | projection (Node node, int n) const |
Returns true if the n'th bit of the node is one. | |
int | dimension (Edge edge) const |
The dimension id of the edge. | |
int | index (Node node) const |
Gives back the index of the node. | |
Node | operator() (int index) const |
Gives back the node by its index. | |
int | nodeNum () const |
Number of nodes. | |
int | edgeNum () const |
Number of edges. | |
Classes | |
class | HyperMap |
Linear combination map. More... |
HyperCubeGraph | ( | int | dim | ) | [inline] |
Construct a graph with dim
dimension.
int dimension | ( | ) | const [inline] |
Gives back the number of the dimensions.
bool projection | ( | Node | node, | |
int | n | |||
) | const [inline] |
Returns true if the n'th bit of the node is one.
int dimension | ( | Edge | edge | ) | const [inline] |
It returns the dimension id of the edge. It can be in the intervall.
int index | ( | Node | node | ) | const [inline] |
Gives back the index of the node. The lower bits of the integer describes the node.
Node operator() | ( | int | index | ) | const [inline] |
Gives back the node by its index.