A DenseOutput class interface extension, geared towards step-wise construction procedures.
Outputs of this kind are to be built incrementally by means of discrete updates that extend its domain. Nature of an update remains implementation specific.
To allow for update rectification (i.e. drop and replacement), in case it fails to meet certain criteria (e.g. not within tolerances), construction can be deferred to a consolidation step. In between consolidations, updates can be rolled back (i.e. discarded) one by one on a last-input-first-output basis. Implementations are thus encouraged to keep recent updates in a light weight form, deferring heavier computations and construction of a better suited representation for evaluation. As such, evaluation is bound to succeed only after consolidation.
T | The scalar type, which must be one of the default scalars. |
#include <drake/systems/analysis/stepwise_dense_output.h>
Public Member Functions | |
~StepwiseDenseOutput () override=default | |
virtual void | Rollback ()=0 |
Rolls back (drops) the last update. More... | |
virtual void | Consolidate ()=0 |
Consolidates latest updates. More... | |
Does not allow copy, move, or assignment | |
StepwiseDenseOutput (const StepwiseDenseOutput &)=delete | |
StepwiseDenseOutput & | operator= (const StepwiseDenseOutput &)=delete |
StepwiseDenseOutput (StepwiseDenseOutput &&)=delete | |
StepwiseDenseOutput & | operator= (StepwiseDenseOutput &&)=delete |
Public Member Functions inherited from DenseOutput< T > | |
virtual | ~DenseOutput ()=default |
VectorX< T > | Evaluate (const T &t) const |
Evaluates the output at the given time t . More... | |
T | EvaluateNth (const T &t, int n) const |
Evaluates the output value's n th scalar element (0-indexed) at the given time t . More... | |
int | size () const |
Returns the output size (i.e. More... | |
bool | is_empty () const |
Checks whether the output is empty or not. More... | |
const T & | start_time () const |
Returns output's start time, or in other words, the oldest time t that it can be evaluated at e.g. More... | |
const T & | end_time () const |
Returns output's end time, or in other words, the newest time t that it can be evaluated at e.g. More... | |
DenseOutput (const DenseOutput &)=delete | |
DenseOutput & | operator= (const DenseOutput &)=delete |
DenseOutput (DenseOutput &&)=delete | |
DenseOutput & | operator= (DenseOutput &&)=delete |
Protected Member Functions | |
StepwiseDenseOutput ()=default | |
Protected Member Functions inherited from DenseOutput< T > | |
DenseOutput ()=default | |
virtual VectorX< T > | DoEvaluate (const T &t) const =0 |
virtual T | DoEvaluateNth (const T &t, int n) const |
virtual bool | do_is_empty () const =0 |
virtual int | do_size () const =0 |
virtual const T & | do_start_time () const =0 |
virtual const T & | do_end_time () const =0 |
void | ThrowIfOutputIsEmpty (const char *func_name) const |
void | ThrowIfNthElementIsInvalid (const char *func_name, int n) const |
void | ThrowIfTimeIsInvalid (const char *func_name, const T &t) const |
|
delete |
|
delete |
|
overridedefault |
|
protecteddefault |
|
pure virtual |
Consolidates latest updates.
All updates since last call or construction are put into a form that is suitable for evaluation.
std::exception | if any of the preconditions is not met. |
Implemented in HermitianDenseOutput< T >.
|
delete |
|
delete |
|
pure virtual |
Rolls back (drops) the last update.
std::exception | if any of the preconditions is not met. |
Implemented in HermitianDenseOutput< T >.