#include <Rectmat.hh>
Inheritance diagram for RazorBack::Rectmat_:
Public Methods | |
Rectmat_ (size_t Row=3, size_t Col=3) | |
default ctor: 3x3 is the default size. | |
Rectmat_ (const Rectmat_< T_ > &Rm) | |
copy ctor. | |
Rectmat_ (const T_ *Arr, size_t Row, size_t Col) | |
init Rectmat_ with a conventional array. More... | |
virtual | ~Rectmat_ () |
destructor. | |
virtual size_t | rno () const |
rno(), cno(): return the number of rows and columns. | |
virtual size_t | cno () const |
virtual vector<T_>::const_iterator | operator[] (size_t Idx) const |
The C-style [] operator provides unchecked access. More... | |
virtual vector<T_>::iterator | operator[] (size_t Idx) |
virtual const T_& | operator() (size_t Ridx, size_t Cidx) const |
virtual T_& | operator() (size_t Ridx, size_t Cidx) |
void | size (size_t Rno, size_t Cno) |
size(Rno, Cno): changes the size of the calling object to Rno x Cno. More... | |
virtual Vector_<T_> | row (size_t Idx) const |
row(Idx): returns the Idx-th row as a Vector_ object safely. More... | |
virtual void | row (const Vector_< T_ > &Vec, size_t Idx) |
virtual Vector_<T_> | col (size_t Idx) const |
col(Idx): returns the Idx-th column as a Vector_ object safely. More... | |
virtual void | col (const Vector_< T_ > &Vec, size_t Idx) |
Rectmat_<T_> | operator * (const T_ &Factor) const |
Simple scalar operations. | |
Rectmat_<T_> | operator/ (const T_ &Div) const |
Rectmat_<T_>& | operator+= (const Rectmat_< T_ > &Mat) |
Matrix addition and subtraction. More... | |
Rectmat_<T_> | operator+ (const Rectmat_< T_ > &Mat) const |
Rectmat_<T_>& | operator-= (const Rectmat_< T_ > &Mat) |
Rectmat_<T_> | operator- (const Rectmat_< T_ > &Mat) const |
Rectmat_<T_> | operator * (const Rectmat_< T_ > &Mat) const |
Matrix*matrix and matrix*vector multiplication. More... | |
Vector_<T_> | operator * (const Vector_< T_ > &Vec) const |
Rectmat_<T_> | get_transpose () const |
get_transpose(): returns the transposed calling object. | |
Rectmat_<T_>& | transpose_inplace () |
transpose_inplace(): replaces the calling object with its transpose. More... | |
virtual Vector_<T_> | diag () const |
diag(): copies the diagonal into a Vector_ object. More... | |
virtual void | diag (const Vector_< T_ > &Vec) |
virtual void | diag_matrix (const T_ &Dval) |
diag_matrix(Dval): turns the calling object into a diagonal matrix with the value Dval in all diagonal positions. More... | |
virtual T_ | trace () const |
trace(): returns the sum of the diagonal elements. More... | |
virtual void | read_matrix (istream &In) |
I/O. | |
Protected Methods | |
void | print_rows (ostream &Out, size_t Rw, size_t Jbeg, size_t Items, size_t Width, size_t Prec) const |
hidden methods. | |
Private Attributes | |
size_t | R |
size_t | C |
Use for general matrices and for non-symmetric square matrices. Derived from Basemat_.
Definition at line 39 of file Rectmat.hh.
|
default ctor: 3x3 is the default size.
Definition at line 57 of file Rectmat.hh. |
|
copy ctor.
Definition at line 66 of file Rectmat.hh. |
|
init Rectmat_ with a conventional array. It is supposed to have the row-major layout. No checks Definition at line 73 of file Rectmat.hh. |
|
destructor.
Definition at line 83 of file Rectmat.hh. |
|
rno(), cno(): return the number of rows and columns.
Reimplemented from RazorBack::Basemat_. Definition at line 88 of file Rectmat.hh. |
|
Reimplemented from RazorBack::Basemat_. Definition at line 89 of file Rectmat.hh. Referenced by operator[](). |
|
The C-style [] operator provides unchecked access. The two-argument function call operator provides optional checked access when Check is true, and FORTRAN-style indexing when Ftnidx is true. Reimplemented from RazorBack::Basemat_. Definition at line 96 of file Rectmat.hh. |
|
Reimplemented from RazorBack::Basemat_. Definition at line 98 of file Rectmat.hh. |
|
Reimplemented from RazorBack::Basemat_. |
|
Reimplemented from RazorBack::Basemat_. |
|
size(Rno, Cno): changes the size of the calling object to Rno x Cno. Nothing is done if the size parameters are the same as the current size or if either of them is 0. When the matrix "shrinks", then the upper left corner is preserved, when it grows, then the new rows and/or columns are padded with "zeroes" T_(0). |
|
row(Idx): returns the Idx-th row as a Vector_ object safely. row(Vec,Idx): sets the elements in the Idx-th row to the elements of the vector Vec, provided Idx is legal and Vec has the right number of elements. Reimplemented from RazorBack::Basemat_. |
|
Reimplemented from RazorBack::Basemat_. |
|
col(Idx): returns the Idx-th column as a Vector_ object safely. col(Vec,Idx): sets the elements in the Idx-th column to the elements of the vector Vec, provided Idx is legal and Vec has the right number of elements. Reimplemented from RazorBack::Basemat_. |
|
Reimplemented from RazorBack::Basemat_. |
|
Simple scalar operations.
|
|
|
|
Matrix addition and subtraction. Dimexc_ is thrown on dimension mismatches. |
|
|
|
|
|
|
|
Matrix*matrix and matrix*vector multiplication. Dimexc_ is thrown on dimension mismatches. |
|
|
|
get_transpose(): returns the transposed calling object.
|
|
transpose_inplace(): replaces the calling object with its transpose. Returns a reference to the calling object. |
|
diag(): copies the diagonal into a Vector_ object. diag(Vec): sets the diagonal to the values in the Vector_ object Vec. If the dimensions don't match, a Dimexc_ exception is thrown. If the calling object is not a square matrix, then Squarexc_ is thrown. Reimplemented from RazorBack::Basemat_. |
|
Reimplemented from RazorBack::Basemat_. |
|
diag_matrix(Dval): turns the calling object into a diagonal matrix with the value Dval in all diagonal positions. If the matrix is not square, a Squarexc_ exception is thrown. Reimplemented from RazorBack::Basemat_. |
|
trace(): returns the sum of the diagonal elements. If the matrix is not square, a Squarexc_ exception is thrown. Reimplemented from RazorBack::Basemat_. |
|
I/O.
Reimplemented from RazorBack::Basemat_. |
|
hidden methods.
Reimplemented from RazorBack::Basemat_. |
|
Definition at line 51 of file Rectmat.hh. |
|
Definition at line 51 of file Rectmat.hh. |