|
bipedal locomotion framework
A suite of libraries for achieving bipedal locomotion on humanoid robots
|
Forward declaration of Vector class. More...
#include <GenericContainer/include/BipedalLocomotion/GenericContainer/Vector.h>
Classes | |
| class | Ref |
| The class ref is used a substitution to a classical reference to a Vector. More... | |
Public Types | |
| using | vector_element_type = typename iDynTree::Span< T >::element_type |
| Utility aliases depending on the type T. More... | |
| using | value_type = typename iDynTree::Span< T >::value_type |
| using | index_type = typename iDynTree::Span< T >::index_type |
| using | pointer = typename iDynTree::Span< T >::pointer |
| using | reference = typename iDynTree::Span< T >::reference |
| using | const_reference = const value_type & |
| using | size_type = typename iDynTree::Span< T >::size_type |
| using | iterator = typename iDynTree::Span< T >::iterator |
| Utility aliases to define iterators. | |
| using | const_iterator = typename iDynTree::Span< T >::const_iterator |
| using | reverse_iterator = typename iDynTree::Span< T >::reverse_iterator |
| using | const_reverse_iterator = typename iDynTree::Span< T >::const_reverse_iterator |
| using | resize_function_type = std::function< iDynTree::Span< T >(index_type)> |
| Alias for the type of lambda used to resize the original vector. More... | |
| using | eigen_map_type = typename Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 > > |
| Alias to determine the output type of toEigen() | |
| using | eigen_map_const_type = typename Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, 1 > > |
Public Member Functions | |
| Vector (iDynTree::Span< T > span, resize_function_type resizeLambda) | |
| Constructor. More... | |
| Vector (iDynTree::Span< T > span) | |
| Constructor. More... | |
| ~Vector ()=default | |
| Destructor. | |
| Vector (const Vector< T > &other)=delete | |
| Copy constructor. More... | |
| Vector (Vector< T > &&other) | |
| Move constructor. More... | |
| bool | clone (const Vector< T > &other) |
| Copies the content of the vector. More... | |
| bool | clone (iDynTree::Span< T > other) |
| Copies the content of the vector. More... | |
| Vector< T > & | operator= (const Vector< T > &other) |
| operator = Copies the content More... | |
| Vector< T > & | operator= (iDynTree::Span< T > other) |
| operator = Copies the content More... | |
| Vector< T > & | operator= (Vector< T > &&other) |
| Move operator = Copies the content. More... | |
| bool | resizeVector (index_type newSize) |
| resizeVector It resize the original vector (if possible) More... | |
| void | resize (index_type newSize) |
| resize It resize the original vector (if possible) More... | |
| index_type | size () const |
| size Get the size of the Vector More... | |
| bool | empty () const |
| empty Checks if the container is empty (zero size) More... | |
| const_reference | operator[] (index_type idx) const |
| operator [] Accessor More... | |
| reference | operator[] (index_type idx) |
| operator [] Accessor More... | |
| vector_element_type | getVal (index_type idx) const |
| getVal Accessor More... | |
| bool | setVal (index_type idx, vector_element_type val) |
| setVal Setter More... | |
| const_reference | at (index_type idx) const |
| at Accessor More... | |
| reference | at (index_type idx) |
| at Accessor More... | |
| const_reference | operator() (index_type idx) const |
| operator () Accessor More... | |
| reference | operator() (index_type idx) |
| operator () Accessor More... | |
| pointer | data () const |
| data Raw pointer to the data More... | |
| iterator | begin () |
| begin Iterator More... | |
| iterator | end () |
| end Iterator More... | |
| const_iterator | begin () const |
| begin Iterator More... | |
| const_iterator | end () const |
| end Iterator More... | |
| const_iterator | cbegin () const |
| cbegin Iterator More... | |
| const_iterator | cend () const |
| cend Iterator More... | |
| reverse_iterator | rbegin () |
| rbegin Iterator to the first element of the reversed vector More... | |
| reverse_iterator | rend () |
| rend Iterator to the element following the last element of the reversed vector. More... | |
| const_reverse_iterator | rbegin () const |
| rbegin Iterator to the first element of the reversed vector More... | |
| const_reverse_iterator | rend () const |
| rend Iterator to the element following the last element of the reversed vector. More... | |
| const_reverse_iterator | crbegin () const |
| crbegin Iterator to the first element of the reversed vector More... | |
| const_reverse_iterator | crend () const |
| crend Iterator to the element following the last element of the reversed vector. More... | |
| eigen_map_type | toEigen () |
| Get an Eigen map corresponding to the current generic vector (see https://eigen.tuxfamily.org/dox/classEigen_1_1Map.html). | |
| eigen_map_const_type | toEigen () const |
| Get an Eigen const map corresponding to the current generic vector (see https://eigen.tuxfamily.org/dox/classEigen_1_1Map.html). | |
Protected Member Functions | |
| Vector ()=default | |
| The default constructor is private. More... | |
Protected Attributes | |
| iDynTree::Span< T > | m_span |
| Span of the pointed vector. More... | |
| resize_function_type | m_resizeLambda |
| User specified lambda to resize the existing container. | |
Forward declaration of Vector class.
Vector is a utility class which maps another existing contiguous container.
T is the type of vector (double, float, int, string,...)
It does not contain any data, but only a pointer to an existing contiguous area of memory containing a sequence of objects. It also stores its size, i.e. the number of objects. It does not own this portion of memory, hence it needs to be properly initialized from an existing container, such as an iDynTree::Vector, std::vector, array, yarp::sig::Vector and similar. Even if it does not own the memory, it is possible to resize it. This is done through an user specified lambda, which calls the corresponding "resize" method on the original object from which Vector has been initialized.
| using BipedalLocomotion::GenericContainer::Vector< T >::vector_element_type = typename iDynTree::Span<T>::element_type |
Utility aliases depending on the type T.
Some notes:
| using BipedalLocomotion::GenericContainer::Vector< T >::resize_function_type = std::function<iDynTree::Span<T>(index_type)> |
Alias for the type of lambda used to resize the original vector.
In particular, it takes as input the new size (of type index size)
|
protecteddefault |
The default constructor is private.
In fact, once the Vector is built, it is assumed to point to an existing container. To be used only if m_span and m_resizeLamba are set manually.
|
inline |
Constructor.
| span | Span of the existing container |
| resizeLambda | User defined lambda to resize the original container |
|
inline |
Constructor.
| span | Span of the existing container |
Since no resizeLambda is provided, it is assumed that the original container cannot be resized.
|
delete |
Copy constructor.
|
inline |
Move constructor.
| other | Another Vector |
|
inline |
Copies the content of the vector.
| other | Vector from which to copy |
|
inline |
Copies the content of the vector.
| other | Span from which to copy |
|
inline |
|
inline |
|
inline |
|
inline |
resizeVector It resize the original vector (if possible)
| newSize | New size of the vector |
|
inline |
resize It resize the original vector (if possible)
| newSize | New size of the vector It calls resizeVector(). There is an assert on its return value. |
|
inline |
|
inline |
empty Checks if the container is empty (zero size)
|
inline |
operator [] Accessor
| idx | The index to be accessed |
|
inline |
operator [] Accessor
| idx | The index to be accessed |
|
inline |
getVal Accessor
| idx | The index to be accessed |
|
inline |
setVal Setter
| idx | Index of the values to be set |
| val | The new value |
|
inline |
at Accessor
| idx | The index to be accessed |
|
inline |
at Accessor
| idx | The index to be accessed |
|
inline |
operator () Accessor
| idx | The index to be accessed |
|
inline |
operator () Accessor
| idx | The index to be accessed |
|
inline |
data Raw pointer to the data
|
inline |
begin Iterator
|
inline |
end Iterator
|
inline |
begin Iterator
|
inline |
end Iterator
|
inline |
cbegin Iterator
|
inline |
cend Iterator
|
inline |
rbegin Iterator to the first element of the reversed vector
|
inline |
rend Iterator to the element following the last element of the reversed vector.
|
inline |
rbegin Iterator to the first element of the reversed vector
|
inline |
rend Iterator to the element following the last element of the reversed vector.
|
inline |
crbegin Iterator to the first element of the reversed vector
|
inline |
crend Iterator to the element following the last element of the reversed vector.
|
protected |
Span of the pointed vector.
This allows to point to an existing container without owning it.