|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.analysis.ComposableFunction
public abstract class ComposableFunction
Base class for UnivariateRealFunction that can be composed with other functions.
| Field Summary | |
|---|---|
static ComposableFunction |
ABS
The FastMath.abs method wrapped as a ComposableFunction. |
static ComposableFunction |
ACOS
The FastMath.abs method wrapped as a ComposableFunction. |
static ComposableFunction |
ASIN
The FastMath.asin method wrapped as a ComposableFunction. |
static ComposableFunction |
ATAN
The FastMath.atan method wrapped as a ComposableFunction. |
static ComposableFunction |
CBRT
The FastMath.cbrt method wrapped as a ComposableFunction. |
static ComposableFunction |
CEIL
The FastMath.ceil method wrapped as a ComposableFunction. |
static ComposableFunction |
COS
The FastMath.cos method wrapped as a ComposableFunction. |
static ComposableFunction |
COSH
The FastMath.cosh method wrapped as a ComposableFunction. |
static ComposableFunction |
EXP
The FastMath.exp method wrapped as a ComposableFunction. |
static ComposableFunction |
EXPM1
The FastMath.expm1 method wrapped as a ComposableFunction. |
static ComposableFunction |
FLOOR
The FastMath.floor method wrapped as a ComposableFunction. |
static ComposableFunction |
IDENTITY
The identity function. |
static ComposableFunction |
INVERT
The invert operator wrapped as a ComposableFunction. |
static ComposableFunction |
LOG
The FastMath.log method wrapped as a ComposableFunction. |
static ComposableFunction |
LOG10
The FastMath.log10 method wrapped as a ComposableFunction. |
static ComposableFunction |
LOG1P
The FastMath.log1p method wrapped as a ComposableFunction. |
static ComposableFunction |
NEGATE
The - operator wrapped as a ComposableFunction. |
static ComposableFunction |
ONE
The constant function always returning 1. |
static ComposableFunction |
RINT
The FastMath.rint method wrapped as a ComposableFunction. |
static ComposableFunction |
SIGNUM
The FastMath.signum method wrapped as a ComposableFunction. |
static ComposableFunction |
SIN
The FastMath.sin method wrapped as a ComposableFunction. |
static ComposableFunction |
SINH
The FastMath.sinh method wrapped as a ComposableFunction. |
static ComposableFunction |
SQRT
The FastMath.sqrt method wrapped as a ComposableFunction. |
static ComposableFunction |
TAN
The FastMath.tan method wrapped as a ComposableFunction. |
static ComposableFunction |
TANH
The FastMath.tanh method wrapped as a ComposableFunction. |
static ComposableFunction |
ULP
The FastMath.ulp method wrapped as a ComposableFunction. |
static ComposableFunction |
ZERO
The constant function always returning 0. |
| Constructor Summary | |
|---|---|
ComposableFunction()
|
|
| Method Summary | |
|---|---|
ComposableFunction |
add(double a)
Return a function adding a constant term to the instance. |
ComposableFunction |
add(UnivariateRealFunction f)
Return a function adding the instance and another function. |
MultivariateRealFunction |
asCollector()
Generates a function that iteratively apply instance function on all elements of an array. |
MultivariateRealFunction |
asCollector(BivariateRealFunction combiner)
Generates a function that iteratively apply instance function on all elements of an array. |
MultivariateRealFunction |
asCollector(BivariateRealFunction combiner,
double initialValue)
Generates a function that iteratively apply instance function on all elements of an array. |
MultivariateRealFunction |
asCollector(double initialValue)
Generates a function that iteratively apply instance function on all elements of an array. |
ComposableFunction |
combine(UnivariateRealFunction f,
BivariateRealFunction combiner)
Return a function combining the instance and another function. |
ComposableFunction |
divide(UnivariateRealFunction f)
Return a function dividing the instance by another function. |
ComposableFunction |
multiply(double scaleFactor)
Return a function scaling the instance by a constant factor. |
ComposableFunction |
multiply(UnivariateRealFunction f)
Return a function multiplying the instance and another function. |
ComposableFunction |
of(UnivariateRealFunction f)
Precompose the instance with another function. |
ComposableFunction |
postCompose(UnivariateRealFunction f)
Postcompose the instance with another function. |
ComposableFunction |
subtract(UnivariateRealFunction f)
Return a function subtracting another function from the instance. |
abstract double |
value(double x)
Compute the value for the function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ComposableFunction ZERO
public static final ComposableFunction ONE
public static final ComposableFunction IDENTITY
public static final ComposableFunction ABS
FastMath.abs method wrapped as a ComposableFunction.
public static final ComposableFunction NEGATE
ComposableFunction.
public static final ComposableFunction INVERT
ComposableFunction.
public static final ComposableFunction SIN
FastMath.sin method wrapped as a ComposableFunction.
public static final ComposableFunction SQRT
FastMath.sqrt method wrapped as a ComposableFunction.
public static final ComposableFunction SINH
FastMath.sinh method wrapped as a ComposableFunction.
public static final ComposableFunction EXP
FastMath.exp method wrapped as a ComposableFunction.
public static final ComposableFunction EXPM1
FastMath.expm1 method wrapped as a ComposableFunction.
public static final ComposableFunction ASIN
FastMath.asin method wrapped as a ComposableFunction.
public static final ComposableFunction ATAN
FastMath.atan method wrapped as a ComposableFunction.
public static final ComposableFunction TAN
FastMath.tan method wrapped as a ComposableFunction.
public static final ComposableFunction TANH
FastMath.tanh method wrapped as a ComposableFunction.
public static final ComposableFunction CBRT
FastMath.cbrt method wrapped as a ComposableFunction.
public static final ComposableFunction CEIL
FastMath.ceil method wrapped as a ComposableFunction.
public static final ComposableFunction FLOOR
FastMath.floor method wrapped as a ComposableFunction.
public static final ComposableFunction LOG
FastMath.log method wrapped as a ComposableFunction.
public static final ComposableFunction LOG10
FastMath.log10 method wrapped as a ComposableFunction.
public static final ComposableFunction LOG1P
FastMath.log1p method wrapped as a ComposableFunction.
public static final ComposableFunction COS
FastMath.cos method wrapped as a ComposableFunction.
public static final ComposableFunction ACOS
FastMath.abs method wrapped as a ComposableFunction.
public static final ComposableFunction COSH
FastMath.cosh method wrapped as a ComposableFunction.
public static final ComposableFunction RINT
FastMath.rint method wrapped as a ComposableFunction.
public static final ComposableFunction SIGNUM
FastMath.signum method wrapped as a ComposableFunction.
public static final ComposableFunction ULP
FastMath.ulp method wrapped as a ComposableFunction.
| Constructor Detail |
|---|
public ComposableFunction()
| Method Detail |
|---|
public ComposableFunction of(UnivariateRealFunction f)
The composed function h created by h = g.of(f) is such
that h.value(x) == g.value(f.value(x)) for all x.
f - function to compose with
this.value(f.value(x))postCompose(UnivariateRealFunction)public ComposableFunction postCompose(UnivariateRealFunction f)
The composed function h created by h = g.postCompose(f) is such
that h.value(x) == f.value(g.value(x)) for all x.
f - function to compose with
f.value(this.value(x))of(UnivariateRealFunction)
public ComposableFunction combine(UnivariateRealFunction f,
BivariateRealFunction combiner)
The function h created by h = g.combine(f, combiner) is such that
h.value(x) == combiner.value(g.value(x), f.value(x)) for all x.
f - function to combine with the instancecombiner - bivariate function used for combining
combine.value(this.value(x), f.value(x))public ComposableFunction add(UnivariateRealFunction f)
f - function to combine with the instance
this.value(x) + f.value(x)public ComposableFunction add(double a)
a - term to add
this.value(x) + apublic ComposableFunction subtract(UnivariateRealFunction f)
f - function to combine with the instance
this.value(x) - f.value(x)public ComposableFunction multiply(UnivariateRealFunction f)
f - function to combine with the instance
this.value(x) * f.value(x)public ComposableFunction multiply(double scaleFactor)
scaleFactor - constant scaling factor
this.value(x) * scaleFactorpublic ComposableFunction divide(UnivariateRealFunction f)
f - function to combine with the instance
this.value(x) / f.value(x)
public MultivariateRealFunction asCollector(BivariateRealFunction combiner,
double initialValue)
The generated function behaves as follows:
result = combiner.value(result,
this.value(nextMultivariateEntry));
combiner - combiner to use between entriesinitialValue - initial value to use before first entry
public MultivariateRealFunction asCollector(BivariateRealFunction combiner)
Calling this method is equivalent to call asCollector(BivariateRealFunction, 0.0).
combiner - combiner to use between entries
asCollector(BivariateRealFunction, double)public MultivariateRealFunction asCollector(double initialValue)
Calling this method is equivalent to call asCollector(BinaryFunction.ADD, initialValue).
initialValue - initial value to use before first entry
asCollector(BivariateRealFunction, double),
BinaryFunction.ADDpublic MultivariateRealFunction asCollector()
Calling this method is equivalent to call asCollector(BinaryFunction.ADD, 0.0).
asCollector(BivariateRealFunction, double),
BinaryFunction.ADD
public abstract double value(double x)
throws FunctionEvaluationException
value in interface UnivariateRealFunctionx - the point for which the function value should be computed
FunctionEvaluationException - if the function evaluation fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||