|
LLVM 22.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 |
| LLVM_ABI unsigned | getStartIdx () const |
| virtual unsigned | getEndIdx () const =0 |
| LLVM_ABI unsigned | getLeftLeafIdx () const |
| LLVM_ABI unsigned | getRightLeafIdx () const |
| LLVM_ABI void | setLeftLeafIdx (unsigned Idx) |
Set the index of the left most leaf node of this node to Idx. | |
| LLVM_ABI void | setRightLeafIdx (unsigned Idx) |
Set the index of the right most leaf node of this node to Idx. | |
| LLVM_ABI void | incrementStartIdx (unsigned Inc) |
Advance this node's StartIdx by Inc. | |
| LLVM_ABI void | setConcatLen (unsigned Len) |
Set the length of the string from the root to this node to Len. | |
| LLVM_ABI 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 34 of file SuffixTreeNode.h.
|
strong |
| Enumerator | |
|---|---|
| ST_Leaf | |
| ST_Internal | |
Definition at line 38 of file SuffixTreeNode.h.
Definition at line 92 of file SuffixTreeNode.h.
Referenced by llvm::SuffixTreeInternalNode::classof(), llvm::SuffixTreeLeafNode::classof(), llvm::SuffixTreeInternalNode::SuffixTreeInternalNode(), and llvm::SuffixTreeLeafNode::SuffixTreeLeafNode().
|
virtualdefault |
| unsigned SuffixTreeNode::getConcatLen | ( | ) | const |
Definition at line 21 of file SuffixTreeNode.cpp.
|
pure virtual |
Implemented in llvm::SuffixTreeInternalNode, and llvm::SuffixTreeLeafNode.
References LLVM_ABI.
|
inline |
Definition at line 63 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.
| 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.
Represents an undefined index in the suffix tree.
Definition at line 37 of file SuffixTreeNode.h.
Referenced by llvm::SuffixTreeInternalNode::isRoot().