C# Class AdvancedAlgorithms.DNAMatcher.SuffixTree

Datei anzeigen Open project: RodH257/Advanced-Algorithm-Problems

Public Properties

Property Type Description
root TreeNode

Public Methods

Method Description
ConstructTree ( string text, int stringNumber ) : void

Constructs a tree with the supplied text Does this by looping through the string character by character from start to end. Creates suffixes for each character from that point on ie SOCCER OCCER CCER CER ER R on first loop then adds those to the tree When those are added to the tree, the tree is checked to see if they already contain those exact ones If the first one is there, its rmeoved, adn second one is checked, this is dwindled until it gets to the last X about that aren't already present. These are added as a subset of the current position ie if it gets to SOCC and realises that CER isnt there it adds CER ER and R as children this is repeated again with OCCER CCER CER ER R and so on

FindLongestCommonSubstring ( string ending1, string ending2 ) : string
SuffixTree ( ) : System
Traverse ( TreeNode parent ) : void

Method Details

ConstructTree() public method

Constructs a tree with the supplied text Does this by looping through the string character by character from start to end. Creates suffixes for each character from that point on ie SOCCER OCCER CCER CER ER R on first loop then adds those to the tree When those are added to the tree, the tree is checked to see if they already contain those exact ones If the first one is there, its rmeoved, adn second one is checked, this is dwindled until it gets to the last X about that aren't already present. These are added as a subset of the current position ie if it gets to SOCC and realises that CER isnt there it adds CER ER and R as children this is repeated again with OCCER CCER CER ER R and so on
public ConstructTree ( string text, int stringNumber ) : void
text string
stringNumber int
return void

FindLongestCommonSubstring() public method

public FindLongestCommonSubstring ( string ending1, string ending2 ) : string
ending1 string
ending2 string
return string

SuffixTree() public method

public SuffixTree ( ) : System
return System

Traverse() public method

public Traverse ( TreeNode parent ) : void
parent TreeNode
return void

Property Details

root public_oe property

public TreeNode root
return TreeNode