frog
Class DirectorialEquivalence

java.lang.Object
  extended by frog.DirectorialEquivalence
All Implemented Interfaces:
Filter, Serializable

public class DirectorialEquivalence
extends Object
implements Filter

Filter for removing vectors based on the vectors that come before them. The filter works by performing the distance formula on the two vectors. If the resulting distance is less than the threshold, the vector is discarded.

Author:
Team Better Recognize
See Also:
Serialized Form

Constructor Summary
DirectorialEquivalence()
          Creates the Filter with a default threshold of 0.2.
 
Method Summary
 Accel3D filter(Accel3D acc)
          Takes in a sample and returns either the unchanged sample or null depending on the Filter's criteria.
 String getDefaults()
          Returns the default parameter String for this Filter.
 String getName()
          Returns the name of this Filter.
 String getParameters()
          Returns the current parameters in a comma-separated String of values.
 void setup(String args)
          Takes only one value, a threshold.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectorialEquivalence

public DirectorialEquivalence()
Creates the Filter with a default threshold of 0.2.

Method Detail

filter

public Accel3D filter(Accel3D acc)
Description copied from interface: Filter
Takes in a sample and returns either the unchanged sample or null depending on the Filter's criteria.

Specified by:
filter in interface Filter
Parameters:
acc - data to be filtered out
Returns:
null if the filter removed this Accel3D. Otherwise returns the original Accel3D unmodified.

getDefaults

public String getDefaults()
Description copied from interface: Filter
Returns the default parameter String for this Filter.

Specified by:
getDefaults in interface Filter
Returns:
the default parameter String that will be used in setup if a blank is given

getName

public String getName()
Description copied from interface: Filter
Returns the name of this Filter.

Specified by:
getName in interface Filter
Returns:
the name of this Filter

getParameters

public String getParameters()
Description copied from interface: Filter
Returns the current parameters in a comma-separated String of values. The values are returned in exactly the same order and style that they would be passed in through the setup(String) method.

Specified by:
getParameters in interface Filter
Returns:
the current parameter String for this Filter

setup

public void setup(String args)
Takes only one value, a threshold.
Example parameter Strings:

Specified by:
setup in interface Filter