public class Symbol extends CharacterImage
image, value| Constructor and Description |
|---|
Symbol(java.lang.String p_value,
java.lang.String p_imageFilename)
Creates a new symbol with a given value and from a given filename.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getDesiredValues()
This returns a double array of all 'desirable' edges which should be firing in order to trigger the symbol.
|
double[] |
getDesiredValues(int p_start,
int p_length)
Returns a range of desired values.
|
int |
getLength()
Returns the number of weighted nodes held by this symbol.
|
double |
getMeanDeviation(double[] p_outputs)
Calculates a confidence value for this nsymbol based on net outputs.
|
WeightedNode |
getWeight(int p_index)
Returns one weighted node, addressed by the index in the internal array - NOT the index stored within the weighted node!
|
WeightedNode[] |
getWeights()
Returns a list of all weighted nodes stored within this Symbol.
|
WeightedNode[] |
getWeightsFromOffset(int p_offset,
int p_length)
Returns a range of weighted nodes from a given position.
|
void |
setLength(int p_length)
Sets the number of output nodes, which ought to be equal to the number of total output nodes in the OCR manager.
|
void |
setWeight(WeightedNode p_weight,
int p_index)
Sets the weight of one particular output node, indexed by value in internal array - NOT by the index as stored in the weighted node itself.
|
java.lang.String |
toString()
Returns this Symbol as represented by a string.
|
getImage, getValue, setImage, setValuepublic Symbol(java.lang.String p_value,
java.lang.String p_imageFilename)
throws java.io.IOException
p_value - The initial value of this symbolp_imageFilename - A path to the image to load. The constructor loads the image itselfjava.io.IOException - in the event that any problem occurs when loading the image filepathpublic WeightedNode[] getWeights()
setLength(int)public WeightedNode[] getWeightsFromOffset(int p_offset, int p_length)
p_offset - The start positionp_length - The number of items to returnpublic double[] getDesiredValues(int p_start,
int p_length)
p_start - The start position.p_length - The number of items to returnpublic WeightedNode getWeight(int p_index)
p_index - The index number to return the node frompublic void setWeight(WeightedNode p_weight, int p_index)
p_weight - The weight to setp_index - The index into which to insert this weighted node.public double getMeanDeviation(double[] p_outputs)
p_outputs - An array of all net outputs from this OCRManager.public java.lang.String toString()
toString in class java.lang.Objectpublic void setLength(int p_length)
p_length - The number of nodespublic int getLength()
public double[] getDesiredValues()