LLVM 20.0.0git
|
A node in a suffix tree which represents a substring or suffix. More...
#include "llvm/Support/SuffixTreeNode.h"
Public Types | |
enum class | NodeKind { ST_Leaf , ST_Internal } |
Public Member Functions | |
NodeKind | getKind () const |
unsigned | getStartIdx () const |
virtual unsigned | getEndIdx () const =0 |
unsigned | getLeftLeafIdx () const |
unsigned | getRightLeafIdx () const |
void | setLeftLeafIdx (unsigned Idx) |
Set the index of the left most leaf node of this node to Idx . | |
void | setRightLeafIdx (unsigned Idx) |
Set the index of the right most leaf node of this node to Idx . | |
void | incrementStartIdx (unsigned Inc) |
Advance this node's StartIdx by Inc . | |
void | setConcatLen (unsigned Len) |
Set the length of the string from the root to this node to Len . | |
unsigned | getConcatLen () const |
SuffixTreeNode (NodeKind Kind, unsigned StartIdx) | |
virtual | ~SuffixTreeNode ()=default |
Static Public Attributes | |
static const unsigned | EmptyIdx = -1 |
Represents an undefined index in the suffix tree. | |
A node in a suffix tree which represents a substring or suffix.
Definition at line 33 of file SuffixTreeNode.h.
|
strong |
Enumerator | |
---|---|
ST_Leaf | |
ST_Internal |
Definition at line 37 of file SuffixTreeNode.h.
Definition at line 91 of file SuffixTreeNode.h.
|
virtualdefault |
unsigned SuffixTreeNode::getConcatLen | ( | ) | const |
Definition at line 21 of file SuffixTreeNode.cpp.
|
pure virtual |
Implemented in llvm::SuffixTreeInternalNode, and llvm::SuffixTreeLeafNode.
|
inline |
Definition at line 62 of file SuffixTreeNode.h.
unsigned SuffixTreeNode::getLeftLeafIdx | ( | ) | const |
Definition at line 41 of file SuffixTreeNode.cpp.
unsigned SuffixTreeNode::getRightLeafIdx | ( | ) | const |
Definition at line 42 of file SuffixTreeNode.cpp.
unsigned SuffixTreeNode::getStartIdx | ( | ) | const |
Definition at line 18 of file SuffixTreeNode.cpp.
Referenced by llvm::SuffixTreeInternalNode::isRoot().
void SuffixTreeNode::incrementStartIdx | ( | unsigned | Inc | ) |
Advance this node's StartIdx by Inc
.
Definition at line 19 of file SuffixTreeNode.cpp.
void SuffixTreeNode::setConcatLen | ( | unsigned | Len | ) |
Set the length of the string from the root to this node to Len
.
Definition at line 20 of file SuffixTreeNode.cpp.
void SuffixTreeNode::setLeftLeafIdx | ( | unsigned | Idx | ) |
Set the index of the left most leaf node of this node to Idx
.
Definition at line 43 of file SuffixTreeNode.cpp.
References Idx.
void SuffixTreeNode::setRightLeafIdx | ( | unsigned | Idx | ) |
Set the index of the right most leaf node of this node to Idx
.
Definition at line 44 of file SuffixTreeNode.cpp.
References Idx.
Represents an undefined index in the suffix tree.
Definition at line 36 of file SuffixTreeNode.h.
Referenced by llvm::SuffixTreeInternalNode::isRoot().