![]() |
The Blaze library currently offers two dense matrix types (StaticMatrix and DynamicMatrix) and one sparse matrix type (CompressedMatrix). All matrices can either be stored as row-major matrices or column-major matrices. Per default, all matrices in Blaze are row-major matrices.
The blaze::StaticMatrix class template is the representation of a fixed-size matrix with statically allocated elements of arbitrary type. It can be included via the header file
The type of the elements, the number of rows and columns, and the storage order of the matrix can be specified via the four template parameters:
Type:
specifies the type of the matrix elements. StaticMatrix can be used with any non-cv-qualified, non-reference element type.M
: specifies the total number of rows of the matrix.N
: specifies the total number of columns of the matrix. Note that it is expected that StaticMatrix is only used for tiny and small matrices.SO
: specifies the storage order (blaze::rowMajor, blaze::columnMajor) of the matrix. The default value is blaze::rowMajor.
The blaze::DynamicMatrix class template is the representation of an arbitrary sized matrix with dynamically allocated elements of arbitrary type. It can be included via the header file
The type of the elements and the storage order of the matrix can be specified via the two template parameters:
Type:
specifies the type of the matrix elements. DynamicMatrix can be used with any non-cv-qualified, non-reference element type.SO
: specifies the storage order (blaze::rowMajor, blaze::columnMajor) of the matrix. The default value is blaze::rowMajor.
The blaze::CompressedMatrix class template is the representation of an arbitrary sized sparse matrix with dynamically allocated elements of arbitrary type. It can be included via the header file
The type of the elements and the storage order of the matrix can be specified via the two template parameters:
Type:
specifies the type of the matrix elements. CompressedMatrix can be used with any non-cv-qualified, non-reference, non-pointer element type.SO
: specifies the storage order (blaze::rowMajor, blaze::columnMajor) of the matrix. The default value is blaze::rowMajor.