Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBmatrixCDsc Class Template Reference

Read-only matrix descriptor **. More...

#include <CTBmatrixDsc.hxx>

Inheritance diagram for CTBmatrixCDsc:

Inheritance graph
[legend]
Collaboration diagram for CTBmatrixCDsc:

Collaboration graph
[legend]
List of all members.

Public Methods

 CTBmatrixCDsc ()
 CTBmatrixCDsc (const T *p_data, CTBint i_nrow, CTBint i_ncol)
 CTBmatrixCDsc (const T *p_data, CTBint i_nrow, CTBint i_ncol, CTBint i_strrow, CTBint i_strcol=1)
 CTBmatrixCDsc (const T *p_data, CTBint i_ncol, const CTBrange &rrow, const CTBrange &rcol)
const TData () const
CTBint NRow () const
CTBint NColumn () const
CTBint Size () const
CTBint StrideRow () const
CTBint StrideColumn () const
CTBvectorCDsc< TRow (CTBint i_row) const
CTBvectorCDsc< TColumn (CTBint i_col) const
CTBvectorCDsc< TDiagonal () const
void Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const
CTBvectorCDsc< Toperator[] (CTBint i_row) const
const Toperator() (CTBint i_row, CTBint i_col) const
bool operator! () const
 operator void * () const

Protected Attributes

Tmp_data
CTBint mi_nrow
CTBint mi_ncol
CTBint mi_strrow
CTBint mi_strcol

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, CTBmatrixCDsc< T > obj)

Detailed Description

template<class T>
class CTBmatrixCDsc< T >

Read-only matrix descriptor **.

Definition at line 20 of file CTBmatrixDsc.hxx.


Constructor & Destructor Documentation

template<class T>
CTBmatrixCDsc< T >::CTBmatrixCDsc [inline]
 

Construct descriptor for empty (nrow=ncol=0) matrix.

Definition at line 28 of file CTBmatrixDsc.icc.

template<class T>
CTBmatrixCDsc< T >::CTBmatrixCDsc const T * p_data,
CTBint i_nrow,
CTBint i_ncol
[inline]
 

Construct descriptor from data pointer and dimensions.

A compact matrix at p_data with i_nrow rows and i_ncol columns in normal C storage order is assumed. The row stride is thus set to i_ncol and the column stride to 1.

The value of p_data is ignored and a null is stored if i_nrow or i_ncol = 0. This simplifies the generation of descriptors in cases where the matrix is empty and prevents under all circumstances that pathological data pointers are passed around.

Definition at line 50 of file CTBmatrixDsc.icc.

template<class T>
CTBmatrixCDsc< T >::CTBmatrixCDsc const T * p_data,
CTBint i_nrow,
CTBint i_ncol,
CTBint i_strrow,
CTBint i_strcol = 1
[inline]
 

Construct descriptor from data pointer, dimensions and strides.

This allows to represent a non-compact matrix in any storage order. p_data points to element (0,0), while p_data[i_strrow] refers to element (1,0) and p_data[i_strcol] to element (0,1).

The value of p_data and a null is stored is ignored if i_nrow or i_ncol = 0. This simplifies the generation of descriptors in cases where the matrix is empty and prevents under all circumstances that pathological data pointers are passed around.

Definition at line 73 of file CTBmatrixDsc.icc.

template<class T>
CTBmatrixCDsc< T >::CTBmatrixCDsc const T * p_data,
CTBint i_ncol,
const CTBrange & rrow,
const CTBrange & rcol
[inline]
 

Construct descriptor from data pointer, number of columns and ranges.

Definition at line 87 of file CTBmatrixDsc.icc.


Member Function Documentation

template<class T>
const T * CTBmatrixCDsc< T >::Data const [inline]
 

Returns pointer to first element of matrix.

Reimplemented in CTBmatrixDsc.

Definition at line 112 of file CTBmatrixDsc.icc.

Referenced by CTBmatrixDsc::operator=().

template<class T>
CTBint CTBmatrixCDsc< T >::NRow const [inline]
 

Returns number of rows.

Definition at line 121 of file CTBmatrixDsc.icc.

