Class TaylorMap
- java.lang.Object
-
- org.hipparchus.analysis.differentiation.TaylorMap
-
- All Implemented Interfaces:
DifferentialAlgebra
public class TaylorMap extends Object implements DifferentialAlgebra
Container for a Taylor map.A Taylor map is a set of n
DerivativeStructure\((f_1, f_2, \ldots, f_n)\) depending on m parameters \((p_1, p_2, \ldots, p_m)\), with positive n and m.- Since:
- 2.2
-
-
Constructor Summary
Constructors Constructor Description TaylorMap(double[] point, DerivativeStructure[] functions)Simple constructor.TaylorMap(int parameters, int order, int nbFunctions)Constructor for identity map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaylorMapcompose(TaylorMap other)Compose the instance with another Taylor map as \(\mathrm{this} \circ \mathrm{other}\).intgetFreeParameters()Get the number of free parameters.DerivativeStructuregetFunction(int i)Get a function from the map.intgetNbFunctions()Get the number of functions of the map.intgetOrder()Get the maximum derivation order.double[]getPoint()Get the point at which map is evaluated.TaylorMapinvert(MatrixDecomposer decomposer)Invert the instance.double[]value(double... deltaP)Evaluate Taylor expansion of the map at some offset.
-
-
-
Constructor Detail
-
TaylorMap
public TaylorMap(double[] point, DerivativeStructure[] functions)Simple constructor.The number of number of parameters and derivation orders of all functions must match.
- Parameters:
point- point at which map is evaluatedfunctions- functions composing the map (must contain at least one element)
-
TaylorMap
public TaylorMap(int parameters, int order, int nbFunctions)Constructor for identity map.The identity is considered to be evaluated at origin.
- Parameters:
parameters- number of free parametersorder- derivation ordernbFunctions- number of functions
-
-
Method Detail
-
getFreeParameters
public int getFreeParameters()
Get the number of free parameters.- Specified by:
getFreeParametersin interfaceDifferentialAlgebra- Returns:
- number of free parameters
-
getOrder
public int getOrder()
Get the maximum derivation order.- Specified by:
getOrderin interfaceDifferentialAlgebra- Returns:
- maximum derivation order
-
getNbFunctions
public int getNbFunctions()
Get the number of functions of the map.- Returns:
- number of functions of the map
-
getPoint
public double[] getPoint()
Get the point at which map is evaluated.- Returns:
- point at which map is evaluated
-
getFunction
public DerivativeStructure getFunction(int i)
Get a function from the map.- Parameters:
i- index of the function (must be between 0 included andgetNbFunctions()excluded- Returns:
- function at index i
-
value
public double[] value(double... deltaP)
Evaluate Taylor expansion of the map at some offset.- Parameters:
deltaP- parameters offsets \((\Delta p_1, \Delta p_2, \ldots, \Delta p_n)\)- Returns:
- value of the Taylor expansion at \((p_1 + \Delta p_1, p_2 + \Delta p_2, \ldots, p_n + \Delta p_n)\)
-
compose
public TaylorMap compose(TaylorMap other)
Compose the instance with another Taylor map as \(\mathrm{this} \circ \mathrm{other}\).- Parameters:
other- map with which instance must be composed- Returns:
- composed map \(\mathrm{this} \circ \mathrm{other}\)
-
invert
public TaylorMap invert(MatrixDecomposer decomposer)
Invert the instance.Consider
Taylor expansionof the map with small parameters offsets \((\Delta p_1, \Delta p_2, \ldots, \Delta p_n)\) which leads to evaluation offsets \((f_1 + df_1, f_2 + df_2, \ldots, f_n + df_n)\). The map inversion defines a Taylor map that computes \((\Delta p_1, \Delta p_2, \ldots, \Delta p_n)\) from \((df_1, df_2, \ldots, df_n)\).The map must be square to be invertible (i.e. the number of functions and the number of parameters in the functions must match)
- Parameters:
decomposer- matrix decomposer to user for inverting the linear part- Returns:
- inverted map
- See Also:
- chapter 2 of Advances in Imaging and Electron Physics, vol 108 by Martin Berz
-
-