trase
Vector.hpp File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <numeric>
Include dependency graph for Vector.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  trase::Vector< T, N >
 An N-dimensional vector class. More...
 
struct  trase::vint2_hash
 hash function for an STL map of 2d int vectors More...
 
struct  trase::vint2_equal
 equality function for an STL map of 2d int vectors More...
 

Typedefs

using trase::vfloat2_t = Vector< float, 2 >
 
using trase::vint2_t = Vector< int, 2 >
 

Functions

template<typename T , int N, typename EXP_T >
Vector< T, N > trase::pow (const Vector< T, N > &arg, EXP_T exponent) noexcept
 returns arg.pow(exponent)
 
template<typename T , int N>
Vector< T, N > trase::operator- (const Vector< T, N > &a) noexcept
 unary - (minus) operator for Vector class
 
template<typename T , int N>
Vector< T, N > trase::operator+ (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 binary + (plus) operator for two Vectors
 
template<typename T , int N>
Vector< T, N > trase::operator- (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 binary - (minus) operator for two Vectors
 
template<typename T , int N>
Vector< T, N > trase::operator* (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 binary * (multiples) operator for two Vectors
 
template<typename T , int N>
Vector< T, N > trase::operator/ (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 binary / (divides) operator for two Vectors
 
template<typename T , int N>
Vector< T, N > trase::operator+ (const T &a, const Vector< T, N > &b) noexcept
 binary + (plus) operator for scalar and Vector
 
template<typename T , int N>
Vector< T, N > trase::operator- (const T &a, const Vector< T, N > &b) noexcept
 binary - (minus) operator for scalar and Vector
 
template<typename T , int N>
Vector< T, N > trase::operator* (const T &a, const Vector< T, N > &b) noexcept
 binary * (multiples) operator for scalar and Vector
 
template<typename T , int N>
Vector< T, N > trase::operator/ (const T &a, const Vector< T, N > &b) noexcept
 binary / (divides) operator for scalar and Vector
 
template<typename T , int N>
Vector< T, N > trase::operator+ (const Vector< T, N > &b, const T &a) noexcept
 binary + (plus) operator for Vector and scalar
 
template<typename T , int N>
Vector< T, N > trase::operator- (const Vector< T, N > &b, const T &a) noexcept
 binary - (minus) operator for Vector and scalar
 
template<typename T , int N>
Vector< T, N > trase::operator* (const Vector< T, N > &b, const T &a) noexcept
 binary * (multiples) operator for Vector and scalar
 
template<typename T , int N>
Vector< T, N > trase::operator/ (const Vector< T, N > &b, const T &a) noexcept
 binary / (divides) operator for Vector and scalar
 
template<typename T , int N>
Vector< bool, N > trase::operator== (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< bool, N > trase::operator!= (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< bool, N > trase::operator< (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< bool, N > trase::operator> (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< bool, N > trase::operator<= (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< bool, N > trase::operator>= (const Vector< T, N > &a, const Vector< T, N > &b) noexcept
 
template<typename T , int N>
Vector< T, N > trase::floor (const Vector< T, N > &a) noexcept
 element-wise floor rounding function for Vector class
 
template<typename T , int N>
Vector< T, N > trase::ceil (const Vector< T, N > &a) noexcept
 element-wise ceil rounding function for Vector class
 
template<typename T , int N>
Vector< T, N > trase::round (const Vector< T, N > &a) noexcept
 element-wise round rounding function for Vector class
 
template<typename T , int N>
Vector< T, N > trase::abs (const Vector< T, N > &a) noexcept
 element-wise absolute value function for Vector class
 
template<typename T , int N>
Vector< T, N > trase::abs2 (const Vector< T, N > &a) noexcept
 element-wise e_i*e_i function for Vector class
 
template<typename T >
Vector< T, 3 > trase::cross (const Vector< T, 3 > &arg1, const Vector< T, 3 > &arg2)
 cross-product function for 3D vectors
 
template<typename T , int N>
Vector< T, N > trase::round_off (const Vector< T, N > &arg, int n)
 round off to n significant digits
 
template<typename T , int N>
Vector< bool, N > trase::approx_equal (const Vector< T, N > &a, const Vector< T, N > &b, const T epsilon)
 
template<typename T , int N>
std::ostream & trase::operator<< (std::ostream &out, const Vector< T, N > &v)
 stream output operator for Vector class
 
template<typename T , int N>
std::istream & trase::operator>> (std::istream &out, Vector< T, N > &v)
 stream input operator for Vector class