MeLOn
Loading...
Searching...
No Matches
vectorarithmetics.h File Reference
#include <vector>
#include <numeric>
#include <algorithm>
#include <cassert>

Go to the source code of this file.

Namespaces

namespace  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.
 
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.
 
template<typename T , typename U >
auto melon::operator- (std::vector< T > &v1, std::vector< U > &v2)
 Overloaded operator for vector class allowing substracting vectors.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
template<typename T >
auto melon::transpose (const std::vector< std::vector< T > > &m)
 Overloaded operator for vector class allowing to transpose a matrix.
 
template<typename T >
auto melon::diag (const std::vector< std::vector< T > > &m)
 Overloaded operator for vector class allowing to obtain a matrix diagonal.