Package pal.math
Class EvaluationCounter
- java.lang.Object
-
- 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
Constructors Constructor Description EvaluationCounter(MultivariateFunction base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleevaluate(double[] argument)compute function valueintgetEvaluationCount()doublegetLowerBound(int n)get lower bound of argument nintgetNumArguments()get number of argumentsOrthogonalHintsgetOrthogonalHints()doublegetUpperBound(int n)get upper bound of argument nvoidreset()
-
-
-
Constructor Detail
-
EvaluationCounter
public EvaluationCounter(MultivariateFunction base)
-
-
Method Detail
-
evaluate
public final double evaluate(double[] argument)
Description copied from interface:MultivariateFunctioncompute function value- Specified by:
evaluatein interfaceMultivariateFunction- 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:MultivariateFunctionget number of arguments- Specified by:
getNumArgumentsin interfaceMultivariateFunction- Returns:
- number of arguments
-
getLowerBound
public final double getLowerBound(int n)
Description copied from interface:MultivariateFunctionget lower bound of argument n- Specified by:
getLowerBoundin interfaceMultivariateFunction- Parameters:
n- argument number- Returns:
- lower bound
-
getUpperBound
public final double getUpperBound(int n)
Description copied from interface:MultivariateFunctionget upper bound of argument n- Specified by:
getUpperBoundin interfaceMultivariateFunction- Parameters:
n- argument number- Returns:
- upper bound
-
getOrthogonalHints
public final OrthogonalHints getOrthogonalHints()
- Specified by:
getOrthogonalHintsin interfaceMultivariateFunction- Returns:
- an Orthogonal Hints object that can be used by Orthogonal based optimisers to get information about the function
-
-