18 #ifndef itkEquivalencyTable_h
19 #define itkEquivalencyTable_h
23 #include <unordered_map>
59 using HashTableType = std::unordered_map<unsigned long, unsigned long, std::hash<unsigned long>>;
78 Add(
unsigned long a,
unsigned long b);
88 AddAndFlatten(
unsigned long a,
unsigned long b);
96 auto result = m_HashMap.find(a);
98 if (result == m_HashMap.end())
104 return result->second;
113 RecursiveLookup(
const unsigned long a)
const;
120 if (m_HashMap.find(a) == m_HashMap.end())
149 return m_HashMap.empty();
153 HashTableType::size_type
156 return m_HashMap.size();
164 return m_HashMap.begin();
172 return m_HashMap.end();
182 PrintSelf(std::ostream & os,
Indent indent)
const override;