rectangle<int MM = 0, int NN = 0> [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:containers,selectors Component type:type
Description
A MTL rectangular matrix is one in which elements could appear in any position in the matrix, i.e., there can be any element A(i,j) where 0 <= i <= M and 0 <= i <= M. Both dense and sparse matrices can fit into this category. The compatible storage types are dense, compressed, and array. If the matrix size is known at compile time, the matrix size can be built in to the shape (for dense external matrices). This allows some algorithms to optimize for small matrices. Here are a few examples of creating rectangular matrix types:
 typedef matrix < double,
                  rectangle<>, 
                  dense<>,
                  column_major >::type FortranMatrix;
  
 typedef matrix < double,
                  rectangle<>, 
                  compressed<>,
                  row_major >::type CSR;
  
 typedef matrix < double,
                  rectangle<4,4>, 
                  dense<>,
                  row_major >::type Quaternion;
  
 typedef matrix < double,
                  rectangle<>, 
                  array< compressed<> >,
                  row_major >::type SparseArrayMat;
 
Example
Definition
matrix.h
Template Parameters

ParameterDescriptionDefault
MMThe number of rows of the matrix, if the matrix has static size (known at compile time) not static
NNThe number of columns of the matrix, if the matrix has static size (known at compile time) not static
Model of
Members
Member Where defined Description
enum { M = MM, N = NN, id = RECT, uplo }    
New members
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.