maliput
ScalarDenseOutput< T > Class Template Referenceabstract

Detailed Description

template<typename T>
class maliput::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).

@tparam_default_scalar

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

Inheritance diagram for ScalarDenseOutput< T >:
[legend]

Public Member Functions

virtual ~ScalarDenseOutput ()=default
 
EvaluateScalar (const T &t) const
 Evaluates output at the given time t. More...
 
- 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...
 

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

virtual ~ScalarDenseOutput ( )
virtualdefault

◆ ScalarDenseOutput()

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

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