#include <itkEquivalencyTable.h>
Inheritance diagram for itk::EquivalencyTable:


EquivalencyTable is a hash table for recording equivalencies among unsigned long integer values. EquivalencyTable can store recursive relationships (8=7, 7=6, 6=5, ...) or be ``flattened'' to eliminate recursion. The table uses an efficient algorithm for eliminating redundancy and preventing circular dependencies.
Definition at line 47 of file itkEquivalencyTable.h.
Public Types | |
| typedef HashTableType::const_iterator | ConstIterator |
| typedef SmartPointer< const Self > | ConstPointer |
| typedef itk::hash_map< unsigned long, unsigned long, itk::hash< unsigned long > > | HashTableType |
| typedef HashTableType::iterator | Iterator |
| typedef SmartPointer< Self > | Pointer |
| typedef DataObject | Superclass |
| typedef HashTableType::value_type | ValueType |
Public Member Functions | |
| bool | Add (unsigned long a, unsigned long b) |
| bool | AddAndFlatten (unsigned long a, unsigned long b) |
| Iterator | Begin () |
| void | Clear () |
| bool | Empty () const |
| Iterator | End () |
| void | Erase (const unsigned long a) |
| void | Flatten () |
| virtual const char * | GetNameOfClass () const |
| Returns TRUE if the label is found in the table and FALSE is the label is *not found in the table *bool | IsEntry (const unsigned long a) const |
| Lookup an equivalency in the table If no entry is found in the the method returns its the value of the argument Does *not recursively descent through equivalencies *unsigned long | Lookup (const unsigned long a) const |
| unsigned long | RecursiveLookup (const unsigned a) const |
| HashTableType::size_type | Size () const |
Static Public Member Functions | |
| static Pointer | New () |
Public Attributes | |
| Standard smart pointer declarations *typedef EquivalencyTable | Self |
| Lookup an equivalency in the table If no entry is found in the * | table |
Protected Member Functions | |
| EquivalencyTable (const Self &) | |
| EquivalencyTable () | |
| void | operator= (const Self &) |
| void | PrintSelf (std::ostream &os, Indent indent) const |
| virtual | ~EquivalencyTable () |
Protected Attributes | |
| HashTableType | m_HashMap |
|
|
Definition at line 63 of file itkEquivalencyTable.h. |
|
|
Definition at line 54 of file itkEquivalencyTable.h. |
|
|
Define the container type for the table. Definition at line 56 of file itkEquivalencyTable.h. |
|
|
Definition at line 62 of file itkEquivalencyTable.h. |
|
|
Definition at line 53 of file itkEquivalencyTable.h. |
|
|
Definition at line 52 of file itkEquivalencyTable.h. |
|
|
Definition at line 64 of file itkEquivalencyTable.h. |
|
|
Definition at line 141 of file itkEquivalencyTable.h. |
|
|
Definition at line 142 of file itkEquivalencyTable.h. |
|
|
|
|
||||||||||||
|
Insert an equivalency into the table. A return value of TRUE indicates that the equivalency did not previously exist in the table and was successfully added. A FALSE return value indicates that the equivalency was not added to the table because a conflict with an existing entry occurred (most likely, the equivalency was already recorded directly or indirectly). |
|
||||||||||||
|
Insert an equivalency into the table and flatten that equivalency. A return value of TRUE indicates that the equivalency did not previously exist in the table and was successfully added. A FALSE return value indicates that the equivalency was not added to the table because a conflict with an existing entry occurred (most likely, the equivalency was already recorded directly or indirectly). |
|
|
Returns an iterator pointing to the first element of the (unordered) table. Definition at line 132 of file itkEquivalencyTable.h. |
|
|
Erases all the entries in the table. Definition at line 119 of file itkEquivalencyTable.h. |
|
|
Returns TRUE if the table is empty, FALSE if it is not empty. Definition at line 123 of file itkEquivalencyTable.h. |
|
|
Returns and iterator pointing to one position past the last element of the (unordered) table. Definition at line 136 of file itkEquivalencyTable.h. |
|
|
Erases the entry with key a. Definition at line 115 of file itkEquivalencyTable.h. |
|
|
``Flattens'' the equivalency table by eliminating all redundant and recursive equivalencies. I.e. the set { 2=1; 3=2; 4=3 } is converted to {4=1; 3=1; 2=1}. |
|
|
|
|
|
Definition at line 107 of file itkEquivalencyTable.h. |
|
|
Definition at line 91 of file itkEquivalencyTable.h. |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Lookup an equivalency in the table by recursing through all successive equivalencies. For example, if the follow entries exist in the table {8=7, 7=6, 6=5}, then RecursiveLookup(8) returns 5. |
|
|
Returns the number of entries in the table. Definition at line 127 of file itkEquivalencyTable.h. |
|
|
Definition at line 148 of file itkEquivalencyTable.h. |
|
|
Definition at line 51 of file itkEquivalencyTable.h. |
|
|
Definition at line 89 of file itkEquivalencyTable.h. |
1.4.2 written by Dimitri van Heesch,
© 1997-2000