A diagonal matrix. More...
#include <usermatrix.h>
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. |
A diagonal matrix.
Definition at line 581 of file usermatrix.h.
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.
b | The diagonal elements. |
Definition at line 595 of file usermatrix.h.
void DiagMatrix::MultV | ( | UserVector< double > & | y, | |
const UserVector< double > & | x | |||
) | const [inline, virtual] |
Computes the diagonal-multiplication of this matrix with a UserVector<double>.
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.
y | The UserVector<double> to multiply with from left. | |
x | The UserVector<double> to multiply with from right. |
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.
row | The row of the element to read. | |
col | The col of the element to read. |
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.
out | The ostream to print to. |
Reimplemented from UserMatrix.
Definition at line 651 of file usermatrix.h.
bool DiagMatrix::one |
Indicates, whether the matrix is an unitary-matrix.
Definition at line 585 of file usermatrix.h.
Pointer<UserVector<double> > DiagMatrix::diag |
A Pointer to the diagonal elements.
Definition at line 589 of file usermatrix.h.