edu.stanford.rsl.jpop.testing
Class UncminTest_f77
- java.lang.Object
-
- edu.stanford.rsl.jpop.testing.UncminTest_f77
-
- All Implemented Interfaces:
- GradientOptimizableFunction, HessianOptimizableFunction, OptimizableFunction
public class UncminTest_f77 extends java.lang.Object implements HessianOptimizableFunction
This class tests the JPOP class. It should produce exactly the same output as the previous implementation in Uncmin_f77;
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleevaluate(double[] x, int block)Evaluates the function at position x.
(Note that x is a Fortran Array which starts at 1.)intgetNumberOfProcessingBlocks()returns the number of parallel processing blocks.double[]gradient(double[] x_in_java, int block)Computes the Gradient at position x.double[][]hessian(double[] x_in_java, int block)Computes the Hessian matrix at position x.static voidmain(java.lang.String[] args)voidsetNumberOfProcessingBlocks(int number)Sets the number of parallel processing blocks.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
evaluate
public double evaluate(double[] x, int block)Description copied from interface:OptimizableFunctionEvaluates the function at position x.
(Note that x is a Fortran Array which starts at 1.)- Specified by:
evaluatein interfaceOptimizableFunction- Parameters:
x- the positionblock- the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().- Returns:
- the function value at x
-
gradient
public double[] gradient(double[] x_in_java, int block)Description copied from interface:GradientOptimizableFunctionComputes the Gradient at position x. (Note that x is a Fortran Array which starts at 1.)- Specified by:
gradientin interfaceGradientOptimizableFunction- Parameters:
x_in_java- the positionblock- the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().- Returns:
- the gradient at x. (In Fortran Style)
-
hessian
public double[][] hessian(double[] x_in_java, int block)Description copied from interface:HessianOptimizableFunctionComputes the Hessian matrix at position x. (Note that x is a Fortran Array which starts at 1.)- Specified by:
hessianin interfaceHessianOptimizableFunctionblock- the block identifier. First block is 0. block is < getNumberOfProcessingBlocks().- Returns:
- the Hessian at x. (In Fortran Style)
-
getNumberOfProcessingBlocks
public int getNumberOfProcessingBlocks()
Description copied from interface:OptimizableFunctionreturns the number of parallel processing blocks.- Specified by:
getNumberOfProcessingBlocksin interfaceOptimizableFunction- Returns:
-
setNumberOfProcessingBlocks
public void setNumberOfProcessingBlocks(int number)
Description copied from interface:OptimizableFunctionSets the number of parallel processing blocks. This number should optimally equal to the number of available processors in the current machine. Default value should be 1.- Specified by:
setNumberOfProcessingBlocksin interfaceOptimizableFunction
-
-
DMelt 3.0 © DataMelt by jWork.ORG