|
| constexpr | Vector () noexcept=default |
| | Default constructor. More...
|
| |
| constexpr | ~Vector () noexcept=default |
| | Default destructor. More...
|
| |
| constexpr | Vector (const Vector &) noexcept=default |
| | Default copy-constructor. More...
|
| |
| constexpr | Vector (Vector &&) noexcept=default |
| | Default move-constructor. More...
|
| |
template<class... TArgs>
requires std::convertible_to<std::invoke_result_t<TGenerator&>, value_type> |
| VDimensions<=1) constexpr Vector(TArgs &&...args) noexcept :m_Values{ static_cast< T >(args)... } { } template< std::convertible_to< value_type > T2, auto VOtherDimensions > requires(!std::same_as< T2, value_type >||dimensions !=VOtherDimensions) constexpr explicit Vector(const Vector< T2, VOtherDimensions > &other) { transform_unseq(std::ranges::take_view{ other, std::min(dimensions, VOtherDimensions) }, std::ranges::begin(m_Values), fn::cast_invoke_result< value_type >(std::identity{}));} template< std::invocable TGenerator > constexpr | Vector (TGenerator generator) |
| | Aggregate initialization like constructor. More...
|
| |
| constexpr Vector & | operator= (const Vector &) noexcept=default |
| | Default copy-assign-operator. More...
|
| |
| constexpr Vector & | operator= (Vector &&) noexcept=default |
| | Default move-assign-operator. More...
|
| |
| constexpr bool | operator== (const Vector &) const noexcept=default |
| | Default equality comparison operator. More...
|
| |
| constexpr const value_type & | operator[] (std::integral auto index) const noexcept |
| | Accesses a specific element. More...
|
| |
| template<std::integral TIndex> |
| constexpr value_type & | operator[] (std::integral auto index) noexcept |
| | Accesses a specific element. More...
|
| |
| constexpr const value_type & | x () const noexcept |
| | Accesses the first element. More...
|
| |
| constexpr value_type & | x () noexcept |
| | Accesses the first element. More...
|
| |
| constexpr const value_type & | y () const noexcept |
| | Accesses the second element. More...
|
| |
| constexpr value_type & | y () noexcept |
| | Accesses the second element. More...
|
| |
| constexpr const value_type & | z () const noexcept |
| | Accesses the third element. More...
|
| |
| constexpr value_type & | z () noexcept |
| | Accesses the third element. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator+= (const Vector< T2, dimensions > &other) |
| | Adds other Vector element-wise. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator-= (const Vector< T2, dimensions > &other) |
| | Subtracts other Vector element-wise. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator+= (const T2 &value) |
| | Adds value to each element. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator-= (const T2 &value) |
| | Subtracts value from each element. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator*= (const T2 &value) |
| | Multiplies each element. More...
|
| |
| template<std::convertible_to< value_type > T2> |
| constexpr Vector & | operator/= (const T2 &value) |
| | Divides each element. More...
|
| |
template<std::convertible_to< value_type > T2>
requires modable<T> |
| constexpr Vector & | operator%= (const T2 &rawValue) |
| | Applies modulo on each element. More...
|
| |
| constexpr auto | begin () noexcept |
| | Returns an iterator to the first element. More...
|
| |
| constexpr auto | begin () const noexcept |
| | Returns an const iterator to the first element. More...
|
| |
| constexpr auto | cbegin () const noexcept |
| | Returns an const iterator to the first element. More...
|
| |
| constexpr auto | end () noexcept |
| | Returns an iterator to the end (i.e. the element after the last element). More...
|
| |
| constexpr auto | end () const noexcept |
| | Returns an const iterator to the end (i.e. the element after the last element). More...
|
| |
| constexpr auto | cend () const noexcept |
| | Returns an const iterator to the end (i.e. the element after the last element). More...
|
| |
| constexpr auto | rbegin () noexcept |
| | Returns an iterator to the reverse-beginning. More...
|
| |
| constexpr auto | rbegin () const noexcept |
| | Returns an const iterator to the reverse-beginning. More...
|
| |
| constexpr auto | crbegin () const noexcept |
| | Returns an const iterator to the reverse-beginning. More...
|
| |
| constexpr auto | rend () noexcept |
| | Returns an iterator to the reverse-end of the given range (i.e. the element before the first element). More...
|
| |
| constexpr auto | rend () const noexcept |
| | Returns an const iterator to the reverse-end of the given range (i.e. the element before the first element). More...
|
| |
| constexpr auto | crend () const noexcept |
| | Returns an const iterator to the reverse-end of the given range (i.e. the element before the first element). More...
|
| |
template<
value_type T, std::size_t VDimensions>
requires (0 < VDimensions)
class sl::vec::Vector< T, VDimensions >
A mathematically vector implementation.
- Template Parameters
-
| T | The value type |
| VDimensions | Amount of dimensions. Must be implicitly convertible to std::size_t. |