public class VotingStrokeRecognizer extends Object implements StrokeRecognizer
For each gesture, the voting recognizer can produce one or more classifications. The algorithm works as follows:
Modifier and Type | Field and Description |
---|---|
static int |
ALL_VOTES
A constant which says that votes are not filtered
by the "n-highest" rule.
|
Constructor and Description |
---|
VotingStrokeRecognizer(StrokeRecognizer[] children)
Construct a voting recognizer with the following
children recognizers.
|
Modifier and Type | Method and Description |
---|---|
List |
children()
Return the children as a list.
|
void |
clearBuffer()
Clear the buffer after every stroke finishes by
setting every entry in the buffer to NO_RECOGNITION.
|
double |
getMinConfidence()
Return the minimum confidence value which is necessary
for a type to get considered in the vote.
|
int |
getNHighest()
Return the "n-highest" value, which says that the n-highest
classifications will get passed on when the child recognizers
vote.
|
void |
setMinConfidence(double val)
Set the minimum confidence classifications that will get passed
on when the child recognizers vote.
|
void |
setNHighest(int n)
Set the "n-highest" value, which says that the n-highest
classifications will get passed on when the child recognizers
vote.
|
RecognitionSet |
strokeCompleted(TimedStroke s)
Pass the event to the child recognizers, tally the vote,
clear the buffer, and return the consensus.
|
RecognitionSet |
strokeModified(TimedStroke s)
Pass the event to the child recognizers, tally the vote,
and return the consensus.
|
RecognitionSet |
strokeStarted(TimedStroke s)
Pass the event to the child recognizers, tally the vote,
and return the consensus.
|
protected RecognitionSet |
vote()
Tally all of the votes of the sub-recognizers and emit them all
into a recognition.
|
public static int ALL_VOTES
setNHighest(int)
public VotingStrokeRecognizer(StrokeRecognizer[] children)
public List children()
public void clearBuffer()
public double getMinConfidence()
public int getNHighest()
public void setMinConfidence(double val)
public void setNHighest(int n)
public RecognitionSet strokeCompleted(TimedStroke s)
strokeCompleted
in interface StrokeRecognizer
public RecognitionSet strokeModified(TimedStroke s)
strokeModified
in interface StrokeRecognizer
public RecognitionSet strokeStarted(TimedStroke s)
strokeStarted
in interface StrokeRecognizer
protected RecognitionSet vote()
getNHighest()
,
getMinConfidence()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.