HyperCubeGraph Class Reference
[Graph Structures]


Detailed Description

This class implements a special graph type. The nodes of the graph can be indiced with integers with at most dim binary length. Two nodes are connected in the graph if the indices differ only on one position in the binary form.

Note:
The type of the ids is chosen to int because efficiency reasons. This way the maximal dimension of this implementation is 26.
The graph type is fully conform to the concepts::Graph concept but it does not conform to the concepts::UGraph.

Author:
Balazs Dezso
#include <lemon/hypercube_graph.h>

Inheritance diagram for HyperCubeGraph:

Inheritance graph
[legend]

List of all members.

Classes

class  HyperMap
 Linear combination map. More...

Public Member Functions

 HyperCubeGraph (int dim)
int dimension () const
bool projection (Node node, int n) const
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 ix) const
int nodeNum () const
 Number of nodes.
int edgeNum () const
 Number of edges.


Constructor & Destructor Documentation

HyperCubeGraph ( int  dim  )  [inline]

Construct a graph with dim dimension.


Member Function Documentation

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 $ \{0, 1, \dots, dim-1\} $ 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  ix  )  const [inline]

Gives back the node by its index.


Generated on Thu Jun 4 04:04:53 2009 for LEMON by  doxygen 1.5.9