CPPLapack
 All Classes Files Functions Variables Friends
_dgbmatrix-cast.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! cast to _zgbmatrix */
00003 inline _zgbmatrix _dgbmatrix::to_zgbmatrix() const
00004 {VERBOSE_REPORT;
00005   zgbmatrix newmat(m,n,kl,ku);
00006   
00007   for(long i=0; i<(kl+ku+1)*n; i++){
00008     newmat.array[i] =comple(array[i],0.0);
00009   }
00010   
00011   destroy();
00012   return _(newmat);
00013 }
00014 
00015 ///////////////////////////////////////////////////////////////////////////////
00016 ///////////////////////////////////////////////////////////////////////////////
00017 ///////////////////////////////////////////////////////////////////////////////
00018 
00019 //=============================================================================
00020 /*! convert to _dgematrix */
00021 inline _dgematrix _dgbmatrix::to_dgematrix() const
00022 {VERBOSE_REPORT;
00023   dgematrix newmat( dgematrix(m,n).zero() );
00024   
00025   for(long i=0; i<m; i++){
00026     for(long j=std::max(long(0),i-kl); j<std::min(n,i+ku+1); j++){
00027       newmat(i,j) =(*this)(i,j);
00028     }
00029   }
00030   
00031   destroy();
00032   return _(newmat);
00033 }
 All Classes Files Functions Variables Friends