Macaulay2 Engine
Loading...
Searching...
No Matches

◆ printHashTableState()

template<typename T>
void printHashTableState ( const T & cont)

Definition at line 90 of file monomial-collection.hpp.

91{
92 // basic layout data
93 std::cout << "size: " << cont.size() << std::endl;
94 std::cout << "buckets: " << cont.bucket_count() << std::endl;
95 std::cout << "load factor: " << cont.load_factor() << std::endl;
96 std::cout << "max load factor: " << cont.max_load_factor() << std::endl;
97
98 // iterator category
99 if (typeid(typename std::iterator_traits<typename T::iterator>::iterator_category)
100 == typeid(std::bidirectional_iterator_tag))
101 {
102 std::cout << "chaining style: doubly-linked" << std::endl;
103 }
104 else
105 {
106 std::cout << "chaining style: singly-linked" << std::endl;
107 }
108
109 // elements per bucket
110 std::cout << "data: " << std::endl;
111 for (auto idx=0ul; idx != cont.bucket_count(); ++idx)
112 {
113 std::cout << " b[" << std::setw(2) << idx << "]: ";
114 for (auto pos = cont.begin(idx); pos != cont.end(idx); ++pos)
115 {
116 std::cout << *pos << " ";
117 }
118 std::cout << std::endl;
119 }
120}
int size
Definition table.c:30

References T::size, and T.