A ScalarDenseOutput class implementation that wraps a DenseOutput class instance and behaves as a view to one of its elements.
T | The scalar type, which must be one of the default scalars. |
#include <drake/systems/analysis/scalar_view_dense_output.h>
Public Member Functions | |
ScalarViewDenseOutput (std::unique_ptr< DenseOutput< T >> base_output, int n) | |
Constructs a view of another DenseOutput instance. More... | |
const DenseOutput< T > * | get_base_output () const |
Returns the base dense output upon which the view operates. More... | |
Does not allow copy, move, or assignment | |
ScalarViewDenseOutput (const ScalarViewDenseOutput &)=delete | |
ScalarViewDenseOutput & | operator= (const ScalarViewDenseOutput &)=delete |
ScalarViewDenseOutput (ScalarViewDenseOutput &&)=delete | |
ScalarViewDenseOutput & | operator= (ScalarViewDenseOutput &&)=delete |
Public Member Functions inherited from ScalarDenseOutput< T > | |
virtual | ~ScalarDenseOutput ()=default |
T | EvaluateScalar (const T &t) const |
Evaluates output at the given time t . More... | |
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 ()=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 | |
T | DoEvaluateScalar (const T &t) const override |
bool | do_is_empty () const override |
const T & | do_start_time () const override |
const T & | do_end_time () const override |
Protected Member Functions inherited from ScalarDenseOutput< T > | |
ScalarDenseOutput ()=default | |
VectorX< T > | DoEvaluate (const T &t) const override |
int | do_size () const override |
Protected Member Functions inherited from DenseOutput< T > | |
DenseOutput ()=default | |
virtual T | DoEvaluateNth (const T &t, int n) const |
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 |
Protected Attributes | |
const std::unique_ptr< DenseOutput< T > > | base_output_ |
const int | n_ |
|
delete |
|
delete |
|
explicit |
Constructs a view of another DenseOutput instance.
base_output | Base dense output to operate with. |
n | The nth scalar element (0-indexed) of the output value to view. |
std::exception | if base_output is nullptr. |
std::exception | if given n does not refer to a valid base output dimension i.e. n ∉ [0, base_output ->size()). |
|
overrideprotectedvirtual |
Implements DenseOutput< T >.
|
overrideprotectedvirtual |
Implements DenseOutput< T >.
|
overrideprotectedvirtual |
Implements DenseOutput< T >.
|
overrideprotectedvirtual |
Implements ScalarDenseOutput< T >.
const DenseOutput<T>* get_base_output | ( | ) | const |
Returns the base dense output upon which the view operates.
|
delete |
|
delete |
|
protected |
|
protected |