inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
TrieNode Class Reference

Represents a single node in the Trie. More...

#include <trie.hpp>

Public Member Functions

 TrieNode ()
 

Public Attributes

std::unordered_map< char, TrieNode * > children
 
std::vector< int > indices
 
bool isEndOfWord
 

Detailed Description

Represents a single node in the Trie.

A TrieNode stores children nodes for each possible character, a list of indices representing the positions of words in the original dataset, and a flag indicating if the node is the end of a valid word.

Note
The children unordered_map stores the next character in the string as a key and the corresponding child node as the value.

Constructor & Destructor Documentation

◆ TrieNode()

TrieNode::TrieNode ( )
inline

Member Data Documentation

◆ children

std::unordered_map<char, TrieNode*> TrieNode::children

◆ indices

std::vector<int> TrieNode::indices

◆ isEndOfWord

bool TrieNode::isEndOfWord

The documentation for this class was generated from the following file: