Drake
Drake C++ Documentation
ScalarDenseOutput< T > Class Template Referenceabstract

Detailed Description

template<typename T>
class drake::systems::ScalarDenseOutput< T >

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).

Template Parameters
TThe scalar type, which must be one of the default scalars.

#include <drake/systems/analysis/scalar_dense_output.h>

Public Member Functions

virtual ~ScalarDenseOutput ()=default
 
EvaluateScalar (const T &t) const
 Evaluates output at the given time t. More...
 
Does not allow copy, move, or assignment
 ScalarDenseOutput (const ScalarDenseOutput &)=delete
 
ScalarDenseOutputoperator= (const ScalarDenseOutput &)=delete
 
 ScalarDenseOutput (ScalarDenseOutput &&)=delete
 
ScalarDenseOutputoperator= (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...
 
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
 
DenseOutputoperator= (const DenseOutput &)=delete
 
 DenseOutput (DenseOutput &&)=delete
 
DenseOutputoperator= (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
 

Constructor & Destructor Documentation

◆ ScalarDenseOutput() [1/3]

ScalarDenseOutput ( const ScalarDenseOutput< T > &  )
delete

◆ ScalarDenseOutput() [2/3]

ScalarDenseOutput ( ScalarDenseOutput< T > &&  )
delete

◆ ~ScalarDenseOutput()

virtual ~ScalarDenseOutput ( )
virtualdefault

◆ ScalarDenseOutput() [3/3]

ScalarDenseOutput ( )
protecteddefault

Member Function Documentation

◆ do_size()

int do_size ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ DoEvaluate()

VectorX<T> DoEvaluate ( const T &  t) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ DoEvaluateScalar()

virtual T DoEvaluateScalar ( const T &  t) const
protectedpure virtual

Implemented in ScalarViewDenseOutput< T >.

◆ EvaluateScalar()

T EvaluateScalar ( const T &  t) const

Evaluates output at the given time t.

Parameters
tTime at which to evaluate output.
Returns
Output scalar value.
Precondition
Output is not empty i.e. is_empty() is false.
Exceptions
std::exceptionif any of the preconditions is not met.
std::exceptionif given t is not within output's domain i.e. t ∉ [start_time(), end_time()].

◆ operator=() [1/2]

ScalarDenseOutput& operator= ( const ScalarDenseOutput< T > &  )
delete

◆ operator=() [2/2]

ScalarDenseOutput& operator= ( ScalarDenseOutput< T > &&  )
delete

The documentation for this class was generated from the following file: