Template Class DirectTable
Defined in File DirectTable.h
Nested Relationships
Nested Types
Class Documentation
-
template<class V>
class DirectTable the table with direct access of the keys in [ a , b ], H( k ) = k - a: every operation in O( 1 ) time, b - a + 1 places of memory
Public Types
-
using Key = long
the type of the keys
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using const_iterator = SlotIterator<DirectTable, Places>
-
using iterator = const_iterator
Public Functions
-
DirectTable(long a, long b)
the empty table of the keys in [ a , b ]
- Pre:
a <= b, and b - a + 1 places fit in a std::size_t (not the whole range of long)
-
void remove(long k)
removes k, if it is there
- Pre:
k in [ a , b ]
- Post:
lookup( k ) is nothing
-
std::size_t size(void) const
-
std::size_t capacity(void) const
the size m = b - a + 1 of the vector
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
struct Places
the places of the table, for SlotIterator
-
using Key = long