raisim::ElementRef
class · #include <raisim/math/Blocks.hpp>
cpp
template <class T>
class ElementRefProxy returned by the comma initializers (Mat::operator<<() and DynamicArray::operator=(double)); each following , value writes the next element in linear (column-major) order.
Constructors & destructor
ElementRef
cpp
ElementRef(T &array, size_t id)Parameters
| Parameter | Description |
|---|---|
array (in) | target being initialized |
id (in) | linear index of the next element to write |
Public member functions
operator,
cpp
ElementRef &operator,(double a)Eigen-style comma initializer continuation. Usage: v << 1.0, 2.0, 3.0; where operator<< seeds the first element. Writing past the end is fatal for fixed-size targets; DynamicArray targets are not checked.
Parameters
| Parameter | Description |
|---|---|
a (in) | value of the next element |
Returns *this
Public attributes
ref
cpp
T &refTarget being initialized.
idx
cpp
size_t idxLinear index of the next element to write.