4#ifndef _da006854_5a52_4f29_8aa1_24be101f8935
5#define _da006854_5a52_4f29_8aa1_24be101f8935
8#include <initializer_list>
15template<std::
size_t N,
typename T>
38 Vector(std::initializer_list<T> && initializer);
52 constexpr std::size_t
size()
const {
return N; }
106 template<
typename Dest>
132template<std::
size_t N,
typename T>
136template<std::
size_t N,
typename T>
140template<std::
size_t N,
typename T>
144template<std::
size_t N,
typename T>
148template<std::
size_t N,
typename T>
152template<std::
size_t N,
typename T>
156template<std::
size_t N,
typename T>
160template<std::
size_t N,
typename T>
169template<std::
size_t N,
typename T>
A vector of arithmetic types.
Definition Vector.h:17
Vector< N, T > & operator%=(T right)
In-place remainder of division by a scalar.
Vector(std::initializer_list< T > &&initializer)
Initialize the values to given sequence.
Vector()
Zero-initialize the values.
Vector< N, Dest > cast() const
Element-wise cast.
Vector< N, T > & operator=(Vector< N, T > const &)=default
const_iterator cbegin() const
Constant iterator to the first element.
std::array< T, N > Container
Underlying container.
Definition Vector.h:20
Vector< N, T > & operator%=(Vector< N, T > const &right)
Elementwise in-place remainder of division.
const_iterator cend() const
Constant iterator after the last element.
Vector< N, T > operator-() const
Opposite operator.
Vector(Vector< N, T > const &)=default
typename Container::iterator iterator
Iterator to values.
Definition Vector.h:28
Vector< N, T > & operator+=(Vector< N, T > const &right)
Element-wise in-place addition.
Vector< N, T > const & operator+() const
Identity operator.
bool operator==(Vector< N, T > const &other) const
Test equality of all elements.
iterator end()
Iterator after the last element.
const_iterator begin() const
Constant iterator to the first element.
Vector< N, T > & operator/=(T right)
In-place division by a scalar.
Vector(Vector< N, T > &&)=default
T & operator[](std::size_t i)
Access an element.
iterator begin()
Iterator to the first element.
typename Container::const_iterator const_iterator
Constant iterator to values.
Definition Vector.h:26
const_iterator end() const
Constant iterator after the last element.
Vector< N, T > & operator=(Vector< N, T > &&)=default
T norm() const
Euclidean norm (i.e. L2 norm)
Vector< N, T > & operator*=(T scalar)
In-place multiplication by a scalar.
Vector< N, T > & operator-=(Vector< N, T > const &right)
Element-wise in-place subtraction.
bool operator!=(Vector< N, T > const &other) const
Test difference of any element.
T const & operator[](std::size_t i) const
Access an element.
constexpr std::size_t size() const
Return the number of elements.
Definition Vector.h:52
typename Container::value_type value_type
Stored value.
Definition Vector.h:23
Top-level namespace of the msl library.
Definition acceleration.h:17
Vector< N, T > operator*(Vector< N, T > left, T right)
Multiplication by a scalar.
Vector< N, T > operator+(Vector< N, T > left, Vector< N, T > const &right)
Element-wise addition.
Vector< N, T > operator/(Vector< N, T > left, T right)
Division by a scalar.
std::ostream & operator<<(std::ostream &stream, Mask const &mask)
Visual representation of the mask.
Vector< N, T > operator%(Vector< N, T > left, Vector< N, T > const &right)
Element-wise remainder of division.
Vector< N, T > operator-(Vector< N, T > left, Vector< N, T > const &right)
Element-wise subtraction.