|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthhreco.recognition.MSTrainingModel
MSTrainingModel (Multi-Stroke Training Model) is a data structure for storing training examples and their types. Each training example is a set of TimedStroke objects.
Field Summary | |
static boolean |
NEGATIVE
Internal constant for the array slot of negative examples. |
static boolean |
POSITIVE
Internal constant for the array slot of positive examples. |
Constructor Summary | |
MSTrainingModel()
Construct an empty training model. |
Method Summary | |
void |
addExample(java.lang.String t,
TimedStroke[] s,
boolean which)
Add an example to this training model for the given type (either positive or negative, denoted by the "which" argument). |
void |
addNegativeExample(java.lang.String t,
TimedStroke[] s)
Add a negative example to this training model for the given type. |
void |
addPositiveExample(java.lang.String t,
TimedStroke[] s)
Add a positive example to this training model for the given type. |
void |
clear()
Remvoe all data from the model. |
void |
combine(MSTrainingModel model)
Add the data in the specified model into "this" model. |
boolean |
containsType(java.lang.String t)
Return true if the training type with the specified name is in the model, or false otherwise. |
TimedStroke[] |
getNegativeExample(java.lang.String t,
int i)
Return the negative example at the specified index for the given type. |
TimedStroke[] |
getPositiveExample(java.lang.String t,
int i)
Return the positive example at the specified index for the given type. |
int |
getTypeCount()
Return how many types are contained in this training model. |
int |
negativeExampleCount(java.lang.String t)
Return the number of negative examples for the given type. |
java.util.Iterator |
negativeExamples(java.lang.String t)
An iterator over the negative examples for the given type. |
int |
positiveExampleCount(java.lang.String t)
Returns the number of positive examples for the given type. |
java.util.Iterator |
positiveExamples(java.lang.String t)
An iterator over the positive examples for the given type. |
void |
removeExample(java.lang.String t,
TimedStroke[] s,
boolean which)
Remove the specified example of the given type from this training model. |
void |
removeNegativeExample(java.lang.String t,
TimedStroke[] s)
Remove the specified negative example of the specified type from this training set. |
void |
removePositiveExample(java.lang.String t,
TimedStroke[] s)
Remove the specified positive example of the specified type from this training set. |
void |
removeType(java.lang.String t)
Remove the specified type from this training set. |
java.lang.String |
toString()
Text representation of this class containing information on the types and the number of positive and negative examples in the model. |
java.util.Iterator |
types()
An iterator over the types contained in this training model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final boolean NEGATIVE
public static final boolean POSITIVE
Constructor Detail |
public MSTrainingModel()
Method Detail |
public final void addNegativeExample(java.lang.String t, TimedStroke[] s)
public final void addPositiveExample(java.lang.String t, TimedStroke[] s)
public final void addExample(java.lang.String t, TimedStroke[] s, boolean which)
public void clear()
public final void combine(MSTrainingModel model)
public final boolean containsType(java.lang.String t)
public final TimedStroke[] getPositiveExample(java.lang.String t, int i)
public final TimedStroke[] getNegativeExample(java.lang.String t, int i)
public final int getTypeCount()
public final int negativeExampleCount(java.lang.String t)
public final java.util.Iterator negativeExamples(java.lang.String t)
public final int positiveExampleCount(java.lang.String t)
public final java.util.Iterator positiveExamples(java.lang.String t)
public final void removeExample(java.lang.String t, TimedStroke[] s, boolean which)
public final void removeNegativeExample(java.lang.String t, TimedStroke[] s)
public final void removePositiveExample(java.lang.String t, TimedStroke[] s)
public final void removeType(java.lang.String t)
public java.util.Iterator types()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |