template<class Type> class DiagMatrix : public Matrix <Type>

a diagonal matrix class

Inheritance:


public members:

DiagMatrix ()
a default constructor
DiagMatrix (int m)
construct a m x m diagonal matrix
DiagMatrix (const Vector <Type>& x)
construct a DiagMatrix with diagonal elements the same as the Vector
DiagMatrix (const DiagMatrix <Type>& A)
construct an identical DiagMatrix
const char* matrixType () const
returns the Matrix Type
Type max () const
returns the maximum element on the diagonal
Type min () const
returns the minimum element on the diagonal
int indexMax () const
returns the index of the maximum diagonal element
int indexMin () const
returns the index of the minimum diagonal element
Vector <Type> diagVector () const
returns the diagonal as a Vector
Vector <Type> rowVector (int i) const
returns the $i$th-row vector
Vector <Type> colVector (int j) const
returns the $j$th-column vector
int size () const
fetch size of the DiagMatrix
Type& operator[] (int i)
returns the $i$th diagonal element, re-writable
Type operator[] (int i) const
returns the $i$th diagonal element, non re-writable
Type operator() (char*, int j)
sum across the $j$th-row
Type operator() (int i, char*)
sum across the $i$th-column
Type rowMax (int ir) const
Type rowMin (int ir) const
Type colMax (int ic) const
Type colMin (int ic) const
DiagMatrix <Type>& operator= (const DiagMatrix <Type>&)
Overloading operators
DiagMatrix <Type>& operator= (const Vector <Type>&)
DiagMatrix <Type>& operator= (const Type)
DiagMatrix <Type>& operator= (const Type*)
DiagMatrix <Type>& operator+= (const DiagMatrix <Type>&)
DiagMatrix <Type>& operator-= (const DiagMatrix <Type>&)
DiagMatrix <Type>& operator+= (const Type)
DiagMatrix <Type>& operator-= (const Type)
DiagMatrix <Type>& operator*= (const Type)
DiagMatrix <Type>& operator/= (const Type)
friend ostream& operator<< (ostream&, const DiagMatrix <Type>&)
friend functions for I/O streams
friend Vector <Type> operator* (const DiagMatrix <Type>& d, const Vector <Type>& x)
friend functions, DiagMatrix * Vector
friend Vector <Type> operator* (const Vector <Type>& x, const DiagMatrix <Type>& d)
friend function, Vector * DiagMatrix
Vector <Type> atdotx (const Vector <Type>& v)
friend function, G(transpose)axpy
Vector <Type> adotx (const Vector <Type>& v)
friend function, Gaxpy

Inherited from Matrix:

public members:

int numOfRows() const
int numOfCols() const

Documentation

a diagonal matrix class

this class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling