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

mat Namespace Reference

Generic routines operating on matrices. More...


Compounds

class  mat::matrixadapter

Functions

template<classMatrix> Matrix::value_type sum (const Matrix& A)
 This would have been better placed in MTL's namespace, but it would conflict with MTL's sum, which only works for vectors (grr!). More...

template<classMatrix> Matrix::size_type size (const Matrix& A)
 General version for most matrices supporting nrows and ncols(). More...

template<classMatrix> Matrix& set (Matrix &A, const typename Matrix::value_type B)
 Replacement for scalar operator= that works with most matrices. More...

template<classMatrix> Matrix::value_type elem (const Matrix &A, typename Matrix::size_type i, typename Matrix::size_type j)
 Replacement for 0-based operator[][] that works with most matrices. More...

template<classMatrix> const Matrix::SubMatrixType submatrix (const Matrix &A, typename Matrix::size_type i1, typename Matrix::size_type i2, typename Matrix::size_type j1, typename Matrix::size_type j2)
 Returns a submatrix or region for a matrix of most types. More...

template<classT> TNT::Subscript size (TNT::const_Region2D< TNT::Matrix<T> >& A)
 TNT-specific specialization to make up for missing size() function in TNT Regions. More...

template<classMatrix> Matrix::value_type edge_average (Matrix& mat)
 Computes the average of a matrix's edge values. More...

template<classT> T edge_average (TNT::Matrix<T>& mat)
 Computes the average of a matrix's edge values. More...

template<classMatrix> Matrix::size_type max_nrows (Matrix &A)
template<classMatrix> Matrix::size_type max_ncols (Matrix &A)
template<classMatrix, classVector> string gnuplot (const Matrix& A, const string& title, const string& outputfilename, const string& gpscript, const Vector& R, const Vector& C)
 General routine for plotting matrices using gnuplot. More...

template<classMatrix> string gnuplot (const Matrix& A, const string& title="", const string& outputfilename="", const string& gpscript="", AxisCoord Ro=0, AxisCoord Rm=1, AxisCoord Co=0, AxisCoord Cm=1)
 Shortcut version for plotting a matrix using gnuplot; generates linearly spaced labels. More...


Detailed Description

Generic routines operating on matrices.

This namespace can also be used for template routines which cannot be in the namespace of a particular matrix class because of conflicts with non-matrix functions already defined there.


Function Documentation

template<classT>
T mat::edge_average ( TNT::Matrix< T >& mat )
 

Computes the average of a matrix's edge values.

TNT-specific version; TNT has a different Fortran-based submatrix concept.

Definition at line 415 of file matrix.h.

template<classMatrix>
Matrix::value_type mat::edge_average ( Matrix & mat )
 

Computes the average of a matrix's edge values.

This version is coded generically, although it depends upon an MTL-like implementation of submatrices.

Definition at line 386 of file matrix.h.

template<classMatrix>
Matrix::value_type mat::elem ( const Matrix & A,
typename Matrix::size_type i,
typename Matrix::size_type j ) [inline]
 

Replacement for 0-based operator[][] that works with most matrices.

Definition at line 338 of file matrix.h.

Referenced by Plot::MatrixImage::MatrixImage().

template<classMatrix>
string mat::gnuplot ( const Matrix & A,
const string & title = "",
const string & outputfilename = "",
const string & gpscript = "",
AxisCoord Ro = 0,
AxisCoord Rm = 1,
AxisCoord Co = 0,
AxisCoord Cm = 1 )
 

Shortcut version for plotting a matrix using gnuplot; generates linearly spaced labels.

Definition at line 303 of file tnt_gnuplot.h.

template<classMatrix, classVector>
string mat::gnuplot ( const Matrix & A,
const string & title,
const string & outputfilename,
const string & gpscript,
const Vector & R,
const Vector & C )
 

General routine for plotting matrices using gnuplot.

Definition at line 252 of file tnt_gnuplot.h.

template<classMatrix>
Matrix::size_type mat::max_ncols ( Matrix & A ) [inline]
 

Definition at line 465 of file matrix.h.

template<classMatrix>
Matrix::size_type mat::max_nrows ( Matrix & A ) [inline]
 

Definition at line 445 of file matrix.h.

template<classMatrix>
Matrix & mat::set ( Matrix & A,
const typename Matrix::value_type B ) [inline]
 

Replacement for scalar operator= that works with most matrices.

Definition at line 323 of file matrix.h.

template<classT>
TNT::Subscript mat::size ( TNT::const_Region2D< TNT::Matrix< T > >& A ) [inline]
 

TNT-specific specialization to make up for missing size() function in TNT Regions.

Definition at line 373 of file matrix.h.

template<classMatrix>
Matrix::size_type mat::size ( const Matrix & A ) [inline]
 

General version for most matrices supporting nrows and ncols().

Definition at line 316 of file matrix.h.

Referenced by edge_average().

template<classMatrix>
const Matrix::SubMatrixType mat::submatrix ( const Matrix & A,
typename Matrix::size_type i1,
typename Matrix::size_type i2,
typename Matrix::size_type j1,
typename Matrix::size_type j2 ) [inline]
 

Returns a submatrix or region for a matrix of most types.

As usual, the first index is inclusive, and the second is exclusive; both are zero-based. The submatrix is const to avoid semantic differences between MTL and TNT regions.

Definition at line 354 of file matrix.h.

template<classMatrix>
Matrix::value_type mat::sum ( const Matrix & A ) [inline]
 

This would have been better placed in MTL's namespace, but it would conflict with MTL's sum, which only works for vectors (grr!).

Definition at line 308 of file matrix.h.

Referenced by KernelFactory::create(), and edge_average().


Generated at Mon Aug 21 00:31:29 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000