DiagMatrix Class Reference

A diagonal matrix. More...

#include <usermatrix.h>

Inheritance diagram for DiagMatrix:
Inheritance graph
[legend]
Collaboration diagram for DiagMatrix:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DiagMatrix (Pointer< UserVector< double > > b_)
 Constructor for a Pointer to a UserVector<double>.
void MultV (UserVector< double > &y, const UserVector< double > &x) const
 Computes the diagonal-multiplication of this matrix with a UserVector<double>.
void MultV (IntervalVector &y, const IntervalVector &x) const
double yAx (const UserVector< double > &y, const UserVector< double > &x) const
 Multiplies this matrix form left and right with UserVector<double>'s.
double operator() (int row, int col) const
 Operator to read one element of the matrix.
void print (ostream &out) const
 Print's out information about this matrix.

Public Attributes

bool one
 Indicates, whether the matrix is an unitary-matrix.
Pointer< UserVector< double > > diag
 A Pointer to the diagonal elements.

Detailed Description

A diagonal matrix.

Definition at line 581 of file usermatrix.h.


Constructor & Destructor Documentation

DiagMatrix::DiagMatrix ( Pointer< UserVector< double > >  b_  )  [inline]

Constructor for a Pointer to a UserVector<double>.

Sets the Pointer to the diagonal elements to the given Pointer.

Parameters:
b The diagonal elements.

Definition at line 595 of file usermatrix.h.


Member Function Documentation

void DiagMatrix::MultV ( UserVector< double > &  y,
const UserVector< double > &  x 
) const [inline, virtual]

Computes the diagonal-multiplication of this matrix with a UserVector<double>.

Parameters:
y The UserVector<double> to store the result in: y=diag.diagmult(x)
x The UserVector<double> to multiply with.

Implements UserMatrix.

Definition at line 603 of file usermatrix.h.

void DiagMatrix::MultV ( IntervalVector y,
const IntervalVector x 
) const [inline, virtual]

Implements IntervalCompliantMatrix.

Definition at line 610 of file usermatrix.h.

double DiagMatrix::yAx ( const UserVector< double > &  y,
const UserVector< double > &  x 
) const [inline, virtual]

Multiplies this matrix form left and right with UserVector<double>'s.

Parameters:
y The UserVector<double> to multiply with from left.
x The UserVector<double> to multiply with from right.
Returns:
The result x*this*y.

Reimplemented from UserMatrix.

Definition at line 627 of file usermatrix.h.

double DiagMatrix::operator() ( int  row,
int  col 
) const [inline, virtual]

Operator to read one element of the matrix.

Abstract.

Parameters:
row The row of the element to read.
col The col of the element to read.
Returns:
The element at index (row, col).

Implements ExtUserMatrix.

Definition at line 640 of file usermatrix.h.

void DiagMatrix::print ( ostream &  out  )  const [inline, virtual]

Print's out information about this matrix.

Print's the dimension and the diagonal elements.

Parameters:
out The ostream to print to.

Reimplemented from UserMatrix.

Definition at line 651 of file usermatrix.h.


Member Data Documentation

Indicates, whether the matrix is an unitary-matrix.

Definition at line 585 of file usermatrix.h.

A Pointer to the diagonal elements.

Definition at line 589 of file usermatrix.h.


The documentation for this class was generated from the following file:

Generated on 10 Mar 2013 for LaGO by  doxygen 1.6.1