A DenseOutput class interface extension to deal with scalar ODE solutions.
A ScalarDenseOutput instance is also a DenseOutput instance with single element vector values (i.e. size() == 1). As such, its value can evaluated in both scalar and vectorial form (via EvaluateScalar() and Evaluate(), respectively).
| T | The scalar type, which must be one of the default scalars. |
#include <drake/systems/analysis/scalar_dense_output.h>
Public Member Functions | |
| virtual | ~ScalarDenseOutput () |
| T | EvaluateScalar (const T &t) const |
Evaluates output at the given time t. More... | |
Does not allow copy, move, or assignment | |
| ScalarDenseOutput (const ScalarDenseOutput &)=delete | |
| ScalarDenseOutput & | operator= (const ScalarDenseOutput &)=delete |
| ScalarDenseOutput (ScalarDenseOutput &&)=delete | |
| ScalarDenseOutput & | operator= (ScalarDenseOutput &&)=delete |
Public Member Functions inherited from DenseOutput< T > | |
| virtual | ~DenseOutput () |
| 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 nth 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 | |
| ScalarDenseOutput ()=default | |
| VectorX< T > | DoEvaluate (const T &t) const override |
| int | do_size () const override |
| virtual T | DoEvaluateScalar (const T &t) const =0 |
Protected Member Functions inherited from DenseOutput< T > | |
| DenseOutput ()=default | |
| virtual T | DoEvaluateNth (const T &t, int n) const |
| virtual bool | do_is_empty () 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 |
|
virtual |
|
protecteddefault |
|
overrideprotectedvirtual |
Implements DenseOutput< T >.
|
overrideprotectedvirtual |
Implements DenseOutput< T >.
|
protectedpure virtual |
Implemented in ScalarViewDenseOutput< T >.
| T EvaluateScalar | ( | const T & | t | ) | const |
Evaluates output at the given time t.
| t | Time at which to evaluate output. |
| std::exception | if any of the preconditions is not met. |
| std::exception | if given t is not within output's domain i.e. t ∉ [start_time(), end_time()]. |
|
delete |
|
delete |