pal.math
Class EvaluationCounter

java.lang.Object
  extended by pal.math.EvaluationCounter
All Implemented Interfaces:
MultivariateFunction

public class EvaluationCounter
extends java.lang.Object
implements MultivariateFunction

A utiltity class that can be used to track the number of evaluations of a general function

Author:
Matthew Goode

Constructor Summary
EvaluationCounter(MultivariateFunction base)
           
 
Method Summary
 double evaluate(double[] argument)
          compute function value
 int getEvaluationCount()
           
 double getLowerBound(int n)
          get lower bound of argument n
 int getNumArguments()
          get number of arguments
 OrthogonalHints getOrthogonalHints()
           
 double getUpperBound(int n)
          get upper bound of argument n
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationCounter

public EvaluationCounter(MultivariateFunction base)
Method Detail

evaluate

public final double evaluate(double[] argument)
Description copied from interface: MultivariateFunction
compute function value

Specified by:
evaluate in interface MultivariateFunction
Parameters:
argument - function argument (vector)
Returns:
function value

reset

public final void reset()

getEvaluationCount

public final int getEvaluationCount()

getNumArguments

public final int getNumArguments()
Description copied from interface: MultivariateFunction
get number of arguments

Specified by:
getNumArguments in interface MultivariateFunction
Returns:
number of arguments

getLowerBound

public final double getLowerBound(int n)
Description copied from interface: MultivariateFunction
get lower bound of argument n

Specified by:
getLowerBound in interface MultivariateFunction
Parameters:
n - argument number
Returns:
lower bound

getUpperBound

public final double getUpperBound(int n)
Description copied from interface: MultivariateFunction
get upper bound of argument n

Specified by:
getUpperBound in interface MultivariateFunction
Parameters:
n - argument number
Returns:
upper bound

getOrthogonalHints

public final OrthogonalHints getOrthogonalHints()
Specified by:
getOrthogonalHints in interface MultivariateFunction
Returns:
an Orthogonal Hints object that can be used by Orthogonal based optimisers to get information about the function