gov.sandia.cognition.learning.algorithm.root
Class SolverFunction

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.learning.algorithm.root.SolverFunction
All Implemented Interfaces:
Evaluator<Double,Double>, ScalarFunction<Double>, UnivariateScalarFunction, CloneableSerializable, Serializable, Cloneable

public class SolverFunction
extends AbstractUnivariateScalarFunction

Evaluator that allows RootFinders to solve for nonzero values by setting a "target" parameter.

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

Constructor Summary
SolverFunction()
          Creates a new instance of SolverFunction
SolverFunction(double target, Evaluator<Double,Double> internalFunction)
          Creates a new instance of SolverFunction
 
Method Summary
 double evaluate(double input)
          Produces a double output for the given double input
 Evaluator<Double,Double> getInternalFunction()
          Getter for internalFunction
 double getTarget()
          Getter for target
 void setInternalFunction(Evaluator<Double,Double> internalFunction)
          Setter for internalFunction.
 void setTarget(double target)
          Setter for target
 
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.util.CloneableSerializable
clone
 

Constructor Detail

SolverFunction

public SolverFunction()
Creates a new instance of SolverFunction


SolverFunction

public SolverFunction(double target,
                      Evaluator<Double,Double> internalFunction)
Creates a new instance of SolverFunction

Parameters:
target - internalFunction value to search for.
internalFunction - The internal function to use.
Method Detail

getTarget

public double getTarget()
Getter for target

Returns:
internalFunction value to search for.

setTarget

public void setTarget(double target)
Setter for target

Parameters:
target - internalFunction value to search for.

getInternalFunction

public Evaluator<Double,Double> getInternalFunction()
Getter for internalFunction

Returns:
The internal function to use.

setInternalFunction

public void setInternalFunction(Evaluator<Double,Double> internalFunction)
Setter for internalFunction.

Parameters:
internalFunction - The internal function to use.

evaluate

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

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