GEOSX
|
Contains operations for operating on compile time sized vectors and matrices. More...
Functions | |
Fixed size square matrix operations | |
Functions that are overloaded to operate square matrices of a fixed size.
| |
template<std::ptrdiff_t M, typename MATRIX > | |
constexpr auto | determinant (MATRIX const &matrix) |
template<std::ptrdiff_t M, typename DST_MATRIX , typename SRC_MATRIX > | |
constexpr auto | invert (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix) |
Invert the source matrix srcMatrix and store the result in dstMatrix . More... | |
template<std::ptrdiff_t M, typename MATRIX > | |
constexpr auto | invert (MATRIX &&matrix) |
Invert the matrix matrix overwritting it. More... | |
Fixed size symmetric matrix operations | |
Functions that are overloaded to operate symmetric matrices of a fixed size.
| |
template<std::ptrdiff_t M, typename DST_VECTOR , typename SYM_MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_eq_symAijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Multiply the vector vectorB by the symmetric matrix symMatrixA and store the result in dstVector . More... | |
template<std::ptrdiff_t M, typename DST_VECTOR , typename SYM_MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_add_symAijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Multiply the vector vectorB by the symmetric matrix symMatrixA and add the result to dstVector . More... | |
template<std::ptrdiff_t M, typename DST_MATRIX , typename SYM_MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_eq_symAikBjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SYM_MATRIX_A const &LVARRAY_RESTRICT_REF symMatrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply the transpose of matrix matrixB by the symmetric matrix symMatrixA and store the result in dstMatrix . More... | |
template<std::ptrdiff_t M, typename DST_SYM_MATRIX , typename MATRIX_A , typename SYM_MATRIX_B > | |
constexpr void | Rij_eq_AikSymBklAjl (DST_SYM_MATRIX &&LVARRAY_RESTRICT_REF dstSymMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, SYM_MATRIX_B const &LVARRAY_RESTRICT_REF symMatrixB) |
Multiply the transpose of matrix matrixA by the symmetric matrix symMatrixB then by matrixA and store the result in dstSymMatrix . More... | |
template<std::ptrdiff_t M, typename SYM_MATRIX > | |
constexpr auto | symDeterminant (SYM_MATRIX const &symMatrix) |
template<std::ptrdiff_t M, typename DST_SYM_MATRIX , typename SRC_SYM_MATRIX > | |
constexpr auto | symInvert (DST_SYM_MATRIX &&LVARRAY_RESTRICT_REF dstSymMatrix, SRC_SYM_MATRIX const &LVARRAY_RESTRICT_REF srcSymMatrix) |
Invert the symmetric matrix srcSymMatrix and store the result in dstSymMatrix . More... | |
template<std::ptrdiff_t M, typename SYM_MATRIX > | |
constexpr auto | symInvert (SYM_MATRIX &&symMatrix) |
Invert the symmetric matrix symMatrix overwritting it. More... | |
template<std::ptrdiff_t M, typename DST_VECTOR , typename SYM_MATRIX > | |
constexpr void | symEigenvalues (DST_VECTOR &&LVARRAY_RESTRICT_REF eigenvalues, SYM_MATRIX const &LVARRAY_RESTRICT_REF symMatrix) |
Compute the eigenvalues of the symmetric matrix symMatrix . More... | |
template<std::ptrdiff_t M, typename DST_VECTOR , typename DST_MATRIX , typename SYM_MATRIX > | |
constexpr void | symEigenvectors (DST_VECTOR &&LVARRAY_RESTRICT_REF eigenvalues, DST_MATRIX &&LVARRAY_RESTRICT_REF eigenvectors, SYM_MATRIX const &LVARRAY_RESTRICT_REF symMatrix) |
Compute the eigenvalues and eigenvectors of the symmetric matrix symMatrix . More... | |
template<std::ptrdiff_t M, typename DST_SYM_MATRIX , typename SRC_MATRIX > | |
constexpr void | denseToSymmetric (DST_SYM_MATRIX &&dstSymMatrix, SRC_MATRIX const &srcMatrix) |
Convert the upper triangular part of srcMatrix to a symmetric matrix. More... | |
template<std::ptrdiff_t M, typename DST_MATRIX , typename SRC_SYM_MATRIX > | |
constexpr void | symmetricToDense (DST_MATRIX &&dstMatrix, SRC_SYM_MATRIX const &srcSymMatrix) |
Convert the srcSymMatrix into a dense matrix. More... | |
Generic operations | |
Functions that are overloaded to operate on both vectors and matrices.
| |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr auto | maxAbsoluteEntry (VECTOR &&vector) |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr void | fill (VECTOR &&vector, std::remove_reference_t< decltype(vector[0]) > const value) |
Set the entries of vector to value . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename MATRIX > | |
constexpr void | fill (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const value) |
Set the entries of matrix to value . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR > | |
constexpr void | copy (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector) |
Copy srcVector into dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX > | |
constexpr void | copy (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix) |
Copy srcMatrix into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr void | scale (VECTOR &&vector, std::remove_reference_t< decltype(vector[0]) > const scale) |
Multiply the entries of vector by scale . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename MATRIX > | |
constexpr void | scale (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const scale) |
Multiply the entries of matrix by scale . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR > | |
constexpr void | scaledCopy (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector, std::remove_reference_t< decltype(srcVector[0]) > const scale) |
Copy srcVector scaled by scale into dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX > | |
constexpr void | scaledCopy (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix, std::remove_reference_t< decltype(srcMatrix[0][0]) > const scale) |
Copy srcMatrix scaled by scale into dstMatrix . More... | |
template<std::ptrdiff_t M, typename DST_VECTOR > | |
constexpr void | addScalar (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, std::remove_reference_t< decltype(dstVector[0]) > const value) |
Add value to dstVector . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR > | |
constexpr void | add (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector) |
Add srcVector to dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX > | |
constexpr void | add (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix) |
Add srcMatrix to dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR > | |
constexpr void | subtract (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector) |
Subtract srcVector from dstVector . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename SRC_VECTOR > | |
constexpr void | scaledAdd (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, SRC_VECTOR const &LVARRAY_RESTRICT_REF srcVector, std::remove_reference_t< decltype(srcVector[0]) > const scale) |
Add srcVector scaled by scale to dstVector . More... | |
template<std::ptrdiff_t ISIZE, typename DST_VECTOR , typename VECTOR_A , typename VECTOR_B > | |
constexpr void | hadamardProduct (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Multiply the elements of vectorA and vectorB putting the result into dstVector . More... | |
Vector operations | |
Functions that operate on vectors. | |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr auto | l2NormSquared (VECTOR const &vector) |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr auto | l2Norm (VECTOR const &vector) |
template<std::ptrdiff_t ISIZE, typename VECTOR > | |
constexpr auto | normalize (VECTOR &&vector) |
Scale vector to a unit vector. More... | |
template<std::ptrdiff_t JSIZE, typename VECTOR_A , typename VECTOR_B > | |
constexpr auto | AiBi (VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
template<typename DST_VECTOR , typename VECTOR_A , typename VECTOR_B > | |
constexpr void | crossProduct (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Compute the cross product of vectorA and vectorB and put it in dstVector . More... | |
Matrix-vector operations | |
Functions that operate on matrices and vectors. | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename VECTOR_A , typename VECTOR_B > | |
constexpr void | Rij_eq_AiBj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the outer product of vectorA and vectorB writing the result to dstMatrix . More... | |
template<std::ptrdiff_t M, typename DST_MATRIX , typename VECTOR_A > | |
constexpr void | Rij_eq_AiAj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA) |
Perform the outer product of vectorA with itself writing the result to dstMatrix . More... | |
template<std::ptrdiff_t JSIZE, std::ptrdiff_t ISIZE, typename DST_MATRIX , typename VECTOR_A , typename VECTOR_B > | |
constexpr void | Rij_add_AiBj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, VECTOR_A const &LVARRAY_RESTRICT_REF vectorA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the outer product of vectorA and vectorB adding the result to dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_eq_AijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the matrix vector multiplication of matrixA and vectorB writing the result to dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_add_AijBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the matrix vector multiplication of matrixA and vectorB adding the result to dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_eq_AjiBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the matrix vector multiplication of the transpose of matrixA and vectorB writing the result to dstVector . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_VECTOR , typename MATRIX_A , typename VECTOR_B > | |
constexpr void | Ri_add_AjiBj (DST_VECTOR &&LVARRAY_RESTRICT_REF dstVector, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, VECTOR_B const &LVARRAY_RESTRICT_REF vectorB) |
Perform the matrix vector multiplication of the transpose of matrixA and vectorB adding the result to dstVector . More... | |
Matrix operations | |
Functions that operate matrices of any shape. | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename SRC_MATRIX > | |
constexpr void | transpose (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, SRC_MATRIX const &LVARRAY_RESTRICT_REF srcMatrix) |
Store the transpose of the NxM matrix srcMatrix in dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_eq_AikBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply matrixA with matrixB and put the result into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_add_AikBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply matrixA with matrixB and add the result to dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_eq_AikBjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply matrixA with the transpose of matrixB and put the result into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_add_AikBjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply matrixA with the transpose of matrixB and put the result into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, typename DST_MATRIX , typename MATRIX_A > | |
constexpr void | Rij_add_AikAjk (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA) |
Multiply matrixA with the transpose of itself and put the result into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_eq_AkiBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply the transpose of matrixA with matrixB and put the result into dstMatrix . More... | |
template<std::ptrdiff_t ISIZE, std::ptrdiff_t JSIZE, std::ptrdiff_t KSIZE, typename DST_MATRIX , typename MATRIX_A , typename MATRIX_B > | |
constexpr void | Rij_add_AkiBkj (DST_MATRIX &&LVARRAY_RESTRICT_REF dstMatrix, MATRIX_A const &LVARRAY_RESTRICT_REF matrixA, MATRIX_B const &LVARRAY_RESTRICT_REF matrixB) |
Multiply the transpose of matrixA with matrixB and add the result into dstMatrix . More... | |
Square matrix operations | |
Functions that operate on square matrices of any size. | |
template<std::ptrdiff_t ISIZE, typename MATRIX > | |
constexpr void | transpose (MATRIX &&LVARRAY_RESTRICT_REF matrix) |
Transpose the MxM matrix matrix . More... | |
template<std::ptrdiff_t ISIZE, typename MATRIX > | |
constexpr void | addIdentity (MATRIX &&matrix, std::remove_reference_t< decltype(matrix[0][0]) > const scale) |
Add scale times the identity matrix to matrix . More... | |
template<std::ptrdiff_t ISIZE, typename MATRIX > | |
constexpr auto | trace (MATRIX const &matrix) |
Symmetric matrix operations | |
Functions that operate on symmetric matrices of any size. | |
template<std::ptrdiff_t ISIZE, typename SYM_MATRIX > | |
constexpr void | symAddIdentity (SYM_MATRIX &&symMatrix, std::remove_reference_t< decltype(symMatrix[0]) > const scale) |
Add scale times the identity matrix to symMatrix . More... | |
template<std::ptrdiff_t ISIZE, typename SYM_MATRIX > | |
constexpr auto | symTrace (SYM_MATRIX const &symMatrix) |
Variables | |
template<std::ptrdiff_t ISIZE> | |
constexpr std::ptrdiff_t | SYM_SIZE = ( ISIZE * ( ISIZE + 1 ) ) / 2 |
The size of a symmetric MxM matrix in Voigt notation. | |
Contains operations for operating on compile time sized vectors and matrices.
LvArray::tensorOps functions accept four differnet types of arguments
Each function takes in the size of the objects as template parameters. As an example to take the dot product of two vectors of length 3 you'd call
|
inline |
Add srcVector
to dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length M. |
srcVector | The source vector, of length M. |
Performs the operation
Definition at line 524 of file genericTensorOps.hpp.
|
inline |
Add srcMatrix
to dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and srcMatrix . |
JSIZE | The size of the second dimension of dstMatrix and srcMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstMatrix | The destination matrix, of size ISIZE x N. |
srcMatrix | The source matrix, of size ISIZE x N. |
Performs the operation
Definition at line 549 of file genericTensorOps.hpp.
|
inline |
Add scale
times the identity matrix to matrix
.
ISIZE | The size of matrix . |
MATRIX | The type of matrix . |
matrix | The ISIZE x ISIZE matrix to add the identity matrix to. |
scale | The amount to scale the identity matrix by. |
Performs the operations
Definition at line 1379 of file genericTensorOps.hpp.
|
inline |
Add value
to dstVector
.
M | The length of dstVector . |
DST_VECTOR | The type of dstVector . |
dstVector | The destination vector, of length M. |
value | The value to add. |
Performs the operation
Definition at line 501 of file genericTensorOps.hpp.
|
inline |
vectorA
and vectorB
. ISIZE | The length of vectorA and vectorB . |
VECTOR_A | The type of vectorA . |
VECTOR_B | The type of vectorB . |
vectorA | The first vector in the inner product, of length M. |
vectorB | The second vector in the inner product, of length M. |
Definition at line 718 of file genericTensorOps.hpp.
|
inline |
Copy srcVector
into dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length ISIZE. |
srcVector | The source vector, of length ISIZE. |
Performs the operation
Definition at line 345 of file genericTensorOps.hpp.
|
inline |
Copy srcMatrix
into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and srcMatrix . |
JSIZE | The size of the second dimension of dstMatrix and srcMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstMatrix | The destination matrix, of size ISIZE x N. |
srcMatrix | The source matrix, of size ISIZE x N. |
Performs the operation
Definition at line 370 of file genericTensorOps.hpp.
|
inline |
Compute the cross product of vectorA
and vectorB
and put it in dstVector
.
DST_VECTOR | The type of dstVector . |
VECTOR_A | The type of vectorA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector to write the cross product to, of length 3. |
vectorA | The first vector in the cross product, of length 3. |
vectorB | THe second vector in the cross product, of length 3. |
Definition at line 745 of file genericTensorOps.hpp.
|
inline |
Convert the upper triangular part of srcMatrix
to a symmetric matrix.
M | The size of dstSymMatrix and srcMatrix . |
DST_SYM_MATRIX | The type of dstSymMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstSymMatrix | The resulting MxM symmetric matrix. |
srcMatrix | The MxM matrix to convert to a symmetric matrix. |
Definition at line 292 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
matrix
. M | The size of matrix . |
MATRIX | The type of matrix . |
matrix | The M x M matrix to get the determinant of. |
Definition at line 38 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Set the entries of vector
to value
.
ISIZE | The size of vector . |
VECTOR | The type of vector . |
vector | The vector to set the entries of, of length M. |
value | The value to set the entries to. |
Performs the operation
Definition at line 297 of file genericTensorOps.hpp.
|
inline |
Set the entries of matrix
to value
.
ISIZE | The size of the first dimension of matrix . |
JSIZE | The size of the second dimension of matrix . |
MATRIX | The type of matrix . |
matrix | The matrix to set the entries of, of size ISIZE x N. |
value | The value to set the entries to. |
Performs the operation
Definition at line 319 of file genericTensorOps.hpp.
|
inline |
Multiply the elements of vectorA
and vectorB
putting the result into dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length M. |
vectorA | The first source vector, of length M. |
vectorB | The second source vector, of length M. |
Performs the operation
Definition at line 628 of file genericTensorOps.hpp.
|
inline |
Invert the source matrix srcMatrix
and store the result in dstMatrix
.
M | The size of the matrices dstMatrix and srcMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstMatrix | The M x M matrix to write the inverse to. |
srcMatrix | The M x M matrix to take the inverse of. |
srcMatrix
can contain integers but dstMatrix
must contain floating point values. Definition at line 53 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Invert the matrix matrix
overwritting it.
M | The size of the matrix matrix . |
MATRIX | The type of matrix . |
matrix | The M x M matrix to take the inverse of and overwrite. |
matrix
must contain floating point values. Definition at line 71 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
vector
. ISIZE | The length of vector . |
VECTOR | The type of vector . |
vector | The vector to get the L2 norm of, of length M. |
Definition at line 680 of file genericTensorOps.hpp.
|
inline |
vector
. ISIZE | The length of vector . |
VECTOR | The type of vector . |
vector | The vector to get the L2 norm squared of, of length M. |
Definition at line 659 of file genericTensorOps.hpp.
|
inline |
vector
. ISIZE | The size of vector . |
VECTOR | The type of vector . |
vector | The vector to get the maximum entry of, of length M. |
Definition at line 273 of file genericTensorOps.hpp.
|
inline |
Scale vector
to a unit vector.
ISIZE | The length of vector . |
VECTOR | The type of vector . |
vector | The vector normalize, of length M. |
vector
. Definition at line 697 of file genericTensorOps.hpp.
|
inline |
Perform the matrix vector multiplication of matrixA
and vectorB
adding the result to dstVector
.
ISIZE | The length of dstVector and the size of the first dimension of matrixA . |
JSIZE | The size of the second dimension of matrixA and the length of vectorBB . |
DST_VECTOR | The type of dstVector . |
MATRIX_A | The type of matrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector to add the result to, of length M. |
matrixA | The matrix to multiply vectorB by, of size ISIZE x N. |
vectorB | The vector multiplied by matrixA , of length N. |
Performs the operations
Definition at line 907 of file genericTensorOps.hpp.
|
inline |
Perform the matrix vector multiplication of the transpose of matrixA
and vectorB
adding the result to dstVector
.
ISIZE | The length of dstVector and the size of the second dimension of matrixA . |
JSIZE | The size of the first dimension of matrixA and the length of vectorB . |
DST_VECTOR | The type of dstVector . |
MATRIX_A | The type of matrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector to add the result to, of length M. |
matrixA | The matrix to multiply vectorB by, of size JSIZE x M. |
vectorB | The vector multiplied by matrixA , of length N. |
Performs the operations
Definition at line 976 of file genericTensorOps.hpp.
|
inline |
Multiply the vector vectorB
by the symmetric matrix symMatrixA
and add the result to dstVector
.
M | The size of dstVector , symMatrixA , and vectorB . |
DST_VECTOR | The type of dstVector . |
SYM_MATRIX_A | The type of symMatrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector of length M to add the result to. |
symMatrixA | The M x M symmetric matrix to multiply vectorB by. |
vectorB | The vector of length M to be multiplied by symMatrixA . |
Performs the operation
Definition at line 122 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Perform the matrix vector multiplication of matrixA
and vectorB
writing the result to dstVector
.
ISIZE | The length of dstVector and the size of the first dimension of matrixA . |
JSIZE | The size of the second dimension of matrixA and the length of vectorBB . |
DST_VECTOR | The type of dstVector . |
MATRIX_A | The type of matrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector to write the result to, of length M. |
matrixA | The matrix to multiply vectorB by, of size ISIZE x N. |
vectorB | The vector multiplied by matrixA , of length N. |
Performs the operations
Definition at line 873 of file genericTensorOps.hpp.
|
inline |
Perform the matrix vector multiplication of the transpose of matrixA
and vectorB
writing the result to dstVector
.
ISIZE | The length of dstVector and the size of the second dimension of matrixA . |
JSIZE | The size of the first dimension of matrixA and the length of vectorB . |
DST_VECTOR | The type of dstVector . |
MATRIX_A | The type of matrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector to write the result to, of length M. |
matrixA | The matrix to multiply vectorB by, of size JSIZE x M. |
vectorB | The vector multiplied by matrixA , of length N. |
Performs the operations
Definition at line 941 of file genericTensorOps.hpp.
|
inline |
Multiply the vector vectorB
by the symmetric matrix symMatrixA
and store the result in dstVector
.
M | The size of dstVector , symMatrixA , and vectorB . |
DST_VECTOR | The type of dstVector . |
SYM_MATRIX_A | The type of symMatrixA . |
VECTOR_B | The type of vectorB . |
dstVector | The vector of length M to write the result to. |
symMatrixA | The M x M symmetric matrix to multiply vectorB by. |
vectorB | The vector of length M to be multiplied by symMatrixA . |
Performs the operation
Definition at line 100 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Perform the outer product of vectorA
and vectorB
adding the result to dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and the length of vectorA . |
JSIZE | The size of the second dimension of dstMatrix and the length of vectorB . |
DST_MATRIX | The type of dstMatrix . |
VECTOR_A | The type of vectorA . |
VECTOR_B | The type of vectorB . |
dstMatrix | The matrix the result is added to, of size ISIZE x N. |
vectorA | The first vector in the outer product, of length M. |
vectorB | The second vector in the outer product, of length N. |
Performs the operations
Definition at line 840 of file genericTensorOps.hpp.
|
inline |
Multiply matrixA
with the transpose of itself and put the result into dstMatrix
.
ISIZE | The size of the first dimension of matrixA and both dimensions of dstMatrix . |
JSIZE | The size of the second dimension of matrixA. |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
dstMatrix | The matrix the result is written to, of size ISIZE x M. |
matrixA | The matrix in the multiplication, of size ISIZE x N. |
Performs the operation
Definition at line 1228 of file genericTensorOps.hpp.
|
inline |
Multiply matrixA
with the transpose of matrixB
and put the result into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and matrixA . |
JSIZE | The size of the second dimension of dstMatrix and the first dimension of matrixB . |
KSIZE | The size of the second dimension of matrixA and matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size ISIZE x P. |
matrixB | The right matrix in the multiplication, of size JSIZE x P. |
Performs the operation
Definition at line 1189 of file genericTensorOps.hpp.
|
inline |
Multiply matrixA
with matrixB
and add the result to dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and matrixA . |
JSIZE | The size of the second dimension of dstMatrix and matrixB . |
KSIZE | The size of the second dimension of matrixA and first dimension of matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is added to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size ISIZE x P. |
matrixB | The right matrix in the multiplication, of size KSIZE x N. |
Performs the operation
Definition at line 1098 of file genericTensorOps.hpp.
|
inline |
Multiply the transpose of matrixA
with matrixB
and add the result into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and the second dimension of matrixA . |
JSIZE | The size of the second dimension of dstMatrix and matrixB . |
KSIZE | The size of the first dimension of matrixA and matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size KSIZE x M. |
matrixB | The right matrix in the multiplication, of size KSIZE x N. |
Performs the operation
Definition at line 1314 of file genericTensorOps.hpp.
|
inline |
Perform the outer product of vectorA
with itself writing the result to dstMatrix
.
M | The size of both dimensions of dstMatrix and the length of vectorA . |
DST_MATRIX | The type of dstMatrix . |
VECTOR_A | The type of vectorA . |
dstMatrix | The matrix the result is written to, of size M x N. |
vectorA | The first vector in the outer product, of length M. |
Performs the operations
Definition at line 810 of file genericTensorOps.hpp.
|
inline |
Perform the outer product of vectorA
and vectorB
writing the result to dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and the length of vectorA . |
JSIZE | The size of the second dimension of dstMatrix and the length of vectorB . |
DST_MATRIX | The type of dstMatrix . |
VECTOR_A | The type of vectorA . |
VECTOR_B | The type of vectorB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
vectorA | The first vector in the outer product, of length M. |
vectorB | The second vector in the outer product, of length N. |
Performs the operations
Definition at line 780 of file genericTensorOps.hpp.
|
inline |
Multiply matrixA
with the transpose of matrixB
and put the result into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and matrixA . |
JSIZE | The size of the second dimension of dstMatrix and the first dimension of matrixB . |
KSIZE | The size of the second dimension of matrixA and matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size ISIZE x P. |
matrixB | The right matrix in the multiplication, of size JSIZE x P. |
Performs the operation
Definition at line 1143 of file genericTensorOps.hpp.
|
inline |
Multiply matrixA
with matrixB
and put the result into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and matrixA . |
JSIZE | The size of the second dimension of dstMatrix and matrixB . |
KSIZE | The size of the second dimension of matrixA and first dimension of matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size ISIZE x P. |
matrixB | The right matrix in the multiplication, of size KSIZE x N. |
Performs the operation
Definition at line 1052 of file genericTensorOps.hpp.
|
inline |
Multiply the transpose of matrix matrixA
by the symmetric matrix symMatrixB
then by matrixA
and store the result in dstSymMatrix
.
M | The size of dstSymMatrix , matrixA and symMatrixB . |
DST_SYM_MATRIX | The type of dstSymMatrix . |
MATRIX_A | The type of matrixA . |
SYM_MATRIX_B | The type of symMatrixB . |
dstSymMatrix | The M x M symmetric matrix to write the result to. |
matrixA | The M x M matrix to pre and post multiply symMatrixB by. |
symMatrixB | The M x M symmetric matrix that gets pre multiplied by matrixA and post postmultiplied by the transpose of matrixA . |
Performs the operation
Definition at line 170 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Multiply the transpose of matrixA
with matrixB
and put the result into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and the second dimension of matrixA . |
JSIZE | The size of the second dimension of dstMatrix and matrixB . |
KSIZE | The size of the first dimension of matrixA and matrixB . |
DST_MATRIX | The type of dstMatrix . |
MATRIX_A | The type of matrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The matrix the result is written to, of size ISIZE x N. |
matrixA | The left matrix in the multiplication, of size KSIZE x M. |
matrixB | The right matrix in the multiplication, of size KSIZE x N. |
Performs the operation
Definition at line 1269 of file genericTensorOps.hpp.
|
inline |
Multiply the transpose of matrix matrixB
by the symmetric matrix symMatrixA
and store the result in dstMatrix
.
M | The size of dstMatrix , symMatrixA and matrixB . |
DST_MATRIX | The type of dstMatrix . |
SYM_MATRIX_A | The type of symMatrixA . |
MATRIX_B | The type of matrixB . |
dstMatrix | The M x M matrix to write the result to. |
symMatrixA | The M x M symmetric matrix to multiply matrixB by. |
matrixB | The M x M matrix to be multiplied by matrixB . |
Performs the operation
Definition at line 145 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Multiply the entries of vector
by scale
.
ISIZE | The size of vector . |
VECTOR | The type of vector . |
vector | The vector to scale, of length M. |
scale | The value to scale the entries of vector by. |
Performs the operation
Definition at line 397 of file genericTensorOps.hpp.
|
inline |
Multiply the entries of matrix
by scale
.
ISIZE | The size of the first dimension of matrix . |
JSIZE | The size of the second dimension of matrix . |
MATRIX | The type of matrix . |
matrix | The matrix to scale, of size ISIZE x N. |
scale | The value scale the entries of vector by. |
Performs the operations
Definition at line 419 of file genericTensorOps.hpp.
|
inline |
Add srcVector
scaled by scale
to dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length M. |
srcVector | The source vector, of length M. |
scale | The value to scale the entries of srcVector by. |
Performs the operation
Definition at line 602 of file genericTensorOps.hpp.
|
inline |
Copy srcVector
scaled by scale
into dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length M. |
srcVector | The source vector, of length M. |
scale | The value to scale srcVector by. |
Performs the operations
Definition at line 446 of file genericTensorOps.hpp.
|
inline |
Copy srcMatrix
scaled by scale
into dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and srcMatrix . |
JSIZE | The size of the second dimension of dstMatrix and srcMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstMatrix | The destination matrix, of size ISIZE x N. |
srcMatrix | The source matrix, of size ISIZE x N. |
scale | The value to scale srcMatrix by. |
Performs the operation
Definition at line 473 of file genericTensorOps.hpp.
|
inline |
Subtract srcVector
from dstVector
.
ISIZE | The length of dstVector and srcVector . |
DST_VECTOR | The type of dstVector . |
SRC_VECTOR | The type of srcVector . |
dstVector | The destination vector, of length M. |
srcVector | The source vector, of length M. |
Performs the operation
Definition at line 577 of file genericTensorOps.hpp.
|
inline |
Add scale
times the identity matrix to symMatrix
.
ISIZE | The size of symMatrix . |
SYM_MATRIX | The type of symMatrix . |
symMatrix | The ISIZE x ISIZE symmetric matrix to add the identity matrix to. |
scale | The amount to scale the identity matrix by. |
Performs the operations
Definition at line 1430 of file genericTensorOps.hpp.
|
inline |
symMatrix
. SYM_MATRIX | The type of symMatrix . |
symMatrix | The M x M symmetric matrix to get the determinant of. |
Definition at line 186 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Compute the eigenvalues of the symmetric matrix symMatrix
.
DST_VECTOR | The type of eigenvalues . |
SYM_MATRIX | The type of symMatrix . |
eigenvalues | The vector of length M to write the eigenvalues to. |
symMatrix | The MxM symmetric matrix to compute the eigenvalues of. |
Computes the eigenvalues by directly solving the characteristic equation, they are returned sorted in ascending order.
symMatrix
can contain integers but eigenvalues
must contain floating point numbers. Definition at line 242 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Compute the eigenvalues and eigenvectors of the symmetric matrix symMatrix
.
DST_VECTOR | The type of eigenvalues . |
DST_MATRIX | The type of eigenvectors |
SYM_MATRIX | The type of symMatrix . |
eigenvalues | The vector of length M to write the eigenvalues to. |
eigenvectors | The MxM matrix to write the eigenvectors to. |
symMatrix | The MxM symmetric matrix to compute the eigenvalues of. |
Computes the eigenvalues by directly solving the characteristic equation, they are returned sorted in ascending order. The row
contains the eigenvector corresponding to
.
symMatrix
can contain integers but eigenvalues
must contain floating point numbers. Definition at line 269 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Invert the symmetric matrix srcSymMatrix
and store the result in dstSymMatrix
.
M | The size of the symmetric matrices dstSymMatrix and srcSymMatrix . |
DST_SYM_MATRIX | The type of dstSymMatrix . |
SRC_SYM_MATRIX | The type of srcSymMatrix . |
dstSymMatrix | The M x M symmetric matrix to write the inverse to. |
srcSymMatrix | The M x M symmetric matrix to take the inverse of. |
srcSymMatrix
can contain integers but dstMatrix
must contain floating point values. Definition at line 201 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Invert the symmetric matrix symMatrix
overwritting it.
M | The size of the matrix symMatrix . |
SYM_MATRIX | The type of symMatrix . |
symMatrix | The M x M symmetric matrix to take the inverse of and overwrite. |
symMatrix
must contain floating point values. Definition at line 219 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
Convert the srcSymMatrix
into a dense matrix.
M | The size of dstMatrix and srcSymMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_SYM_MATRIX | The type of srcSymMatrix . |
dstMatrix | The resulting MxM matrix. |
srcSymMatrix | The MxM symmetric matrix to convert. |
Definition at line 308 of file fixedSizeSquareMatrixOps.hpp.
|
inline |
symMatrix
. ISIZE | The size of symMatrix . |
SYM_MATRIX | The type of symMatrix . |
symMatrix | The ISIZE x ISIZE symmetric matrix to get the trace of. |
Definition at line 1449 of file genericTensorOps.hpp.
|
inline |
matrix
. ISIZE | The size of matrix . |
MATRIX | The type of matrix . |
matrix | The ISIZE x ISIZE matrix to get the trace of. |
Definition at line 1398 of file genericTensorOps.hpp.
|
inline |
Store the transpose of the NxM matrix srcMatrix
in dstMatrix
.
ISIZE | The size of the first dimension of dstMatrix and the second dimension of srcMatrix . |
JSIZE | The size of the second dimension of dstMatrix and the first dimension of srcMatrix . |
DST_MATRIX | The type of dstMatrix . |
SRC_MATRIX | The type of srcMatrix . |
dstMatrix | The MxN matrix where the transpose of srcMatrix is written. |
srcMatrix | The NxM matrix to transpose. |
Definition at line 1014 of file genericTensorOps.hpp.
|
inline |
Transpose the MxM matrix matrix
.
ISIZE | The size of matrix . |
MATRIX | The type of matrix . |
matrix | The MxM matrix to transpose. |
Definition at line 1353 of file genericTensorOps.hpp.