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

MatrixType< T > Struct Template Reference

#include <matrix.h>

Inheritance diagram for MatrixType< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<class T = double>
struct MatrixType< T >

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 132 of file matrix.h.

Public Types

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

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

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


The documentation for this struct was generated from the following file:
Generated on Mon Jan 20 02:37:04 2003 for RF-LISSOM by doxygen1.3-rc2