public class SymbolTable
extends java.lang.Object
Symbol| Constructor and Description |
|---|
SymbolTable()
Creates a blank symbol table
|
SymbolTable(java.io.FileReader p_file)
Creates a new symbol table from a saved symbol table file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Symbol p_symbol)
Adds a symbol to the end of the symbol table.
|
int |
getLength()
Returns the length of the table.
|
Symbol |
getSymbol(int p_index)
Returns a symbol by index.
|
Symbol[] |
getSymbols()
Returns an array with all symbols from this table in.
|
void |
remove(int p_index)
Removes a symbol from the table by index.
|
void |
save(java.io.FileWriter fout)
Saves the suymbol table to the file provided.
|
void |
setLength(int p_length)
Sets the number of weighted nodes every symbol in the table has.
|
public SymbolTable()
public SymbolTable(java.io.FileReader p_file)
throws java.io.IOException
p_file - The file from which to loadjava.io.IOException - if any load aspect failspublic void add(Symbol p_symbol)
p_symbol - The symbol to appendpublic void remove(int p_index)
throws java.lang.IndexOutOfBoundsException
p_index - The index of the symbol one wishes to removejava.lang.IndexOutOfBoundsException - in the event that the index number is not pointing to a symbolpublic void save(java.io.FileWriter fout)
throws java.io.IOException
fout - The file to write to.java.io.IOException - in the event that any save aspect fails.public void setLength(int p_length)
p_length - The number of weighted nodes. Ought to be equal to the number of total output neurons in the OCR managerpublic Symbol getSymbol(int p_index) throws java.lang.IndexOutOfBoundsException
p_index - The index of the symbol to returnjava.lang.IndexOutOfBoundsException - in the event that no symbol is found at the index provided.public Symbol[] getSymbols()
public int getLength()