Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::FaceSetSimple Class Reference

Simple face sets. More...

#include <ogdf/basic/FaceSet.h>

Public Member Functions

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

Private Attributes

SListPure< face > m_faces
 The list of faces contained in S. More...
 
FaceArray< bool > m_isContained
 m_isContained[f] is true iff f is contained in S. More...
 

Detailed Description

Simple face sets.

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

See also

Definition at line 56 of file FaceSet.h.

Constructor & Destructor Documentation

◆ FaceSetSimple()

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

Creates an empty face set associated with combinatorial embedding E.

Definition at line 59 of file FaceSet.h.

◆ ~FaceSetSimple()

ogdf::FaceSetSimple::~FaceSetSimple ( )
inline

Definition at line 62 of file FaceSet.h.

Member Function Documentation

◆ clear()

void ogdf::FaceSetSimple::clear ( )
inline

Removes all faces from S.

After this operation, the 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 86 of file FaceSet.h.

◆ faces()

const SListPure<face>& ogdf::FaceSetSimple::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 109 of file FaceSet.h.

◆ insert()

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

Inserts face f into set S.

This operation has constant runtime.

Precondition
f is a face in the associated combinatorial embedding.

Definition at line 70 of file FaceSet.h.

◆ isMember()

bool ogdf::FaceSetSimple::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 100 of file FaceSet.h.

Member Data Documentation

◆ m_faces

SListPure<face> ogdf::FaceSetSimple::m_faces
private

The list of faces contained in S.

Definition at line 118 of file FaceSet.h.

◆ m_isContained

FaceArray<bool> ogdf::FaceSetSimple::m_isContained
private

m_isContained[f] is true iff f is contained in S.

Definition at line 115 of file FaceSet.h.


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