AFLPcore
Class CutoffFunction

java.lang.Object
  |
  +--AFLPcore.Operation
        |
        +--AFLPcore.CutoffFunction
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LinearCutoff

public abstract class CutoffFunction
extends Operation
implements java.lang.Cloneable

An abstract class that is used to represent different functions for cutting off noise from data peaks. The parameters need to compute the cutoff for a position should be passed in as options. Examples would be things like simple linear functions, or a decaying exponential. in the first case, the value would be the same for every position, but in the case of a decaying exponential, the cutoff would decrease as the position increased. In many cases, the parameters required will not truly be optional, but the "options" can be marked as required. This is done so that the program can tell the user what the function requires. NOTE: The first option must set the height of the function. This will correspond to the cutoff value at the position defined by Cutoff. This is required so that the other parts of the program can interface with the different functions in a standard manner.


Fields inherited from class AFLPcore.Operation
descript, helpFile, name, options
 
Constructor Summary
CutoffFunction()
           
 
Method Summary
 java.lang.Object clone()
          Gives an object where every field has been copied from this object to the new object.
abstract  double getCutoff(double position)
          Returns the cutoff value for the specified position
abstract  void read(java.io.DataInputStream in)
          Reads in the properties of this class from the specified input stream.
abstract  void write(java.io.DataOutputStream out)
          Writes all of the information this class needs to store in order to be recreated.
 
Methods inherited from class AFLPcore.Operation
getDescription, getHelpFile, getName, getOptions, setOptions
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CutoffFunction

public CutoffFunction()
Method Detail

getCutoff

public abstract double getCutoff(double position)
Returns the cutoff value for the specified position
Returns:
the cutoff at the position

clone

public java.lang.Object clone()
Gives an object where every field has been copied from this object to the new object.
Overrides:
clone in class java.lang.Object
Returns:
a copy of this object.

write

public abstract void write(java.io.DataOutputStream out)
                    throws java.io.IOException
Writes all of the information this class needs to store in order to be recreated. This will be used for things like storing the class in a file. Therefore, the write should output enough information so that read can recreate the essential properties of this class.
Parameters:
out - the destination to write the data to.
Throws:
java.io.IOException - occurs when a problem is encountered when writing to the stream.

read

public abstract void read(java.io.DataInputStream in)
                   throws java.io.IOException
Reads in the properties of this class from the specified input stream. The stream data should have been created by write. This will retrieve this classes state from the input stream. All of the current data in this class will be replaced by the data from the stream.
Parameters:
in - the input stream with the data for the class.
Throws:
java.io.IOException - occurs when a problem is encountered when writing to the stream.