FullBpGraph

Declared in lemon/full_graph.h, in the group Graph Structures; the same class on the Doxygen site.

class FullBpGraph : public BpGraphExtender< FullBpGraphBase >

An undirected full bipartite graph class.

FullBpGraph is a simple and fast implmenetation of undirected full bipartite graphs. It contains an edge between every red-blue pairs of nodes, therefore the number of edges is nr*nb. This class is completely static and it needs constant memory space. Thus you can neither add nor delete nodes or edges, however the structure can be resized using resize().

This type fully conforms to the BpGraph concept. Most of its member functions and nested classes are documented only in the concept class.

This class provides constant time counting for nodes, edges and arcs.

See also

FullGraph

Public Types

typedef ExtendedFullBpGraphBase Parent

Public Functions

inline FullBpGraph()

Default constructor. The number of nodes and edges will be zero.

inline FullBpGraph( int redNum , int blueNum )

Constructor.

Parameters:
  • redNum – The number of the red nodes.

  • blueNum – The number of the blue nodes.

inline void resize( int redNum , int blueNum )

Resizes the graph.

This function resizes the graph. It fully destroys and rebuilds the structure, therefore the maps of the graph will be reallocated automatically and the previous values will be lost.

inline RedNode redNode( int index ) const

Returns the red node with the given index. Since this structure is completely static, the red nodes can be indexed with integers from the range [0..redNum()-1].

See also

redIndex()

inline int index( RedNode node ) const

Returns the index of the given red node. Since this structure is completely static, the red nodes can be indexed with integers from the range [0..redNum()-1].

See also

operator()()

inline BlueNode blueNode( int index ) const

Returns the blue node with the given index. Since this structure is completely static, the blue nodes can be indexed with integers from the range [0..blueNum()-1].

See also

blueIndex()

inline int index( BlueNode node ) const

Returns the index of the given blue node. Since this structure is completely static, the blue nodes can be indexed with integers from the range [0..blueNum()-1].

See also

operator()()

inline Edge edge( const Node & u , const Node & v ) const

Returns the edge which connects the given nodes.

inline Arc arc( const Node & u , const Node & v ) const

Returns the arc which connects the given nodes.

inline int nodeNum() const

Number of nodes.

inline int redNum() const

Number of red nodes.

inline int blueNum() const

Number of blue nodes.

inline int arcNum() const

Number of arcs.

inline int edgeNum() const

Number of edges.