org.strbio.util
Interface CGOptimizer.Optimizable

Enclosing interface:
CGOptimizer

public static interface CGOptimizer.Optimizable

This is the interface you have to implement if you want to optimize using NRMin.


Method Summary
 double[] getVars()
          This should return an array of variables you want optimized.
 double objectiveFunction()
          The variables will be optimized in such a way as to minimize the value returned by calls to objectiveFunction().
 void objectiveGradient(double[] rv)
          The gradient function must return the gradient at the current point with respect to each variable in the vector.
 void setVars(double[] v)
          This should set the optimizable variables to values from the array.
 

Method Detail

getVars

double[] getVars()
This should return an array of variables you want optimized.


setVars

void setVars(double[] v)
This should set the optimizable variables to values from the array. The array is in the same order as in getVars.


objectiveFunction

double objectiveFunction()
The variables will be optimized in such a way as to minimize the value returned by calls to objectiveFunction().


objectiveGradient

void objectiveGradient(double[] rv)
The gradient function must return the gradient at the current point with respect to each variable in the vector. A new vector is not created each time, to save on object creation.