|
| zgbmatrix () |
|
| zgbmatrix (const zgbmatrix &) |
|
| zgbmatrix (const _zgbmatrix &) |
|
| zgbmatrix (const CPPL_INT &, const CPPL_INT &, const CPPL_INT &, const CPPL_INT &) |
|
| zgbmatrix (const char *) |
|
| ~zgbmatrix () |
|
_zgematrix | to_zgematrix () const |
|
comple & | operator() (const CPPL_INT &, const CPPL_INT &) |
|
comple | operator() (const CPPL_INT &, const CPPL_INT &) const |
|
zgbmatrix & | set (const CPPL_INT &, const CPPL_INT &, const comple &) |
|
void | write (const char *) const |
|
void | read (const char *) |
|
void | clear () |
|
zgbmatrix & | zero () |
|
zgbmatrix & | identity () |
|
void | chsign () |
|
void | copy (const zgbmatrix &) |
|
void | shallow_copy (const _zgbmatrix &) |
|
void | resize (const CPPL_INT &, const CPPL_INT &, const CPPL_INT &, const CPPL_INT &) |
|
_zrovector | row (const CPPL_INT &) const |
|
_zcovector | col (const CPPL_INT &) const |
|
CPPL_INT | zgbsv (zgematrix &) |
|
CPPL_INT | zgbsv (zcovector &) |
|
zgbmatrix & | operator= (const zgbmatrix &) |
|
zgbmatrix & | operator= (const _zgbmatrix &) |
|
zgbmatrix & | operator+= (const zgbmatrix &) |
|
zgbmatrix & | operator+= (const _zgbmatrix &) |
|
zgbmatrix & | operator-= (const zgbmatrix &) |
|
zgbmatrix & | operator-= (const _zgbmatrix &) |
|
zgbmatrix & | operator*= (const zgbmatrix &) |
|
zgbmatrix & | operator*= (const _zgbmatrix &) |
|
zgbmatrix & | operator*= (const double &) |
|
zgbmatrix & | operator*= (const comple &) |
|
zgbmatrix & | operator/= (const double &) |
|
zgbmatrix & | operator/= (const comple &) |
|
|
std::ostream & | operator<< (std::ostream &, const zgbmatrix &) |
|
void | swap (zgbmatrix &, zgbmatrix &) |
|
_zgbmatrix | _ (zgbmatrix &) |
|
_zgbmatrix | t (const zgbmatrix &) |
|
_zgematrix | i (const zgbmatrix &) |
|
_zgbmatrix | conj (const zgbmatrix &) |
|
_zgbmatrix | conjt (const zgbmatrix &) |
|
const zgbmatrix & | operator+ (const zgbmatrix &) |
|
_zgbmatrix | operator- (const zgbmatrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const zgematrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const _zgematrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const zhematrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const _zhematrix &) |
|
_zgbmatrix | operator+ (const zgbmatrix &, const zgbmatrix &) |
|
_zgbmatrix | operator+ (const zgbmatrix &, const _zgbmatrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const zgsmatrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const _zgsmatrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const zhsmatrix &) |
|
_zgematrix | operator+ (const zgbmatrix &, const _zhsmatrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const zgematrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const _zgematrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const zhematrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const _zhematrix &) |
|
_zgbmatrix | operator- (const zgbmatrix &, const zgbmatrix &) |
|
_zgbmatrix | operator- (const zgbmatrix &, const _zgbmatrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const zgsmatrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const _zgsmatrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const zhsmatrix &) |
|
_zgematrix | operator- (const zgbmatrix &, const _zhsmatrix &) |
|
_zcovector | operator* (const zgbmatrix &, const zcovector &) |
|
_zcovector | operator* (const zgbmatrix &, const _zcovector &) |
|
_zgematrix | operator* (const zgbmatrix &, const zgematrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const _zgematrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const zhematrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const _zhematrix &) |
|
_zgbmatrix | operator* (const zgbmatrix &, const zgbmatrix &) |
|
_zgbmatrix | operator* (const zgbmatrix &, const _zgbmatrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const zgsmatrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const _zgsmatrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const zhsmatrix &) |
|
_zgematrix | operator* (const zgbmatrix &, const _zhsmatrix &) |
|
_zgbmatrix | operator* (const zgbmatrix &, const double &) |
|
_zgbmatrix | operator* (const zgbmatrix &, const comple &) |
|
_zgbmatrix | operator/ (const zgbmatrix &, const double &) |
|
_zgbmatrix | operator/ (const zgbmatrix &, const comple &) |
|
_zgbmatrix | operator* (const double &, const zgbmatrix &) |
|
_zgbmatrix | operator* (const comple &, const zgbmatrix &) |
|
Complex Double-precision General Band Matrix Class.
Definition at line 3 of file zgbmatrix.hpp.
comple & zgbmatrix::operator() |
( |
const CPPL_INT & |
i, |
|
|
const CPPL_INT & |
j |
|
) |
| |
|
inline |
operator() for non-const object
Definition at line 3 of file zgbmatrix-io.hpp.
References darray, i, kl, ku, m, and n.
Referenced by identity(), operator*=(), operator+=(), operator-=(), read(), write(), and zgbsv().
6 if(
i<0 || j<0 ||
m<=
i || n<=j || i-j>
kl || j-
i>
ku ){
8 std::cerr <<
"The required component is out of the matrix size." << std::endl
9 <<
"Your input is (" <<
i <<
"," << j <<
"), whereas the matrix size is " <<
m <<
"x" <<
n <<
" with kl=" <<
kl <<
", ku=" <<
ku <<
"." << std::endl;
friend _zgematrix i(const zgbmatrix &)
comple ** darray
array of pointers of column head addresses
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
void zgbmatrix::shallow_copy |
( |
const _zgbmatrix & |
mat | ) |
|
|
inline |
make a shallow copy of the matrix
This function is not designed to be used in project codes.
Definition at line 85 of file zgbmatrix-misc.hpp.
References array, _zgbmatrix::array, darray, _zgbmatrix::darray, kl, _zgbmatrix::kl, _zgbmatrix::ku, ku, m, _zgbmatrix::m, _zgbmatrix::n, n, and _zgbmatrix::nullify().
Referenced by operator=().
CPPL_INT ku
upper band width
CPPL_INT kl
lower band width
comple ** darray
array of pointers of column head addresses
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
CPPL_INT m
matrix row size
comple * array
1D array to store matrix data
comple ** darray
array of pointers of column head addresses
CPPL_INT n
matrix column size
comple * array
1D array to store matrix data
solve A*X=Y using zgbsv
The argument is zgematrix Y. Y is overwritten and become the solution X. A is also overwritten.
Definition at line 5 of file zgbmatrix-lapack.hpp.
References zgematrix::array, array, i, kl, ku, m, zgematrix::m, n, zgematrix::n, operator()(), and swap.
Referenced by i().
10 std::cerr <<
"These matrix and vector cannot be solved." << std::endl
11 <<
"Your input was (" <<
m <<
"x" <<
n <<
") and (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
17 for(CPPL_INT
i=0;
i<
m;
i++){
18 const CPPL_INT jmax =std::min(
n,
i+
ku+1);
19 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax; j++){
24 CPPL_INT NRHS(mat.
n), LDAB(2*
kl+
ku+1), *IPIV(
new CPPL_INT[
n]), LDB(mat.
m), INFO(1);
25 zgbsv_(&
n, &
kl, &
ku, &NRHS, newmat.array, &LDAB, IPIV, mat.
array, &LDB, &INFO);
32 std::cerr <<
"Serious trouble happend. INFO = " << INFO <<
"." << std::endl;
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT n
matrix column size
comple * array
1D array to store matrix data
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT m
matrix row size
CPPL_INT kl
lower band width
friend void swap(zgbmatrix &, zgbmatrix &)
solve A*x=y using zgbsv
The argument is zcovector y. y is overwritten and become the solution x. A is also overwritten.
Definition at line 41 of file zgbmatrix-lapack.hpp.
References zcovector::array, array, i, kl, ku, zcovector::l, m, n, operator()(), and swap.
46 std::cerr <<
"These matrix and vector cannot be solved." << std::endl
47 <<
"Your input was (" <<
m <<
"x" <<
n <<
") and (" << vec.
l <<
")." << std::endl;
53 for(CPPL_INT
i=0;
i<
m;
i++){
54 const CPPL_INT jmax =std::min(
n,
i+
ku+1);
55 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax; j++){
60 CPPL_INT NRHS(1), LDAB(2*
kl+
ku+1), *IPIV(
new CPPL_INT[
n]), LDB(vec.
l), INFO(1);
61 zgbsv_(&
n, &
kl, &
ku, &NRHS, newmat.array, &LDAB, IPIV, vec.
array, &LDB, &INFO);
68 std::cerr <<
"Serious trouble happend. INFO = " << INFO <<
"." << std::endl;
comple * array
1D array to store vector data
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
friend void swap(zgbmatrix &, zgbmatrix &)
zgbmatrix+=zgbmatrix operator
If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix.
Definition at line 19 of file zgbmatrix-zgbmatrix.hpp.
References i, kl, ku, m, n, operator()(), swap, and zero().
22 if(
n!=mat.
n ||
m!=mat.
m){
24 std::cerr <<
"These two matrises can not make a summation." << std::endl
25 <<
"Your input was" <<
"(" <<
m <<
"x"<<
n <<
","<<
kl <<
":"<<
ku <<
") "<<
"+=" <<
"("<< mat.
m <<
"x"<< mat.
n <<
","<< mat.
kl <<
":"<< mat.
ku <<
") " << std::endl;
31 for(CPPL_INT
i=0;
i<
m;
i++){
32 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
33 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
44 for(CPPL_INT
i=0;
i<
m;
i++){
45 const CPPL_INT jmax1 =std::min(
n,
i+
ku+1);
46 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax1; j++){
49 const CPPL_INT jmax2 =std::min(mat.
n,
i+mat.
ku+1);
50 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax2; j++){
51 newmat(
i,j) += mat(
i,j);
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
friend void swap(zgbmatrix &, zgbmatrix &)
zgbmatrix+=_zgbmatrix operator
If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix.
Definition at line 16 of file zgbmatrix-_zgbmatrix.hpp.
References _zgbmatrix::destroy(), i, kl, _zgbmatrix::kl, _zgbmatrix::ku, ku, m, _zgbmatrix::m, _zgbmatrix::n, n, operator()(), swap, and zero().
19 if(
n!=mat.
n ||
m!=mat.
m){
21 std::cerr <<
"These two matrises can not make a summation." << std::endl
22 <<
"Your input was" <<
"(" <<
m <<
"x"<<
n <<
","<<
kl <<
":"<<
ku <<
") "<<
"+=" <<
"("<< mat.
m <<
"x"<< mat.
n <<
","<< mat.
kl <<
":"<< mat.
ku <<
") " << std::endl;
28 for(CPPL_INT
i=0;
i<
m;
i++){
29 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
30 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
41 for(CPPL_INT
i=0;
i<
m;
i++){
42 const CPPL_INT jmax1 =std::min(
n,
i+
ku+1);
43 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax1; j++){
46 const CPPL_INT jmax2 =std::min(mat.
n,
i+mat.
ku+1);
47 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax2; j++){
48 newmat(
i,j) += mat(
i,j);
CPPL_INT ku
upper band width
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT kl
lower band width
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
friend void swap(zgbmatrix &, zgbmatrix &)
zgbmatrix-=zgbmatrix operator
If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix.
Definition at line 63 of file zgbmatrix-zgbmatrix.hpp.
References i, kl, ku, m, n, operator()(), swap, and zero().
66 if(
n!=mat.
n ||
m!=mat.
m){
68 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
69 <<
"Your input was" <<
"(" <<
m <<
"x"<<
n <<
","<<
kl <<
":"<<
ku <<
") "<<
"-=" <<
"("<< mat.
m <<
"x"<< mat.
n <<
","<< mat.
kl <<
":"<< mat.
ku <<
") " << std::endl;
75 for(CPPL_INT
i=0;
i<
m;
i++){
76 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
77 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
88 for(CPPL_INT
i=0;
i<
m;
i++){
89 const CPPL_INT jmax1 =std::min(
n,
i+
ku+1);
90 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax1; j++){
93 const CPPL_INT jmax2 =std::min(mat.
n,
i+mat.
ku+1);
94 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax2; j++){
95 newmat(
i,j) -= mat(
i,j);
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
friend void swap(zgbmatrix &, zgbmatrix &)
zgbmatrix-=_zgbmatrix operator
If the band width of the left side matrix is narrower than the right side matrix, the band width of the left side matrix become thicker as same as the right side matrix.
Definition at line 61 of file zgbmatrix-_zgbmatrix.hpp.
References _zgbmatrix::destroy(), i, kl, _zgbmatrix::kl, _zgbmatrix::ku, ku, m, _zgbmatrix::m, _zgbmatrix::n, n, operator()(), swap, and zero().
64 if(
n!=mat.
n ||
m!=mat.
m){
66 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
67 <<
"Your input was" <<
"(" <<
m <<
"x"<<
n <<
","<<
kl <<
":"<<
ku <<
") "<<
"-=" <<
"("<< mat.
m <<
"x"<< mat.
n <<
","<< mat.
kl <<
":"<< mat.
ku <<
") " << std::endl;
73 for(CPPL_INT
i=0;
i<
m;
i++){
74 const CPPL_INT jmax =std::min(
n,
i+mat.
ku+1);
75 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax; j++){
86 for(CPPL_INT
i=0;
i<
m;
i++){
87 const CPPL_INT jmax1 =std::min(
n,
i+
ku+1);
88 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax1; j++){
91 const CPPL_INT jmax2 =std::min(mat.
n,
i+mat.
ku+1);
92 for(CPPL_INT j=std::max(CPPL_INT(0),
i-mat.
kl); j<jmax2; j++){
93 newmat(
i,j) -= mat(
i,j);
CPPL_INT ku
upper band width
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT kl
lower band width
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
friend void swap(zgbmatrix &, zgbmatrix &)
zgbmatrix*=_zgbmatrix operator
Definition at line 105 of file zgbmatrix-_zgbmatrix.hpp.
References _zgbmatrix::destroy(), i, kl, _zgbmatrix::kl, _zgbmatrix::ku, ku, _zgbmatrix::m, m, _zgbmatrix::n, n, operator()(), swap, and zero().
106 {CPPL_VERBOSE_REPORT;
110 std::cerr <<
"These two matrises can not make a product." << std::endl
111 <<
"Your input was (" <<
m <<
"x" <<
n <<
") * (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
119 for(CPPL_INT
i=0;
i<newmat.
m;
i++){
120 const CPPL_INT jmax =std::min(newmat.n,
i+newmat.ku+1);
121 for(CPPL_INT j=std::max(CPPL_INT(0),
i-newmat.kl); j<jmax; j++){
122 const CPPL_INT kmax =std::min( std::min(
n,
i+
ku+1), std::min(mat.
m,j+mat.
kl+1) );
123 for(CPPL_INT k=std::max( std::max(CPPL_INT(0),
i-
kl), std::max(CPPL_INT(0),j-mat.
ku) ); k<kmax; k++){
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
comple & operator()(const CPPL_INT &, const CPPL_INT &)
friend _zgematrix i(const zgbmatrix &)
CPPL_INT kl
lower band width
CPPL_INT n
matrix column size
CPPL_INT ku
upper band width
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
CPPL_INT kl
lower band width
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
friend void swap(zgbmatrix &, zgbmatrix &)
return its inverse matrix
Definition at line 19 of file zgbmatrix-calc.hpp.
Referenced by chsign(), col(), copy(), identity(), operator()(), operator*=(), operator+=(), operator-=(), read(), resize(), set(), to_zgematrix(), write(), zero(), zgbmatrix(), and zgbsv().
24 std::cerr <<
"This matrix is not square and has no inverse matrix." << std::endl
25 <<
"Your input was (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
33 mat_cp.zgbsv(mat_inv);
CPPL_INT n
matrix column size
Complex Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
Complex Double-precision General Band Matrix Class.
friend _zgbmatrix _(zgbmatrix &)