frog.plugin.spot.onspot
Class DirectorialEquivalenceFilter

java.lang.Object
  extended by frog.plugin.spot.onspot.DirectorialEquivalenceFilter
All Implemented Interfaces:
Filter

public class DirectorialEquivalenceFilter
extends Object
implements Filter

This filter takes the magnitude of a vector and compares it to the last vector's magnitude. If the difference does not surpass the given threshold, the vector is discarded.

Author:
Team Better Recognize

Field Summary
 
Fields inherited from interface frog.plugin.spot.onspot.Filter
X, Y, Z
 
Constructor Summary
DirectorialEquivalenceFilter()
           
 
Method Summary
 double[] filter(double[] vector)
          Discards vectors based on their similarity to the previous vector.
 void setup(String args)
          Sets the Threshold for this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectorialEquivalenceFilter

public DirectorialEquivalenceFilter()
Method Detail

filter

public double[] filter(double[] vector)
Discards vectors based on their similarity to the previous vector.

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

setup

public void setup(String args)
Sets the Threshold for this filter.

The setup for this Filter must be a String containing a single floating point value (i.e. must pass the constraints of Double.parseDouble(String).

Specified by:
setup in interface Filter
Parameters:
args - a comma-separated list of values.