#include <HashArray2D.h>

Public Types | |
| typedef HashConstIterator2D < I1_, I2_, E_, Hash1_, Hash2_ > | const_terator |
| The type of const-iterators for 2D-hash arrays. | |
Public Member Functions | |
| HashArray2D () | |
| Creates a 2D-hash array. | |
| HashArray2D (const E_ &defaultValue, const Hash1_ &hashFunc1=Hash1_(), const Hash2_ &hashFunc2=Hash2_()) | |
| Creates a 2D-hash array and sets the default value to x. | |
| HashArray2D (const HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ > &A) | |
| Copy constructor. | |
| HashArray2D & | operator= (const HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ > &A) |
| Assignment operator. | |
| ~HashArray2D () | |
| const E_ & | operator() (const I1_ &i, const I2_ &j) const |
| Returns a const reference to entry (i,j). | |
| E_ & | operator() (const I1_ &i, const I2_ &j) |
| Returns a reference to entry (i,j). | |
| bool | isDefined (const I1_ &i, const I2_ &j) const |
| Returns true iff entry (i,j) is defined. | |
| void | undefine (const I1_ &i, const I2_ &j) |
| Undefines the entry at index (i,j). | |
| HashConstIterator2D< I1_, I2_, E_, Hash1_, Hash2_ > | begin () const |
| Returns an iterator pointing to the first element. | |
| int | size () const |
| Returns the number of defined elements in the table. | |
| int | empty () const |
| Returns if any indices are defined. | |
| void | clear () |
| Undefines all indices. | |
Private Attributes | |
| E_ | m_defaultValue |
| The default value of the array. | |
A 2D-hash array can be used like a usual 2-dimensional array but with a general index type. The class uses five template parameters:
Definition at line 86 of file HashArray2D.h.
| typedef HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::const_terator |
The type of const-iterators for 2D-hash arrays.
Reimplemented from ogdf::Hashing< K, I, H >.
Definition at line 91 of file HashArray2D.h.
| ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::HashArray2D | ( | ) | [inline] |
| ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::HashArray2D | ( | const E_ & | defaultValue, | |
| const Hash1_ & | hashFunc1 = Hash1_(), |
|||
| const Hash2_ & | hashFunc2 = Hash2_() | |||
| ) | [inline] |
Creates a 2D-hash array and sets the default value to x.
Definition at line 97 of file HashArray2D.h.
| ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::HashArray2D | ( | const HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ > & | A | ) | [inline] |
| ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::~HashArray2D | ( | ) | [inline] |
Definition at line 117 of file HashArray2D.h.
| HashArray2D& ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::operator= | ( | const HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ > & | A | ) | [inline] |
| const E_& ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::operator() | ( | const I1_ & | i, | |
| const I2_ & | j | |||
| ) | const [inline] |
| E_& ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::operator() | ( | const I1_ & | i, | |
| const I2_ & | j | |||
| ) | [inline] |
| bool ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::isDefined | ( | const I1_ & | i, | |
| const I2_ & | j | |||
| ) | const [inline] |
| void ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::undefine | ( | const I1_ & | i, | |
| const I2_ & | j | |||
| ) | [inline] |
| HashConstIterator2D<I1_,I2_,E_,Hash1_,Hash2_> ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::begin | ( | ) | const [inline] |
Returns an iterator pointing to the first element.
Reimplemented from ogdf::Hashing< K, I, H >.
Definition at line 148 of file HashArray2D.h.
| int ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::size | ( | ) | const [inline] |
Returns the number of defined elements in the table.
Reimplemented from ogdf::Hashing< K, I, H >.
Definition at line 154 of file HashArray2D.h.
| int ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::empty | ( | ) | const [inline] |
Returns if any indices are defined.
Reimplemented from ogdf::Hashing< K, I, H >.
Definition at line 159 of file HashArray2D.h.
| void ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::clear | ( | ) | [inline] |
Undefines all indices.
Reimplemented from ogdf::Hashing< K, I, H >.
Definition at line 165 of file HashArray2D.h.
E_ ogdf::HashArray2D< I1_, I2_, E_, Hash1_, Hash2_ >::m_defaultValue [private] |