Dynamic arrays indexed with edges. More...
#include <ogdf/basic/EdgeArray.h>
Public Member Functions | |
| EdgeArray () | |
| Constructs an empty edge array associated with no graph. | |
| EdgeArray (const Graph &G) | |
| Constructs an edge array associated with G. | |
| EdgeArray (const Graph &G, const T &x) | |
| Constructs an edge array associated with G. | |
| EdgeArray (const EdgeArray< T > &A) | |
| Constructs an edge array that is a copy of A. | |
| bool | valid () const |
| Returns true iff the array is associated with a graph. | |
| const Graph * | graphOf () const |
| Returns a pointer to the associated graph. | |
| const T & | operator[] (edge e) const |
| Returns a reference to the element with index e. | |
| T & | operator[] (edge e) |
| Returns a reference to the element with index e. | |
| const T & | operator[] (adjEntry adj) const |
| Returns a reference to the element with index edge of adj. | |
| T & | operator[] (adjEntry adj) |
| Returns a reference to the element with index edge of adj. | |
| 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. | |
| EdgeArray< T > & | operator= (const EdgeArray< T > &a) |
| Assignment operator. | |
| void | init () |
| Reinitializes the array. Associates the array with no graph. | |
| void | init (const Graph &G) |
| Reinitializes the array. Associates the array with G. | |
| void | init (const Graph &G, const T &x) |
| Reinitializes the array. Associates the array with G. | |
| void | fill (const T &x) |
| Sets all array elements to x. | |
| void * | operator new (size_t nBytes) |
| void * | operator new (size_t, void *p) |
| void | operator delete (void *p, size_t nBytes) |
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. | |
| virtual void | disconnect () |
| Virtual function called when array is disconnected from the graph. | |
Private Attributes | |
| T | m_x |
| The default value for array elements. | |
Dynamic arrays indexed with edges.
Edge arrays adjust their table size automatically when the graph grows.
Definition at line 114 of file EdgeArray.h.
| ogdf::EdgeArray< T >::EdgeArray | ( | ) | [inline] |
Constructs an empty edge array associated with no graph.
Definition at line 119 of file EdgeArray.h.
| ogdf::EdgeArray< T >::EdgeArray | ( | const Graph & | G | ) | [inline] |
Constructs an edge array associated with G.
Definition at line 121 of file EdgeArray.h.
| ogdf::EdgeArray< T >::EdgeArray | ( | const Graph & | G, | |
| const T & | x | |||
| ) | [inline] |
Constructs an edge array associated with G.
| G | is the associated graph. | |
| x | is the default value for all array elements. |
Definition at line 127 of file EdgeArray.h.
| ogdf::EdgeArray< T >::EdgeArray | ( | const EdgeArray< T > & | A | ) | [inline] |
Constructs an edge array that is a copy of A.
Associates the array with the same graph as A and copies all elements.
Definition at line 133 of file EdgeArray.h.
| virtual void ogdf::EdgeArray< T >::disconnect | ( | ) | [inline, private, virtual] |
Virtual function called when array is disconnected from the graph.
Implements ogdf::EdgeArrayBase.
Definition at line 228 of file EdgeArray.h.
| virtual void ogdf::EdgeArray< T >::enlargeTable | ( | int | newTableSize | ) | [inline, private, virtual] |
Virtual function called when table size has to be enlarged.
Implements ogdf::EdgeArrayBase.
Definition at line 220 of file EdgeArray.h.
| void ogdf::EdgeArray< T >::fill | ( | const T & | x | ) | [inline] |
Sets all array elements to x.
Definition at line 213 of file EdgeArray.h.
| const Graph* ogdf::EdgeArray< T >::graphOf | ( | ) | const [inline] |
Returns a pointer to the associated graph.
Definition at line 139 of file EdgeArray.h.
| void ogdf::EdgeArray< T >::init | ( | ) | [inline] |
Reinitializes the array. Associates the array with no graph.
Definition at line 194 of file EdgeArray.h.
| void ogdf::EdgeArray< T >::init | ( | const Graph & | G | ) | [inline] |
Reinitializes the array. Associates the array with G.
Definition at line 199 of file EdgeArray.h.
| void ogdf::EdgeArray< T >::init | ( | const Graph & | G, | |
| const T & | x | |||
| ) | [inline] |
Reinitializes the array. Associates the array with G.
| G | is the associated graph. | |
| x | is the default value. |
Definition at line 208 of file EdgeArray.h.
| void ogdf::EdgeArray< T >::operator delete | ( | void * | p, | |
| size_t | nBytes | |||
| ) | [inline] |
Definition at line 233 of file EdgeArray.h.
| void* ogdf::EdgeArray< T >::operator new | ( | size_t | nBytes | ) | [inline] |
Definition at line 233 of file EdgeArray.h.
| void* ogdf::EdgeArray< T >::operator new | ( | size_t | , | |
| void * | p | |||
| ) | [inline] |
Definition at line 233 of file EdgeArray.h.
| EdgeArray<T>& ogdf::EdgeArray< T >::operator= | ( | const EdgeArray< T > & | a | ) | [inline] |
Assignment operator.
Definition at line 186 of file EdgeArray.h.
| T& ogdf::EdgeArray< T >::operator[] | ( | adjEntry | adj | ) | [inline] |
Returns a reference to the element with index edge of adj.
Definition at line 162 of file EdgeArray.h.
| const T& ogdf::EdgeArray< T >::operator[] | ( | edge | e | ) | const [inline] |
Returns a reference to the element with index e.
Definition at line 144 of file EdgeArray.h.
| T& ogdf::EdgeArray< T >::operator[] | ( | int | index | ) | [inline] |
Returns a reference to the element with index index.
Definition at line 181 of file EdgeArray.h.
| T& ogdf::EdgeArray< T >::operator[] | ( | edge | e | ) | [inline] |
Returns a reference to the element with index e.
Definition at line 150 of file EdgeArray.h.
| const T& ogdf::EdgeArray< T >::operator[] | ( | adjEntry | adj | ) | const [inline] |
Returns a reference to the element with index edge of adj.
Definition at line 156 of file EdgeArray.h.
| const T& ogdf::EdgeArray< T >::operator[] | ( | int | index | ) | const [inline] |
Returns a reference to the element with index index.
Definition at line 172 of file EdgeArray.h.
| virtual void ogdf::EdgeArray< T >::reinit | ( | int | initTableSize | ) | [inline, private, virtual] |
Virtual function called when table has to be reinitialized.
Implements ogdf::EdgeArrayBase.
Definition at line 224 of file EdgeArray.h.
| bool ogdf::EdgeArray< T >::valid | ( | ) | const [inline] |
Returns true iff the array is associated with a graph.
Definition at line 136 of file EdgeArray.h.
T ogdf::EdgeArray< T >::m_x [private] |
The default value for array elements.
Definition at line 115 of file EdgeArray.h.