18 #ifndef __itkEquivalencyTable_h
19 #define __itkEquivalencyTable_h
23 #include "itksys/hash_map.hxx"
57 typedef itksys::hash_map<
unsigned long,
unsigned long,
75 bool Add(
unsigned long a,
unsigned long b);
84 bool AddAndFlatten(
unsigned long a,
unsigned long b);
89 unsigned long Lookup(
const unsigned long a)
const
93 if ( result == m_HashMap.end() ) {
return a; }
94 else {
return ( *result ).second; }
101 unsigned long RecursiveLookup(
const unsigned long a)
const;
105 bool IsEntry(
const unsigned long a)
const
107 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
108 else {
return true; }
113 void Erase(
const unsigned long a)
114 { m_HashMap.erase(a); }
118 { m_HashMap.clear(); }
122 {
return m_HashMap.empty(); }
125 HashTableType::size_type
Size()
const
126 {
return m_HashMap.size(); }
142 void operator=(
const Self &);
145 void PrintSelf(std::ostream & os,
Indent indent)
const;