Graph | The graph type in which the path is. |
This implementation is a back and front insertable and erasable path type. It can be indexed in O(1) time. The front and back insertion and erasure is amortized O(1) time. The impelementation is based on two opposite organized vectors. #include <lemon/path.h>
Classes | |
class | EdgeIt |
Lemon style iterator for path edges. More... | |
Public Member Functions | |
Path () | |
Default constructor. | |
template<typename CPath > | |
Path (const CPath &cpath) | |
Template copy constructor. | |
template<typename CPath > | |
Path & | operator= (const CPath &cpath) |
Template copy assignment. | |
int | length () const |
Length of the path. | |
bool | empty () const |
Returns whether the path is empty. | |
void | clear () |
Resets the path to an empty path. | |
const Edge & | nth (int n) const |
Gives back the nth edge. | |
EdgeIt | nthIt (int n) const |
Initializes edge iterator to point to the nth edge. | |
const Edge & | front () const |
Gives back the first edge of the path. | |
void | addFront (const Edge &edge) |
Add a new edge before the current path. | |
void | eraseFront () |
Erase the first edge of the path. | |
const Edge & | back () const |
Gives back the last edge of the path. | |
void | addBack (const Edge &edge) |
Add a new edge behind the current path. | |
void | eraseBack () |
Erase the last edge of the path. |
Path | ( | ) | [inline] |
Default constructor
Path | ( | const CPath< _Graph > & | cpath | ) | [inline] |
This path can be initialized with any other path type. It just makes a copy of the given path.
Path& operator= | ( | const CPath< _Graph > & | cpath | ) | [inline] |
This path can be initialized with any other path type. It just makes a copy of the given path.
const Edge& nth | ( | int | n | ) | const [inline] |