Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

Face sets. More...

#include <ogdf/basic/FaceSet.h>

Public Member Functions

 FaceSet (const CombinatorialEmbedding &E)
 Creates an empty node set associated with combinatorial embedding E. More...
 
 ~FaceSet ()
 
void clear ()
 Removes all faces from S. More...
 
const List< face > & faces () const
 Returns a reference to the list of faces contained in S. More...
 
void insert (face f)
 Inserts face f into S. More...
 
bool isMember (face f) const
 Returns true if face f is contained in S, false otherwise. More...
 
void remove (face f)
 Removes face f from S. More...
 
int size () const
 Returns the size of S. More...
 

Private Attributes

List< face > m_faces
 The list of faces contained in S. More...
 
FaceArray< ListIterator< face > > m_it
 m_it[f] contains the list iterator pointing to f if f is contained in S, an invalid list iterator otherwise. More...
 

Detailed Description

Face sets.

A face set maintains a subset S of the faces contained in an associated combinatorial embedding. This kind of face set provides efficient operations for testing membership, insertion and deletion of elements, and clearing the set.

In contrast to FaceSetPure, a FaceSet provides efficient access to the number of faces stored in the set.

See also

Definition at line 234 of file FaceSet.h.

Constructor & Destructor Documentation

◆ FaceSet()

ogdf::FaceSet::FaceSet ( const CombinatorialEmbedding &  E)
inlineexplicit

Creates an empty node set associated with combinatorial embedding E.

Definition at line 237 of file FaceSet.h.

◆ ~FaceSet()

ogdf::FaceSet::~FaceSet ( )
inline

Definition at line 240 of file FaceSet.h.

Member Function Documentation

◆ clear()

void ogdf::FaceSet::clear ( )
inline

Removes all faces from S.

After this operation, S is empty and still associated with the same combinatorial embedding. The runtime of this operations is O(k), where k is the number of faces in S before this operation.

Definition at line 277 of file FaceSet.h.

◆ faces()

const List<face>& ogdf::FaceSet::faces ( ) const
inline

Returns a reference to the list of faces contained in S.

This list can be used for iterating over all faces in S.

Definition at line 308 of file FaceSet.h.

◆ insert()

void ogdf::FaceSet::insert ( face  f)
inline

Inserts face f into S.

This operation has constant runtime.

Precondition
f is a face in the associated combinatorial embedding.

Definition at line 248 of file FaceSet.h.

◆ isMember()

bool ogdf::FaceSet::isMember ( face  f) const
inline

Returns true if face f is contained in S, false otherwise.

This operation has constant runtime.

Precondition
f is a face in the associated combinatorial embedding.

Definition at line 291 of file FaceSet.h.

◆ remove()

void ogdf::FaceSet::remove ( face  f)
inline

Removes face f from S.

This operation has constant runtime.

Precondition
f is a face in the associated combinatorial embedding.

Definition at line 261 of file FaceSet.h.

◆ size()

int ogdf::FaceSet::size ( ) const
inline

Returns the size of S.

This operation has constant runtime.

Definition at line 300 of file FaceSet.h.

Member Data Documentation

◆ m_faces

List<face> ogdf::FaceSet::m_faces
private

The list of faces contained in S.

Definition at line 318 of file FaceSet.h.

◆ m_it

FaceArray<ListIterator<face> > ogdf::FaceSet::m_it
private

m_it[f] contains the list iterator pointing to f if f is contained in S, an invalid list iterator otherwise.

Definition at line 315 of file FaceSet.h.


The documentation for this class was generated from the following file: