Supervector is a concrete class template that implements VectorBase by concatenating multiple VectorBases, which it does not own.
| T | The scalar type, which must be one of the default scalars. |
#include <drake/systems/framework/supervector.h>
Public Member Functions | |
| Supervector (const std::vector< VectorBase< T > * > &subvectors) | |
| Constructs a supervector consisting of all the vectors in subvectors, which must live at least as long as this supervector. More... | |
| int | size () const final |
| Returns the number of elements in the vector. More... | |
Does not allow copy, move, or assignment | |
| Supervector (const Supervector &)=delete | |
| Supervector & | operator= (const Supervector &)=delete |
| Supervector (Supervector &&)=delete | |
| Supervector & | operator= (Supervector &&)=delete |
Public Member Functions inherited from VectorBase< T > | |
| virtual | ~VectorBase () |
| T & | operator[] (int index) |
| Returns the element at the given index in the vector. More... | |
| const T & | operator[] (int index) const |
| Returns the element at the given index in the vector. More... | |
| const T & | GetAtIndex (int index) const |
| Returns the element at the given index in the vector. More... | |
| T & | GetAtIndex (int index) |
| Returns the element at the given index in the vector. More... | |
| void | SetAtIndex (int index, const T &value) |
| Replaces the state at the given index with the value. More... | |
| virtual void | SetFrom (const VectorBase< T > &value) |
Replaces the entire vector with the contents of value. More... | |
| virtual void | SetFromVector (const Eigen::Ref< const VectorX< T >> &value) |
Replaces the entire vector with the contents of value. More... | |
| virtual void | SetZero () |
| Sets all elements of this vector to zero. More... | |
| virtual VectorX< T > | CopyToVector () const |
| Copies this entire VectorBase into a contiguous Eigen Vector. More... | |
| virtual void | CopyToPreSizedVector (EigenPtr< VectorX< T >> vec) const |
| Copies this entire VectorBase into a pre-sized Eigen Vector. More... | |
| virtual void | ScaleAndAddToVector (const T &scale, EigenPtr< VectorX< T >> vec) const |
Adds a scaled version of this vector to Eigen vector vec. More... | |
| VectorBase & | PlusEqScaled (const T &scale, const VectorBase< T > &rhs) |
Add in scaled vector rhs to this vector. More... | |
| VectorBase & | PlusEqScaled (const std::initializer_list< std::pair< T, const VectorBase< T > & >> &rhs_scale) |
| Add in multiple scaled vectors to this vector. More... | |
| VectorBase & | operator+= (const VectorBase< T > &rhs) |
Add in vector rhs to this vector. More... | |
| VectorBase & | operator-= (const VectorBase< T > &rhs) |
Subtract in vector rhs to this vector. More... | |
| virtual void | GetElementBounds (Eigen::VectorXd *lower, Eigen::VectorXd *upper) const |
| Get the bounds for the elements. More... | |
| VectorBase (const VectorBase &)=delete | |
| VectorBase & | operator= (const VectorBase &)=delete |
| VectorBase (VectorBase &&)=delete | |
| VectorBase & | operator= (VectorBase &&)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from VectorBase< T > | |
| VectorBase () | |
| virtual void | DoPlusEqScaled (const std::initializer_list< std::pair< T, const VectorBase< T > & >> &rhs_scale) |
| Adds in multiple scaled vectors to this vector. More... | |
| void | ThrowOutOfRange (int index) const |
| void | ThrowMismatchedSize (int other_size) const |
|
delete |
|
delete |
|
explicit |
Constructs a supervector consisting of all the vectors in subvectors, which must live at least as long as this supervector.
|
delete |
|
delete |
|
finalvirtual |
Returns the number of elements in the vector.
Implementations should ensure this operation is O(1) and allocates no memory.
Implements VectorBase< T >.