template
class
Matrix<class>
: public Array2D<class>
(Return to index)
Matrix.
A templated representation for matrices.
This class implements the basic algebraic operations on general matrices,
which need not be square.
Type: |
Instantiable |
Superclasses: |
public Array2D<class> |
Include file: |
./Algebra/Matrix.hh |
Inheritance
Synopsis (including inherited members):
- Public members:
-
Matrix
()
;
-
Matrix
(const Array2D<T>&)
;
-
Matrix
(int,int)
;
-
Matrix
(int,int,const T&)
;
-
Matrix
(const Matrix&)
;
-
~Matrix
()
;
-
Matrix<T>& operator=
(const Matrix<T>&)
;
-
Matrix<T>& operator=
(const Array2D<T>&)
;
-
Matrix<T>& operator*=
(const T&)
;
-
Matrix<T>& operator/=
(const T&)
;
-
Matrix<T>& operator+=
(const Matrix<T>&)
;
-
Matrix<T>& operator-=
(const Matrix<T>&)
;
-
Matrix<T>& operator+=
(const T&)
;
-
Matrix<T>& operator-=
(const T&)
;
-
Matrix<T>& operator*=
(const Matrix<T>&)
;
-
Matrix<T> transpose
()const
;
-
Matrix<T> dotm
(const Matrix<T>&)const
;
-
Vector<T> dotcv
(const Vector<T>&)const
;
-
Vector<T> dotrv
(const Vector<T>&)const
;
-
typedef T value_type
;
-
typedef T* iterator
;
-
typedef const T* const_iterator
;
-
typedef T* row_iterator
;
-
typedef const T* const_row_iterator
;
-
typedef SliceIterator<T> col_iterator
;
-
typedef ConstSliceIterator<T> const_col_iterator
;
-
T& operator()
(int,int)
;
-
const T& operator()
(int,int)const
;
-
int nrows
()const
;
-
int ncols
()const
;
-
int size
()const
;
-
iterator begin
()
;
-
iterator end
()
;
-
const_iterator begin
()const
;
-
const_iterator end
()const
;
-
row_iterator row_begin
(int)
;
-
row_iterator row_end
(int)
;
-
const_row_iterator row_begin
(int)const
;
-
const_row_iterator row_end
(int)const
;
-
row_iterator operator[]
(int)
;
-
const_row_iterator operator[]
(int)const
;
-
col_iterator col_begin
(int)
;
-
col_iterator col_end
(int)
;
-
const_col_iterator col_begin
(int)const
;
-
const_col_iterator col_end
(int)const
;
-
void getColumn
(Array1D<T>&,int)const
;
-
void getRow
(Array1D<T>&,int)const
;
-
void putColumn
(const Array1D<T>&,int)
;
-
void putRow
(const Array1D<T>&,int)
;
-
void swapColumns
(int,int)
;
-
void swapRows
(int,int)
;
Documentation:
- Public members:
-
Matrix
()
;
- Default constructor.
Constructs undefined matrix.
-
Matrix
(const Array2D<T>&)
;
- Conversion.
From two-dimensional array.
-
Matrix
(int,int)
;
- Constructor.
Reserve rows x cols elements and leave them undefined.
-
Matrix
(int,int,const T&)
;
- Constructor.
Reserve rows x cols elements and set them to t.
-
Vector<T> dotcv
(const Vector<T>&)const
;
- Matrix times column vector.
-
Matrix<T> dotm
(const Matrix<T>&)const
;
- Matrix product.
-
Vector<T> dotrv
(const Vector<T>&)const
;
- Row vector times matrix.
-
Matrix<T>& operator*=
(const T&)
;
- Multiply by scalar and assign.
-
Matrix<T>& operator*=
(const Matrix<T>&)
;
- Multiply by matrix and assign.
-
Matrix<T>& operator+=
(const Matrix<T>&)
;
- Add matrix and assign..
-
Matrix<T>& operator+=
(const T&)
;
- Add scalar.
Add the unit matrix times t and assign.
Throw SizeError, if matrix is not square.
-
Matrix<T>& operator-=
(const Matrix<T>&)
;
- Subtract matrix and assign.
-
Matrix<T>& operator-=
(const T&)
;
- Subtract scalar.
Subtract the unit matrix times t and assign.
Throw SizeError, if matrix is not square.
-
Matrix<T>& operator/=
(const T&)
;
- Divide by scalar and assign.
-
Matrix<T>& operator=
(const Array2D<T>&)
;
- Convert and assign.
-
Matrix<T> transpose
()const
;
- Matrix transpose.
Documentation generated by fci on Mon Feb 7 11:41:45 2000