fr.cnes.sirius.patrius.propagation
Class SimpleAdditionalStateProvider

java.lang.Object
  extended by fr.cnes.sirius.patrius.propagation.SimpleAdditionalStateProvider
All Implemented Interfaces:
AdditionalStateProvider

public final class SimpleAdditionalStateProvider
extends Object
implements AdditionalStateProvider

This class is a simple implementation of additionalStateProvider. It is composed of a name, a dates table, and an additional states table associated to the dates. An ISearch index provides a way to find the nearest index table for a given date. It provides an additional state at a date through linear interpolation of the given additional states table.

Since:
3.1
Version:
$Id: SimpleAdditionalStateProvider.java 17585 2017-05-10 13:27:59Z bignon $
Author:
chabaudp
Concurrency :
immutable

Constructor Summary
SimpleAdditionalStateProvider(String name, AbsoluteDate[] dateTab, double[][] additionalStatesTab, ISearchIndex algo)
          Creates an instance of SimpleAdditionalStateProvider from a name describing the additional state double table, a table of dates, and a table of additional states associated to these dates.
 
Method Summary
 double[] getAdditionalState(AbsoluteDate date)
          Get the additional state.
 String getName()
          Get the name of the additional state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAdditionalStateProvider

public SimpleAdditionalStateProvider(String name,
                                     AbsoluteDate[] dateTab,
                                     double[][] additionalStatesTab,
                                     ISearchIndex algo)
Creates an instance of SimpleAdditionalStateProvider from a name describing the additional state double table, a table of dates, and a table of additional states associated to these dates.

Parameters:
name - describes the additional state double table
dateTab - table of dates
additionalStatesTab - additional states associated to these dates
algo - class to find the nearest date index from a given date in the date table (If null, algo will be, by default, a BinarySearchIndexOpenClosed based on a table of duration since the first date of the dates table)
Method Detail

getName

public String getName()
Get the name of the additional state.

Specified by:
getName in interface AdditionalStateProvider
Returns:
name of the additional state

getAdditionalState

public double[] getAdditionalState(AbsoluteDate date)
Get the additional state.

Specified by:
getAdditionalState in interface AdditionalStateProvider
Parameters:
date - date to which additional state is computed
Returns:
additional state at this date


Copyright © 2017 CNES. All Rights Reserved.