|
CU_HOST_DEVICE | Matrix (void) |
| Create a matrix filled with 0s.
|
|
template<typename T1 > |
CU_HOST_DEVICE | Matrix (const Matrix< nRows, nCols, T1 > &mat) |
| Copy a matrix. More...
|
|
template<typename T1 > |
CU_HOST_DEVICE | Matrix (const Vector< nCols, T1 > *vecs) |
| Fill the matrix with the array of vectors. More...
|
|
template<typename T1 > |
CU_HOST_DEVICE | Matrix (const T1 *values, MatrixLayout layout=C_STYLE) |
| Fill in the matrix with the values . More...
|
|
CU_HOST_DEVICE | Matrix (const T *values, MatrixLayout layout=C_STYLE) |
| Fill in the matrix with the values . More...
|
|
CU_HOST_DEVICE | Matrix (const T &value) |
| Create a diagonal matrix. More...
|
|
CU_HOST_DEVICE const T * | c_data () const |
| Returns a constant raw pointer on the data. More...
|
|
CU_HOST_DEVICE T * | data () |
| Returns a raw pointer on the data. More...
|
|
CU_HOST_DEVICE Matrix | operator- (void) const |
| Matrix subtraction.
|
|
CU_HOST_DEVICE Matrix | operator+ (const Matrix &mat) const |
| Matrix addition. More...
|
|
CU_HOST_DEVICE Matrix | operator- (const Matrix &mat) const |
|
CU_HOST_DEVICE Matrix | operator* (const T &scalar) const |
| Matrix-scalar multiplication.
|
|
CU_HOST_DEVICE Matrix | operator/ (const T &scalar) const |
| Matrix-scalar division.
|
|
CU_HOST_DEVICE Vector< nRows, T > | operator* (const Vector< nCols, T > &vec) const |
| Matrix*Column Vector.
|
|
CU_HOST_DEVICE Matrix & | operator= (const Matrix &mat) |
|
CU_HOST_DEVICE Matrix & | operator+= (const Matrix &mat) |
|
CU_HOST_DEVICE Matrix & | operator-= (const Matrix &mat) |
|
CU_HOST_DEVICE Matrix & | operator*= (const T &scalar) |
|
CU_HOST_DEVICE Matrix & | operator/= (const T &scalar) |
|
CU_HOST_DEVICE Matrix & | operator*= (const Matrix &mat) |
|
bool | operator== (const Matrix &mat) const |
|
CU_HOST_DEVICE bool | operator!= (const Matrix &mat) const |
|
CU_HOST_DEVICE Vector< nCols, T > & | operator[] (size_t idx) |
| Returns the nth row. More...
|
|
CU_HOST_DEVICE Vector< nCols, T > | operator[] (size_t idx) const |
| Returns the nth row. More...
|
|
CU_HOST_DEVICE T & | operator() (size_t i, size_t j) |
| Return the value at row i , column j .
|
|
CU_HOST_DEVICE T | operator() (size_t i, size_t j) const |
| Return the value at row i , column j .
|
|
CU_HOST_DEVICE Matrix & | zero (void) |
| Set the matrix to all zero.
|
|
CU_HOST_DEVICE Matrix & | operator= (const T &value) |
| Set the matrix to a diagonal matrix. More...
|
|
CU_HOST_DEVICE Matrix< nCols,
nRows, T > | operator~ () |
| Transpose the matrix.
|
|
CU_HOST_DEVICE T | trace () const |
| Trace of the matrix.
|
|
CU_HOST_DEVICE void | fillArray (T *array, MatrixLayout layout=C_STYLE) |
|
CU_HOST_DEVICE Vector< nRows, T > | diag () const |
| Return the diagonal vector, if the matrix is square.
|
|
|
(Note that these are not member functions.)
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Vector< nCols, T > | operator* (const Vector< nCols, T > &vec, const Matrix< nRows, nCols, T > &mat) |
| Row-Vector - Matrix multipliation.
|
|
template<size_t nRows, size_t nSize, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | operator* (const Matrix< nRows, nSize, T > &mat1, const Matrix< nSize, nCols, T > &mat2) |
| Matrix multiplication.
|
|
template<typename T > |
T CU_HOST_DEVICE | det (const Matrix< 1, 1, T > &mat) |
| Determinant of the matrix.
|
|
template<typename T > |
T CU_HOST_DEVICE | det (const Matrix< 2, 2, T > &mat) |
| Determinant of the matrix.
|
|
template<typename T > |
T CU_HOST_DEVICE | det (const Matrix< 3, 3, T > &mat) |
| Determinant of the matrix.
|
|
template<size_t nRows, typename T > |
T CU_HOST_DEVICE | det (const Matrix< nRows, nRows, T > &mat) |
| Determinant of the matrix. More...
|
|
template<size_t nRows, typename T > |
CU_HOST_DEVICE T | cofactor (const Matrix< nRows, nRows, T > &mat, size_t i, size_t j) |
| Returns the cofactor of the matrix for position (i,j)
|
|
template<typename T > |
CU_HOST_DEVICE Matrix< 1, 1, T > | inverse (const Matrix< 1, 1, T > &mat) |
| Inverse the matrix.
|
|
template<typename T > |
CU_HOST_DEVICE Matrix< 2, 2, T > | inverse (const Matrix< 2, 2, T > &mat) |
| Inverse the matrix.
|
|
template<typename T > |
CU_HOST_DEVICE Matrix< 3, 3, T > | inverse (const Matrix< 3, 3, T > &mat) |
| Inverse the matrix.
|
|
template<typename T > |
CU_HOST_DEVICE Matrix< 4, 4, T > | inverse (const Matrix< 4, 4, T > &mat) |
| Inverse the matrix.
|
|
template<size_t nRows, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nRows, T > | inverse (const Matrix< nRows, nRows, T > &mat) |
| Inverse the matrix. More...
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nCols,
nRows, T > | transpose (const Matrix< nRows, nCols, T > &mat) |
| Transpose a matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE T | norm (const Matrix< nRows, nCols, T > &mat) |
| Return the norm of the matrix. More...
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE T | normsq (const Matrix< nRows, nCols, T > &mat) |
| Return the square norm of the matrix. More...
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (const T &(*fct)(const T &), const Matrix< nRows, nCols, T > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(T), const Matrix< nRows, nCols, T > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(const T &), const Matrix< nRows, nCols, T > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (const T &(*fct)(const T1 &), const Matrix< nRows, nCols, T1 > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(T1), const Matrix< nRows, nCols, T1 > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(const T1 &), const Matrix< nRows, nCols, T1 > &m) |
| Apply a unary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(T, T), const Matrix< nRows, nCols, T > &m1, const Matrix< nRows, nCols, T > &m2) |
| Apply a binary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(const T &, const T &), const Matrix< nRows, nCols, T > &m1, const Matrix< nRows, nCols, T > &m2) |
| Apply a binary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (const T &(*fct)(const T &, const T &), const Matrix< nRows, nCols, T > &m1, const Matrix< nRows, nCols, T > &m2) |
| Apply a binary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 , typename T2 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(T1, T2), const Matrix< nRows, nCols, T1 > &m1, const Matrix< nRows, nCols, T2 > &m2) |
| Apply a binary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 , typename T2 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (T(*fct)(const T1 &, const T2 &), const Matrix< nRows, nCols, T1 > &m1, const Matrix< nRows, nCols, T2 > &m2) |
| Apply a binary function to each element of the matrix.
|
|
template<size_t nRows, size_t nCols, typename T , typename T1 , typename T2 > |
CU_HOST_DEVICE Matrix< nRows,
nCols, T > | map (const T &(*fct)(const T1 &, const T2 &), const Matrix< nRows, nCols, T1 > &m1, const Matrix< nRows, nCols, T2 > &m2) |
| Apply a binary function to each element of the matrix.
|
|