|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Scene
A scene database that keeps track of multiple interpretations of a set of strokes. Groups of strokes are stored hierarchically, and these also have multiple interpretations. There are also choice elements that represent a mutually exclusive choice between objects of the same type that use the same type. Using this data structure, a client can view all of the interpretations of the scene and perform efficient operations to filter interpretations.
Method Summary | |
---|---|
CompositeElement |
addComposite(TypedData data,
double confidence,
SceneElement[] children,
String[] names)
Add a new composite element to the database and return it. |
StrokeElement |
addStroke(TimedStroke stroke)
Add a new stroke element to the database. |
List |
choices()
Return a list of all of the choices contained in the scene. |
void |
confirm(CompositeElement elt,
boolean makeChoices)
Accept the given interpretation of the set of strokes that the given element covers as the correct interpretation of those strokes. |
List |
elementsOfType(Type type,
CompositeElement elt)
Find the elements in the scene with the given type that do not contradict the given element, and return them as a list. |
boolean |
isConsistent(SceneElement e1,
SceneElement e2)
Return whether or not the two elements are consistent, that is, whether the leaf nodes that they span are strictly disjoint. |
boolean |
isCoveringAll(SceneElement elt)
Return whether or not this element covers all of the leaves. |
void |
removeElement(SceneElement elt)
Remove an element from the database. |
List |
roots()
Return a list of every root node in the database, i.e. |
List |
strokes()
Return a list the stroke elements of the scene in the order that they were added to the database. |
Method Detail |
---|
CompositeElement addComposite(TypedData data, double confidence, SceneElement[] children, String[] names)
data
- The typed data associated with the composite.confidence
- The confidence of recognition, between 0 and 1.children
- The children of this element in the tree.names
- The names of the children.StrokeElement addStroke(TimedStroke stroke)
List choices()
void confirm(CompositeElement elt, boolean makeChoices)
elt
- The interpretation to confirmmakeChoices
- Whether or not to confirm the existing
choice nodes at or under elt.List elementsOfType(Type type, CompositeElement elt)
type
- The type of elements that will be returned.element
- The elements that the returned set must be
consistent with, or null if it doesn't matter.
isConsistent(SceneElement, SceneElement)
boolean isCoveringAll(SceneElement elt)
boolean isConsistent(SceneElement e1, SceneElement e2)
void removeElement(SceneElement elt)
List roots()
List strokes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |