|
| zgsmatrix () |
|
| zgsmatrix (const zgsmatrix &) |
|
| zgsmatrix (const _zgsmatrix &) |
|
| zgsmatrix (const CPPL_INT &, const CPPL_INT &, const CPPL_INT=0) |
|
| zgsmatrix (const char *) |
|
| ~zgsmatrix () |
|
_zgematrix | to_zgematrix () const |
|
comple | operator() (const CPPL_INT &, const CPPL_INT &) const |
|
comple & | operator() (const CPPL_INT &, const CPPL_INT &) |
|
zgsmatrix & | put (const CPPL_INT &, const CPPL_INT &, const comple &) |
|
zgsmatrix & | del (const CPPL_INT, const CPPL_INT) |
|
zgsmatrix & | del (const CPPL_INT) |
|
void | write (const char *) const |
|
void | read (const char *) |
|
void | clear () |
|
zgsmatrix & | zero () |
|
zgsmatrix & | identity () |
|
void | chsign () |
|
void | copy (const zgsmatrix &) |
|
void | shallow_copy (const _zgsmatrix &) |
|
zgsmatrix & | resize (const CPPL_INT &, const CPPL_INT &, const CPPL_INT=0, const CPPL_INT=0) |
|
void | stretch (const CPPL_INT &, const CPPL_INT &) |
|
void | expand (const CPPL_INT &) |
|
bool | isListed (const CPPL_INT &, const CPPL_INT &) |
|
CPPL_INT | number (const CPPL_INT &, const CPPL_INT &) |
|
void | checkup () |
|
void | diet (const double=DBL_MIN) |
|
_zrovector | row (const CPPL_INT &) const |
|
_zcovector | col (const CPPL_INT &) const |
|
zgsmatrix & | operator= (const zgsmatrix &) |
|
zgsmatrix & | operator= (const _zgsmatrix &) |
|
zgsmatrix & | operator+= (const zgsmatrix &) |
|
zgsmatrix & | operator+= (const _zgsmatrix &) |
|
zgsmatrix & | operator-= (const zgsmatrix &) |
|
zgsmatrix & | operator-= (const _zgsmatrix &) |
|
zgsmatrix & | operator*= (const zgsmatrix &) |
|
zgsmatrix & | operator*= (const _zgsmatrix &) |
|
zgsmatrix & | operator*= (const double &) |
|
zgsmatrix & | operator*= (const comple &) |
|
zgsmatrix & | operator/= (const double &) |
|
zgsmatrix & | operator/= (const comple &) |
|
|
std::ostream & | operator<< (std::ostream &, const zgsmatrix &) |
|
void | swap (zgsmatrix &, zgsmatrix &) |
|
_zgsmatrix | _ (zgsmatrix &) |
|
_zgsmatrix | t (const zgsmatrix &) |
|
_zgsmatrix | conj (const zgsmatrix &) |
|
_zgsmatrix | conjt (const zgsmatrix &) |
|
void | idamax (CPPL_INT &, CPPL_INT &, const zgsmatrix &) |
|
comple | damax (const zgsmatrix &) |
|
const zgsmatrix & | operator+ (const zgsmatrix &) |
|
_zgsmatrix | operator- (const zgsmatrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const zgematrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const _zgematrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const zhematrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const _zhematrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const zgbmatrix &) |
|
_zgematrix | operator+ (const zgsmatrix &, const _zgbmatrix &) |
|
_zgsmatrix | operator+ (const zgsmatrix &, const zgsmatrix &) |
|
_zgsmatrix | operator+ (const zgsmatrix &, const _zgsmatrix &) |
|
_zgsmatrix | operator+ (const zgsmatrix &, const zhsmatrix &) |
|
_zgsmatrix | operator+ (const zgsmatrix &, const _zhsmatrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const zgematrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const _zgematrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const zhematrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const _zhematrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const zgbmatrix &) |
|
_zgematrix | operator- (const zgsmatrix &, const _zgbmatrix &) |
|
_zgsmatrix | operator- (const zgsmatrix &, const zgsmatrix &) |
|
_zgsmatrix | operator- (const zgsmatrix &, const _zgsmatrix &) |
|
_zgsmatrix | operator- (const zgsmatrix &, const zhsmatrix &) |
|
_zgsmatrix | operator- (const zgsmatrix &, const _zhsmatrix &) |
|
_zcovector | operator* (const zgsmatrix &, const zcovector &) |
|
_zcovector | operator* (const zgsmatrix &, const _zcovector &) |
|
_zgematrix | operator* (const zgsmatrix &, const zgematrix &) |
|
_zgematrix | operator* (const zgsmatrix &, const _zgematrix &) |
|
_zgematrix | operator* (const zgsmatrix &, const zhematrix &) |
|
_zgematrix | operator* (const zgsmatrix &, const _zhematrix &) |
|
_zgematrix | operator* (const zgsmatrix &, const zgbmatrix &) |
|
_zgematrix | operator* (const zgsmatrix &, const _zgbmatrix &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const zgsmatrix &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const _zgsmatrix &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const zhsmatrix &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const _zhsmatrix &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const double &) |
|
_zgsmatrix | operator* (const zgsmatrix &, const comple &) |
|
_zgsmatrix | operator/ (const zgsmatrix &, const double &) |
|
_zgsmatrix | operator/ (const zgsmatrix &, const comple &) |
|
_zgsmatrix | operator* (const double &, const zgsmatrix &) |
|
_zgsmatrix | operator* (const comple &, const zgsmatrix &) |
|
Complex Double-precision General Sparse Matrix Class.
Definition at line 3 of file zgsmatrix.hpp.
zgsmatrix & zgsmatrix::put |
( |
const CPPL_INT & |
i, |
|
|
const CPPL_INT & |
j, |
|
|
const comple & |
v |
|
) |
| |
|
inline |
put value without isListed check
Definition at line 56 of file zgsmatrix-io.hpp.
References cols, data, i(), isListed(), m, n, and rows.
Referenced by identity(), read(), _dgsmatrix::to_zgsmatrix(), _zhsmatrix::to_zgsmatrix(), dgsmatrix::to_zgsmatrix(), and zhsmatrix::to_zgsmatrix().
59 if(
i<0 || j<0 ||
m<=
i ||
n<=j ){
61 std::cerr <<
"The required component is out of the matrix size." << std::endl
62 <<
"Your input is (" <<
i <<
"," << j <<
"), whereas the matrix size is " <<
m <<
"x" <<
n <<
"." << std::endl;
68 std::cerr <<
"The required component is already listed." << std::endl
69 <<
"Your input was (" <<
i <<
"," << j <<
")." << std::endl;
76 cols[j].push_back(CPPL_INT(
data.size()));
bool isListed(const CPPL_INT &, const CPPL_INT &)
_dgematrix i(const _dgbmatrix &mat)
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< zcomponent > data
matrix data
Component Class for Complex Double-precision Sparse Matrix Classes.
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
zgsmatrix & zgsmatrix::del |
( |
const CPPL_INT |
i, |
|
|
const CPPL_INT |
j |
|
) |
| |
|
inline |
delete the entry of a component
Definition at line 88 of file zgsmatrix-io.hpp.
References cols, data, i(), m, n, and rows.
Referenced by diet(), and stretch().
91 if(
i<0 || j<0 ||
m<=
i ||
n<=j ){
93 std::cerr <<
"The required component is out of the matrix size." << std::endl
94 <<
"Your input is (" <<
i <<
"," << j <<
"), whereas the matrix size is " <<
m <<
"x" <<
n <<
"." << std::endl;
100 const std::vector<CPPL_INT>::iterator rows_i_end =
rows[
i].end();
101 for(std::vector<CPPL_INT>::iterator p=
rows[
i].begin(); p!=rows_i_end; p++){
105 CPPL_INT C =CPPL_INT(
data.size()-1);
113 const std::vector<CPPL_INT>::iterator cols_j_end =
cols[j].end();
114 for(std::vector<CPPL_INT>::iterator q=
cols[j].begin(); q!=cols_j_end; q++){
115 if(*q==c){
cols[j].erase(q);
break; }
119 CPPL_INT I(data[c].
i), J(data[c].j);
120 const std::vector<CPPL_INT>::iterator rows_I_end =
rows[I].end();
121 for(std::vector<CPPL_INT>::iterator q=
rows[I].begin(); q!=rows_I_end; q++){
122 if(*q==C){ *q=c;
break; }
124 const std::vector<CPPL_INT>::iterator cols_J_end =
cols[J].end();
125 for(std::vector<CPPL_INT>::iterator q=
cols[J].begin(); q!=cols_J_end; q++){
126 if(*q==C){ *q=c;
break; }
133 std::cerr <<
"# [NOTE] zgsmatrix::del(CPPL_INT&, CPPL_INT&): The required component was not listed. Your input was (" <<
i <<
"," << j <<
")." << std::endl;
_dgematrix i(const _dgbmatrix &mat)
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< zcomponent > data
matrix data
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
change the matrix into a zero matrix
Definition at line 14 of file zgsmatrix-misc.hpp.
References cols, data, i(), m, n, and rows.
Referenced by col(), identity(), row(), to_zgematrix(), _zhsmatrix::to_zgsmatrix(), and zhsmatrix::to_zgsmatrix().
17 for(CPPL_INT
i=0;
i<
m;
i++){
rows[
i].resize(0); }
18 for(CPPL_INT j=0; j<
n; j++){
cols[j].resize(0); }
_dgematrix i(const _dgbmatrix &mat)
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< zcomponent > data
matrix data
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
void zgsmatrix::shallow_copy |
( |
const _zgsmatrix & |
mat | ) |
|
|
inline |
make a shallow copy of the matrix
This function is not designed to be used in project codes.
Definition at line 66 of file zgsmatrix-misc.hpp.
References cols, _zgsmatrix::cols, _zgsmatrix::data, data, m, _zgsmatrix::m, _zgsmatrix::n, n, _zgsmatrix::nullify(), rows, and _zgsmatrix::rows.
Referenced by operator=().
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
CPPL_INT n
matrix column size
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
std::vector< zcomponent > data
matrix data
CPPL_INT m
matrix row size
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
std::vector< zcomponent > data
matrix data
std::vector< std::vector<CPPL_INT> > zgsmatrix::rows |
array of vector to store the entry information of component for each row
Definition at line 12 of file zgsmatrix.hpp.
Referenced by _(), clear(), conjt(), copy(), del(), isListed(), number(), operator()(), operator*(), operator*=(), operator<<(), put(), resize(), row(), shallow_copy(), stretch(), swap(), t(), zero(), zgsmatrix(), and ~zgsmatrix().
std::vector< std::vector<CPPL_INT> > zgsmatrix::cols |
array of vector to store the entry information of component for each column
Definition at line 13 of file zgsmatrix.hpp.
Referenced by _(), clear(), col(), conjt(), copy(), del(), operator()(), put(), resize(), shallow_copy(), stretch(), swap(), t(), zero(), zgsmatrix(), and ~zgsmatrix().