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 _iterator.h >

Creation

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

FaceCirc fc(leda_graph G) introduces a variable fc of this class associated with G. The edge is initialized to nil.

FaceCirc fc(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(leda_graph G) associates fc with G.

void fc.init(leda_graph G, 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 = fc2 assigns fc2 to fc. This method returns a reference to fc.

bool fc == 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.

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
LEDA research project
2000-02-09