© 2006-2007 ETH Zurich

org.ximtec.igesture.core
Class TestSet

java.lang.Object
  extended by org.ximtec.igesture.core.DefaultPropertyChangeNotifier
      extended by org.ximtec.igesture.core.DefaultDataObject
          extended by org.ximtec.igesture.core.TestSet
All Implemented Interfaces:
Serializable, DataObject, PropertyChangeNotifier

public class TestSet
extends DefaultDataObject

Set of gesture samples used to evaluate algorithms.

Version:
1.0, Nov 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch
See Also:
Serialized Form

Field Summary
static String NOISE
           
static String PROPERTY_NAME
           
static String PROPERTY_TEST_CLASSES
           
 
Fields inherited from class org.ximtec.igesture.core.DefaultDataObject
PROPERTY_ID
 
Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
propertyChangeSupport
 
Constructor Summary
TestSet(String name)
          Constructs a new test set.
 
Method Summary
 void accept(Visitor visitor)
          Accepts a visitor.
 void add(Gesture<?> sample)
          Adds a sample to the list of samples.
 void addAll(List<Gesture<?>> samples)
          Adds a list of samples.
 void addTestClass(TestClass testClass)
           
 void addTestClasses(List<TestClass> testClasses)
           
 String getName()
          Returns the name of the test set.
 int getNoiseSize()
          Returns the number of samples which should be rejected by the recogniser.
 int getNumberOfSamples()
          Returns the number of samples in the test set.
 TestClass getTestClass(String name)
           
 List<TestClass> getTestClasses()
          Returns all samples.
 boolean isEmpty()
          Returns true if the test set is empty.
 void remove(TestClass testClass)
          Removes a the sample from the list of samples.
 void setName(String name)
          Sets the name of the test set.
 int size()
          Returns the size of the test set.
 String toString()
           
 
Methods inherited from class org.ximtec.igesture.core.DefaultDataObject
getId, setId
 
Methods inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 

Field Detail

PROPERTY_NAME

public static final String PROPERTY_NAME
See Also:
Constant Field Values

PROPERTY_TEST_CLASSES

public static final String PROPERTY_TEST_CLASSES
See Also:
Constant Field Values

NOISE

public static final String NOISE
See Also:
Constant Field Values
Constructor Detail

TestSet

public TestSet(String name)
Constructs a new test set.

Parameters:
name - the name of the test set.
Method Detail

add

public void add(Gesture<?> sample)
Adds a sample to the list of samples.

Parameters:
sample - the sample to be added.

getTestClass

public TestClass getTestClass(String name)

addTestClass

public void addTestClass(TestClass testClass)

addTestClasses

public void addTestClasses(List<TestClass> testClasses)

addAll

public void addAll(List<Gesture<?>> samples)
Adds a list of samples.

Parameters:
samples - the samples to be added.

remove

public void remove(TestClass testClass)
Removes a the sample from the list of samples.

Parameters:
sample - the sample to be removed.

getTestClasses

public List<TestClass> getTestClasses()
Returns all samples.

Returns:
a list with all samples.

getNoiseSize

public int getNoiseSize()
Returns the number of samples which should be rejected by the recogniser.

Returns:
the number of "noise" entries in the test set.

setName

public void setName(String name)
Sets the name of the test set.

Parameters:
name - the name of the test set.

getName

public String getName()
Returns the name of the test set.

Returns:
the name of the test set.

size

public int size()
Returns the size of the test set. (Number of test classes)

Returns:
the size of the test set.

getNumberOfSamples

public int getNumberOfSamples()
Returns the number of samples in the test set. This is the sum of all samples in all test classes.

Returns:
the number of samples

isEmpty

public boolean isEmpty()
Returns true if the test set is empty.

Returns:
true if the test set is empty.

accept

public void accept(Visitor visitor)
Accepts a visitor.

Specified by:
accept in interface DataObject
Overrides:
accept in class DefaultDataObject
Parameters:
visitor - the visitor to be used.

toString

public String toString()
Overrides:
toString in class Object

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.