#include <lemon/hypercube_graph.h>
Public Member Functions | |
int | nodeNum () const |
Number of nodes. | |
int | edgeNum () const |
Number of edges. | |
int | maxNodeId () const |
Maximum node ID. | |
int | maxEdgeId () const |
Maximum edge ID. | |
Node | source (Edge e) const |
Gives back the source node of an edge. | |
Node | target (Edge e) const |
Gives back the target node of an edge. | |
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 | node (int index) const |
Gives back the node by its index. | |
Static Public Member Functions | |
static int | id (Node v) |
Node ID. | |
static int | id (Edge e) |
Edge ID. | |
Protected Member Functions | |
void | construct (int dim) |
Creates a hypercube graph with the given size. |
|
Creates a hypercube graph with the given size. |
|
Maximum node ID.
|
|
Maximum edge ID.
|
|
Gives back the source node of an edge. |
|
Gives back the target node of an edge. |
|
The ID of a valid Node is a nonnegative integer not greater than maxNodeId(). The range of the ID's is not surely continuous and the greatest node ID can be actually less then maxNodeId(). The ID of the INVALID node is -1.
|
|
The ID of a valid Edge is a nonnegative integer not greater than maxEdgeId(). The range of the ID's is not surely continuous and the greatest edge ID can be actually less then maxEdgeId(). The ID of the INVALID edge is -1.
|
|
Gives back the number of the dimensions. |
|
Returns true if the n'th bit of the node is one. |
|
It returns the dimension id of the edge. It can be in the ${0, 1, dim-1}$ intervall. |
|
Gives back the index of the node. The lower bits of the integer describe the node. |
|
Gives back the node by its index. |