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  return _(newmat);
12 }
13 
14 ///////////////////////////////////////////////////////////////////////////////
15 ///////////////////////////////////////////////////////////////////////////////
16 ///////////////////////////////////////////////////////////////////////////////
17 
18 //=============================================================================
19 /*! convert to _dgematrix */
21 {CPPL_VERBOSE_REPORT;
22  dgematrix newmat( dgematrix(m,n).zero() );
23 
24  for(CPPL_INT i=0; i<m; i++){
25  const CPPL_INT jmax =std::min(n,i+ku+1);
26  for(CPPL_INT j=std::max(CPPL_INT(0),i-kl); j<jmax; j++){
27  newmat(i,j) =(*this)(i,j);
28  }
29  }
30 
31  return _(newmat);
32 }
_zgbmatrix to_zgbmatrix() const
friend _dgematrix i(const dgbmatrix &)
CPPL_INT m
matrix row size
Definition: dgbmatrix.hpp:9
friend _dgbmatrix _(dgbmatrix &)
_dgematrix to_dgematrix() const
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
CPPL_INT kl
lower band width
Definition: dgbmatrix.hpp:11
CPPL_INT ku
upper band width
Definition: dgbmatrix.hpp:12
double * array
1D array to store matrix data
Definition: dgbmatrix.hpp:13
(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
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
dgbmatrix & zero()
CPPL_INT n
matrix column size
Definition: dgbmatrix.hpp:10
comple * array
1D array to store matrix data
Definition: zgbmatrix.hpp:13