gov.sandia.cognition.learning.algorithm.minimization.line
Class InputOutputSlopeTriplet

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.data.AbstractInputOutputPair<InputType,OutputType>
          extended by gov.sandia.cognition.learning.data.DefaultInputOutputPair<Double,Double>
              extended by gov.sandia.cognition.learning.algorithm.minimization.line.InputOutputSlopeTriplet
All Implemented Interfaces:
InputOutputPair<Double,Double>, CloneableSerializable, Pair<Double,Double>, Serializable, Cloneable

public class InputOutputSlopeTriplet
extends DefaultInputOutputPair<Double,Double>
implements CloneableSerializable

Stores an InputOutputPair with corresponding slope (gradient) information

Since:
2.2
Author:
Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
InputOutputSlopeTriplet()
          Creates a new instance of InputOutputSlopeTriplet
InputOutputSlopeTriplet(Double input, Double output, Double slope)
          Creates a new instance of InputOutputSlopeTriplet
InputOutputSlopeTriplet(InputOutputSlopeTriplet other)
          Copy constructor
 
Method Summary
 InputOutputSlopeTriplet clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 Double getSlope()
          Getter for slope
 void setSlope(Double slope)
          Setter for slope
 String toString()
           
 
Methods inherited from class gov.sandia.cognition.learning.data.DefaultInputOutputPair
create, create, getInput, getOutput, labelCollection, mergeCollections, setInput, setOutput
 
Methods inherited from class gov.sandia.cognition.learning.data.AbstractInputOutputPair
getFirst, getSecond
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputOutputSlopeTriplet

public InputOutputSlopeTriplet()
Creates a new instance of InputOutputSlopeTriplet


InputOutputSlopeTriplet

public InputOutputSlopeTriplet(Double input,
                               Double output,
                               Double slope)
Creates a new instance of InputOutputSlopeTriplet

Parameters:
input - Input to consider
output - Output to consider
slope - Slope (first derivative) at the given point

InputOutputSlopeTriplet

public InputOutputSlopeTriplet(InputOutputSlopeTriplet other)
Copy constructor

Parameters:
other - InputOutputSlopeTriplet to copy
Method Detail

clone

public InputOutputSlopeTriplet clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractCloneableSerializable
Returns:
A clone of this object.

getSlope

public Double getSlope()
Getter for slope

Returns:
Slope (first derivative) at the given point

setSlope

public void setSlope(Double slope)
Setter for slope

Parameters:
slope - Slope (first derivative) at the given point

toString

public String toString()
Overrides:
toString in class AbstractInputOutputPair<Double,Double>