public class LinearCombinationFunction extends Object implements IParamDiffFunction
Note: The child class have to cast their functions to Serializable if it should be serializable (not
required).
| Modifier and Type | Field and Description |
|---|---|
protected Map<Parameter,Function<SpacecraftState,Double>> |
functions
Map describing the functions.
|
protected static String |
PARAMETER_PREFIX_NAME
Standard parameter prefix name: "A".
|
| Constructor and Description |
|---|
LinearCombinationFunction(Collection<Function<SpacecraftState,Double>> monomialFunctionCollection)
Constructor to initialize the function with the monomial function description.
|
LinearCombinationFunction(Map<Parameter,Function<SpacecraftState,Double>> functions)
Constructor to initialize the function.
|
| Modifier and Type | Method and Description |
|---|---|
double |
derivativeValue(Parameter p,
SpacecraftState s)
Compute the derivative value with respect to the input parameter.
|
ArrayList<Parameter> |
getParameters()
Get the supported parameters.
|
boolean |
isDifferentiableBy(Parameter p)
Tell if the function is differentiable by the given parameter.
|
boolean |
supportsParameter(Parameter param)
Check if a parameter is supported.
|
double |
value(SpacecraftState state)
Getting the value of the function.
|
protected static final String PARAMETER_PREFIX_NAME
protected final Map<Parameter,Function<SpacecraftState,Double>> functions
public LinearCombinationFunction(Map<Parameter,Function<SpacecraftState,Double>> functions)
WARNING: The given map is directly stored in the function. Please be careful to not modify the map, otherwise the function would change to, which can lead to unexpected behaviors.
functions - Map describing the functionsNullArgumentException - if a parameter (key) or a monomial function (value) is
described by null because a null parameter/function can't be appliedpublic LinearCombinationFunction(Collection<Function<SpacecraftState,Double>> monomialFunctionCollection)
monomialFunctionCollection - Collection describing the monomial functionsNullArgumentException - if a monomial function is described by null because a
null function can't be appliedpublic double derivativeValue(Parameter p, SpacecraftState s)
derivativeValue in interface IParamDiffFunctionp - parameters - current statepublic double value(SpacecraftState state)
value in interface IParameterizableFunctionstate - the spacecraft statepublic boolean supportsParameter(Parameter param)
supportsParameter in interface IParameterizableparam - parameter to checkpublic boolean isDifferentiableBy(Parameter p)
isDifferentiableBy in interface IParamDiffFunctionp - function parameterpublic ArrayList<Parameter> getParameters()
The list is returned in a shallow copy.
getParameters in interface IParameterizableCopyright © 2025 CNES. All rights reserved.