Bitset based node representing suffixes/letters.
More...
#include <node.hpp>
|
using | PrecedingType = std::uint32_t |
|
|
void | add_char (char c) |
|
void | set_preceding (std::size_t preceding) |
|
void | set_is_end_of_word (bool is_end_of_word) |
|
std::size_t | bits_on_before (std::size_t i) const |
|
bool | test (std::size_t i) const |
| O(1) test if a suffix is present. More...
|
|
bool | any () const |
|
bool | is_end_of_word () const |
|
PrecedingType | preceding () const |
|
|
std::bitset< 26 > | bits_ |
|
PrecedingType | preceding_ |
|
bool | is_end_of_word_ |
|
|
std::ostream & | operator<< (std::ostream &os, const Node &node) |
|
Bitset based node representing suffixes/letters.
◆ any()
bool compact_trie::Node::any |
( |
| ) |
const |
- Returns
- True if any suffixes are present/child nodes of this one exist.
◆ bits_on_before()
std::size_t compact_trie::Node::bits_on_before |
( |
std::size_t |
i | ) |
const |
- Returns
- Number of on bits/suffixes before the bit at index
i
. Used for calculating the offset into the next row for child nodes.
- Parameters
-
◆ preceding()
Node::PrecedingType compact_trie::Node::preceding |
( |
| ) |
const |
- Returns
- The number of suffixes of words in the row prior to this
Node
, used for calculating the offset into the next row for child nodes.
◆ test()
bool compact_trie::Node::test |
( |
std::size_t |
i | ) |
const |
O(1) test if a suffix is present.
- Parameters
-
[in] | i | Suffix/letter to test, 0 == 'a', 1 == 'b'... |
The documentation for this class was generated from the following files:
- compact_trie/include/wordsearch_solver/compact_trie/node.hpp
- compact_trie/src/node.cpp