gov.sandia.cognition.learning.algorithm.minimization.line
Class LineMinimizerDerivativeBased.InternalFunction

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.math.AbstractScalarFunction<Double>
          extended by gov.sandia.cognition.math.AbstractUnivariateScalarFunction
              extended by gov.sandia.cognition.math.AbstractDifferentiableUnivariateScalarFunction
                  extended by gov.sandia.cognition.learning.algorithm.minimization.line.LineMinimizerDerivativeBased.InternalFunction
All Implemented Interfaces:
Evaluator<Double,Double>, DifferentiableEvaluator<Double,Double,Double>, DifferentiableUnivariateScalarFunction, ScalarFunction<Double>, UnivariateScalarFunction, CloneableSerializable, Serializable, Cloneable
Enclosing class:
LineMinimizerDerivativeBased

public class LineMinimizerDerivativeBased.InternalFunction
extends AbstractDifferentiableUnivariateScalarFunction

Internal function used to map/remap/unmap the search direction.

See Also:
Serialized Form

Constructor Summary
LineMinimizerDerivativeBased.InternalFunction()
           
 
Method Summary
protected  double convertInputFromInternal(double internalInput)
          Converts the internal x-axis value to real-world x-axis value
 InputOutputSlopeTriplet convertInputFromInternal(InputOutputSlopeTriplet internalPoint)
          Converts an InternalFunction InputOutputSlopeTriplet to a real-world InputOutputSlopeTriplet by unreflection and flipping the sign of the slope (if the direction of search was backward).
 double convertInputToInternal(double input)
          Converts a real-world "x" value to the internal values used inside the search algorithm.
 double differentiate(double internalInput)
          Differentiates the output of the function about the given input
 double evaluate(double internalInput)
          Produces a double output for the given double input
 
Methods inherited from class gov.sandia.cognition.math.AbstractDifferentiableUnivariateScalarFunction
differentiate
 
Methods inherited from class gov.sandia.cognition.math.AbstractUnivariateScalarFunction
evaluate, evaluateAsDouble
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.math.ScalarFunction
evaluateAsDouble
 
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator
evaluate
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

LineMinimizerDerivativeBased.InternalFunction

public LineMinimizerDerivativeBased.InternalFunction()
Method Detail

convertInputToInternal

public double convertInputToInternal(double input)
Converts a real-world "x" value to the internal values used inside the search algorithm. This compensates for reflecting the search space

Parameters:
input - Input value in the real-world
Returns:
X-axis value to send to the InternalFunction

convertInputFromInternal

protected double convertInputFromInternal(double internalInput)
Converts the internal x-axis value to real-world x-axis value

Parameters:
internalInput - internalInput to convert
Returns:
real-world x-axis value

convertInputFromInternal

public InputOutputSlopeTriplet convertInputFromInternal(InputOutputSlopeTriplet internalPoint)
Converts an InternalFunction InputOutputSlopeTriplet to a real-world InputOutputSlopeTriplet by unreflection and flipping the sign of the slope (if the direction of search was backward).

Parameters:
internalPoint - InternalFunction-based point to manipulate
Returns:
Real-world value

evaluate

public double evaluate(double internalInput)
Description copied from interface: UnivariateScalarFunction
Produces a double output for the given double input

Parameters:
internalInput - Input to the Evaluator
Returns:
output at the given input

differentiate

public double differentiate(double internalInput)
Description copied from interface: DifferentiableUnivariateScalarFunction
Differentiates the output of the function about the given input

Parameters:
internalInput - Input about which to compute the derivative of the function output
Returns:
Derivative of the output with respect to the input