Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::HyperGraph::NodeArray< T > Class Template Reference

Dynamic arrays indexed with nodes. More...

#include <ogdf/basic/HyperGraph.h>

+ Inheritance diagram for ogdf::HyperGraph::NodeArray< T >:

List of all members.

Public Member Functions

 NodeArray (HyperGraph *pGraph)
 NodeArray (HyperGraph *pGraph, const T &initValue)
- Public Member Functions inherited from ogdf::HyperGraph::GraphArray< T, NodeElement >
 GraphArray ()
 GraphArray (HyperGraph *pGraph)
 Creates a graph array attached to pGraph.
 GraphArray (HyperGraph *pGraph, const T &initialValue)
 Creates a graph array attached to pGraph with default value initialValue.
virtual ~GraphArray ()
 Destructor.
HyperGraphgraph () const
 Returns the graph the array is attached to.
const T & operator[] (const NodeElement *e) const
 Returns a const reference to the entry for an indexed element.
T & operator[] (const NodeElement *e)
 Returns a reference to the entry for an indexed element.

Additional Inherited Members

- Protected Member Functions inherited from ogdf::HyperGraph::GraphArray< T, NodeElement >
virtual void setSize (int numElements)
 Implementation of GraphArrayBase::setSize(int).
- Protected 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 (const T &x)
 Sets all elements to x.
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 ()
 Reinitializes the array to an array with empty index set.
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.
const T & operator[] (inti) const
 Returns a reference to the element at position i.
T & operator[] (inti)
 Returns a reference to the element at position i.
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.
- Protected Attributes inherited from ogdf::HyperGraph::GraphArray< T, NodeElement >
m_initialValue
 The initial value for unset entries.
HyperGraphm_pGraph
 The graph the array is attached to.

Detailed Description

template<typename T>
class ogdf::HyperGraph::NodeArray< T >

Dynamic arrays indexed with nodes.

Definition at line 383 of file HyperGraph.h.


Constructor & Destructor Documentation

template<typename T>
ogdf::HyperGraph::NodeArray< T >::NodeArray ( HyperGraph pGraph)
inline

Definition at line 386 of file HyperGraph.h.

template<typename T>
ogdf::HyperGraph::NodeArray< T >::NodeArray ( HyperGraph pGraph,
const T &  initValue 
)
inline

Definition at line 387 of file HyperGraph.h.


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