org.omegahat.Numerics.Optimizers
Interface ModelObjective

All Known Implementing Classes:
ModelObjectiveOmegahat

public interface ModelObjective

Interface for objects that define an objective function to be optimized.

Such objects will be passed to the various optimizer algorithms and used to compute the value (and optionally other information such as gradients) of the objective at particular model points as the optimization proceeds.


Method Summary
 void assignParameters(ModelPointNumericInt arg)
          Install the parameters from the ModelPoint argument, so that eval can find them.
 ModelPoint eval(ModelPointNumericInt arg)
          Evaluate the expression at the supplied ModelPoint.
 NumericArray getGradient(ModelPointNumericInt arg)
          Retreive the return the computed gradient of the objective, and store it in the ModelPoint argument, if that is non-null.
 NumericMatrix getHessian(ModelPointNumericInt arg)
          Retreive the return the computed hessian of the objective, and store it in the ModelPoint argument, if that is non-null.
 double getValue(ModelPointNumericInt arg)
          Retreive the return the computed value of the objective, and store it in the ModelPoint argument, if that is non-null.
 

Method Detail

eval

public ModelPoint eval(ModelPointNumericInt arg)
Evaluate the expression at the supplied ModelPoint.

The returned value (typically the same object as the argument) has the appropriate fields (e.g., value, gradient and/or hessian) filled in.


assignParameters

public void assignParameters(ModelPointNumericInt arg)
Install the parameters from the ModelPoint argument, so that eval can find them.

getValue

public double getValue(ModelPointNumericInt arg)
Retreive the return the computed value of the objective, and store it in the ModelPoint argument, if that is non-null.

getGradient

public NumericArray getGradient(ModelPointNumericInt arg)
Retreive the return the computed gradient of the objective, and store it in the ModelPoint argument, if that is non-null.

By convention, returns null if the gradient is not being computed.


getHessian

public NumericMatrix getHessian(ModelPointNumericInt arg)
Retreive the return the computed hessian of the objective, and store it in the ModelPoint argument, if that is non-null.

By convention, returns null if the hessian is not being computed.