#include "CTBmatrix.hxx"
Collaboration diagram for CTBmatrix:
Public Types | |
typedef T | Elem_t |
Public Methods | |
CTBmatrix () | |
CTBmatrix (CTBint i_nrow, CTBint i_ncol) | |
CTBmatrix (CTBint i_nrow, CTBint i_ncol, const T &def) | |
CTBmatrix (CTBint i_nrow, CTBint i_ncol, const T &def, const T &defdiag) | |
CTBmatrix (const CTBmatrix< T > &rhs) | |
CTBmatrix (CTBmatrix< T > &rhs, bool b_grab) | |
virtual | ~CTBmatrix () |
CTBint | NRow () const |
CTBint | NColumn () const |
CTBint | Size () const |
CTBint | Capacity () const |
CTBvectorDsc< T > | Row (CTBint i_row) |
CTBvectorCDsc< T > | Row (CTBint i_row) const |
CTBvectorDsc< T > | Column (CTBint i_col) |
CTBvectorCDsc< T > | Column (CTBint i_col) const |
CTBvectorDsc< T > | Diagonal () |
CTBvectorCDsc< T > | Diagonal () const |
CTBvectorDsc< T > | Diagonal (CTBint i_dia) |
CTBvectorCDsc< T > | Diagonal (CTBint i_dia) const |
CTBmatrixDsc< T > | Transpose () |
CTBmatrixCDsc< T > | Transpose () const |
void | SwapRow (CTBint i_r1, CTBint i_r2) |
void | SwapColumn (CTBint i_c1, CTBint i_c2) |
T & | At (CTBint i_row, CTBint i_col) |
const T & | At (CTBint i_row, CTBint i_col) const |
void | Resize (CTBint i_nrow, CTBint i_ncol) |
void | Resize (CTBint i_nrow, CTBint i_ncol, const T &def) |
void | EnsureCapacity (CTBint i_cap) |
void | IncreaseCapacity (CTBint i_cap) |
void | TrimCapacity () |
void | Grab (CTBmatrix< T > &rhs) |
const T * | Data () const |
CTBint | StrideRow () const |
CTBint | StrideColumn () const |
void | Dump (int i_indent=0, ostream &os=cout, const char *p_text=0) const |
CTBvectorDsc< T > | operator[] (CTBint i_row) |
CTBvectorCDsc< T > | operator[] (CTBint i_row) const |
T & | operator() (CTBint i_row, CTBint i_col) |
const T & | operator() (CTBint i_row, CTBint i_col) const |
CTBvectorDsc< T > | operator() (CTBint i_row, const CTBrange &rcol) |
CTBvectorCDsc< T > | operator() (CTBint i_row, const CTBrange &rcol) const |
CTBvectorDsc< T > | operator() (const CTBrange &rrow, CTBint i_col) |
CTBvectorCDsc< T > | operator() (const CTBrange &rrow, CTBint i_col) const |
CTBmatrixDsc< T > | operator() (const CTBrange &rrow, const CTBrange &rcol) |
CTBmatrixCDsc< T > | operator() (const CTBrange &rrow, const CTBrange &rcol) const |
bool | operator! () const |
operator T * () | |
operator const T * () const | |
operator CTBmatrixDsc () | |
operator CTBmatrixCDsc () const | |
CTBmatrix< T > & | operator= (const T &rhs) |
CTBmatrix< T > & | operator= (const CTBmatrix< T > &rhs) |
CTBmatrix< T > & | operator= (const CTBmatrixCDsc< T > &rhs) |
Private Methods | |
void | ChangeCapacity (CTBint i_cap) |
Private Attributes | |
CTBrawBuffer< T > | m_rbuf |
CTBint | mi_nrow |
CTBint | mi_ncol |
Related Functions | |
(Note that these are not member functions.) | |
ostream & | operator<< (ostream &os, const CTBmatrix< T > &obj) |
Definition at line 23 of file CTBmatrix.hxx.
|
vector element type.
Definition at line 27 of file CTBmatrix.hxx. |
|
Construct empty (nrow=ncol=0) matrix.
Definition at line 21 of file CTBmatrix.icc. |
|
Construct with i_nrow rows and i_ncol colmuns.
Definition at line 46 of file CTBmatrix.cxx. |
|
Construct with i_nrow rows, i_ncol colmuns, and default value def.
Definition at line 62 of file CTBmatrix.cxx. |
|
Construct with default value def but defdiag on the diagonal.
Definition at line 78 of file CTBmatrix.cxx. |
|
Copy constructor.
Definition at line 97 of file CTBmatrix.cxx. |
|
Definition at line 31 of file CTBmatrix.icc. |
|
Definition at line 113 of file CTBmatrix.cxx. |
|
Returns number of rows of matrix.
Definition at line 44 of file CTBmatrix.icc. Referenced by CTBdot().
|
|
Returns number of columns of matrix.
Definition at line 53 of file CTBmatrix.icc. Referenced by CTBdot(), and StrideRow().
|
|
Returns size of matrix ( equivalent to NRow() * NColumn() ).
Definition at line 62 of file CTBmatrix.icc. Referenced by ChangeCapacity(), Grab(), TrimCapacity(), operator=(), and ~CTBmatrix().
|
|
Returns capacity of matrix.
Definition at line 71 of file CTBmatrix.icc. Referenced by EnsureCapacity(), IncreaseCapacity(), Resize(), and TrimCapacity().
|
|
Access row i_row, (index checked ifdef CTB__IndexCheck).
Definition at line 80 of file CTBmatrix.icc. |
|
Constant access row i_row, (index checked ifdef CTB__IndexCheck).
Definition at line 92 of file CTBmatrix.icc. |
|
Access column i_col, (index checked ifdefCTB__IndexCheck).
Definition at line 104 of file CTBmatrix.icc. |
|
Constant access column i_col, (index checked ifdef CTB__IndexCheck).
Definition at line 116 of file CTBmatrix.icc. |
|
Access diagonal, returns a vector descriptor.
Definition at line 128 of file CTBmatrix.icc. |
|
Constant access diagonal, returns a vector descriptor.
Definition at line 137 of file CTBmatrix.icc. |
|
Access off-diagonal, returns a vector descriptor.
Returns a descriptor to the super diagonal if i_dia > 0 and to a sub diagonal if i_dia < 0. The diagonal is returned for i_dia = 0, but keep in mind that If i_dia >= NColumn() or if i_dia <= -NRow() a descriptor with a zero vector length is returned. Definition at line 134 of file CTBmatrix.cxx. |
|
Constant access off-diagonal, returns a vector descriptor.
Definition at line 164 of file CTBmatrix.icc. |
|
Return matrix descriptor for transposed matrix.
Definition at line 146 of file CTBmatrix.icc. |
|
Return constant matrix descriptor for transposed matrix.
Definition at line 155 of file CTBmatrix.icc. |
|
Swap contents of rows i_r1 and i_r2.
Definition at line 157 of file CTBmatrix.cxx. |
|
Swap contents of columns i_c1 and i_c2.
Definition at line 181 of file CTBmatrix.cxx. |
|
Access matrix element with index range check.
Definition at line 208 of file CTBmatrix.cxx. Referenced by operator()().
|
|
Constant access matrix element with index range check.
Definition at line 225 of file CTBmatrix.cxx. |
|
Change size of matrix to i_nrow rows and i_ncol columns.
Definition at line 239 of file CTBmatrix.cxx. Referenced by CTBdot().
|
|
Change matrix to i_nrow rows and i_ncol columns, default def.
Definition at line 278 of file CTBmatrix.cxx. |
|
Ensure capacity.
Definition at line 175 of file CTBmatrix.icc. Referenced by operator=().
|
|
Increase capacity to i_cap, at least double it.
Definition at line 317 of file CTBmatrix.cxx. |
|
Reduce capacity to NRow() * NColumn() .
Definition at line 185 of file CTBmatrix.icc. |
|
Grab resources. The resources allocated for rhs will be transfered to the calling object. Definition at line 330 of file CTBmatrix.cxx. |
|
Returns pointer to first element of matrix.
This method is equivalent to operator T *() and has only been added to provide the interface used by Definition at line 200 of file CTBmatrix.icc. |
|
Returns row stride of matrix (returns NColumn() ).
This method returns always Definition at line 213 of file CTBmatrix.icc. |
|
Returns column stride of matrix (returns always 1).
This method returns always Definition at line 226 of file CTBmatrix.icc. |
|
Dump.
Definition at line 349 of file CTBmatrix.cxx. |
|
Access row (index checked if CTB__IndexCheck defined).
Definition at line 235 of file CTBmatrix.icc. |
|
Constant access row (index checked ifdef CTB__IndexCheck).
Definition at line 247 of file CTBmatrix.icc. |
|
Access element (index checked ifdef CTB__IndexCheck).
Definition at line 259 of file CTBmatrix.icc. |
|
Constant access element (index checked ifdef CTB__IndexCheck).
Definition at line 272 of file CTBmatrix.icc. |
|
Access row subset (index checked ifdef CTB__IndexCheck).
Definition at line 285 of file CTBmatrix.icc. |
|
Constant access row subset (index checked ifdef CTB__IndexCheck).
Definition at line 299 of file CTBmatrix.icc. |
|
Access column subset (index checked ifdef CTB__IndexCheck).
Definition at line 313 of file CTBmatrix.icc. |
|
Constant access column subset (index checked ifdef CTB__IndexCheck).
Definition at line 327 of file CTBmatrix.icc. |
|
Access submatrix (index checked ifdef CTB__IndexCheck).
Definition at line 341 of file CTBmatrix.icc. |
|
Constant access submatrix (index checked ifdef CTB__IndexCheck).
Definition at line 355 of file CTBmatrix.icc. |
|
Returns
Definition at line 369 of file CTBmatrix.icc. |
|
Convert to pointer to data, returns null if Size()==0.
Definition at line 378 of file CTBmatrix.icc. |
|
Constant convert to pointer to data, returns null if Size()==0.
Definition at line 387 of file CTBmatrix.icc. |
|
Convert to matrix descriptor.
Definition at line 396 of file CTBmatrix.icc. |
|
Convert to constant matrix descriptor.
Definition at line 405 of file CTBmatrix.icc. |
|
Set all elements to the scalar value rhs.
Definition at line 366 of file CTBmatrix.cxx. |
|
Copy elements of matrix rhs.
Definition at line 386 of file CTBmatrix.cxx. |
|
Copy elements of matrix descriptor rhs.
Definition at line 406 of file CTBmatrix.cxx. |
|
Change capacity.
Definition at line 437 of file CTBmatrix.cxx. Referenced by EnsureCapacity(), IncreaseCapacity(), Resize(), and TrimCapacity().
|
|
ostream insertion.
Definition at line 417 of file CTBmatrix.icc. |
|
raw memory buffer.
Definition at line 114 of file CTBmatrix.hxx. |
|
number of rows.
Definition at line 115 of file CTBmatrix.hxx. |
|
number of columns.
Definition at line 116 of file CTBmatrix.hxx. |