maliput
ScalarViewDenseOutput< T > Class Template Reference

Detailed Description

template<typename T>
class maliput::drake::systems::ScalarViewDenseOutput< T >

A ScalarDenseOutput class implementation that wraps a DenseOutput class instance and behaves as a view to one of its elements.

@tparam_default_scalar

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

Inheritance diagram for ScalarViewDenseOutput< T >:
[legend]

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...
 
- Public Member Functions inherited from ScalarDenseOutput< T >
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

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_
 

Constructor & Destructor Documentation

◆ ScalarViewDenseOutput()

ScalarViewDenseOutput ( std::unique_ptr< DenseOutput< T >>  base_output,
int  n 
)
explicit

Constructs a view of another DenseOutput instance.

Parameters
base_outputBase dense output to operate with.
nThe nth scalar element (0-indexed) of the output value to view.
Exceptions
std::exceptionif base_output is nullptr.
std::exceptionif given n does not refer to a valid base output dimension i.e. n ∉ [0, base_output->size()).

Member Function Documentation

◆ do_end_time()

const T& do_end_time ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ do_is_empty()

bool do_is_empty ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ do_start_time()

const T& do_start_time ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ DoEvaluateScalar()

T DoEvaluateScalar ( const T &  t) const
overrideprotectedvirtual

◆ get_base_output()

const DenseOutput<T>* get_base_output ( ) const

Returns the base dense output upon which the view operates.

Member Data Documentation

◆ base_output_

const std::unique_ptr<DenseOutput<T> > base_output_
protected

◆ n_

const int n_
protected

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