SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function

Interface Function<D,R>

• Nested Class Summary

Nested Classes
Modifier and Type Interface and Description
static class  Function.EvaluationException
This is the RuntimeException thrown when it fails to evaluate an expression.
• Method Summary

All Methods
Modifier and Type Method and Description
int dimensionOfDomain()
Get the number of variables the function has.
int dimensionOfRange()
Get the dimension of the range space of the function.
R evaluate(D x)
Evaluate the function f at x, where x is from the domain.
• Method Detail

• evaluate

R evaluate(D x)
Evaluate the function f at x, where x is from the domain.
Parameters:
x - x
Returns:
f(x)
• dimensionOfDomain

int dimensionOfDomain()
Get the number of variables the function has. For example, for a univariate function, the domain dimension is 1; for a bivariate function, the domain dimension is 2.
Returns:
the number of variables
• dimensionOfRange

int dimensionOfRange()
Get the dimension of the range space of the function. For example, for a Rn->Rm function, the dimension of the range is m.
Returns:
the dimension of the range