Drake
|
BasicVector is a semantics-free wrapper around an Eigen vector that satisfies VectorInterface. More...
#include <drake/systems/framework/basic_vector.h>
Public Member Functions | |
BasicVector (int size) | |
void | set_value (const Eigen::Ref< const VectorX< T >> &value) override |
Sets the vector to the given value. More... | |
int | size () const override |
Returns the size of the vector, which must be equal to the number of rows in get_value(). More... | |
Eigen::VectorBlock< const VectorX< T > > | get_value () const override |
Returns a column vector containing the entire value of the signal. More... | |
Eigen::VectorBlock< VectorX< T > > | get_mutable_value () override |
Returns a reference that allows mutation of the values in this vector, but does not allow resizing the vector itself. More... | |
std::unique_ptr< VectorInterface< T > > | Clone () const final |
Copies the entire state to a new BasicVector. More... | |
Public Member Functions inherited from VectorInterface< T > | |
virtual | ~VectorInterface () |
Additional Inherited Members | |
Protected Member Functions inherited from VectorInterface< T > | |
VectorInterface () | |
BasicVector is a semantics-free wrapper around an Eigen vector that satisfies VectorInterface.
Once constructed, its size is fixed. The BasicVector is initialized to the quiet_NaN of the Eigen scalar. If numeric_limits is not specialized on the Eigen scalar, the BasicVector will be initialized with the scalar's default constructor.
T | The vector element type, which must be a valid Eigen scalar. |
|
inlineexplicit |
|
inlinefinalvirtual |
Copies the entire state to a new BasicVector.
Uses the Non-Virtual Interface idiom because smart pointers do not have type covariance.
Implements VectorInterface< T >.
|
inlineoverridevirtual |
Returns a reference that allows mutation of the values in this vector, but does not allow resizing the vector itself.
Implements VectorInterface< T >.
|
inlineoverridevirtual |
Returns a column vector containing the entire value of the signal.
Implements VectorInterface< T >.
|
inlineoverridevirtual |
Sets the vector to the given value.
After a.set_value(b.get_value()), a must be identical to b. May throw std::out_of_range if the new value has different dimensions than expected by the concrete class implementing VectorInterface.
Implements VectorInterface< T >.
|
inlineoverridevirtual |
Returns the size of the vector, which must be equal to the number of rows in get_value().
Implements VectorInterface< T >.