dLife Home Page

dlife.nn
Class BoundFilter

java.lang.Object
  extended by dlife.nn.BoundFilter
All Implemented Interfaces:
NNDataFilter, Serializable

public class BoundFilter
extends Object
implements NNDataFilter

An NNDataFilter that bounds its input values to a a specified range. Any value larger than max is bound to max and any value smaller than min is bound to min. Values between max and min are unchanged. If min is greater than or equal to max then this filter will have no effect.

Version:
Jan 9, 2007
Author:
Grant Braught, Dickinson College
See Also:
Serialized Form

Constructor Summary
BoundFilter(double min, double max)
          Construct a new BoundFilter with the specified max and min values.
 
Method Summary
 double filterValue(double value)
          Filter the value, bounding it to the range [min...max].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundFilter

public BoundFilter(double min,
                   double max)
Construct a new BoundFilter with the specified max and min values.

Parameters:
min - the smallest value allowed.
max - the largest value allowed.
Method Detail

filterValue

public double filterValue(double value)
Filter the value, bounding it to the range [min...max].

Specified by:
filterValue in interface NNDataFilter
Parameters:
value - the value to be filtered.
Returns:
the filtered value.

dLife Home Page