1 #ifndef COTILA_VECTOR_OPERATORS_H_ 2 #define COTILA_VECTOR_OPERATORS_H_ 19 template <
typename T, std::
size_t N>
21 for (std::size_t i = 0; i < vector<T, N>::size; ++i) {
35 template <
typename T, std::
size_t N>
47 template <
typename T, std::
size_t N>
59 template <
typename T, std::
size_t N>
71 template <
typename T, std::
size_t N>
84 template <
typename T, std::
size_t N>
96 template <
typename T, std::
size_t N>
108 template <
typename T, std::
size_t N>
121 template <
typename T, std::
size_t N>
134 template <
typename T, std::
size_t N>
144 #endif // COTILA_VECTOR_OPERATORS_H_ constexpr bool operator==(const vector< T, N > &a, const vector< T, N > &b)
checks equality of two vectors
Definition: operators.h:20
A container representing a vector.
Definition: vector.h:25
constexpr vector< T, N > operator*(const vector< T, N > &a, const vector< T, N > &b)
computes the Hadamard product
Definition: operators.h:109
Contains the definition of the cotila::vector class.
constexpr matrix< U, N, M > elementwise(F f, const matrix< T, N, M > &m, const Matrices &... matrices)
applies a function elementwise between many matrices
Definition: utility.h:28
constexpr vector< T, N > operator+(const vector< T, N > &a, const vector< T, N > &b)
computes the vector sum
Definition: operators.h:72
constexpr vector< T, N > operator/(const vector< T, N > &a, const vector< T, N > &b)
computes the elementwise vector quotient
Definition: operators.h:135
constexpr bool operator!=(const vector< T, N > &a, const vector< T, N > &b)
checks inequality of two vectors
Definition: operators.h:36