Lightweight, simple double precision matrix object.
Provides basic matrix functionality. Note that elements of the
matrix are stored internally in FORTRAN order but using
C style indexing. That is, all indices begin at 0, not 1 and
run to size - 1. Further, FORTRAN order means the elements are
actually ordered in columns as in FORTRAN in a continuous,
logical block of memory. This allow one to use the BLAS functions
to access the elements of the matrix. As usual be warned this
is useful for efficiency and speed, but completely circumvents the
bounds checking used by methods in the object.
- Source:
- dmatrix.h:105
- Author:
- Robert R and Gary L. Pavlis
- Version:
- unknown
Friends:
function |
dmatrixoperator+ |
Add two matrices.
X=A+B.
|
function |
dmatrixoperator- |
Take the difference of two matrices.
X=A-B.
|
function |
dmatrixoperator* |
Multiply two matrices.
X=A*B.
|
function |
dmatrixoperator* |
Scale a matrix by a constant.
X=c*A where c is a constant.
|
function |
dmatrixoperator/ |
Divide each element of a matrix by a constant.
X=A/c where c is a scalar.
|
function |
dmatrixtr |
Transpose a matrix.
Given X, returns X^T.
|
function |
ostream&operator<< |
Output stream operator for a matrix.
|
function |
istream&operator>> |
Input stream operator for a matrix.
|
Entity | Type | Scope | Short Description |
~dmatrix | destructor | public | Destructor.
|
dmatrix | constructor | public | Default constructor.
|
dmatrix | constructor | public | Basic constructor.
|
dmatrix | constructor | public | Standard copy constructor
|
columns | method | public | Return the number of columns in this matrix.
|
get_address | method | public | Return a pointer to an element (r,c) of matrix.
|
operator () | operator | public | Indexing operator for a matrix object.
|
operator += | operator | public | Adds one matrix to another.
|
operator -= | operator | public | Subtracts one matrix from another.
|
operator = | operator | public | Standard assignment operator
|
rows | method | public | Return the number of rows in this matrix.
|
size | method | public | Get the size of this matrix.
|
zero | method | public | Initialize a matrix to all zeros.
|
Destructor.
Nothing special.
- Source:
- dmatrix.h:125
- Code:
-
constructor dmatrix | ? ^
< > |
Default constructor.
Produces a 1x1 matrix as a place holder.
- Source:
- dmatrix.h:110
- Code:
-
constructor dmatrix | ? ^
< > |
Basic constructor.
Allocates space for nr x nc array.
- Source:
- dmatrix.h:116
- Params:
nr
| number of rows to allocate for this matrix.
|
nc
| number of columns to allocate for this matrix.
|
- Code:
public dmatrix ( | int nr , |
| int nc ) |
constructor dmatrix | ? ^
< > |
Standard copy constructor
- Source:
- dmatrix.h:121
- Param:
other
| matrix to be copied/
|
- Code:
public dmatrix ( | const dmatrix & other ) |
Return the number of columns in this matrix.
- Source:
- dmatrix.h:206
- Code:
-
method get_address | ? ^
< > |
Return a pointer to an element (r,c) of matrix.
This is most
useful in constructs using the BLAS that require a pointer reference
to an element of a matrix.
- Source:
- dmatrix.h:184
- Params:
r
| is row index requested.
|
c
| is column index requested.
|
- Exception:
- Code:
public double * get_address ( | int r , |
| int c ) |
Indexing operator for a matrix object.
Gets value of
matrix at (rowindex,colindex).
- Source:
- dmatrix.h:134
- Params:
rowindex
| row to fetch
|
colindex
| column to fetch.
|
- Returns:
- Reference to matrix element at position (rowindex,colindex)
- Exception:
- Code:
public double & operator () ( | int rowindex , |
| int colindex ) |
Adds one matrix to another.
X->X+A where A is right hand side.
- Source:
- dmatrix.h:143
- Exception:
- Code:
public void operator += ( | const dmatrix & other ) |
Subtracts one matrix from another.
X->X-A where A is right hand side.
- Source:
- dmatrix.h:148
- Exception:
- Code:
public void operator -= ( | const dmatrix & other ) |
Standard assignment operator
- Source:
- dmatrix.h:138
- Code:
public void operator = ( | const dmatrix & other ) |
Return the number of rows in this matrix.
- Source:
- dmatrix.h:202
- Code:
-
Get the size of this matrix.
User must delete [] the result.
User should use rows() and columns() method in preference to this.
- Source:
- dmatrix.h:198
- Returns:
- Two element int vector with row=[0] and column=[1].
- Code:
-
Initialize a matrix to all zeros.
- Source:
- dmatrix.h:210
- Code:
-
Created Wed Apr 27 07:05:01 2005.
This documentation was generated automatically by
ccdoc v08r41 2004/09/29 bin_opt_suncc_sun4-solaris-2.8.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.