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;
107 if ( m_HashMap.find(a) == m_HashMap.end() ) {
return false; }
108 else {
return true; }
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(); }
143 void operator=(const Self &) ITK_DELETE_FUNCTION;
145 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
unsigned long Lookup(const unsigned long a) const
HashTableType::const_iterator ConstIterator
void Erase(const unsigned long a)
HashTableType::value_type ValueType
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
itksys::hash_map< unsigned long, unsigned long, itksys::hash< unsigned long > > HashTableType
HashTableType::size_type Size() const
Hash table to manage integral label equivalencies.
HashTableType::iterator Iterator
bool IsEntry(const unsigned long a) const
Control indentation during Print() invocation.
Base class for all data objects in ITK.
virtual ~EquivalencyTable()