next up previous contents index
Next: Filter Node Iterator ( Up: Graphs and Iterators Previous: Adjacency Iterators ( AdjIt   Contents   Index


Face Circulators ( FaceCirc )

Definition

a variable fc of class FaceCirc is a face circulator that circulates through the set of edges of a face as long as the graph is embedded combinatorically correct, i.e. the graph has to be bidirected and a map (see graph).

#include < LEDA/graph/graph_iterator.h >

Creation

FaceCirc fc introduces a variable fc of this class associated with no graph.

FaceCirc fc(const leda::graph& G) introduces a variable fc of this class associated with G. The edge is initialized to nil.

FaceCirc fc(const leda::graph& G, leda::edge e)
    introduces a variable fc of this class marked with e and associated with G.

Precondition: e is an edge of G.

Operations

void fc.init(const leda::graph& G)
    associates fc with G.

void fc.init(const leda::graph& G, const leda::edge& e)
    associates fc with G and marks it with e.

Precondition: e is an edge of G.

void fc.update(leda::edge e) fc marks e afterwards.

void fc.make_invalid() makes fc invalid, i.e. fc.valid() will be false afterwards and fc marks no edge.

FaceCirc& fc = const FaceCirc& fc2 assigns fc2 to fc. This method returns a reference to fc.

bool fc == const FaceCirc& fc2 returns true if and only if fc and fc2 are equal, i.e. if the marked edges are equal.

bool fc.has_edge() returns true if and only if fc marks an edge.

bool fc.eol() returns !fc.valid().

bool fc.valid() returns true if and only if the circulator is marked with an edge.

leda::edge fc.get_edge() returns the marked edge or nil if fc.valid() returns false.

const leda::graph& fc.get_graph() returns the associated graph.

FaceCirc& ++fc redirects the circulator to the cyclic adjacency predecessor of reversal(e), where e is the marked edge. This method returns a reference to fc.

Precondition: fc.valid() returns true.

FaceCirc& -fc redirects the circulator to the cyclic adjacency successor of e, where e is the marked edge. This method returns a reference to fc.

Precondition: fc.valid() returns true.

Implementation

Creation of a circulator and all methods take constant time.


next up previous contents index
Next: Filter Node Iterator ( Up: Graphs and Iterators Previous: Adjacency Iterators ( AdjIt   Contents   Index