org.orekit.parameter
Class PiecewiseFunction

java.lang.Object
  extended by org.orekit.parameter.Parameterizable
      extended by org.orekit.parameter.ParamDiffFunction
          extended by org.orekit.parameter.PiecewiseFunction
All Implemented Interfaces:
Serializable, IParamDiffFunction, IParameterizable, IParameterizableFunction

public class PiecewiseFunction
extends ParamDiffFunction

This class is used to define parameterizable piecewize function. It is defined by a list of IParamDiffFunction, each sub function applying to a certain interval defined by the first date of the interval.

Since:
2.3
Version:
$Id: PiecewiseFunction.java 12351 2015-02-13 17:17:08Z maggiorani $
Author:
auguief
See Also:
Serialized Form
Concurrency :
not thread-safe, uses internal mutable attributes

Constructor Summary
PiecewiseFunction(ArrayList<IParamDiffFunction> flist, ArrayList<AbsoluteDate> xlist)
          Simple constructor with 2 lists (IParamDiffFunction and AbsoluteDate) where dates list represent the connection points between functions.
 
Method Summary
 double derivativeValue(Parameter p, SpacecraftState s)
          Compute the derivative value with respect to the input parameter.
 ArrayList<Parameter> getParameters()
          Get the supported parameters.
 double value(SpacecraftState s)
          Getting the value of the function.
 
Methods inherited from class org.orekit.parameter.ParamDiffFunction
isDifferentiableBy, supportsParameter
 
Methods inherited from class org.orekit.parameter.Parameterizable
addParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PiecewiseFunction

public PiecewiseFunction(ArrayList<IParamDiffFunction> flist,
                         ArrayList<AbsoluteDate> xlist)
                  throws OrekitException
Simple constructor with 2 lists (IParamDiffFunction and AbsoluteDate) where dates list represent the connection points between functions. So dates list size must equals to functions list size - 1 else exception is thrown

Parameters:
flist - list of IParamDiffFunction
xlist - list of AbsoluteDate ordered chronologically
Throws:
OrekitException - if xlist.size() != flist.size() - 1 or xlist is not ordered chronologically
Method Detail

value

public double value(SpacecraftState s)
Getting the value of the function.

Parameters:
s - the spacecraft state
Returns:
the value of the function.

derivativeValue

public double derivativeValue(Parameter p,
                              SpacecraftState s)
Compute the derivative value with respect to the input parameter.

Parameters:
p - parameter
s - current state
Returns:
the derivative value

getParameters

public ArrayList<Parameter> getParameters()
Get the supported parameters.

Specified by:
getParameters in interface IParameterizable
Overrides:
getParameters in class Parameterizable
Returns:
list of supported parameters


Copyright © 2016 CNES. All Rights Reserved.