abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
BpGraph::RedNodeIt Class Reference

Iterator class for the red nodes. More...

#include <lemon/concepts/bpgraph.h>

Inheritance diagram for BpGraph::RedNodeIt:

Public Member Functions

 RedNodeIt ()
 Default constructor.
 RedNodeIt (const RedNodeIt &n)
 Copy constructor.
const RedNodeIt & operator= (const RedNodeIt &)
 Assignment operator.
 RedNodeIt (Invalid)
 Invalid constructor & conversion.
 RedNodeIt (const BpGraph &)
 Sets the iterator to the first red node.
 RedNodeIt (const BpGraph &, const RedNode &)
 Sets the iterator to the given red node.
RedNodeIt & operator++ ()
 Next node.
Public Member Functions inherited from BpGraph::RedNode
 RedNode ()
 Default constructor.
 RedNode (const RedNode &)
 Copy constructor.
const RedNode & operator= (const RedNode &)
 Assignment operator.
 RedNode (Invalid)
 Invalid constructor & conversion.
Public Member Functions inherited from BpGraph::Node
 Node ()
 Default constructor.
 Node (const Node &)
 Copy constructor.
const Node & operator= (const Node &)
 Assignment operator.
 Node (Invalid)
 Invalid constructor & conversion.
bool operator== (Node) const
 Equality operator.
bool operator!= (Node) const
 Inequality operator.
bool operator< (Node) const
 Artificial ordering operator.

Detailed Description

This iterator goes through each red node of the graph. Its usage is quite simple, for example, you can count the number of red nodes in a graph g of type BpGraph like this:

int count = 0;
for( BpGraph::RedNodeIt n( g ) ; n != INVALID ; ++n )
++count;
Iterator class for the red nodes.
Definition bpgraph.h:212
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ RedNodeIt() [1/5]

RedNodeIt ( )
inline

Default constructor.

Warning
It sets the iterator to an undefined value.

◆ RedNodeIt() [2/5]

RedNodeIt ( const RedNodeIt & n)
inline

Copy constructor.

◆ RedNodeIt() [3/5]

RedNodeIt ( Invalid )
inline

Initializes the iterator to be invalid.

See also
Invalid for more details.

◆ RedNodeIt() [4/5]

RedNodeIt ( const BpGraph & )
inlineexplicit

Sets the iterator to the first red node of the given digraph.

◆ RedNodeIt() [5/5]

RedNodeIt ( const BpGraph & ,
const RedNode &  )
inline

Sets the iterator to the given red node of the given digraph.

Member Function Documentation

◆ operator=()

const RedNodeIt & operator= ( const RedNodeIt & )
inline

Assignment operator.

◆ operator++()

RedNodeIt & operator++ ( )
inline

Assign the iterator to the next red node.