CPPLapack
 All Classes Files Functions Variables Friends Pages
dsymatrix-cast.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! cast to _zhematrix */
4 {CPPL_VERBOSE_REPORT;
5  zhematrix newmat(n);
6 
7  for(CPPL_INT j=0; j<n; j++){
8  for(CPPL_INT i=j; i<n; i++){
9  newmat(i,j) =comple((*this)(i,j),0.0);
10  }
11  }
12 
13  return _(newmat);
14 }
15 
16 ///////////////////////////////////////////////////////////////////////////////
17 ///////////////////////////////////////////////////////////////////////////////
18 ///////////////////////////////////////////////////////////////////////////////
19 
20 //=============================================================================
21 /*! convert to _dgematrix */
23 {CPPL_VERBOSE_REPORT;
24  dgematrix newmat(n,n);
25 
26  for(CPPL_INT i=0; i<n; i++){
27  for(CPPL_INT j=0; j<n; j++){
28  newmat(i,j) =(*this)(i,j);
29  }
30  }
31 
32  return _(newmat);
33 }
34 
35 //=============================================================================
36 /*! convert to _dssmatrix */
37 inline _dssmatrix dsymatrix::to_dssmatrix(const double eps) const
38 {CPPL_VERBOSE_REPORT;
39  dssmatrix newmat(n);
40 
41  for(CPPL_INT j=0; j<n; j++){
42  for(CPPL_INT i=j; i<n; i++){
43  if( fabs((*this)(i,j))>eps ){
44  newmat(i,j) =(*this)(i,j);
45  }
46  }
47  }
48 
49  return _(newmat);
50 }
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
_dssmatrix to_dssmatrix(const double eps=-1) const
friend _dsymatrix _(dsymatrix &)
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Sparse Matrix Class
Definition: _dssmatrix.hpp:3
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
_dgematrix to_dgematrix() const
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_zhematrix to_zhematrix() const
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
Definition: zhematrix.hpp:4
Real Double-precision Symmetric Sparse Matrix Class.
Definition: dssmatrix.hpp:3