Matrix Types

Table of Contents

Previous: Vector Operations     Next: Matrix Operations


The Blaze library currently offers three dense matrix types (StaticMatrix, HybridMatrix 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.


StaticMatrix


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:

template< typename Type, size_t M, size_t N, bool SO >
class StaticMatrix;


DynamicMatrix


The blaze::DynamicMatrix class template is the representation of an arbitrary sized matrix with $ M \cdot N $ 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:

template< typename Type, bool SO >
class DynamicMatrix;


HybridMatrix


The HybridMatrix class template combines the flexibility of a dynamically sized matrix with the efficiency and performance of a fixed-size matrix. It is implemented as a crossing between the blaze::StaticMatrix and the blaze::DynamicMatrix class templates: Similar to the static matrix it uses static stack memory instead of dynamically allocated memory and similar to the dynamic matrix it can be resized (within the extend of the static memory). It can be included via the header file

The type of the elements, the maximum number of rows and columns and the storage order of the matrix can be specified via the four template parameters:

template< typename Type, size_t M, size_t N, bool SO >
class HybridMatrix;


CompressedMatrix


The blaze::CompressedMatrix class template is the representation of an arbitrary sized sparse matrix with $ M \cdot N $ 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:

template< typename Type, bool SO >
class CompressedMatrix;


Previous: Vector Operations     Next: Matrix Operations