edu.stanford.rsl.jpop.testing
Class UncminTest_f77

java.lang.Object
  extended by 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;

Version:
.5 --- May 5, 2010.
Author:
Andreas Maier

Method Summary
 double evaluate(double[] x, int block)
          Evaluates the function at position x.
(Note that x is a Fortran Array which starts at 1.)
 int getNumberOfProcessingBlocks()
          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 void main(java.lang.String[] args)
           
 void setNumberOfProcessingBlocks(int number)
          Sets the number of parallel processing blocks.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)

evaluate

public double evaluate(double[] x,
                       int block)
Description copied from interface: OptimizableFunction
Evaluates the function at position x.
(Note that x is a Fortran Array which starts at 1.)

Specified by:
evaluate in interface OptimizableFunction
Parameters:
x - the position
block - 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: GradientOptimizableFunction
Computes the Gradient at position x. (Note that x is a Fortran Array which starts at 1.)

Specified by:
gradient in interface GradientOptimizableFunction
Parameters:
x_in_java - the position
block - 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: HessianOptimizableFunction
Computes the Hessian matrix at position x. (Note that x is a Fortran Array which starts at 1.)

Specified by:
hessian in interface HessianOptimizableFunction
block - 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: OptimizableFunction
returns the number of parallel processing blocks.

Specified by:
getNumberOfProcessingBlocks in interface OptimizableFunction
Returns:

setNumberOfProcessingBlocks

public void setNumberOfProcessingBlocks(int number)
Description copied from interface: OptimizableFunction
Sets 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:
setNumberOfProcessingBlocks in interface OptimizableFunction