maliput
HermitianDenseOutput< T >::IntegrationStep Class Reference

Detailed Description

template<typename T> class maliput::drake::systems::HermitianDenseOutput< T >::IntegrationStep

An integration step representation class, holding just enough for Hermitian interpolation: three (3) related sets containing step times {t₀, ..., tᵢ₋₁, tᵢ} where tᵢ ∈ ℝ, step states {𝐱₀, ..., 𝐱ᵢ₋₁, 𝐱ᵢ} where 𝐱ᵢ ∈ ℝⁿ, and state derivatives {d𝐱/dt₀, ..., d𝐱/dtᵢ₋₁, d𝐱/dtᵢ} where d𝐱/dtᵢ ∈ ℝⁿ.

This step definition allows for intermediate time, state and state derivative triplets (e.g. the integrator internal stages) to improve interpolation.

Note
The use of column matrices instead of plain vectors helps reduce HermitianDenseOutput construction overhead, as this type of dense output leverages a PiecewisePolynomial instance that takes matrices.

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

Public Member Functions

IntegrationStep ()=default
Constructs an empty step. More...

IntegrationStep (const T &initial_time, MatrixX< T > initial_state, MatrixX< T > initial_state_derivative)
Constructs a zero length step (i.e. More...

void Extend (const T &time, MatrixX< T > state, MatrixX< T > state_derivative)
Extends the step forward in time from column matrices. More...

const T & start_time () const
Returns step start time t₀ (that of the first time, state and state derivative triplet), which may coincide with its end time tᵢ (that of the last time, state and state derivative triplet) if the step has zero length (that is, it contains a single triplet). More...

const T & end_time () const
Returns step end time tᵢ (that of the first time, state and state derivative triplet), which may coincide with its start time t₀ (that of the last time, state and state derivative triplet) if the step has zero length (that is, it contains a single triplet). More...

int size () const
Returns the step state 𝐱 size (i.e. dimension). More...

const std::vector< T > & get_times () const
Returns step times {t₀, ..., tᵢ₋₁, tᵢ}. More...

const std::vector< MatrixX< T > > & get_states () const
Returns step states {𝐱₀, ..., 𝐱ᵢ₋₁, 𝐱ᵢ} as column matrices. More...

const std::vector< MatrixX< T > > & get_state_derivatives () const
Gets step state derivatives {d𝐱/dt₀, ..., d𝐱/dtᵢ₋₁, d𝐱/dtᵢ} as column matrices. More...

◆ IntegrationStep() [1/2]

 IntegrationStep ( )
default

Constructs an empty step.

◆ IntegrationStep() [2/2]

 IntegrationStep ( const T & initial_time, MatrixX< T > initial_state, MatrixX< T > initial_state_derivative )

Constructs a zero length step (i.e.

a step containing a single time, state and state derivative triplet) from column matrices.

Parameters
 initial_time Initial time t₀ where the step starts. initial_state Initial state vector 𝐱₀ at initial_time as a column matrix. initial_state_derivative Initial state derivative vector d𝐱/dt₀ at initial_time as a column matrix.
Exceptions
 std::exception if given initial_state 𝐱₀ is not a column matrix. if given initial_state_derivative d𝐱/t₀ is not a column matrix. if given initial_state 𝐱₀ and initial_state_derivative d𝐱/dt₀ do not match each other's dimension.

◆ end_time()

 const T& end_time ( ) const

Returns step end time tᵢ (that of the first time, state and state derivative triplet), which may coincide with its start time t₀ (that of the last time, state and state derivative triplet) if the step has zero length (that is, it contains a single triplet).

◆ Extend()

 void Extend ( const T & time, MatrixX< T > state, MatrixX< T > state_derivative )

Extends the step forward in time from column matrices.

Provided time, state and state_derivative are appended to the current step, effectively increasing its time length.

Parameters
 time Time tᵢ to extend the step to. state State vector 𝐱ᵢ at time tᵢ as a column matrix. state_derivative State derivative vector d𝐱/dtᵢ at time tᵢ as a column matrix.
Exceptions
 std::exception if given state 𝐱ᵢ is not a column matrix. if given state_derivative d𝐱/dtᵢ is not a column matrix. if given time tᵢ is not greater than the previous time tᵢ₋₁ in the step. if given state 𝐱ᵢ dimension does not match the dimension of the previous state 𝐱ᵢ₋₁. if given state 𝐱ᵢ and state_derivative d𝐱/dtᵢ do not match each other's dimension.

◆ get_state_derivatives()

 const std::vector >& get_state_derivatives ( ) const

Gets step state derivatives {d𝐱/dt₀, ..., d𝐱/dtᵢ₋₁, d𝐱/dtᵢ} as column matrices.

◆ get_states()

 const std::vector >& get_states ( ) const

Returns step states {𝐱₀, ..., 𝐱ᵢ₋₁, 𝐱ᵢ} as column matrices.

◆ get_times()

 const std::vector& get_times ( ) const

Returns step times {t₀, ..., tᵢ₋₁, tᵢ}.

◆ size()

 int size ( ) const

Returns the step state 𝐱 size (i.e. dimension).

◆ start_time()

 const T& start_time ( ) const

Returns step start time t₀ (that of the first time, state and state derivative triplet), which may coincide with its end time tᵢ (that of the last time, state and state derivative triplet) if the step has zero length (that is, it contains a single triplet).

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