MeLOn
vectorarithmetics.h File Reference
#include <vector>
#include <numeric>
#include <algorithm>
#include <cassert>

Go to the source code of this file.

Namespaces

 melon
 

Functions

template<typename T , typename U >
auto melon::operator+ (const std::vector< T > &v1, const std::vector< U > &v2)
 Overloaded operator for vector class allowing adding vectors. More...
 
template<typename T , typename U >
auto melon::operator+ (const std::vector< T > &v, const U s)
 Overloaded operator for vector class allowing adding scalars to vectors. More...
 
template<typename T , typename U >
auto melon::operator- (std::vector< T > &v1, std::vector< U > &v2)
 Overloaded operator for vector class allowing substracting vectors. More...
 
template<typename T , typename U >
auto melon::operator- (const std::vector< T > &v, const U s)
 Overloaded operator for vector class allowing substracting scalars from vectors. More...
 
template<typename T , typename U >
auto melon::operator* (const T &s, const std::vector< U > &v)
 Overloaded operator for vector class allowing the calulation of a vector scalar product. More...
 
template<typename T , typename U >
auto melon::operator* (const std::vector< T > &v, const U &s)
 Overloaded operator for vector class allowing the calulation of a vector scalar product. More...
 
template<typename T , typename U >
auto melon::operator/ (const std::vector< T > &v, const U &s)
 Overloaded operator for vector class allowing the calulation of a vector scalar division. More...
 
template<typename T , typename U >
auto melon::dot_product (const std::vector< T > &v1, const std::vector< U > &v2)
 Overloaded operator for vector class allowing the calulation of dot product of two vectors. More...
 
template<typename T , typename U >
auto melon::operator* (const std::vector< std::vector< T >> &m, const std::vector< U > &v)
 Overloaded operator for vector class allowing the calulation of a matrix vector product. More...
 
template<typename T , typename U >
auto melon::operator* (const std::vector< std::vector< T >> &m1, const std::vector< std::vector< U >> &m2)
 Overloaded operator for vector class allowing the calulation of a matrix matrix product. More...
 
template<typename T >
auto melon::transpose (const std::vector< std::vector< T >> &m)
 Overloaded operator for vector class allowing to transpose a matrix. More...
 
template<typename T >
auto melon::diag (const std::vector< std::vector< T >> &m)
 Overloaded operator for vector class allowing to obtain a matrix diagonal. More...