7 const std::vector<dcomponent>::const_iterator data_end =
data.end();
8 for(std::vector<dcomponent>::const_iterator it=
data.begin(); it!=data_end; it++){
9 newmat.
put(it->i, it->j, comple(it->v,0.));
26 const std::vector<dcomponent>::const_iterator data_end =
data.end();
27 for(std::vector<dcomponent>::const_iterator it=
data.begin(); it!=data_end; it++){
28 newmat(it->i,it->j) = it->v;
46 newmat.
a.resize(
data.size());
47 newmat.
ia.resize(
m+1);
48 newmat.
ja.resize(
data.size());
53 for(CPPL_INT
i=0;
i<
m;
i++){
55 const std::vector<CPPL_INT>::const_iterator rows_i_end =
rows[
i].end();
56 std::map<CPPL_INT,CPPL_INT> jc;
57 for(std::vector<CPPL_INT>::const_iterator rit=
rows[
i].begin(); rit!=rows_i_end; rit++){
58 jc.insert( std::make_pair(
data[*rit].j, *rit) );
61 const std::map<CPPL_INT,CPPL_INT>::const_iterator jc_end =jc.end();
62 for(std::map<CPPL_INT,CPPL_INT>::const_iterator jcit=jc.begin(); jcit!=jc_end; jcit++){
63 newmat.
a[k] =
data[(*jcit).second].v;
64 newmat.
ja[k] =CPPL_INT((*jcit).first)+1;
Complex Double-precision General Sparse Matrix Class.
std::vector< dcomponent > data
matrix data
std::vector< double > a
matrix component values
dgrmatrix to_dgrmatrix() const
CPPL_INT n
matrix column size
friend _dgsmatrix _(dgsmatrix &)
std::vector< CPPL_INT > ia
rowIndex (NOT zero-based BUT one-based indexing)
_zgsmatrix to_zgsmatrix() const
_dgematrix i(const _dgbmatrix &mat)
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
zgsmatrix & put(const CPPL_INT &, const CPPL_INT &, const comple &)
Real Double-precision General Dence Matrix Class.
CPPL_INT n
matrix column size
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
_dgematrix to_dgematrix() const
CPPL_INT m
matrix row size
std::vector< CPPL_INT > ja
columns (NOT zero-based BUT one-based indexing)
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
Real Double-precision General Compressed Sparse Row (CSR) Matrix Class.
CPPL_INT m
matrix row size