|
|
| Matrix3D ()=default |
| | default construct a 3D matrix
|
| |
|
| Matrix3D (int numRows, int numCols, int numZ) |
| | construct an empty 3D matrix with numRows x numCols x numZ dimensions.
|
| |
|
| Matrix3D (std::initializer_list< IndexType > idx, Matrix3DInitializer data) |
| |
|
void | insert (IndexType idx, Matrix< DataType > mat) |
| |
|
void | pushBack (IndexType idx, Matrix< DataType > mat) |
| |
| Matrix< DataType > & | operator[] (int idx) |
| | Indexer to slice a Matrix3D and index value and data at idx. More...
|
| |
| rr::Matrix< DataType > & | slice (int k) |
| | 1D Matrix slicer. More...
|
| |
| rr::Matrix3D< DataType, IndexType > & | colSliceByName (const std::vector< std::string > &rowNames) |
| | slice a Matrix3D by colnames. More...
|
| |
| std::vector< DataType > | slice (int k, int j) |
| | 2D Matrix slicer. More...
|
| |
| DataType | slice (int k, int j, int i) |
| | 3D Matrix slicer. More...
|
| |
| Matrix< DataType > & | getItem (IndexType idx) |
| | slicing operator that uses the user provided index. More...
|
| |
| const std::vector< IndexType > & | getIndex () const |
| | getter for the index data field of the Matrix3D. More...
|
| |
|
void | setKthMatrix (int k, IndexType idx, Matrix< DataType > data) |
| |
| int | numRows () |
| | get number of rows in this 3D matrix More...
|
| |
| int | numCols () |
| | get number of columns in this 3D matrix More...
|
| |
| int | numZ () |
| | get number of matrices in this 3D matrix More...
|
| |
|
void | setRowNames (const std::vector< std::string > &rowNames) |
| | set row names for each of the z matrices
|
| |
|
void | setColNames (const std::vector< std::string > &colNames) |
| | set col names for each of the z matrices
|
| |
|
std::vector< std::string > | getRowNames () |
| | return the row names for this Matrix3D
|
| |
|
std::vector< std::string > | getColNames () |
| | return the column names for this Matrix3D
|
| |
|
bool | operator== (Matrix3D< IndexType, DataType > &other) |
| | equality operator
|
| |
|
bool | operator!= (Matrix3D< IndexType, DataType > &other) |
| | inequality operator
|
| |
|
bool | almostEquals (Matrix3D< double, double > &other, double tol) |
| | equality operator for double IndexType and DataType types only
|
| |
| void | deleteRow (const int &which) |
| | delete the row indexed by More...
|
| |
| void | deleteRow (const std::string &which) |
| | delete the row indexed by More...
|
| |
| void | deleteCol (const int &which) |
| | delete the col indexed by More...
|
| |
| void | deleteCol (const std::string &which) |
| | delete the col indexed by More...
|
| |
template<typename IndexType, typename DataType>
class rr::Matrix3D< IndexType, DataType >
A basic local 3D version of the Matrix class, based on initializer_list.
template<typename IndexType , typename DataType >
| DataType rr::Matrix3D< IndexType, DataType >::slice |
( |
int |
k, |
|
|
int |
j, |
|
|
int |
i |
|
) |
| |
|
inline |
3D Matrix slicer.
Convert a 3D matrix to a scalar DataType by slicing the (k, j, i) (depth, height, width) direction using numerical indices.
- Parameters
-
| k | corresponds to the number of sub matrices, indexed by k in the set 0, 1, ..., zMax. |
| j | indexes the number of row vectors in submatrix k for j in 0, 1, ..., yMax |
| i | indexes the number of elements in each row vector j; i in 0, 1, ..., xMax |
- Returns
- A scalar DataType object at index k, j, i of this Matrix3D<DataType>.