CPPLapack
 All Classes Files Functions Variables Friends Pages
_dgbmatrix-cast.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! cast to _zgbmatrix */
4 {CPPL_VERBOSE_REPORT;
5  zgbmatrix newmat(m,n,kl,ku);
6 
7  for(CPPL_INT i=0; i<(kl+ku+1)*n; i++){
8  newmat.array[i] =comple(array[i],0.0);
9  }
10 
11  destroy();
12  return _(newmat);
13 }
14 
15 ///////////////////////////////////////////////////////////////////////////////
16 ///////////////////////////////////////////////////////////////////////////////
17 ///////////////////////////////////////////////////////////////////////////////
18 
19 //=============================================================================
20 /*! convert to _dgematrix */
22 {CPPL_VERBOSE_REPORT;
23  dgematrix newmat( dgematrix(m,n).zero() );
24 
25  for(CPPL_INT i=0; i<m; i++){
26  const CPPL_INT jmax =std::min(n,i+ku+1);
27  for(CPPL_INT j=std::max(CPPL_INT(0),i-kl); j<jmax; j++){
28  newmat(i,j) =(*this)(i,j);
29  }
30  }
31 
32  destroy();
33  return _(newmat);
34 }
friend _dgematrix i(const _dgbmatrix &)
CPPL_INT ku
upper band width
Definition: _dgbmatrix.hpp:12
void destroy() const
_zgbmatrix to_zgbmatrix() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
double * array
1D array to store matrix data
Definition: _dgbmatrix.hpp:13
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
_dcovector _(dcovector &vec)
_dgematrix to_dgematrix() const
comple * array
1D array to store matrix data
Definition: zgbmatrix.hpp:13
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9