|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jhu.bme.smile.commons.optimize.FunctionNumericNDDifferentiation
public class FunctionNumericNDDifferentiation
This class does numeric differentiation in ND. There are lots of methods of doing so, and depending on how many points are used, enter that value in for the method variable. Also computes 2nd derivatives and hessians Defaults to 3-point method.
| Constructor Summary | |
|---|---|
FunctionNumericNDDifferentiation(OptimizableNDContinuous function)
Creates an object which can differentiate an ND function with default values. |
|
FunctionNumericNDDifferentiation(OptimizableNDContinuous function,
double step,
int method)
Creates an object which can differentiate an ND function in various ways. |
|
| Method Summary | |
|---|---|
double[][] |
get2ndDerivative(double[] x)
Creates the hessian matrix |
double |
get2ndDerivative(double[] x,
int dim1,
int dim2)
Gets 2nd partial derivative for the dimensions given |
double[] |
getDerivative(double[] x)
Gets the gradient |
double[] |
getDomainMax()
Gets the domain maximum |
double[] |
getDomainMin()
Gets the domain minimum |
double |
getDomainTolerance()
Gets the tolerance |
int |
getMethod()
Gets the method used |
int |
getNumberOfDimensions()
Gets the number of dimensions |
double |
getStep()
Gets the step size used |
double |
getValue(double[] x)
Gets the value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FunctionNumericNDDifferentiation(OptimizableNDContinuous function)
function - the function to be differentiated
public FunctionNumericNDDifferentiation(OptimizableNDContinuous function,
double step,
int method)
function - the function to be differentiatedstep - the step sizemethod - the differentiating method requested: 0,1,3,5,7, or 9. Default is 3.| Method Detail |
|---|
public double get2ndDerivative(double[] x,
int dim1,
int dim2)
get2ndDerivative in interface OptimizableNDContinuousDifferentiablex - a double array that contains the location of the derivative requireddim1 - the first dimension of the derivativedim2 - the second dimension of the derivative
public double[][] get2ndDerivative(double[] x)
get2ndDerivative in interface OptimizableNDContinuousDifferentiablex - location to evaluate derivative at
public double[] getDerivative(double[] x)
getDerivative in interface OptimizableNDContinuousDifferentiablex - location to evaluate derivative at
public int getMethod()
public double getStep()
public double[] getDomainMax()
getDomainMax in interface OptimizableNDContinuouspublic double[] getDomainMin()
getDomainMin in interface OptimizableNDContinuouspublic double getDomainTolerance()
getDomainTolerance in interface OptimizableNDContinuouspublic double getValue(double[] x)
getValue in interface OptimizableNDContinuousx - location to get value at
public int getNumberOfDimensions()
getNumberOfDimensions in interface OptimizableNDContinuous
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||