|
| | SimplePath () |
| | Default constructor.
|
|
| SimplePath (const SimplePath &cpath) |
| | Copy constructor.
|
| template< typename CPath > |
| | SimplePath (const CPath &cpath) |
| | Template copy constructor.
|
|
SimplePath & | operator= (const SimplePath &cpath) |
| | Copy assignment.
|
| template< typename CPath > |
| SimplePath & | operator= (const CPath &cpath) |
| | Template copy assignment.
|
| LemonRangeWrapper1< ArcIt , SimplePath > | arcs () const |
| | Gets the collection of the arcs of the path.
|
|
int | length () const |
| | Length of the path.
|
|
bool | empty () const |
| | Return true if the path is empty.
|
|
void | clear () |
| | Reset the path to an empty one.
|
| const Arc & | nth (int n) const |
| | The n-th arc.
|
|
ArcIt | nthIt (int n) const |
| | Initializes arc iterator to point to the n-th arc.
|
| const Arc & | operator[] (int n) const |
| | The n-th arc.
|
|
const Arc & | front () const |
| | The first arc of the path.
|
|
const Arc & | back () const |
| | The last arc of the path.
|
|
void | addBack (const Arc &arc) |
| | Add a new arc behind the current path.
|
|
void | eraseBack () |
| | Erase the last arc of the path.
|
template< typename GR >
class lemon::SimplePath< GR >
A structure for representing directed path in a digraph.
- Template Parameters
-
| GR | The digraph type in which the path is. |
In a sense, a path can be treated as a list of arcs. The LEMON path type simply stores this list. As a consequence, it cannot enumerate the nodes in the path, and the source node of a zero-length path is undefined.
This implementation is a just back insertable and erasable path type. It can be indexed in O(1) time. The back insertion and erasure is amortized O(1) time. This implementation is faster than the Path type because it use just one vector for the arcs.