|
| | UnitMap (double *ptr) |
| | Construct a mutable view over a raw buffer.
|
|
| UnitMap (const UnitMap &)=delete |
|
UnitMap & | operator= (const UnitMap &)=delete |
|
| UnitMap (UnitMap &&)=default |
| | Move constructor.
|
|
UnitMap & | operator= (UnitMap &&)=default |
| | Move assignment.
|
template<std::size_t N>
requires ValidIndex<N, UnitTags...> |
| constexpr auto | Get () const |
| | Get the N-th element with its unit.
|
|
ConstMapType | Raw () const |
| | Read-only access to the underlying Eigen map.
|
|
MapType | Raw () |
| | Mutable access to the underlying Eigen map.
|
template<std::size_t N>
requires ValidIndex<N, UnitTags...> |
| void | Set (units::unit_t< std::tuple_element_t< N, UnitTuple > > val) |
| | Set the N-th element, writing through to the buffer.
|
template<typename... OtherTags>
requires UnitEquality<UnitTuple, std::tuple<OtherTags...>> |
| UnitMap & | operator= (const UnitVector< OtherTags... > &vec) |
| | Assign all values from a compatible UnitVector, writing through.
|
| UnitVector< UnitTags... > | ToVector () const |
| | Produce an owned UnitVector copy of the mapped data.
|
|
| operator UnitVector< UnitTags... > () const |
| | Implicit conversion to UnitVector (copies data).
|
|
constexpr auto | X () const |
| | Access the first element (x).
|
|
void | X (units::unit_t< std::tuple_element_t< Size >=1 ? 0 :0, UnitTuple > > val) |
| | Set the first element (x).
|
|
constexpr auto | Y () const |
| | Access the second element (y).
|
|
void | Y (units::unit_t< std::tuple_element_t< Size >=2 ? 1 :0, UnitTuple > > val) |
| | Set the second element (y).
|
|
constexpr auto | Z () const |
| | Access the third element (z).
|
|
void | Z (units::unit_t< std::tuple_element_t< Size >=3 ? 2 :0, UnitTuple > > val) |
| | Set the third element (z).
|
|
constexpr auto | W () const |
| | Access the fourth element (w).
|
|
void | W (units::unit_t< std::tuple_element_t< Size >=4 ? 3 :0, UnitTuple > > val) |
| | Set the fourth element (w).
|
template<typename... UnitTags>
class valor::EigenUnit::UnitMap< UnitTags >
A non-owning, unit-safe view over a raw double* buffer.
Wraps an Eigen::Map to provide zero-copy unit-checked access to external buffers (hardware registers, shared memory, C APIs, etc.). Mutations write back to the original buffer.
- Template Parameters
-
| UnitTags | The unit types for each element. |