Referenced by CTBprintfMD::Dimension1(), CTBmatrixDsc::operator=(), and CTBmatrix::operator=().

template<class T>
CTBint CTBmatrixCDsc< T >::NColumn const [inline]
 

Returns number of columns.

Definition at line 130 of file CTBmatrixDsc.icc.

Referenced by CTBprintfMD::Dimension2(), and CTBmatrix::operator=().

template<class T>
CTBint CTBmatrixCDsc< T >::Size const [inline]
 

Returns size of matrix ( equivalent to NRow() * NColumn() ).

Definition at line 139 of file CTBmatrixDsc.icc.

template<class T>
CTBint CTBmatrixCDsc< T >::StrideRow const [inline]
 

Returns row stride of matrix.

Definition at line 148 of file CTBmatrixDsc.icc.

Referenced by CTBmatrixDsc::operator=().

template<class T>
CTBint CTBmatrixCDsc< T >::StrideColumn const [inline]
 

Returns column stride of matrix.

Definition at line 157 of file CTBmatrixDsc.icc.

template<class T>
CTBvectorCDsc< T > CTBmatrixCDsc< T >::Row CTBint i_row const [inline]
 

Constant access row (index checked if CTB__IndexCheck defined).

Reimplemented in CTBmatrixDsc.

Definition at line 166 of file CTBmatrixDsc.icc.

template<class T>
CTBvectorCDsc< T > CTBmatrixCDsc< T >::Column CTBint i_col const [inline]
 

Constant access column (index checked if CTB__IndexCheck defined).

Reimplemented in CTBmatrixDsc.

Definition at line 178 of file CTBmatrixDsc.icc.

template<class T>
CTBvectorCDsc< T > CTBmatrixCDsc< T >::Diagonal const [inline]
 

Constant access diagonal.

Reimplemented in CTBmatrixDsc.

Definition at line 190 of file CTBmatrixDsc.icc.

template<class T>
void CTBmatrixCDsc< T >::Dump int i_indent = 0,
ostream & os = cout,
const char * p_text = 0
const [inline]
 

Dump.

Definition at line 199 of file CTBmatrixDsc.icc.

template<class T>
CTBvectorCDsc< T > CTBmatrixCDsc< T >::operator[] CTBint i_row const [inline]
 

Constant access row (index checked if CTB__IndexCheck defined).

Reimplemented in CTBmatrixDsc.

Definition at line 219 of file CTBmatrixDsc.icc.

template<class T>
const T & CTBmatrixCDsc< T >::operator() CTBint i_row,
CTBint i_col
const [inline]
 

Constant access element (index checked if CTB__IndexCheck defined).

Reimplemented in CTBmatrixDsc.

Definition at line 231 of file CTBmatrixDsc.icc.

template<class T>
bool CTBmatrixCDsc< T >::operator! const [inline]
 

Returns true if matrix empty.

Definition at line 244 of file CTBmatrixDsc.icc.

template<class T>
CTBmatrixCDsc< T >::operator void * const [inline]
 

Returns 0 if matrix empty, otherwise a non zero pointer.

Definition at line 253 of file CTBmatrixDsc.icc.


Friends And Related Function Documentation

template<class T>
ostream & operator<< ostream & os,
CTBmatrixCDsc< T > obj
[related]
 

ostream insertion.

Definition at line 265 of file CTBmatrixDsc.icc.


Member Data Documentation

template<class T>
T* CTBmatrixCDsc::mp_data [protected]
 

pointer to data.

Definition at line 53 of file CTBmatrixDsc.hxx.

template<class T>
CTBint CTBmatrixCDsc::mi_nrow [protected]
 

number of rows.

Definition at line 54 of file CTBmatrixDsc.hxx.

template<class T>
CTBint CTBmatrixCDsc::mi_ncol [protected]
 

number of columns.

Definition at line 55 of file CTBmatrixDsc.hxx.

template<class T>
CTBint CTBmatrixCDsc::mi_strrow [protected]
 

row stride.

Definition at line 56 of file CTBmatrixDsc.hxx.

template<class T>
CTBint CTBmatrixCDsc::mi_strcol [protected]
 

column stride.

Definition at line 57 of file CTBmatrixDsc.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:13:56 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001