Class: Node

Node

new Node()

Node object constructor for the suffixtree construction
Source:

Members

leavePositions

Childnodes of a node
Source:

leaves

Node string value
Source:

nodePositions

Startpositions of the leaves in the string
Source:

nodes

Leaves(suffixes) of the node
Source:

Methods

addSuffix(suf, pos)

Method to add a suffix to the current tree
Parameters:
Name Type Description
suf Current suffix in the tree generation
pos Position of the current suffx in the complete string
Source:
Returns:
none

checkLeaves(suf, pos)

Method to test leaves for matching beginning and node insertion
Parameters:
Name Type Description
suf Current suffix in the tree generation
pos Position of the current suffx in the complete string
Source:
Returns:
none

checkNodes(suf, pos)

Method to test for node splitting in Suffixtree generation
Parameters:
Name Type Description
suf Current suffix in the tree generation
pos Position of the current suffx in the complete string
Source:
Returns:
boolean whether to split a node or not

getLongestRepeatedSubString()

Method to retrieve the longest repeated substring from the suffixtree
Source:
Returns:
The longest of the repeated substrings in the suffixtree

getLongestRepeatedSubStrings()

Method to retrieve the longest repeated substrings from the suffixtree
Source:
Returns:
All pairs of repeated substrings

toHTML()

Method to create an HTML representation of the suffix tree
Source:
Returns:
HTML representation of the suffixtree