Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
ScalarViewDenseOutput< T > Class Template Reference

Detailed Description

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

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

Template Parameters
TThe 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.
const DenseOutput< T > * get_base_output () const
 Returns the base dense output upon which the view operates.
Does not allow copy, move, or assignment
 ScalarViewDenseOutput (const ScalarViewDenseOutput &)=delete
ScalarViewDenseOutputoperator= (const ScalarViewDenseOutput &)=delete
 ScalarViewDenseOutput (ScalarViewDenseOutput &&)=delete
ScalarViewDenseOutputoperator= (ScalarViewDenseOutput &&)=delete
Public Member Functions inherited from ScalarDenseOutput< T >
virtual ~ScalarDenseOutput ()
EvaluateScalar (const T &t) const
 Evaluates output at the given time t.
 ScalarDenseOutput (const ScalarDenseOutput &)=delete
ScalarDenseOutputoperator= (const ScalarDenseOutput &)=delete
 ScalarDenseOutput (ScalarDenseOutput &&)=delete
ScalarDenseOutputoperator= (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.
EvaluateNth (const T &t, int n) const
 Evaluates the output value's nth scalar element (0-indexed) at the given time t.
int size () const
 Returns the output size (i.e.
bool is_empty () const
 Checks whether the output is empty or not.
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.
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.
 DenseOutput (const DenseOutput &)=delete
DenseOutputoperator= (const DenseOutput &)=delete
 DenseOutput (DenseOutput &&)=delete
DenseOutputoperator= (DenseOutput &&)=delete

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() [1/3]

template<typename T>
ScalarViewDenseOutput ( const ScalarViewDenseOutput< T > & )
delete

◆ ScalarViewDenseOutput() [2/3]

template<typename T>
ScalarViewDenseOutput ( ScalarViewDenseOutput< T > && )
delete

◆ ScalarViewDenseOutput() [3/3]

template<typename T>
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()

template<typename T>
const T & do_end_time ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ do_is_empty()

template<typename T>
bool do_is_empty ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ do_start_time()

template<typename T>
const T & do_start_time ( ) const
overrideprotectedvirtual

Implements DenseOutput< T >.

◆ DoEvaluateScalar()

template<typename T>
T DoEvaluateScalar ( const T & t) const
overrideprotectedvirtual

◆ get_base_output()

template<typename T>
const DenseOutput< T > * get_base_output ( ) const

Returns the base dense output upon which the view operates.

◆ operator=() [1/2]

template<typename T>
ScalarViewDenseOutput & operator= ( const ScalarViewDenseOutput< T > & )
delete

◆ operator=() [2/2]

template<typename T>
ScalarViewDenseOutput & operator= ( ScalarViewDenseOutput< T > && )
delete

Member Data Documentation

◆ base_output_

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

◆ n_

template<typename T>
const int n_
protected

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