Package pal.math
Class OrthogonalLineFunction
java.lang.Object
pal.math.OrthogonalLineFunction
- All Implemented Interfaces:
UnivariateFunction
converts a multivariate function into a univariate function
by keeping all but one argument constant
- Author:
- Korbinian Strimmer
-
Constructor Summary
ConstructorsConstructorDescriptionconstruct univariate function from multivariate functionOrthogonalLineFunction(MultivariateFunction func, int selectedDimension, double[] initialArguments) construct univariate function from multivariate function -
Method Summary
Modifier and TypeMethodDescriptiondoubleevaluate(double arg) compute function valuedoubleget lower bound of argumentdoubleget upper bound of argumentvoidselectArgument(int num) use only the specified argument in the constructed univariate function and keep all others constantvoidsetAllArguments(double[] start) set (change) values of all arguments (start values)voidsetArgument(double val) set (change) value of a single argument (the one currently active)
-
Constructor Details
-
OrthogonalLineFunction
construct univariate function from multivariate function- Parameters:
func- multivariate function
-
OrthogonalLineFunction
public OrthogonalLineFunction(MultivariateFunction func, int selectedDimension, double[] initialArguments) construct univariate function from multivariate function- Parameters:
func- multivariate functionthe- initial arguments to the base MultivariateFunction (may be null)selectedDimension- The selected dimension/argument that the line "runs" along
-
-
Method Details
-
setAllArguments
public void setAllArguments(double[] start) set (change) values of all arguments (start values)- Parameters:
start- start values
-
setArgument
public void setArgument(double val) set (change) value of a single argument (the one currently active)- Parameters:
val- value of argument
-
selectArgument
public void selectArgument(int num) use only the specified argument in the constructed univariate function and keep all others constant- Parameters:
num- argument number
-
evaluate
public double evaluate(double arg) Description copied from interface:UnivariateFunctioncompute function value- Specified by:
evaluatein interfaceUnivariateFunction- Returns:
- function value
-
getLowerBound
public double getLowerBound()Description copied from interface:UnivariateFunctionget lower bound of argument- Specified by:
getLowerBoundin interfaceUnivariateFunction- Returns:
- lower bound
-
getUpperBound
public double getUpperBound()Description copied from interface:UnivariateFunctionget upper bound of argument- Specified by:
getUpperBoundin interfaceUnivariateFunction- Returns:
- upper bound
-