A dense matrix class.
More...
#include <matrix.hpp>
Public Types |
| typedef base_type::size_type | size_type |
Public Member Functions |
| | matrix () |
| | The default constructor. Does not allocate any memory.
|
| | matrix (size_type rows, size_type columns) |
| | Creates the matrix with the given dimensions.
|
| template<typename LHS , typename RHS , typename OP > |
| | matrix (matrix_expression< LHS, RHS, OP > const &proxy) |
| template<typename MatrixType > |
| | matrix (matrix_expression< MatrixType, MatrixType, op_trans > const &proxy) |
| | matrix (identity_matrix< SCALARTYPE > const &m) |
| | Creates the matrix from the supplied identity matrix.
|
| | matrix (zero_matrix< SCALARTYPE > const &m) |
| | Creates the matrix from the supplied zero matrix.
|
| | matrix (scalar_matrix< SCALARTYPE > const &m) |
| | Creates the matrix from the supplied scalar matrix.
|
| | matrix (const base_type &other) |
| | matrix (const self_type &other) |
| self_type & | operator= (const matrix_expression< const base_type, const base_type, op_trans > &proxy) |
| void | resize (size_type rows, size_type columns, bool preserve=true) |
| | Resizes the matrix. Existing entries can optionally be preserved.
|
Detailed Description
template<class SCALARTYPE, typename F, unsigned int ALIGNMENT>
class viennacl::matrix< SCALARTYPE, F, ALIGNMENT >
A dense matrix class.
- Template Parameters:
-
| SCALARTYPE | The underlying scalar type (either float or double) |
| F | Storage layout: Either row_major or column_major (at present only row_major is supported) |
| ALIGNMENT | The internal memory size is given by (size()/ALIGNMENT + 1) * ALIGNMENT. ALIGNMENT must be a power of two. Best values or usually 4, 8 or 16, higher values are usually a waste of memory. |
Member Typedef Documentation
Constructor & Destructor Documentation
The default constructor. Does not allocate any memory.
Creates the matrix with the given dimensions.
- Parameters:
-
| rows | Number of rows |
| columns | Number of columns |
Creates the matrix from the supplied identity matrix.
Creates the matrix from the supplied zero matrix.
Creates the matrix from the supplied scalar matrix.
Member Function Documentation
Resizes the matrix. Existing entries can optionally be preserved.
- Parameters:
-
| rows | New number of rows |
| columns | New number of columns |
| preserve | If true, existing values are preserved. |
Reimplemented from matrix_base< SCALARTYPE, F >.
The documentation for this class was generated from the following file: