public class NetStack
extends java.lang.Object
| Constructor and Description |
|---|
NetStack()
Creates an empty net stack.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendNet(NeuralNet tempNet)
Appends a net to the end of the stack.
|
int |
countNets()
Returns the number of nets that are currently loaded.
|
int |
countOutput()
Returns the number of outputs this OCR system will generate.
|
int |
getInputCount()
Returns the number of input neurons that this OCR manager is currently set to using.
|
NeuralNet |
getNet(int p_index)
Returns a net by index from this OCR manager.
|
NeuralNet[] |
getNets()
Returns an array of all nets held in this OCR manager, ordered as they are to have their outputs serialised.
|
void |
moveNet(int p_indexFrom,
int p_indexTo)
Moves a net in the list of nets.
|
void |
removeNet(NeuralNet p_net)
Removes a net from the internal list.
|
void |
setInput(int p_number)
Attempts to adjust the number of input neurons.
|
public void appendNet(NeuralNet tempNet) throws ValueOutOfBoundsException
tempNet - The net to append.ValueOutOfBoundsException - in the event that the net given has the wrong amount of input neurons.public void setInput(int p_number)
throws ValueOutOfBoundsException
p_number - The number of inputs to attempt to setValueOutOfBoundsException - in the event that the desired number of inputs is incompatible with currently loaded nets.public int getInputCount()
public void moveNet(int p_indexFrom,
int p_indexTo)
throws java.lang.IndexOutOfBoundsException
The order in which nets are loaded is vital, as all nets' outputs are serialised before poat-parsing and symbol comparison. Note that the removal of the net from the vector shuffles everything up - indexTo will have to be one less than one would normally assume.
p_indexFrom - The index to request a net fromp_indexTo - The index to move the requested net tojava.lang.IndexOutOfBoundsException - in the event that either index does not existpublic NeuralNet getNet(int p_index) throws java.lang.IndexOutOfBoundsException
p_index - The index of the net to returnjava.lang.IndexOutOfBoundsException - Thrown in the event that the index requested contains no net or does not existpublic void removeNet(NeuralNet p_net) throws ItemNotFoundException
p_net - the net to removeItemNotFoundException - In the event that the net is not in the listpublic NeuralNet[] getNets()
public int countNets()
public int countOutput()