LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::SuffixTreeInternalNode Struct Reference

#include "llvm/Support/SuffixTreeNode.h"

Inheritance diagram for llvm::SuffixTreeInternalNode:
Inheritance graph
[legend]

Public Member Functions

bool isRoot () const
 
unsigned getEndIdx () const override
 
void setLink (SuffixTreeInternalNode *L)
 Sets Link to L. Assumes L is not null.
 
SuffixTreeInternalNodegetLink () const
 
 SuffixTreeInternalNode (unsigned StartIdx, unsigned EndIdx, SuffixTreeInternalNode *Link)
 
virtual ~SuffixTreeInternalNode ()=default
 
- Public Member Functions inherited from llvm::SuffixTreeNode
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 Member Functions

static bool classof (const SuffixTreeNode *N)
 

Public Attributes

DenseMap< unsigned, SuffixTreeNode * > Children
 The children of this node.
 

Additional Inherited Members

- Public Types inherited from llvm::SuffixTreeNode
enum class  NodeKind { ST_Leaf , ST_Internal }
 
- Static Public Attributes inherited from llvm::SuffixTreeNode
static const unsigned EmptyIdx = -1
 Represents an undefined index in the suffix tree.
 

Detailed Description

Definition at line 97 of file SuffixTreeNode.h.

Constructor & Destructor Documentation

◆ SuffixTreeInternalNode()

llvm::SuffixTreeInternalNode::SuffixTreeInternalNode ( unsigned  StartIdx,
unsigned  EndIdx,
SuffixTreeInternalNode Link 
)
inline

Definition at line 152 of file SuffixTreeNode.h.

◆ ~SuffixTreeInternalNode()

virtual llvm::SuffixTreeInternalNode::~SuffixTreeInternalNode ( )
virtualdefault

Member Function Documentation

◆ classof()

static bool llvm::SuffixTreeInternalNode::classof ( const SuffixTreeNode N)
inlinestatic

Definition at line 129 of file SuffixTreeNode.h.

References N, and llvm::SuffixTreeNode::ST_Internal.

◆ getEndIdx()

unsigned SuffixTreeInternalNode::getEndIdx ( ) const
overridevirtual
Returns
the end index of this node's substring in the entire string.

Implements llvm::SuffixTreeNode.

Definition at line 26 of file SuffixTreeNode.cpp.

◆ getLink()

SuffixTreeInternalNode * SuffixTreeInternalNode::getLink ( ) const
Returns
the pointer to the Link node.

Definition at line 31 of file SuffixTreeNode.cpp.

◆ isRoot()

bool SuffixTreeInternalNode::isRoot ( ) const
Returns
true if this node is the root of its owning SuffixTree.

Definition at line 23 of file SuffixTreeNode.cpp.

References llvm::SuffixTreeNode::EmptyIdx, and llvm::SuffixTreeNode::getStartIdx().

◆ setLink()

void SuffixTreeInternalNode::setLink ( SuffixTreeInternalNode L)

Sets Link to L. Assumes L is not null.

Definition at line 27 of file SuffixTreeNode.cpp.

References assert().

Member Data Documentation

◆ Children

DenseMap<unsigned, SuffixTreeNode *> llvm::SuffixTreeInternalNode::Children

The children of this node.

A child existing on an unsigned integer implies that from the mapping represented by the current node, there is a way to reach another mapping by tacking that character on the end of the current string.

Definition at line 150 of file SuffixTreeNode.h.


The documentation for this struct was generated from the following files: