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   for(long i=0; i<(kl+ku+1)*n; i++){
00007     newmat.array[i] =comple(array[i],0.0);
00008   }
00009   
00010   return _(newmat);
00011 }
00012 
00013 ///////////////////////////////////////////////////////////////////////////////
00014 ///////////////////////////////////////////////////////////////////////////////
00015 ///////////////////////////////////////////////////////////////////////////////
00016 
00017 //=============================================================================
00018 /*! convert to _dgematrix */
00019 inline _dgematrix dgbmatrix::to_dgematrix() const
00020 {VERBOSE_REPORT;
00021   dgematrix newmat( dgematrix(m,n).zero() );
00022   for(long i=0; i<m; i++){
00023     for(long j=std::max(long(0),i-kl); j<std::min(n,i+ku+1); j++){
00024       newmat(i,j) =(*this)(i,j);
00025     }
00026   }
00027   
00028   return _(newmat);
00029 }
 All Classes Files Functions Variables Friends