CPPLapack
 All Classes Files Functions Variables Friends Pages
_zgsmatrix-cast.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! convert to _zgematrix */
4 {CPPL_VERBOSE_REPORT;
5  zgematrix newmat(m,n);
6  newmat.zero();
7 
8  const std::vector<zcomponent>::const_iterator data_end =data.end();
9  for(std::vector<zcomponent>::const_iterator it=data.begin(); it!=data_end; it++){
10  newmat(it->i,it->j) = it->v;
11  }
12 
13  destroy();
14  return _(newmat);
15 }
CPPL_INT n
matrix column size
Definition: _zgsmatrix.hpp:10
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
zgematrix & zero()
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: _zgsmatrix.hpp:9
void destroy() const
_zgematrix to_zgematrix() const
_dcovector _(dcovector &vec)
std::vector< zcomponent > data
matrix data
Definition: _zgsmatrix.hpp:11