C# Class LevenshteinAutomaton.TrieNode

Prefix tree node
Show file Open project: ibendrup/LevenshteinAutomaton Class Usage Examples

Public Properties

Property Type Description
Children TrieNode>.Dictionary
Key String

Public Methods

Method Description
AddChild ( char c, TrieNode child ) : bool

Add child node

ContainsChildValue ( char letter ) : bool

Check if node contains child for given letter

GetChild ( String wordOrPrefix ) : TrieNode

Get node for given word or prefix if exists

GetChild ( char letter ) : TrieNode

Get child node by letter

GetWord ( string word ) : TrieNode

Get node for given word if exists

ToString ( ) : String
TrieNode ( String key ) : System

Init node with the given key

Method Details

AddChild() public method

Add child node
public AddChild ( char c, TrieNode child ) : bool
c char Letter
child TrieNode Node to add
return bool

ContainsChildValue() public method

Check if node contains child for given letter
public ContainsChildValue ( char letter ) : bool
letter char
return bool

GetChild() public method

Get node for given word or prefix if exists
public GetChild ( String wordOrPrefix ) : TrieNode
wordOrPrefix String
return TrieNode

GetChild() public method

Get child node by letter
public GetChild ( char letter ) : TrieNode
letter char
return TrieNode

GetWord() public method

Get node for given word if exists
public GetWord ( string word ) : TrieNode
word string
return TrieNode

ToString() public method

public ToString ( ) : String
return String

TrieNode() public method

Init node with the given key
public TrieNode ( String key ) : System
key String Key
return System

Property Details

Children public property

Children node list
public Dictionary Children
return TrieNode>.Dictionary

Key public property

Node's key
public String Key
return String