T
- the type of the function parameters and valuepublic class FDSFactory<T extends RealFieldElement<T>> extends Object
FieldDerivativeStructure
.
This class is a factory for FieldDerivativeStructure
instances.
Instances of this class are guaranteed to be immutable.
FieldDerivativeStructure
Constructor and Description |
---|
FDSFactory(Field<T> valueField,
int parameters,
int order)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
FieldDerivativeStructure<T> |
build(double... derivatives)
Build a
FieldDerivativeStructure from all its derivatives. |
FieldDerivativeStructure<T> |
build(T... derivatives)
Build a
FieldDerivativeStructure from all its derivatives. |
FieldDerivativeStructure<T> |
constant(double value)
Build a
FieldDerivativeStructure representing a constant value. |
FieldDerivativeStructure<T> |
constant(T value)
Build a
FieldDerivativeStructure representing a constant value. |
DSCompiler |
getCompiler()
Get the compiler for the current dimensions.
|
Field<FieldDerivativeStructure<T>> |
getDerivativeField()
Get the
Field the FieldDerivativeStructure instances belong to. |
Field<T> |
getValueField()
Get the
Field the value and parameters of the function belongs to. |
FieldDerivativeStructure<T> |
variable(int index,
double value)
Build a
FieldDerivativeStructure representing a variable. |
FieldDerivativeStructure<T> |
variable(int index,
T value)
Build a
FieldDerivativeStructure representing a variable. |
public Field<T> getValueField()
Field
the value and parameters of the function belongs to.Field
the value and parameters of the function belongs topublic Field<FieldDerivativeStructure<T>> getDerivativeField()
Field
the FieldDerivativeStructure
instances belong to.Field
the FieldDerivativeStructure
instances belong topublic FieldDerivativeStructure<T> constant(double value)
FieldDerivativeStructure
representing a constant value.value
- value of the constantFieldDerivativeStructure
representing a constant valuepublic FieldDerivativeStructure<T> constant(T value)
FieldDerivativeStructure
representing a constant value.value
- value of the constantFieldDerivativeStructure
representing a constant valuepublic FieldDerivativeStructure<T> variable(int index, T value) throws MathIllegalArgumentException
FieldDerivativeStructure
representing a variable.
Instances built using this method are considered to be the free variables with respect to which differentials are computed. As such, their differential with respect to themselves is +1.
index
- index of the variable (from 0 to
getCompiler()
.getFreeParameters()
- 1)value
- value of the variableFieldDerivativeStructure
representing a variableMathIllegalArgumentException
- if index if greater or
equal to getCompiler()
.getFreeParameters()
.public FieldDerivativeStructure<T> variable(int index, double value) throws MathIllegalArgumentException
FieldDerivativeStructure
representing a variable.
Instances built using this method are considered to be the free variables with respect to which differentials are computed. As such, their differential with respect to themselves is +1.
index
- index of the variable (from 0 to
getCompiler()
.getFreeParameters()
- 1)value
- value of the variableFieldDerivativeStructure
representing a variableMathIllegalArgumentException
- if index if greater or
equal to getCompiler()
.getFreeParameters()
.@SafeVarargs public final FieldDerivativeStructure<T> build(T... derivatives) throws MathIllegalArgumentException
FieldDerivativeStructure
from all its derivatives.derivatives
- derivatives sorted according to
DSCompiler.getPartialDerivativeIndex(int...)
FieldDerivativeStructure
with specified derivativesMathIllegalArgumentException
- if derivatives array does not match the
size
expected by the compilerMathIllegalArgumentException
- if order is too largeFieldDerivativeStructure.getAllDerivatives()
public FieldDerivativeStructure<T> build(double... derivatives) throws MathIllegalArgumentException
FieldDerivativeStructure
from all its derivatives.derivatives
- derivatives sorted according to
DSCompiler.getPartialDerivativeIndex(int...)
FieldDerivativeStructure
with specified derivativesMathIllegalArgumentException
- if derivatives array does not match the
size
expected by the compilerMathIllegalArgumentException
- if order is too largeFieldDerivativeStructure.getAllDerivatives()
public DSCompiler getCompiler()
Copyright © 2016–2020 Hipparchus.org. All rights reserved.