Complex Double-precision General Sparse Matrix Class. More...
#include <zgsmatrix.hpp>
Public Member Functions | |
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 &) |
Public Attributes | |
CPPL_INT | m |
matrix row size More... | |
CPPL_INT | n |
matrix column size More... | |
std::vector< zcomponent > | data |
matrix data More... | |
std::vector< std::vector < CPPL_INT > > | rows |
array of vector to store the entry information of component for each row More... | |
std::vector< std::vector < CPPL_INT > > | cols |
array of vector to store the entry information of component for each column More... | |
Complex Double-precision General Sparse Matrix Class.
Definition at line 3 of file zgsmatrix.hpp.
|
inline |
zgsmatrix constructor without arguments
Definition at line 3 of file zgsmatrix-constructor.hpp.
References cols, data, m, n, and rows.
|
inline |
zgsmatrix copy constructor
Definition at line 19 of file zgsmatrix-constructor.hpp.
References cols, copy(), data, m, n, and rows.
|
inline |
zgsmatrix constructor to cast _zgsmatrix
Definition at line 31 of file zgsmatrix-constructor.hpp.
References cols, _zgsmatrix::cols, _zgsmatrix::data, data, m, _zgsmatrix::m, _zgsmatrix::n, n, _zgsmatrix::nullify(), rows, and _zgsmatrix::rows.
|
inline |
zgsmatrix constructor with size specification
Definition at line 52 of file zgsmatrix-constructor.hpp.
References cols, data, m, n, and rows.
|
inline |
zgsmatrix constructor with filename
Definition at line 74 of file zgsmatrix-constructor.hpp.
References cols, data, read(), and rows.
|
inline |
zgsmatrix destructor
Definition at line 90 of file zgsmatrix-constructor.hpp.
References cols, data, and rows.
|
inline |
convert to _zgematrix
Definition at line 3 of file zgsmatrix-cast.hpp.
References _, data, zcomponent::i, zcomponent::j, m, n, zcomponent::v, and zero().
Referenced by operator+(), and operator-().
|
inline |
operator() for const object
Definition at line 3 of file zgsmatrix-io.hpp.
References data, i(), m, n, and rows.
|
inline |
operator() for const object
Definition at line 26 of file zgsmatrix-io.hpp.
References cols, data, i(), m, n, and rows.
|
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().
|
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().
|
inline |
delete the entry of an element
Definition at line 141 of file zgsmatrix-io.hpp.
References cols, data, i(), and rows.
|
inline |
Definition at line 223 of file zgsmatrix-io.hpp.
|
inline |
Definition at line 242 of file zgsmatrix-io.hpp.
References data, i(), m, n, put(), and resize().
Referenced by zgsmatrix().
|
inline |
clear all the matrix data and set the sizes 0
Definition at line 3 of file zgsmatrix-misc.hpp.
References cols, data, m, n, and rows.
|
inline |
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().
|
inline |
change the matrix into an identity matrix
Definition at line 24 of file zgsmatrix-misc.hpp.
References i(), m, n, put(), and zero().
|
inline |
change sign(+/-) of the matrix
Definition at line 44 of file zgsmatrix-misc.hpp.
References data.
Referenced by operator-().
|
inline |
make a deep copy of the matrix
Definition at line 54 of file zgsmatrix-misc.hpp.
References cols, data, m, n, and rows.
Referenced by operator=(), and zgsmatrix().
|
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=().
|
inline |
resize the matrix
Definition at line 83 of file zgsmatrix-misc.hpp.
References cols, data, i(), m, n, and rows.
Referenced by read().
|
inline |
stretch the matrix size
Definition at line 114 of file zgsmatrix-misc.hpp.
References cols, data, del(), i(), m, n, and rows.
|
inline |
|
inline |
check if the component is listed
Definition at line 172 of file zgsmatrix-misc.hpp.
References data, i(), m, n, and rows.
Referenced by put().
|
inline |
return the element number of the component
Definition at line 193 of file zgsmatrix-misc.hpp.
References data, i(), m, n, and rows.
|
inline |
health checkup
Definition at line 224 of file zgsmatrix-misc.hpp.
|
inline |
|
inline |
get row of the matrix
Definition at line 251 of file zgsmatrix-misc.hpp.
References _, data, m, n, rows, and zero().
|
inline |
get column of the matrix
Definition at line 274 of file zgsmatrix-misc.hpp.
References _, cols, data, i(), m, n, and zero().
|
inline |
zgsmatrix=_zgsmatrix operator
Definition at line 3 of file zgsmatrix-_zgsmatrix.hpp.
References shallow_copy().
|
inline |
zgsmatrix+=_zgsmatrix operator
Definition at line 15 of file zgsmatrix-_zgsmatrix.hpp.
References _zgsmatrix::data, _zgsmatrix::destroy(), _zgsmatrix::m, m, n, and _zgsmatrix::n.
|
inline |
zgsmatrix-=_zgsmatrix operator
Definition at line 37 of file zgsmatrix-_zgsmatrix.hpp.
References _zgsmatrix::data, _zgsmatrix::destroy(), _zgsmatrix::m, m, n, and _zgsmatrix::n.
zgsmatrix*=zgsmatrix operator
Definition at line 59 of file zgsmatrix-zgsmatrix.hpp.
References data, m, n, rows, and swap.
|
inline |
zgsmatrix*=_zgsmatrix operator
Definition at line 59 of file zgsmatrix-_zgsmatrix.hpp.
References data, _zgsmatrix::data, _zgsmatrix::destroy(), _zgsmatrix::m, m, n, _zgsmatrix::n, _zgsmatrix::rows, and swap.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 200 of file zgsmatrix-io.hpp.
swap two matrices
Definition at line 301 of file zgsmatrix-misc.hpp.
Referenced by operator*=().
|
friend |
convert user object to smart-temporary object
Definition at line 312 of file zgsmatrix-misc.hpp.
Referenced by col(), row(), and to_zgematrix().
|
friend |
return transposed zgsmatrix
Definition at line 3 of file zgsmatrix-calc.hpp.
|
friend |
|
friend |
|
friend |
search the index of element having the largest absolute value in 0-based numbering system
Definition at line 57 of file zgsmatrix-calc.hpp.
|
friend |
+zgsmatrix operator
Definition at line 3 of file zgsmatrix-unary.hpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
zgsmatrix*zgsmatrix operator
Definition at line 137 of file zgsmatrix-zgsmatrix.hpp.
|
friend |
zgsmatrix*_zgsmatrix operator
Definition at line 139 of file zgsmatrix-_zgsmatrix.hpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
CPPL_INT zgsmatrix::m |
matrix row size
Definition at line 9 of file zgsmatrix.hpp.
Referenced by _(), checkup(), clear(), col(), copy(), del(), identity(), isListed(), number(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<<(), put(), read(), resize(), row(), shallow_copy(), stretch(), swap(), t(), to_zgematrix(), write(), zero(), and zgsmatrix().
CPPL_INT zgsmatrix::n |
matrix column size
Definition at line 10 of file zgsmatrix.hpp.
Referenced by _(), checkup(), clear(), col(), copy(), del(), identity(), isListed(), number(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<<(), put(), read(), resize(), row(), shallow_copy(), stretch(), swap(), t(), to_zgematrix(), write(), zero(), and zgsmatrix().
std::vector<zcomponent> zgsmatrix::data |
matrix data
Definition at line 11 of file zgsmatrix.hpp.
Referenced by _(), checkup(), chsign(), clear(), col(), conj(), conjt(), copy(), damax(), del(), diet(), idamax(), isListed(), number(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<<(), operator=(), put(), read(), resize(), row(), shallow_copy(), stretch(), swap(), t(), to_zgematrix(), write(), zero(), zgsmatrix(), and ~zgsmatrix().
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().