Dynamic arrays indexed with faces of a combinatorial embedding. More...
#include <ogdf/basic/FaceArray.h>
Inheritance diagram for ogdf::FaceArray< T >:Public Member Functions | |
| FaceArray () | |
| Constructs an empty face array associated with no combinatorial embedding. | |
| FaceArray (const ConstCombinatorialEmbedding &E) | |
| Constructs a face array associated with E. | |
| FaceArray (const ConstCombinatorialEmbedding &E, const T &x) | |
| Constructs a face array associated with E. | |
| FaceArray (const FaceArray< T > &A) | |
| Constructs an face array that is a copy of A. | |
| const ConstCombinatorialEmbedding * | embeddingOf () const |
| Returns a pointer to the associated combinatorial embedding. | |
| void | fill (const T &x) |
| Sets all array elements to x. | |
| void | init () |
| Reinitializes the array. Associates the array with no combinatorial embedding. | |
| void | init (const ConstCombinatorialEmbedding &E) |
| Reinitializes the array. Associates the array with E. | |
| void | init (const ConstCombinatorialEmbedding &E, const T &x) |
| Reinitializes the array. Associates the array with E. | |
| FaceArray< T > & | operator= (const FaceArray< T > &a) |
| Assignment operator. | |
| const T & | operator[] (face f) const |
| Returns a reference to the element with index f. | |
| T & | operator[] (face f) |
| Returns a reference to the element with index f. | |
| const T & | operator[] (int index) const |
| Returns a reference to the element with index index. | |
| T & | operator[] (int index) |
| Returns a reference to the element with index index. | |
| bool | valid () const |
| Returns true iff the array is associated with a combinatorial embedding. | |
Private Member Functions | |
| virtual void | enlargeTable (int newTableSize) |
| Virtual function called when table size has to be enlarged. | |
| virtual void | reinit (int initTableSize) |
| Virtual function called when table has to be reinitialized. | |
Private Member Functions inherited from ogdf::Array< T > | |
| Array () | |
| Creates an array with empty index set. | |
| Array (ints) | |
| Creates an array with index set [0..s-1]. | |
| Array (inta, intb) | |
| Creates an array with index set [a..b]. | |
| Array (inta, intb, const T &x) | |
| Creates an array with index set [a..b] and initializes each element with x. | |
| Array (const Array< T > &A) | |
| Creates an array that is a copy of A. | |
| ~Array () | |
| T * | begin () |
| Returns a pointer to the first element. | |
| const T * | begin () const |
| Returns a pointer to the first element. | |
| int | binarySearch (const T &x) const |
| Performs a binary search for element x. | |
| int | binarySearch (const T &e, const COMPARER &comp) const |
| Performs a binary search for element x with comparer comp. | |
| T * | end () |
| Returns a pointer to one past the last element. | |
| const T * | end () const |
| Returns a pointer to one past the last element. | |
| void | fill (inti, intj, const T &x) |
| Sets elements in the intervall [i..j] to x. | |
| void | grow (intadd, const T &x) |
| Enlarges the array by add elements and sets new elements to x. | |
| void | grow (intadd) |
| Enlarges the array by add elements. | |
| int | high () const |
| Returns the maximal array index. | |
| void | init (ints) |
| Reinitializes the array to an array with index set [0..s-1]. | |
| void | init (inta, intb) |
| Reinitializes the array to an array with index set [a..b]. | |
| void | init (inta, intb, const T &x) |
| Reinitializes the array to an array with index set [a..b] and sets all entries to x. | |
| int | linearSearch (const T &e) const |
| Performs a linear search for element x. | |
| int | linearSearch (const T &e, const COMPARER &comp) const |
| Performs a linear search for element x with comparer comp. | |
| int | low () const |
| Returns the minimal array index. | |
| Array< T, int > & | operator= (const Array< T, int > &array2) |
| Assignment operator. | |
| void | permute (intl, intr) |
| Randomly permutes the subarray with index set [l..r]. | |
| void | permute () |
| Randomly permutes the array. | |
| void | quicksort () |
| Sorts array using Quicksort. | |
| void | quicksort (intl, intr) |
| Sorts subarray with index set [l..r] using Quicksort. | |
| void | quicksort (const COMPARER &comp) |
| Sorts array using Quicksort and a user-defined comparer comp. | |
| void | quicksort (intl, intr, const COMPARER &comp) |
| Sorts the subarray with index set [l..r] using Quicksort and a user-defined comparer comp. | |
| T * | rbegin () |
| Returns a pointer to the last element. | |
| const T * | rbegin () const |
| Returns a pointer to the last element. | |
| T * | rend () |
| Returns a pointer to one before the first element. | |
| const T * | rend () const |
| Returns a pointer to one before the first element. | |
| int | size () const |
| Returns the size (number of elements) of the array. | |
| void | swap (inti, intj) |
| Swaps the elements at position i and j. | |
Private Attributes | |
| T | m_x |
| The default value for array elements. | |
Additional Inherited Members | |
Protected Member Functions inherited from ogdf::FaceArrayBase | |
| FaceArrayBase () | |
| Initializes a face array not associated with a combinatorial embedding. | |
| FaceArrayBase (const ConstCombinatorialEmbedding *pE) | |
| Initializes a face array associated with pE. | |
| virtual | ~FaceArrayBase () |
| void | reregister (const ConstCombinatorialEmbedding *pE) |
| Associates the array with a new combinatorial embedding. | |
Protected Attributes inherited from ogdf::FaceArrayBase | |
| const ConstCombinatorialEmbedding * | m_pEmbedding |
| The associated combinatorial embedding. | |
Private Types inherited from ogdf::Array< T > | |
| enum | |
Dynamic arrays indexed with faces of a combinatorial embedding.
Face arrays represent a mapping from faces to data of type T. They adjust their table size automatically when the number of faces in the corresponding combinatorial embedding increases.
| T | is the element type. |
Definition at line 109 of file FaceArray.h.
|
inline |
Constructs an empty face array associated with no combinatorial embedding.
Definition at line 114 of file FaceArray.h.
|
inline |
Constructs a face array associated with E.
Definition at line 116 of file FaceArray.h.
|
inline |
Constructs a face array associated with E.
| E | is the associated combinatorial embedding. |
| x | is the default value for all array elements. |
Definition at line 123 of file FaceArray.h.
|
inline |
Constructs an face array that is a copy of A.
Associates the array with the same combinatorial embedding as A and copies all elements.
Definition at line 130 of file FaceArray.h.
|
inline |
Returns a pointer to the associated combinatorial embedding.
Definition at line 136 of file FaceArray.h.
|
inlineprivatevirtual |
Virtual function called when table size has to be enlarged.
Implements ogdf::FaceArrayBase.
Definition at line 205 of file FaceArray.h.
|
inline |
Sets all array elements to x.
Reimplemented from ogdf::Array< T >.
Definition at line 198 of file FaceArray.h.
|
inline |
Reinitializes the array. Associates the array with no combinatorial embedding.
Reimplemented from ogdf::Array< T >.
Definition at line 179 of file FaceArray.h.
|
inline |
Reinitializes the array. Associates the array with E.
Definition at line 184 of file FaceArray.h.
|
inline |
Reinitializes the array. Associates the array with E.
| E | is the associated combinatorial embedding. |
| x | is the default value. |
Definition at line 193 of file FaceArray.h.
|
inline |
Assignment operator.
Definition at line 171 of file FaceArray.h.
|
inline |
Returns a reference to the element with index f.
Definition at line 141 of file FaceArray.h.
|
inline |
Returns a reference to the element with index f.
Definition at line 147 of file FaceArray.h.
|
inline |
Returns a reference to the element with index index.
Reimplemented from ogdf::Array< T >.
Definition at line 157 of file FaceArray.h.
|
inline |
Returns a reference to the element with index index.
Reimplemented from ogdf::Array< T >.
Definition at line 166 of file FaceArray.h.
|
inlineprivatevirtual |
Virtual function called when table has to be reinitialized.
Implements ogdf::FaceArrayBase.
Definition at line 209 of file FaceArray.h.
|
inline |
Returns true iff the array is associated with a combinatorial embedding.
Definition at line 133 of file FaceArray.h.
|
private |
The default value for array elements.
Definition at line 110 of file FaceArray.h.