frog.plugin.spot.onspot
Class IdleStateFilter

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

public class IdleStateFilter
extends Object
implements Filter

This filter takes the magnitude of a vector and checks it against a given threshold. If the magnitude is less than the threshold, this vector is discarded.

Author:
Team Better Recognize

Field Summary
 
Fields inherited from interface frog.plugin.spot.onspot.Filter
X, Y, Z
 
Constructor Summary
IdleStateFilter()
           
 
Method Summary
 double[] filter(double[] vector)
          Discards vectors with a magnitude less than that of the threshold.
 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

IdleStateFilter

public IdleStateFilter()
Method Detail

filter

public double[] filter(double[] vector)
Discards vectors with a magnitude less than that of the threshold.

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.