public class BoundsCheckedFunction extends Object implements MultivariateFunction
Constructor and Description |
---|
BoundsCheckedFunction(MultivariateFunction func)
construct bound-checked multivariate function
(a large number will be returned on function evaluation if argument
is out of bounds; default is 1000000)
|
BoundsCheckedFunction(MultivariateFunction func,
double largeNumber)
construct constrained multivariate function
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double[] x)
computes function value, taking into account the constraints on the
argument
|
double |
getLowerBound(int n)
get lower bound of argument n
|
int |
getNumArguments()
get number of arguments
|
double |
getUpperBound(int n)
get upper bound of argument n
|
public BoundsCheckedFunction(MultivariateFunction func)
func
- unconstrained multivariate functionpublic BoundsCheckedFunction(MultivariateFunction func, double largeNumber)
func
- unconstrained multivariate functionlargeNumber
- value returned on function evaluation
if argument is out of boundspublic double evaluate(double[] x)
evaluate
in interface MultivariateFunction
x
- function argumentpublic int getNumArguments()
MultivariateFunction
getNumArguments
in interface MultivariateFunction
public double getLowerBound(int n)
MultivariateFunction
getLowerBound
in interface MultivariateFunction
n
- argument numberpublic double getUpperBound(int n)
MultivariateFunction
getUpperBound
in interface MultivariateFunction
n
- argument numberCopyright © 2015–2021 Fiji. All rights reserved.