|
template<class T > |
bool | AlmostEqual (T d1, T d2, std::true_type) |
|
template<class T > |
bool | AlmostEqual (T d1, T d2, std::false_type) |
|
template<class T , class = std::enable_if_t<traits::NotVector<T>::value && traits::NotMatrix<T>::value && traits::NotQuaternion<T>::value>> |
bool | AlmostEqual (T d1, T d2) |
|
template<class T , int Dim, bool Packed1, bool Packed2> |
bool | AlmostEqual (const Vector< T, Dim, Packed1 > &lhs, const Vector< T, Dim, Packed2 > &rhs) |
|
template<class T , bool Packed1, bool Packed2> |
bool | AlmostEqual (const Quaternion< T, Packed1 > &lhs, const Quaternion< T, Packed2 > &rhs) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order1, eMatrixLayout Layout1, bool Packed1, eMatrixOrder Order2, eMatrixLayout Layout2, bool Packed2> |
bool | AlmostEqual (const Matrix< T, Rows, Columns, Order1, Layout1, Packed1 > &lhs, const Matrix< T, Rows, Columns, Order2, Layout2, Packed2 > &rhs) |
|
template<class LinalgClass1 , class LinalgClass2 > |
bool | operator== (const ApproxHelper< LinalgClass1 > &lhs, const LinalgClass2 &rhs) |
|
template<class LinalgClass1 , class LinalgClass2 > |
bool | operator== (const LinalgClass1 &lhs, const ApproxHelper< LinalgClass2 > &rhs) |
|
template<class LinalgClass1 , class LinalgClass2 > |
bool | operator== (const ApproxHelper< LinalgClass1 > &lhs, const ApproxHelper< LinalgClass2 > &rhs) |
|
template<class LinalgClass > |
std::ostream & | operator<< (std::ostream &os, const ApproxHelper< LinalgClass > &arg) |
|
template<class LinalgClass > |
ApproxHelper< LinalgClass > | ApproxVec (const LinalgClass &arg) |
|
template<class T > |
RangeHelper< T > | Range (T first, T last, T step) |
|
template<class T > |
RangeHelper< T > | Range (T first, T last) |
|
template<class T > |
RangeHelper< T > | Range (T last) |
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
auto | DecomposeLU (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m) |
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
auto | DecomposeLUP (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m, int &parity) |
| Implements LU decomposition with partial pivoting. More...
|
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
auto | DecomposeLUP (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m) |
| Implements LU decomposition with partial pivoting. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
auto | DecomposeQR (Matrix< T, Rows, Columns, Order, Layout, Packed > m) |
| Calculates the QR decomposition of the matrix using Householder transforms. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
auto | DecomposeSVD (Matrix< T, Rows, Columns, Order, Layout, Packed > m) |
| Calculates the thin SVD of the matrix. More...
|
|
template<class T , class U > |
auto | Intersect (const T &t, const U &u) |
|
template<class T , int Dim, bool Packed> |
std::ostream & | operator<< (std::ostream &os, const mathter::Vector< T, Dim, Packed > &v) |
| Prints the vector like [1,2,3]. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | strtovec (const char *str, const char **end) |
| Parses a vector from a string. More...
|
|
template<class VectorT > |
VectorT | strtovec (const char *str, const char **end) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
std::ostream & | operator<< (std::ostream &os, const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | strtomat (const char *str, const char **end) |
|
template<class MatrixT > |
MatrixT | strtomat (const char *str, const char **end) |
|
template<class T , bool Packed> |
std::ostream & | operator<< (std::ostream &os, const Quaternion< T, Packed > &q) |
|
template<class T , class U , int Rows1, int Match, int Columns2, eMatrixOrder Order1, eMatrixOrder Order2, bool Packed, class V > |
auto | operator* (const Matrix< T, Rows1, Match, Order1, eMatrixLayout::ROW_MAJOR, Packed > &lhs, const Matrix< U, Match, Columns2, Order2, eMatrixLayout::ROW_MAJOR, Packed > &rhs) -> Matrix< V, Rows1, Columns2, Order1, eMatrixLayout::ROW_MAJOR, Packed > |
|
template<class T , class U , int Rows1, int Match, int Columns2, eMatrixOrder Order1, eMatrixOrder Order2, bool Packed, class V > |
auto | operator* (const Matrix< T, Rows1, Match, Order1, eMatrixLayout::ROW_MAJOR, Packed > &lhs, const Matrix< U, Match, Columns2, Order2, eMatrixLayout::COLUMN_MAJOR, Packed > &rhs) -> Matrix< V, Rows1, Columns2, Order1, eMatrixLayout::ROW_MAJOR, Packed > |
|
template<class T , class U , int Rows1, int Match, int Columns2, eMatrixOrder Order1, eMatrixOrder Order2, bool Packed, class V > |
auto | operator* (const Matrix< T, Rows1, Match, Order1, eMatrixLayout::COLUMN_MAJOR, Packed > &lhs, const Matrix< U, Match, Columns2, Order2, eMatrixLayout::COLUMN_MAJOR, Packed > &rhs) -> Matrix< V, Rows1, Columns2, Order1, eMatrixLayout::COLUMN_MAJOR, Packed > |
|
template<class T , class U , int Rows1, int Match, int Columns2, eMatrixOrder Order1, eMatrixOrder Order2, bool Packed, class V > |
auto | operator* (const Matrix< T, Rows1, Match, Order1, eMatrixLayout::COLUMN_MAJOR, Packed > &lhs, const Matrix< U, Match, Columns2, Order2, eMatrixLayout::ROW_MAJOR, Packed > &rhs) -> Matrix< V, Rows1, Columns2, Order1, eMatrixLayout::COLUMN_MAJOR, Packed > |
|
template<class T1 , class T2 , int Rows1, int Match, int Columns2, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool PackedA> |
auto | operator* (const Matrix< T1, Rows1, Match, Order1, Layout1, PackedA > &lhs, const Matrix< T2, Match, Columns2, Order2, Layout2, PackedA > &rhs) -> Matrix< traits::MatMulElemT< T1, T2 >, Rows1, Columns2, Order1, Layout1, PackedA > |
|
template<class T1 , class T2 , int Dim, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed> |
Matrix< T1, Dim, Dim, Order1, Layout1, Packed > & | operator*= (Matrix< T1, Dim, Dim, Order1, Layout1, Packed > &lhs, const Matrix< T2, Dim, Dim, Order2, Layout2, Packed > &rhs) |
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout SameLayout, bool Packed, class V = decltype(T() + U())> |
Matrix< U, Rows, Columns, Order1, SameLayout, Packed > | operator+ (const Matrix< T, Rows, Columns, Order1, SameLayout, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, SameLayout, Packed > &rhs) |
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout SameLayout, bool Packed, class V = decltype(T() - U())> |
Matrix< U, Rows, Columns, Order1, SameLayout, Packed > | operator- (const Matrix< T, Rows, Columns, Order1, SameLayout, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, SameLayout, Packed > &rhs) |
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed, class V , class = typename std::enable_if<Layout1 != Layout2>::type> |
Matrix< U, Rows, Columns, Order1, Layout1, Packed > | operator+ (const Matrix< T, Rows, Columns, Order1, Layout1, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, Layout2, Packed > &rhs) |
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed, class V , class = typename std::enable_if<Layout1 != Layout2>::type> |
Matrix< U, Rows, Columns, Order1, Layout1, Packed > | operator- (const Matrix< T, Rows, Columns, Order1, Layout1, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, Layout2, Packed > &rhs) |
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed, class V > |
Matrix< U, Rows, Columns, Order1, Layout1, Packed > & | operator+= (Matrix< T, Rows, Columns, Order1, Layout1, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, Layout2, Packed > &rhs) |
| Performs matrix addition and stores result in this. More...
|
|
template<class T , class U , int Rows, int Columns, eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed, class V > |
Matrix< U, Rows, Columns, Order1, Layout1, Packed > & | operator-= (Matrix< T, Rows, Columns, Order1, Layout1, Packed > &lhs, const Matrix< U, Rows, Columns, Order2, Layout2, Packed > &rhs) |
| Performs matrix subtraction and stores result in this. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > & | operator*= (Matrix< T, Rows, Columns, Order, Layout, Packed > &mat, T s) |
| Multiplies all elements of the matrix by scalar. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > & | operator/= (Matrix< T, Rows, Columns, Order, Layout, Packed > &mat, T s) |
| Divides all elements of the matrix by scalar. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator* (T s, const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator/ (T s, const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator* (const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat, T s) |
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator/ (const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat, T s) |
|
template<class T , class T2 , int Rows, int Columns, eMatrixOrder Order, eMatrixOrder Order2, eMatrixLayout Layout, bool Packed> |
auto | MulElementwise (const Matrix< T, Rows, Columns, Order, Layout, Packed > &lhs, const Matrix< T2, Rows, Columns, Order2, Layout, Packed > &rhs) |
|
template<class T , class T2 , int Rows, int Columns, eMatrixOrder Order, eMatrixOrder Order2, eMatrixLayout Layout, bool Packed> |
auto | MulElementwise (const Matrix< T, Rows, Columns, Order, Layout, Packed > &lhs, const Matrix< T2, Rows, Columns, Order2, traits::OppositeLayout< Layout >::value, Packed > &rhs) |
|
template<class T , class T2 , int Rows, int Columns, eMatrixOrder Order, eMatrixOrder Order2, eMatrixLayout Layout, bool Packed> |
auto | DivElementwise (const Matrix< T, Rows, Columns, Order, Layout, Packed > &lhs, const Matrix< T2, Rows, Columns, Order2, Layout, Packed > &rhs) |
|
template<class T , class T2 , int Rows, int Columns, eMatrixOrder Order, eMatrixOrder Order2, eMatrixLayout Layout, bool Packed> |
auto | DivElementwise (const Matrix< T, Rows, Columns, Order, Layout, Packed > &lhs, const Matrix< T2, Rows, Columns, Order2, traits::OppositeLayout< Layout >::value, Packed > &rhs) |
|
template<class U , class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator+ (const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat) |
|
template<class U , class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Rows, Columns, Order, Layout, Packed > | operator- (const Matrix< T, Rows, Columns, Order, Layout, Packed > &mat) |
|
template<int Rows, int Columns, class T1 , class T2 , eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed1, bool Packed2> |
bool | operator== (const Matrix< T1, Rows, Columns, Order1, Layout1, Packed1 > &lhs, const Matrix< T2, Rows, Columns, Order2, Layout2, Packed2 > &rhs) |
|
template<int Rows, int Columns, class T1 , class T2 , eMatrixOrder Order1, eMatrixOrder Order2, eMatrixLayout Layout1, eMatrixLayout Layout2, bool Packed1, bool Packed2> |
bool | operator!= (const Matrix< T1, Rows, Columns, Order1, Layout1, Packed1 > &lhs, const Matrix< T2, Rows, Columns, Order2, Layout2, Packed2 > &rhs) |
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
T | Trace (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m) |
| Returns the trace (sum of diagonal elements) of the matrix. More...
|
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
T | Determinant (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m) |
| Returns the determinant of the matrix. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Columns, Rows, Order, Layout, Packed > | Transpose (const Matrix< T, Rows, Columns, Order, Layout, Packed > &m) |
| Transposes the matrix in-place. More...
|
|
template<class T , int Dim, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
Matrix< T, Dim, Dim, Order, Layout, Packed > | Inverse (const Matrix< T, Dim, Dim, Order, Layout, Packed > &m) |
| Returns the inverse of the matrix. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
T | NormSquared (const Matrix< T, Rows, Columns, Order, Layout, Packed > &m) |
| Calculates the square of the Frobenius norm of the matrix. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
T | Norm (const Matrix< T, Rows, Columns, Order, Layout, Packed > &m) |
| Calculates the Frobenius norm of the matrix. More...
|
|
template<class Vt , class Mt , int Vd, int Mcol, eMatrixOrder Morder, bool Packed, class Rt > |
Vector< Rt, Mcol, Packed > | operator* (const Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd, Mcol, Morder, eMatrixLayout::ROW_MAJOR, Packed > &mat) |
|
template<class Vt , class Mt , int Vd, int Mcol, eMatrixOrder Morder, bool Packed, class Rt > |
Vector< Rt, Mcol, Packed > | operator* (const Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd, Mcol, Morder, eMatrixLayout::COLUMN_MAJOR, Packed > &mat) |
|
template<class Vt , class Mt , int Vd, int Mcol, eMatrixOrder Morder, eMatrixLayout Mlayout, bool Packed> |
Vector< traits::MatMulElemT< Vt, Mt >, Mcol, Packed > | operator* (const Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd, Mcol, Morder, Mlayout, Packed > &mat) |
|
template<class Vt , class Mt , int Vd, eMatrixLayout Mlayout, eMatrixOrder Morder, bool Packed, class Rt = traits::MatMulElemT<Vt, Mt>> |
Vector< Rt, Vd, Packed > | operator* (const Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd+1, Vd, Morder, Mlayout, Packed > &mat) |
|
template<class Vt , class Mt , int Vd, eMatrixLayout Mlayout, eMatrixOrder Morder, bool Packed, class Rt = traits::MatMulElemT<Vt, Mt>> |
Vector< Rt, Vd, Packed > | operator* (const Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd+1, Vd+1, Morder, Mlayout, Packed > &mat) |
|
template<class Vt , class Mt , int Vd, int Mrow, eMatrixOrder Morder, bool Packed, class Rt > |
Vector< Rt, Mrow, Packed > | operator* (const Matrix< Mt, Mrow, Vd, Morder, eMatrixLayout::ROW_MAJOR, Packed > &mat, const Vector< Vt, Vd, Packed > &vec) |
|
template<class Vt , class Mt , int Vd, int Mrow, eMatrixOrder Morder, bool Packed, class Rt > |
Vector< Rt, Mrow, Packed > | operator* (const Matrix< Mt, Mrow, Vd, Morder, eMatrixLayout::COLUMN_MAJOR, Packed > &mat, const Vector< Vt, Vd, Packed > &vec) |
|
template<class Vt , class Mt , int Vd, int Mrow, eMatrixOrder Morder, eMatrixLayout Mlayout, bool Packed> |
Vector< traits::MatMulElemT< Vt, Mt >, Mrow, Packed > | operator* (const Matrix< Mt, Mrow, Vd, Morder, Mlayout, Packed > &mat, const Vector< Vt, Vd, Packed > &vec) |
|
template<class Vt , class Mt , int Vd, eMatrixLayout Mlayout, eMatrixOrder Morder, bool Packed, class Rt = traits::MatMulElemT<Vt, Mt>> |
Vector< Rt, Vd, Packed > | operator* (const Matrix< Mt, Vd, Vd+1, Morder, Mlayout, Packed > &mat, const Vector< Vt, Vd, Packed > &vec) |
|
template<class Vt , class Mt , int Vd, eMatrixLayout Mlayout, eMatrixOrder Morder, bool Packed, class Rt = traits::MatMulElemT<Vt, Mt>> |
Vector< Rt, Vd, Packed > | operator* (const Matrix< Mt, Vd+1, Vd+1, Morder, Mlayout, Packed > &mat, const Vector< Vt, Vd, Packed > &vec) |
|
template<class Vt , class Mt , int Vd, eMatrixOrder Morder, eMatrixLayout Layout, bool Packed> |
Vector< Vt, Vd, Packed > & | operator*= (Vector< Vt, Vd, Packed > &vec, const Matrix< Mt, Vd, Vd, Morder, Layout, Packed > &mat) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > & | operator+= (Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > & | operator-= (Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > & | operator*= (Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > & | operator*= (Quaternion< T, Packed > &lhs, T s) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > & | operator/= (Quaternion< T, Packed > &lhs, T s) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator+ (const Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator- (const Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator* (const Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator* (const Quaternion< T, Packed > &lhs, T s) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator/ (const Quaternion< T, Packed > &lhs, T s) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator+ (const Quaternion< T, Packed > &arg) |
|
template<class T , bool Packed> |
Quaternion< T, Packed > | operator- (const Quaternion< T, Packed > &arg) |
|
template<class T , bool Packed, class U , class = typename std::enable_if<!std::is_same<U, Quaternion<T, Packed>>::value>::type> |
Quaternion< T, Packed > | operator* (U s, const Quaternion< T, Packed > &rhs) |
| Multiplies all coefficients of the quaternion by s . More...
|
|
template<class T , bool Packed, class U , class = typename std::enable_if<!std::is_same<U, Quaternion<T, Packed>>::value>::type> |
Quaternion< T, Packed > | operator/ (U s, const Quaternion< T, Packed > &rhs) |
| Divides all coefficients of the quaternion by s . More...
|
|
template<class T , bool Packed, class U , class = typename std::enable_if<!traits::IsQuaternion<U>::value>::type> |
Quaternion< T, Packed > | operator+ (const U &lhs, const Quaternion< T, Packed > &rhs) |
| Adds a real to the real part of the quaternion. More...
|
|
template<class T , bool Packed> |
bool | operator== (const Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
| Check exact equality of coefficients. More...
|
|
template<class T , bool Packed> |
bool | operator!= (const Quaternion< T, Packed > &lhs, const Quaternion< T, Packed > &rhs) |
| Check exact unequality of coefficients. More...
|
|
template<class T , bool Packed> |
T | Abs (const Quaternion< T, Packed > &q) |
| The euclidean length of the vector of the 4 elements of the quaternion. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Conjugate (const Quaternion< T, Packed > &q) |
| Negates the imaginary values of the quaternion. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Exp (const Quaternion< T, Packed > &q) |
| Natural quaternion exponentiation, base e. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Log (const Quaternion< T, Packed > &q) |
| Natural quaternion logarithm, base e. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Pow (const Quaternion< T, Packed > &q, T a) |
| Raises q to the power of a . More...
|
|
template<class T , bool Packed> |
T | LengthSquared (const Quaternion< T, Packed > &q) |
| Returns the square of the absolute value. More...
|
|
template<class T , bool Packed> |
T | Length (const Quaternion< T, Packed > &q) |
| Returns the absolute value of the quaternion. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Normalize (const Quaternion< T, Packed > &q) |
| Returns the unit quaternion of the same direction. Does not change this object. More...
|
|
template<class T , bool Packed> |
Quaternion< T, Packed > | Inverse (const Quaternion< T, Packed > &q) |
| Returns the quaternion of opposite rotation. More...
|
|
template<class T , bool Packed> |
bool | IsNormalized (const Quaternion< T, Packed > &q) |
| Check if the quaternion is a unit quaternion, with some tolerance for floats. More...
|
|
template<class T , bool QPacked, bool PackedA> |
Vector< T, 3, PackedA > | operator* (const Quaternion< T, QPacked > &q, const Vector< T, 3, PackedA > &vec) |
| Rotates (and scales) vector by quaternion. More...
|
|
template<class T , bool QPacked, bool PackedA> |
Vector< T, 3, PackedA > | operator* (const Vector< T, 3, PackedA > &vec, const Quaternion< T, QPacked > &q) |
| Rotates (and scales) vector by quaternion. More...
|
|
template<class T , bool QPacked, bool PackedA> |
Vector< T, 3, PackedA > & | operator*= (Vector< T, 3, PackedA > &vec, const Quaternion< T, QPacked > &q) |
| Rotates (and scales) vector by quaternion. More...
|
|
auto | Identity () |
| Creates an identity matrix or identity quaternion. More...
|
|
template<class T , int Dim, bool Packed> |
auto | Orthographic (const Vector< T, Dim, Packed > &minBounds, const Vector< T, Dim, Packed > &maxBounds, T projNearPlane=T(0), T projFarPlane=T(1)) |
| Creates an orthographics projection matrix. The volume before projection is an axis-aligned hypercube and it is projected onto a unit hypercube. More...
|
|
template<class T , int DimMinus1, bool Packed> |
auto | Perspective (T fovX, const Vector< T, DimMinus1, Packed > &ratios, T nearPlane, T farPlane, T projNearPlane=T(0), T projFarPlane=T(1)) |
| Creates a perspective projection matrix. More...
|
|
template<class T > |
auto | Perspective (T fov, T nearPlane, T farPlane, T projNearPlane=T(0), T projFarPlane=T(1)) |
| Creates a 2D projection matrix. More...
|
|
template<class T > |
auto | Perspective (T fov, T aspectRatio, T nearPlane, T farPlane, T projNearPlane=T(0), T projFarPlane=T(1)) |
| Creates a 3D projection matrix. More...
|
|
template<class T > |
auto | Rotation (const T &angle) |
| Creates a 2D rotation matrix. More...
|
|
template<class T > |
auto | RotationAxis (T angle, int axis) |
| Rotates around coordinate axis. More...
|
|
template<int Axis, class T > |
auto | RotationAxis (T angle) |
| Rotates around coordinate axis. More...
|
|
template<class T > |
auto | RotationX (T angle) |
| Rotates around the X axis according to the right (left) hand rule. More...
|
|
template<class T > |
auto | RotationY (T angle) |
| Rotates around the Y axis according to the right (left) hand rule. More...
|
|
template<class T > |
auto | RotationZ (T angle) |
| Rotates around the Z axis according to the right (left) hand rule. More...
|
|
template<int FirstAxis, int SecondAxis, int ThirdAxis, class T > |
auto | RotationAxis3 (T angle0, T angle1, T angle2) |
| Rotates around three axes in succession. More...
|
|
template<class T > |
auto | RotationEuler (T z1, T x2, T z3) |
| Rotation matrix from Euler angles. Rotations are Z-X-Z. More...
|
|
template<class T > |
auto | RotationRPY (T x1, T y2, T z3) |
| Rotation matrix from roll-pitch-yaw angles. Rotations are X-Y-Z. More...
|
|
template<class T , bool Vpacked, class U > |
auto | RotationAxisAngle (const Vector< T, 3, Vpacked > &axis, U angle) |
| Rotates around an arbitrary axis. More...
|
|
template<class T , int Rows, int Columns, eMatrixOrder Order, eMatrixLayout Layout, bool Packed> |
bool | IsRotationMatrix3D (const Matrix< T, Rows, Columns, Order, Layout, Packed > &m) |
| Determines if the matrix is a proper rotation matrix. More...
|
|
template<class Vt , int Vdim, bool Vpacked> |
auto | Scale (const Vector< Vt, Vdim, Vpacked > &scale) |
| Creates a scaling matrix. More...
|
|
template<class... Args, typename std::enable_if<(traits::All< traits::IsScalar, typename std::decay< Args >::type... >::value), int >::type = 0> |
auto | Scale (Args &&... scales) |
| Creates a scaling matrix. More...
|
|
template<class T > |
auto | Shear (T slope, int principalAxis, int modulatorAxis) |
| Creates a shear matrix. More...
|
|
template<class T , int Dim, bool Packed> |
auto | Translation (const Vector< T, Dim, Packed > &translation) |
| Creates a translation matrix. More...
|
|
template<class... Args, typename std::enable_if<(traits::All< traits::IsScalar, typename std::decay< Args >::type... >::value), int >::type = 0> |
auto | Translation (const Args &... coordinates) |
| Creates a translation matrix. More...
|
|
template<class T , int Dim, bool Packed, size_t BaseDim, size_t FlipDim> |
auto | LookAt (const Vector< T, Dim, Packed > &eye, const Vector< T, Dim, Packed > &target, const std::array< Vector< T, Dim, Packed >, BaseDim > &bases, const std::array< bool, FlipDim > &flipAxes) |
| Creates a camera look-at matrix. More...
|
|
template<class T , bool Packed> |
auto | LookAt (const Vector< T, 2, Packed > &eye, const Vector< T, 2, Packed > &target, bool positiveYForward=true, bool flipX=false) |
| Creates a 2D look-at matrix. More...
|
|
template<class T , bool Packed> |
auto | LookAt (const Vector< T, 3, Packed > &eye, const Vector< T, 3, Packed > &target, const Vector< T, 3, Packed > &up, bool positiveZForward=true, bool flipX=false, bool flipY=false) |
| Creates a 3D look-at matrix. More...
|
|
auto | Zero () |
| Creates a matrix with all elements zero. More...
|
|
template<class Scalar > |
auto | Rad2Deg (Scalar rad) |
| Converts radians to degrees. More...
|
|
template<class Scalar > |
auto | Deg2Rad (Scalar deg) |
| Converts degrees to radians. More...
|
|
template<class Scalar > |
Scalar | Clamp (Scalar arg, Scalar lower, Scalar upper) |
| Limits arg to the range [lower, upper], making it either lower or upper if out of range. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | Clamp (const Vector< T, Dim, Packed > &arg, T lower, T upper) |
| Clamps all elements of the vector according to the scalar clamp. More...
|
|
template<class Scalar > |
Scalar | Saturate (Scalar arg) |
| Clamps argument into range [0,1]. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | Saturate (const Vector< T, Dim, Packed > &arg) |
| Clamps all elements into range [0,1]. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator* (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise (Hadamard) vector product. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator/ (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector division. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator+ (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector addition. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator- (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector subtraction. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator*= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise (Hadamard) vector product. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator/= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector division. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator+= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector addition. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator-= (Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Elementwise vector subtraction. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator*= (Vector< T, Dim, Packed > &lhs, T rhs) |
| Scales the vector by rhs . More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator/= (Vector< T, Dim, Packed > &lhs, T rhs) |
| Scales the vector by 1/rhs . More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator+= (Vector< T, Dim, Packed > &lhs, T rhs) |
| Adds rhs to each element of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > & | operator-= (Vector< T, Dim, Packed > &lhs, T rhs) |
| Subtracts rhs from each element of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator* (const Vector< T, Dim, Packed > &lhs, T rhs) |
| Scales the vector by rhs . More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator/ (const Vector< T, Dim, Packed > &lhs, T rhs) |
| Scales the vector by 1/rhs . More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator+ (const Vector< T, Dim, Packed > &lhs, T rhs) |
| Adds rhs to each element of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator- (const Vector< T, Dim, Packed > &lhs, T rhs) |
| Subtracts rhs from each element of the vector. More...
|
|
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type> |
Vector< T, Dim, Packed > | operator* (U lhs, const Vector< T, Dim, Packed > &rhs) |
| Scales vector by lhs . More...
|
|
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type> |
Vector< T, Dim, Packed > | operator+ (U lhs, const Vector< T, Dim, Packed > &rhs) |
| Adds lhs to all elements of the vector. More...
|
|
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type> |
Vector< T, Dim, Packed > | operator- (U lhs, const Vector< T, Dim, Packed > &rhs) |
| Makes a vector with lhs as all elements, then subtracts rhs from it. More...
|
|
template<class T , int Dim, bool Packed, class U , class = typename std::enable_if<std::is_convertible<U, T>::value>::type> |
Vector< T, Dim, Packed > | operator/ (U lhs, const Vector< T, Dim, Packed > &rhs) |
| Makes a vector with lhs as all elements, then divides it by rhs . More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | MultiplyAdd (const Vector< T, Dim, Packed > &a, const Vector< T, Dim, Packed > &b, const Vector< T, Dim, Packed > &c) |
| Return (a*b)+c. Performs MAD or FMA if supported by target architecture. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator- (const Vector< T, Dim, Packed > &arg) |
| Negates all elements of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | operator+ (const Vector< T, Dim, Packed > &arg) |
| Optional plus sign, leaves the vector as is. More...
|
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator* (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator/ (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator+ (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator- (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator* (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator/ (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator+ (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > | operator- (const Swizzle< T, Indices... > &s, const Vector< T, Dim, Packed > &v) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & | operator*= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & | operator/= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & | operator+= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed, int... Indices> |
std::enable_if_t< Dim==sizeof...(Indices), Vector< T, Dim, Packed > > & | operator-= (const Vector< T, Dim, Packed > &v, const Swizzle< T, Indices... > &s) |
|
template<class T , int Dim, bool Packed> |
bool | operator== (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Exactly compares two vectors. More...
|
|
template<class T , int Dim, bool Packed> |
bool | operator!= (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Exactly compares two vectors. More...
|
|
template<class T , int Dim, bool Packed, class U > |
mathter::Vector< T, Dim+1, Packed > | operator| (const mathter::Vector< T, Dim, Packed > &lhs, U rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int Dim1, class T2 , int Dim2, bool Packed> |
mathter::Vector< T1, Dim1+Dim2, Packed > | operator| (const mathter::Vector< T1, Dim1, Packed > &lhs, const mathter::Vector< T2, Dim2, Packed > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T , int Dim, bool Packed, class U > |
mathter::Vector< T, Dim+1, Packed > | operator| (U lhs, const mathter::Vector< T, Dim, Packed > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int... Indices1, class T2 , int... Indices2> |
Vector< T1, sizeof...(Indices2)+sizeof...(Indices2), false > | operator| (const Swizzle< T1, Indices1... > &lhs, const Swizzle< T2, Indices2... > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int... Indices1, class T2 , int Dim, bool Packed> |
Vector< T1, sizeof...(Indices1)+Dim, Packed > | operator| (const Swizzle< T1, Indices1... > &lhs, const Vector< T2, Dim, Packed > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int... Indices1, class T2 , int Dim, bool Packed> |
Vector< T1, sizeof...(Indices1)+Dim, Packed > | operator| (const Vector< T2, Dim, Packed > &lhs, const Swizzle< T1, Indices1... > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int... Indices1, class U > |
Vector< T1, sizeof...(Indices1)+1, false > | operator| (const Swizzle< T1, Indices1... > &lhs, U rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T1 , int... Indices1, class U > |
Vector< T1, sizeof...(Indices1)+1, false > | operator| (U lhs, const Swizzle< T1, Indices1... > &rhs) |
| Concatenates the arguments, and returns the concatenated vector. More...
|
|
template<class T , int Dim, bool Packed> |
bool | IsNullvector (const Vector< T, Dim, Packed > &v) |
| Returns true if the vector's length is too small for precise calculations (i.e. normalization). More...
|
|
template<class T , int Dim, bool Packed> |
T | LengthSquared (const Vector< T, Dim, Packed > &v) |
| Returns the squared length of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
T | Length (const Vector< T, Dim, Packed > &v) |
| Returns the length of the vector. More...
|
|
template<class T , int Dim, bool Packed> |
T | LengthPrecise (const Vector< T, Dim, Packed > &v) |
| Returns the length of the vector, avoids overflow and underflow, so it's more expensive. More...
|
|
template<class T , class U , int Dim, bool Packed1, bool Packed2> |
auto | Distance (const Vector< T, Dim, Packed1 > &lhs, const Vector< U, Dim, Packed2 > &rhs) |
| Returns the euclidean distance between to vectors. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | Normalize (const Vector< T, Dim, Packed > &v) |
| Makes a unit vector, but keeps direction. More...
|
|
template<class T , int Dim, bool Packed> |
bool | IsNormalized (const Vector< T, Dim, Packed > &v) |
| Checks if the vector is unit vector. There's some tolerance due to floating points. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | SafeNormalize (const Vector< T, Dim, Packed > &v) |
| Makes a unit vector, but keeps direction. Leans towards (1,0,0...) for nullvectors, costs more. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | SafeNormalize (const Vector< T, Dim, Packed > &v, const Vector< T, Dim, Packed > °enerate) |
| Makes a unit vector, but keeps direction. Leans towards degenerate for nullvectors, costs more. More...
|
|
template<class T , int Dim, bool Packed> |
void | Fill (Vector< T, Dim, Packed > &lhs, T all) |
| Sets all elements of the vector to the same value. More...
|
|
template<class T , int Dim, bool Packed> |
T | Dot (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Calculates the scalar product (dot product) of the two arguments. More...
|
|
template<class T , int Dim, bool Packed, class... Args> |
auto | Cross (const Vector< T, Dim, Packed > &head, Args &&... args) -> Vector< T, Dim, Packed > |
| Returns the generalized cross-product in N dimensions. More...
|
|
template<class T , int Dim, bool Packed> |
auto | Cross (const std::array< const Vector< T, Dim, Packed > *, Dim - 1 > &args) -> Vector< T, Dim, Packed > |
| Returns the generalized cross-product in N dimensions. More...
|
|
template<class T , bool Packed> |
Vector< T, 2, Packed > | Cross (const Vector< T, 2, Packed > &arg) |
| Returns the 2-dimensional cross prodct, which is a vector perpendicular to the argument. More...
|
|
template<class T , bool Packed> |
Vector< T, 2, Packed > | Cross (const std::array< const Vector< T, 2, Packed > *, 1 > &arg) |
| Returns the 2-dimensional cross prodct, which is a vector perpendicular to the argument. More...
|
|
template<class T , bool Packed> |
Vector< T, 3, Packed > | Cross (const Vector< T, 3, Packed > &lhs, const Vector< T, 3, Packed > &rhs) |
| Returns the 3-dimensional cross-product. More...
|
|
template<class T , bool Packed> |
Vector< T, 3, Packed > | Cross (const std::array< const Vector< T, 3, Packed > *, 2 > &args) |
| Returns the 3-dimensional cross-product. More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | Min (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Returns the element-wise minimum of arguments More...
|
|
template<class T , int Dim, bool Packed> |
Vector< T, Dim, Packed > | Max (const Vector< T, Dim, Packed > &lhs, const Vector< T, Dim, Packed > &rhs) |
| Returns the element-wise maximum of arguments More...
|
|
| false () const |
|
| true () const |
|