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.
Compounds | |
class | CArrayMatrixAdapter |
Wraps up a C array as a no-frills matrix; wrap this with a MatrixAdapter for more features. More... | |
class | MatrixAdapter |
Adapter that allows you to view an existing matrix as another matrix with arbitrary linear value scaling, width and height extension or reduction, spatial offsetting, etc. as needed. More... | |
class | MatrixInterface |
Abstract base class providing a simple unified virtual-function interface to matrices of various types. More... | |
class | MatrixInterfaceAdapter |
Wraps up a MatrixAdapter<> as a MatrixInterface<>, without introducing any virtual function overhead into the actual MatrixAdapter<> class. More... | |
class | MatrixInterfaceBinaryAdapter |
Adapter that presents as a matrix the result of a scalar two-argument operation on the elements of two identically-sized matrices. More... | |
class | MatrixInterfaceConstant |
Convenience class for packaging a constant scalar value as a matrix of arbitrary size. More... | |
Functions | |
template<class Matrix, class InnerC, class OuterC> Matrix | matrix_from_nested_containers (const OuterC &n, bool column_major=false) |
Constructs and returns a matrix, given a container of pointers to containers. | |
template<class Matrix> 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!). | |
template<class Matrix> Matrix::size_type | size (const Matrix &A) |
General version for most matrices supporting nrows() and ncols(). | |
template<class Matrix> Matrix & | set (Matrix &A, const typename Matrix::value_type B) |
Replacement for scalar operator= that works with most matrices. | |
template<class Matrix> 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. | |
template<class Matrix> 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. | |
template<class T> TNT::Subscript | size (TNT::const_Region2D< TNT::Matrix< T > > &A) |
TNT-specific specialization to make up for missing size() function in TNT Regions. | |
template<class Matrix> Matrix::value_type | edge_average (const Matrix &mat) |
Computes the average of a matrix's edge values. | |
template<class T> T | edge_average (const TNT::Matrix< T > &mat) |
Computes the average of a matrix's edge values. | |
template<class Matrix> Matrix::size_type | max_nrows (const Matrix &A) |
template<class Matrix> Matrix::size_type | max_ncols (const Matrix &A) |
template<class Matrix> Matrix::size_type | max_pnrows (const Matrix &A) |
template<class Matrix> Matrix::size_type | max_pncols (const Matrix &A) |
template<class Matrix> void | delete_contents (Matrix &A) |
Delete all items pointed to by the given matrix of pointers. | |
template<class Matrix, class OutputStream> OutputStream & | stream_output (const Matrix &A, OutputStream &stream) |
Outputs the matrix contents (by itself) to a stream, e.g. | |
template<class Matrix, class InputStream> InputStream & | stream_input (Matrix &A, InputStream &stream) |
Simple, non-robust input of matrix contents (by itself) from a stream, e.g. | |
template<class Matrix, class Vector> 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. | |
template<class Matrix> 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. |
|
Computes the average of a matrix's edge values. TNT-specific version; TNT has a different Fortran-based submatrix concept. Definition at line 465 of file matrix.h. References size(). |
|
Computes the average of a matrix's edge values. This version is coded generically, although it depends upon an MTL-like implementation of submatrices. |
|
Constructs and returns a matrix, given a container of pointers to containers. The type of the result Matrix must be supplied as a template argument; all elements of each nested container must be compatible with that type. Treats the nested containers as row-major by default. If the nested containers differ in size, the largest of them will be used as the number of rows, with missing spots left with the default value for the result type. Should probably just make this into a view (a la MatrixInterfaceAdapter) instead of actually constructing the resulting matrix. |
|
Simple, non-robust input of matrix contents (by itself) from a stream, e.g. a std::ofstream |
|
Outputs the matrix contents (by itself) to a stream, e.g. a std::ofstream Definition at line 594 of file matrix.h. References elem(). Referenced by Plot::PlotSpecification< Matrix, String, ScaleType, MatrixTableType, ParameterMapType >::save_matrix(). |
|
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 404 of file matrix.h. References MatIndex, and UpperBound. Referenced by Plot::PlotSpecification< Matrix, String, ScaleType, MatrixTableType, ParameterMapType >::save_matrix(). |