Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

MatrixType Template Struct Reference

Wrapper to disguise the actual type of matrices while allowing the value type to be templated; simple typedefs wouldn't allow that. More...

#include <matrix.h>

List of all members.

Public Types

typedef TNT::Matrix<T> rectangular
 Ordinary dense, rectangular matrix; a 2D array. More...

typedef TNT::Matrix<T> circular
 Dense matrix with non-zero elements only in the circular disk inscribed in the rectangular region. More...

typedef TNT::Matrix<T> sparse
 Sparse matrix which is expected to have fewer than 50% of the elements non-zero. More...


Detailed Description

template<class T = double> template struct MatrixType

Wrapper to disguise the actual type of matrices while allowing the value type to be templated; simple typedefs wouldn't allow that.

Currently three logically-distinct kinds of matrices can be specified, and more (e.g. a general convex shape) could be added quite simply:

 MatrixType<T>::rectangular Ordinary dense, rectangular matrix, i.e. a 2D array.

MatrixType<T>::circular Dense matrix with non-zero elements only in the circular disk inscribed in the rectangular region.

MatrixType<T>::sparse Sparse matrix which is expected to have fewer than 50% of the elements non-zero.

The actual TNT implementation uses a dense rectangular matrix for all three types. The MTL implementation currently uses a dense rectangular matrix for the Rectangle and Circle, but uses (index,value) pairs for Sparse.

Examples:

 typedef MatrixType<Network::value_type>::sparse matrix_type; matrix_type M(3,4); 

Definition at line 125 of file matrix.h.


Member Typedef Documentation

template<classT = double>
typedef TNT::Matrix<T> MatrixType<T>::circular
 

Dense matrix with non-zero elements only in the circular disk inscribed in the rectangular region.

Definition at line 143 of file matrix.h.

template<classT = double>
typedef TNT::Matrix<T> MatrixType<T>::rectangular
 

Ordinary dense, rectangular matrix; a 2D array.

Definition at line 141 of file matrix.h.

template<classT = double>
typedef TNT::Matrix<T> MatrixType<T>::sparse
 

Sparse matrix which is expected to have fewer than 50% of the elements non-zero.

Definition at line 145 of file matrix.h.


The documentation for this struct was generated from the following file:
Generated at Mon Aug 21 00:31:19 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000