SOMHunter Core
math::vector Namespace Reference

Functions

template<typename T_ >
std::vector< T_ > sub (const std::vector< T_ > &left, const std::vector< T_ > &right)
 Computes the substraction of the given vectors (left - right). More...
 
template<typename T_ >
std::vector< T_ > add (const std::vector< T_ > &left, const std::vector< T_ > &right)
 Computes the addition of the given vectors (left + right). More...
 
template<typename T_ , typename S_ >
std::vector< T_ > mult (const std::vector< T_ > &left, S_ right)
 Computes the element-wise multiplication of the given vector and constant right. More...
 
template<typename T_ >
std::vector< T_ > mult (const std::vector< T_ > &left, const std::vector< T_ > &right)
 Computes the element-wise multiplication of the given vectors. More...
 
template<typename T_ >
T_ dot (const std::vector< T_ > &left, const std::vector< T_ > &right)
 Computes the dot product of the given vectors. More...
 
template<typename T_ >
std::vector< T_ > mat_mult (const std::vector< std::vector< T_ >> &mat, const std::vector< T_ > &vec)
 
template<typename T_ >
float length (const std::vector< T_ > &left)
 
template<typename T_ >
std::vector< T_ > normalize (const std::vector< T_ > &left)
 

Function Documentation

◆ add()

template<typename T_ >
std::vector<T_> math::vector::add ( const std::vector< T_ > &  left,
const std::vector< T_ > &  right 
)
inline

Computes the addition of the given vectors (left + right).

Todo:
Vectorize.

◆ dot()

template<typename T_ >
T_ math::vector::dot ( const std::vector< T_ > &  left,
const std::vector< T_ > &  right 
)
inline

Computes the dot product of the given vectors.

Todo:
Vectorize.

◆ length()

template<typename T_ >
float math::vector::length ( const std::vector< T_ > &  left)
inline
Here is the call graph for this function:

◆ mat_mult()

template<typename T_ >
std::vector<T_> math::vector::mat_mult ( const std::vector< std::vector< T_ >> &  mat,
const std::vector< T_ > &  vec 
)
inline
Here is the call graph for this function:

◆ mult() [1/2]

template<typename T_ >
std::vector<T_> math::vector::mult ( const std::vector< T_ > &  left,
const std::vector< T_ > &  right 
)
inline

Computes the element-wise multiplication of the given vectors.

Todo:
Vectorize.

◆ mult() [2/2]

template<typename T_ , typename S_ >
std::vector<T_> math::vector::mult ( const std::vector< T_ > &  left,
S_  right 
)
inline

Computes the element-wise multiplication of the given vector and constant right.

Todo:
Vectorize.

◆ normalize()

template<typename T_ >
std::vector<T_> math::vector::normalize ( const std::vector< T_ > &  left)
inline
Here is the call graph for this function:

◆ sub()

template<typename T_ >
std::vector<T_> math::vector::sub ( const std::vector< T_ > &  left,
const std::vector< T_ > &  right 
)
inline

Computes the substraction of the given vectors (left - right).

Todo:
Vectorize.