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
public class FDSFactory<T extends CalculusFieldElement<T>> extends Object
Factory forFieldDerivativeStructure.This class is a factory for
FieldDerivativeStructureinstances.Instances of this class are guaranteed to be immutable.
- See Also:
 FieldDerivativeStructure
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFDSFactory.DerivativeField<T extends CalculusFieldElement<T>>Field for {link FieldDerivativeStructure} instances. 
- 
Constructor Summary
Constructors Constructor Description FDSFactory(Field<T> valueField, int parameters, int order)Simple constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDerivativeStructure<T>build(double... derivatives)Build aFieldDerivativeStructurefrom all its derivatives.FieldDerivativeStructure<T>build(T... derivatives)Build aFieldDerivativeStructurefrom all its derivatives.FieldDerivativeStructure<T>constant(double value)Build aFieldDerivativeStructurerepresenting a constant value.FieldDerivativeStructure<T>constant(T value)Build aFieldDerivativeStructurerepresenting a constant value.DSCompilergetCompiler()Get the compiler for the current dimensions.FDSFactory.DerivativeField<T>getDerivativeField()Get theFieldtheFieldDerivativeStructureinstances belong to.Field<T>getValueField()Get theFieldthe value and parameters of the function belongs to.FieldDerivativeStructure<T>variable(int index, double value)Build aFieldDerivativeStructurerepresenting a variable.FieldDerivativeStructure<T>variable(int index, T value)Build aFieldDerivativeStructurerepresenting a variable. 
 - 
 
- 
- 
Method Detail
- 
getValueField
public Field<T> getValueField()
Get theFieldthe value and parameters of the function belongs to.- Returns:
 Fieldthe value and parameters of the function belongs to
 
- 
getDerivativeField
public FDSFactory.DerivativeField<T> getDerivativeField()
Get theFieldtheFieldDerivativeStructureinstances belong to.- Returns:
 FieldtheFieldDerivativeStructureinstances belong to
 
- 
constant
public FieldDerivativeStructure<T> constant(double value)
Build aFieldDerivativeStructurerepresenting a constant value.- Parameters:
 value- value of the constant- Returns:
 - a 
FieldDerivativeStructurerepresenting a constant value 
 
- 
constant
public FieldDerivativeStructure<T> constant(T value)
Build aFieldDerivativeStructurerepresenting a constant value.- Parameters:
 value- value of the constant- Returns:
 - a 
FieldDerivativeStructurerepresenting a constant value 
 
- 
variable
public FieldDerivativeStructure<T> variable(int index, T 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().
 
- 
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:
 FieldDerivativeStructure.getAllDerivatives()
 
- 
build
public FieldDerivativeStructure<T> build(double... 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:
 FieldDerivativeStructure.getAllDerivatives()
 
- 
getCompiler
public DSCompiler getCompiler()
Get the compiler for the current dimensions.- Returns:
 - compiler for the current dimensions
 
 
 - 
 
 -