diva.sketch.recognition
Class SceneDeltaSet

java.lang.Object
  extended by diva.sketch.recognition.SceneDeltaSet

public class SceneDeltaSet
extends Object

A collection of deltas that represents the cumulative set of possible changes recognized by a scene recognizer in response to a given event. If a recognizer does not recognize anything, it will return the constant NO_DELTA.

Version:
$Revision: 1.5 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Field Summary
static SceneDeltaSet NO_DELTA
          A constant representing no change to a scene.
 
Constructor Summary
SceneDeltaSet()
          Construct an empty scene delta set.
 
Method Summary
 void addAll(SceneDeltaSet s)
          Add all of the deltas from the given delta set to this delta set in sorted order from highest to lowest confidence.
 void addDelta(SceneDelta d)
          Add a scene delta to this set in sorted order of confidence from highest to lowest.
 Iterator deltas()
          Return the deltas in sorted order from highest confidence to lowest.
 int getDeltaCount()
          Return the number of deltas contained in this set.
 void removeDelta(SceneDelta d)
          Remove a scene delta from this set.
 String toString()
          Print the contents of this delta set in sorted order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_DELTA

public static final SceneDeltaSet NO_DELTA
A constant representing no change to a scene. Many recognizers will return this as a result when they have failed to recognize anything; a client should check for this constant explicitly because it has a different behavior from a normal delta set, i.e. it will throw exceptions when clients try to modify it.

Constructor Detail

SceneDeltaSet

public SceneDeltaSet()
Construct an empty scene delta set.

Method Detail

addDelta

public void addDelta(SceneDelta d)
Add a scene delta to this set in sorted order of confidence from highest to lowest.


removeDelta

public void removeDelta(SceneDelta d)
Remove a scene delta from this set.


getDeltaCount

public int getDeltaCount()
Return the number of deltas contained in this set.


deltas

public Iterator deltas()
Return the deltas in sorted order from highest confidence to lowest.


addAll

public void addAll(SceneDeltaSet s)
Add all of the deltas from the given delta set to this delta set in sorted order from highest to lowest confidence.


toString

public String toString()
Print the contents of this delta set in sorted order.

Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.