Go to the documentation of this file.
58 template<
class DataType,
class ValueType =
long long unsigned int>
62 BitTrie(
bool bitReadLeftToRight);
80 unsigned size()
const;
86 void dump(std::ostream& out)
const;
BitVector longestCompletePattern(const BitVector &bits) const
bool bitReadLeftToRight_
The configuration how bits are read and stored into the trie. If true, the rightmost (LSB) bit is pla...
BitVector stripBit(BitVector bitVector) const
static BitVector uniquePrefixImpl(const BitTrie &bitTrie)
static bool isRootNode(const BitTrie &node)
DataType & at(BitVector bits)
bool insert(BitVector bits)
static BitVector patternAtNode(const BitTrie &node)
BitVector uniqueUnusedPrefix() const
static BitVector uniqueUnusedPrefixImpl(const BitTrie &bitTrie)
bool nextBit(const BitVector &bitVector) const
unsigned int Frequency
The type for frequencies of the patterns.
BitTrie * node_[2]
The bits are encoded as indexes where 0: zero node, 1: one node. If node at index is not nullptr,...
static bool nodeBitValue(const BitTrie &node)
Frequency frequency_
The frequency. The current occurrence of the bit pattern so far.
static ValueType & value(BitVector &bitVector)
unsigned WidthType
The type for width of bit vector.
DataType * data_
The data at this node.
bool check(const BitVector &exactbits) const
static unsigned depth(const BitTrie &node)
DataType
Data types of hardware ports.
BitTrie * parent_
Parent of the (sub)trie. If the pointer is null, the node is root of the trie.
unsigned frequency(const BitVector &prefixBits) const
bool erase(BitVector bits)
void dump(std::ostream &out) const
static WidthType & width(BitVector &bitVector)
static bool nodeTerminatesPattern(const BitTrie &node)
BitTrie * findNode(const BitVector &bits)