template<typename T>
class drake::systems::Subvector< T >
Subvector is a concrete class template that implements VectorBase by providing a sliced view of a VectorBase.
- Template Parameters
-
|
| | Subvector (VectorBase< T > *vector, int first_element, int num_elements) |
| | Constructs a subvector of vector that consists of num_elements starting at first_element.
|
| int | size () const final |
| | Returns the number of elements in the vector.
|
| | Subvector (const Subvector &)=delete |
| Subvector & | operator= (const Subvector &)=delete |
| | Subvector (Subvector &&)=delete |
| Subvector & | operator= (Subvector &&)=delete |
| virtual | ~VectorBase () |
| T & | operator[] (int index) |
| | Returns the element at the given index in the vector.
|
| const T & | operator[] (int index) const |
| | Returns the element at the given index in the vector.
|
| const T & | GetAtIndex (int index) const |
| | Returns the element at the given index in the vector.
|
| T & | GetAtIndex (int index) |
| | Returns the element at the given index in the vector.
|
| void | SetAtIndex (int index, const T &value) |
| | Replaces the state at the given index with the value.
|
| virtual void | SetFrom (const VectorBase< T > &value) |
| | Replaces the entire vector with the contents of value.
|
| virtual void | SetFromVector (const Eigen::Ref< const VectorX< T > > &value) |
| | Replaces the entire vector with the contents of value.
|
| virtual void | SetZero () |
| | Sets all elements of this vector to zero.
|
| virtual VectorX< T > | CopyToVector () const |
| | Copies this entire VectorBase into a contiguous Eigen Vector.
|
| virtual void | CopyToPreSizedVector (EigenPtr< VectorX< T > > vec) const |
| | Copies this entire VectorBase into a pre-sized Eigen Vector.
|
| virtual void | ScaleAndAddToVector (const T &scale, EigenPtr< VectorX< T > > vec) const |
| | Adds a scaled version of this vector to Eigen vector vec.
|
| VectorBase & | PlusEqScaled (const T &scale, const VectorBase< T > &rhs) |
| | Add in scaled vector rhs to this vector.
|
| VectorBase & | PlusEqScaled (const std::initializer_list< std::pair< T, const VectorBase< T > & > > &rhs_scale) |
| | Add in multiple scaled vectors to this vector.
|
| VectorBase & | operator+= (const VectorBase< T > &rhs) |
| | Add in vector rhs to this vector.
|
| VectorBase & | operator-= (const VectorBase< T > &rhs) |
| | Subtract in vector rhs to this vector.
|
| virtual void | GetElementBounds (Eigen::VectorXd *lower, Eigen::VectorXd *upper) const |
| | Get the bounds for the elements.
|
| std::string | to_string () const |
| | Returns the string representation of a VectorBase<T> as a row vector RowVectorX<T> e.g., "1, 2, 3".
|
| | VectorBase (const VectorBase &)=delete |
| VectorBase & | operator= (const VectorBase &)=delete |
| | VectorBase (VectorBase &&)=delete |
| VectorBase & | operator= (VectorBase &&)=delete |