Class FDSFactory<T extends CalculusFieldElement<T>>
java.lang.Object
org.hipparchus.analysis.differentiation.FDSFactory<T>
- Type Parameters:
T- the type of the function parameters and value
Factory for
FieldDerivativeStructure.
This class is a factory for FieldDerivativeStructure instances.
Instances of this class are guaranteed to be immutable.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFDSFactory.DerivativeField<T extends CalculusFieldElement<T>>Field for {link FieldDerivativeStructure} instances. -
Constructor Summary
ConstructorsConstructorDescriptionFDSFactory(Field<T> valueField, int parameters, int order) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild(double... derivatives) Build aFieldDerivativeStructurefrom all its derivatives.final FieldDerivativeStructure<T> Build aFieldDerivativeStructurefrom all its derivatives.constant(double value) Build aFieldDerivativeStructurerepresenting a constant value.Build aFieldDerivativeStructurerepresenting a constant value.Get the compiler for the current dimensions.Get theFieldtheFieldDerivativeStructureinstances belong to.Get theFieldthe value and parameters of the function belongs to.variable(int index, double value) Build aFieldDerivativeStructurerepresenting a variable.Build aFieldDerivativeStructurerepresenting a variable.
-
Constructor Details
-
FDSFactory
Simple constructor.- Parameters:
valueField- field for the function parameters and valueparameters- number of free parametersorder- derivation order
-
-
Method Details
-
getValueField
Get theFieldthe value and parameters of the function belongs to.- Returns:
Fieldthe value and parameters of the function belongs to
-
getDerivativeField
Get theFieldtheFieldDerivativeStructureinstances belong to.- Returns:
FieldtheFieldDerivativeStructureinstances belong to
-
constant
Build aFieldDerivativeStructurerepresenting a constant value.- Parameters:
value- value of the constant- Returns:
- a
FieldDerivativeStructurerepresenting a constant value
-
constant
Build aFieldDerivativeStructurerepresenting a constant value.- Parameters:
value- value of the constant- Returns:
- a
FieldDerivativeStructurerepresenting a constant value
-
variable
Build aFieldDerivativeStructurerepresenting 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.
- Parameters:
index- index of the variable (from 0 togetCompiler().getFreeParameters()- 1)value- value of the variable- Returns:
- a
FieldDerivativeStructurerepresenting a variable - Throws:
MathIllegalArgumentException- if index if greater or equal togetCompiler().getFreeParameters().
-
variable
public FieldDerivativeStructure<T> variable(int index, double value) throws MathIllegalArgumentException Build aFieldDerivativeStructurerepresenting 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.
- Parameters:
index- index of the variable (from 0 togetCompiler().getFreeParameters()- 1)value- value of the variable- Returns:
- a
FieldDerivativeStructurerepresenting a variable - Throws:
MathIllegalArgumentException- if index if greater or equal togetCompiler().getFreeParameters().
-
build
@SafeVarargs public final FieldDerivativeStructure<T> build(T... derivatives) throws MathIllegalArgumentException Build aFieldDerivativeStructurefrom all its derivatives.- Parameters:
derivatives- derivatives sorted according toDSCompiler.getPartialDerivativeIndex(int...)- Returns:
FieldDerivativeStructurewith specified derivatives- Throws:
MathIllegalArgumentException- if derivatives array does not match thesizeexpected by the compilerMathIllegalArgumentException- if order is too large- See Also:
-
build
Build aFieldDerivativeStructurefrom all its derivatives.- Parameters:
derivatives- derivatives sorted according toDSCompiler.getPartialDerivativeIndex(int...)- Returns:
FieldDerivativeStructurewith specified derivatives- Throws:
MathIllegalArgumentException- if derivatives array does not match thesizeexpected by the compilerMathIllegalArgumentException- if order is too large- See Also:
-
getCompiler
Get the compiler for the current dimensions.- Returns:
- compiler for the current dimensions
-