This class is memory compatible to K values of type T. More...
#include <cvb/block.hpp>
Public Member Functions | |
template<class Ty > | |
LinearValue< T, K > & | operator= (const Ty &other) noexcept |
Assignment from any type, for which get<size_t>(Ty) function exists. The values pointed to by this class are overwritten by those of other. More... | |
template<std::size_t N> | |
LinearValue< T, K > & | operator= (const T(&list)[N]) noexcept |
Assignment from a N-element initializer list or array. The values pointed to by this class are overwritten by those of the initializer list. More... | |
template<class Ty > | |
Ty | Cast () const noexcept |
Cast to any type, for which a set<size_t>(Ty) function exists. More... | |
T & | X () noexcept |
Get reference to the first (x) value. More... | |
const T & | X () const noexcept |
Get const reference to the first (x) value. More... | |
template<size_t N = K, std::enable_if_t< less< 1, N >::value, int > = 0> | |
T & | Y () noexcept |
Get reference to the second (y) value. More... | |
template<size_t N = K, std::enable_if_t< less< 1, N >::value, int > = 0> | |
const T & | Y () const noexcept |
Get const reference to the second (y) value. More... | |
template<size_t N = K, std::enable_if_t< less< 2, N >::value, int > = 0> | |
T & | Z () noexcept |
Get reference to the third (z) value. More... | |
template<size_t N = K, std::enable_if_t< less< 2, N >::value, int > = 0> | |
const T & | Z () const noexcept |
Get const reference to the third (z) value. More... | |
template<size_t N = K, std::enable_if_t< less< 3, N >::value, int > = 0> | |
T & | W () noexcept |
Get reference to the fourth (w) value. More... | |
template<size_t N = K, std::enable_if_t< less< 3, N >::value, int > = 0> | |
const T & | W () const noexcept |
Get const reference to the fourth (w) value. More... | |
const T & | operator[] (size_t i) const noexcept |
Element access. More... | |
T & | operator[] (size_t i) noexcept |
Mutable element access. More... | |
Static Public Member Functions | |
static constexpr const size_t | NumValues () noexcept |
Get number of values stored in this LinearValue. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<size_t I, class T , size_t K, std::enable_if_t< less< I, K >::value, int > = 0> | |
T | get (const LinearValue< T, K > &linVal) noexcept |
Get's the I-th element of the LinearValue<T,K>. More... | |
template<size_t I, class T , size_t K, std::enable_if_t< less< I, K >::value, int > = 0> | |
void | set (LinearValue< T, K > &linVal, const T &val) noexcept |
Set's the value of the I-th element in the LinearValue<T,K> linVal. More... | |
This class is memory compatible to K values of type T.
|
inlinenoexcept |
Cast to any type, for which a set<size_t>(Ty) function exists.
Ty | Target type, for which a Cvb::set<size_t>(Ty) function exists. |
|
inlinestaticconstexprnoexcept |
Get number of values stored in this LinearValue.
|
inlinenoexcept |
Assignment from a N-element initializer list or array. The values pointed to by this class are overwritten by those of the initializer list.
N | The number of elements. Must be equal to K. |
list | N-element initializer list or array. |
|
inlinenoexcept |
Assignment from any type, for which get<size_t>(Ty) function exists. The values pointed to by this class are overwritten by those of other.
[in] | other | Object of any type Ty to copy values from. A get<size_t>(Ty) function has to be provided elsewhere and should be defined for 0,..,K-1. |
|
inlinenoexcept |
Element access.
[in] | i | The index of the requested element. |
|
inlinenoexcept |
Mutable element access.
[in] | i | The index of the requested element. |
|
inlinenoexcept |
Get const reference to the fourth (w) value.
|
inlinenoexcept |
Get reference to the fourth (w) value.
|
inlinenoexcept |
Get const reference to the first (x) value.
|
inlinenoexcept |
Get reference to the first (x) value.
|
inlinenoexcept |
Get const reference to the second (y) value.
|
inlinenoexcept |
Get reference to the second (y) value.
|
inlinenoexcept |
Get const reference to the third (z) value.
|
inlinenoexcept |
Get reference to the third (z) value.
|
related |
|
related |