CPPLapack
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Public Attributes | Friends | List of all members
_zhematrix Class Reference

(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class More...

#include <_zhematrix.hpp>

Public Member Functions

 _zhematrix ()
 
 _zhematrix (const _zhematrix &)
 
 ~_zhematrix ()
 
_zgematrix to_zgematrix () const
 
zhecomplex operator() (const CPPL_INT &, const CPPL_INT &) const
 
void write (const char *) const
 
void nullify () const
 
void destroy () const
 
void complete () const
 

Public Attributes

CPPL_INT const & m
 matrix row and size More...
 
CPPL_INT n
 matrix column size More...
 
comple * array
 1D array to store matrix data More...
 
comple ** darray
 array of pointers of column head addresses More...
 

Friends

std::ostream & operator<< (std::ostream &, const zhematrix &)
 
_zhematrix t (const _zhematrix &)
 
_zgematrix i (const _zhematrix &)
 
const _zhematrixoperator+ (const _zhematrix &)
 
_zhematrix operator- (const _zhematrix &)
 
_zgematrix operator+ (const _zhematrix &, const zgematrix &)
 
_zgematrix operator+ (const _zhematrix &, const _zgematrix &)
 
_zhematrix operator+ (const _zhematrix &, const zhematrix &)
 
_zhematrix operator+ (const _zhematrix &, const _zhematrix &)
 
_zgematrix operator+ (const _zhematrix &, const zgbmatrix &)
 
_zgematrix operator+ (const _zhematrix &, const _zgbmatrix &)
 
_zgematrix operator+ (const _zhematrix &, const zgsmatrix &)
 
_zgematrix operator+ (const _zhematrix &, const _zgsmatrix &)
 
_zhematrix operator+ (const _zhematrix &, const zhsmatrix &)
 
_zhematrix operator+ (const _zhematrix &, const _zhsmatrix &)
 
_zgematrix operator- (const _zhematrix &, const zgematrix &)
 
_zgematrix operator- (const _zhematrix &, const _zgematrix &)
 
_zhematrix operator- (const _zhematrix &, const zhematrix &)
 
_zhematrix operator- (const _zhematrix &, const _zhematrix &)
 
_zgematrix operator- (const _zhematrix &, const zgbmatrix &)
 
_zgematrix operator- (const _zhematrix &, const _zgbmatrix &)
 
_zgematrix operator- (const _zhematrix &, const zgsmatrix &)
 
_zgematrix operator- (const _zhematrix &, const _zgsmatrix &)
 
_zhematrix operator- (const _zhematrix &, const zhsmatrix &)
 
_zhematrix operator- (const _zhematrix &, const _zhsmatrix &)
 
_zcovector operator* (const _zhematrix &, const zcovector &)
 
_zcovector operator* (const _zhematrix &, const _zcovector &)
 
_zgematrix operator* (const _zhematrix &, const zgematrix &)
 
_zgematrix operator* (const _zhematrix &, const _zgematrix &)
 
_zgematrix operator* (const _zhematrix &, const zhematrix &)
 
_zgematrix operator* (const _zhematrix &, const _zhematrix &)
 
_zgematrix operator* (const _zhematrix &, const zgbmatrix &)
 
_zgematrix operator* (const _zhematrix &, const _zgbmatrix &)
 
_zgematrix operator* (const _zhematrix &, const zgsmatrix &)
 
_zgematrix operator* (const _zhematrix &, const _zgsmatrix &)
 
_zgematrix operator* (const _zhematrix &, const zhsmatrix &)
 
_zgematrix operator* (const _zhematrix &, const _zhsmatrix &)
 
_zhematrix operator* (const _zhematrix &, const double &)
 
_zgematrix operator* (const _zhematrix &, const comple &)
 
_zhematrix operator/ (const _zhematrix &, const double &)
 
_zgematrix operator/ (const _zhematrix &, const comple &)
 
_zhematrix operator* (const double &, const _zhematrix &)
 
_zgematrix operator* (const comple &, const _zhematrix &)
 

Detailed Description

(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class

Definition at line 3 of file _zhematrix.hpp.

Constructor & Destructor Documentation

_zhematrix::_zhematrix ( )
inline

_zhematrix constructor without arguments

Definition at line 3 of file _zhematrix-constructor.hpp.

References array, darray, and n.

4  :m(n)
5 {CPPL_VERBOSE_REPORT;
6  //////// initialize ////////
7  n =0;
8  array =NULL;
9  darray =NULL;
10 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
CPPL_INT const & m
matrix row and size
Definition: _zhematrix.hpp:10
_zhematrix::_zhematrix ( const _zhematrix mat)
inline

_zhematrix copy constructor

Definition at line 14 of file _zhematrix-constructor.hpp.

References array, darray, n, and nullify().

15  :m(n)
16 {CPPL_VERBOSE_REPORT;
17  //////// initialize ////////
18  n =mat.n;
19  array =mat.array;
20  darray =mat.darray;
21 
22  mat.nullify();
23 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void nullify() const
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
CPPL_INT const & m
matrix row and size
Definition: _zhematrix.hpp:10
_zhematrix::~_zhematrix ( )
inline

zhematrix destructor

Definition at line 31 of file _zhematrix-constructor.hpp.

References array, and darray.

32 {CPPL_VERBOSE_REPORT;
33  delete [] array;
34  delete [] darray;
35 }
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13

Member Function Documentation

_zgematrix _zhematrix::to_zgematrix ( ) const
inline

convert to _zgematrix

Definition at line 3 of file _zhematrix-cast.hpp.

References _(), destroy(), i, and n.

Referenced by operator*(), operator+(), and operator/().

4 {CPPL_VERBOSE_REPORT;
5  zgematrix newmat(n,n);
6 
7  for(CPPL_INT i=0; i<n; i++){
8  for(CPPL_INT j=0; j<n; j++){
9  newmat(i,j) =(*this)(i,j);
10  }
11  }
12 
13  destroy();
14  return _(newmat);
15 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
zhecomplex _zhematrix::operator() ( const CPPL_INT &  i,
const CPPL_INT &  j 
) const
inline

operator() for object

Definition at line 3 of file _zhematrix-io.hpp.

References darray, and n.

Referenced by write().

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if( i<0 || j<0 || n<=i || n<=j ){
7  ERROR_REPORT;
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 (" << n << "," << n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  if(i>=j){ return zhecomplex(i,j, darray[j][i]); }
15  else { return zhecomplex(i,j, darray[i][j]); }
16 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
(DO NOT USE) Complex-double Class for Hermitian matrices
Definition: zhecomplex.hpp:3
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
void _zhematrix::write ( const char *  filename) const
inline

Definition at line 56 of file _zhematrix-io.hpp.

References destroy(), i, imag(), n, and operator()().

57 {CPPL_VERBOSE_REPORT;
58  std::ofstream ofs(filename, std::ios::trunc);
59  ofs.setf(std::cout.flags());
60  ofs.precision(std::cout.precision());
61  ofs.width(std::cout.width());
62  ofs.fill(std::cout.fill());
63 
64  ofs << "#zhematrix " << n << std::endl;
65  for(CPPL_INT i=0; i<n; i++){
66  for(CPPL_INT j=0; j<=i; j++ ){
67  ofs << operator()(i,j) << " ";
68  }
69  ofs << std::endl;
70 
71 #ifdef CPPL_DEBUG
72  if(std::fabs(std::imag(operator()(i,i))) > DBL_MIN){
73  WARNING_REPORT;
74  std::cerr << "The " << i << "th diagonal component of the zhematrix is not a real number." << std::endl;
75  }
76 #endif//CPPL_DEBUG
77  }
78 
79  ofs.close();
80  destroy();
81 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
zhecomplex operator()(const CPPL_INT &, const CPPL_INT &) const
void destroy() const
dcovec3 imag(const dquater &q)
friend _zgematrix i(const _zhematrix &)
void _zhematrix::nullify ( ) const
inline

nullify all the matrix data

Definition at line 3 of file _zhematrix-misc.hpp.

References array, darray, and n.

Referenced by _zhematrix(), zhematrix::shallow_copy(), and zhematrix::zhematrix().

4 {CPPL_VERBOSE_REPORT;
5  n=0;
6  array=NULL;
7  darray=NULL;
8 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
void _zhematrix::destroy ( ) const
inline

destroy all the matrix data

Definition at line 12 of file _zhematrix-misc.hpp.

References array, and darray.

Referenced by operator*(), zgematrix::operator*=(), operator+(), zhematrix::operator+=(), zgematrix::operator+=(), operator-(), zhematrix::operator-=(), zgematrix::operator-=(), operator<<(), to_zgematrix(), and write().

13 {CPPL_VERBOSE_REPORT;
14  delete [] array;
15  delete [] darray;
16  array=NULL;
17  darray=NULL;
18 }
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
void _zhematrix::complete ( ) const
inline

complete the upper-right components

Definition at line 22 of file _zhematrix-misc.hpp.

References conj(), darray, i, and n.

Referenced by operator*().

23 {CPPL_VERBOSE_REPORT;
24  for(CPPL_INT i=0; i<n; i++){
25  for(CPPL_INT j=0; j<i; j++){
26  darray[i][j] =std::conj(darray[j][i]);
27  }
28  }
29 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
_zcovector conj(const _zcovector &vec)
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const zhematrix mat 
)
friend

Definition at line 65 of file zhematrix-io.hpp.

66 {CPPL_VERBOSE_REPORT;
67  for(CPPL_INT i=0; i<mat.n; i++){
68  for(CPPL_INT j=0; j<mat.n; j++){
69  if(i>j){ s << " " << mat(i,j) << " "; }
70  else if(i==j){ s << " " << std::real(mat(i,i)) << " "; }
71  else{ s << "{" << std::conj(mat(j,i)) << "} "; }
72  }
73  s << std::endl;
74 
75 #ifdef CPPL_DEBUG
76  if(std::fabs(std::imag(mat(i,i))) > DBL_MIN){
77  WARNING_REPORT;
78  std::cerr << "The " << i << "th diagonal component of the zhematrix is not a real number." << std::endl;
79  }
80 #endif//CPPL_DEBUG
81  }
82 
83  return s;
84 }
_zcovector conj(const _zcovector &vec)
CPPL_INT n
matrix column size
Definition: zhematrix.hpp:11
dcovec3 imag(const dquater &q)
friend _zgematrix i(const _zhematrix &)
_zhematrix t ( const _zhematrix mat)
friend

return transposed _zhematrix

Definition at line 3 of file _zhematrix-calc.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  WARNING_REPORT;
7  std::cerr << "This function call has no effect since the matrix is symmetric." << std::endl;
8 #endif//CPPL_DEBUG
9 
10  return mat;
11 }
_zgematrix i ( const _zhematrix mat)
friend

return its inverse matrix

Definition at line 15 of file _zhematrix-calc.hpp.

Referenced by complete(), to_zgematrix(), and write().

16 {CPPL_VERBOSE_REPORT;
17  zhematrix mat_cp(mat);
18  zgematrix mat_inv(mat_cp.n,mat_cp.n);
19  mat_inv.identity();
20  mat_cp.zhesv(mat_inv);
21 
22  return _(mat_inv);
23 }
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
Definition: zhematrix.hpp:4
_dcovector _(dcovector &vec)
const _zhematrix& operator+ ( const _zhematrix mat)
friend

+_zhematrix operator

Definition at line 3 of file _zhematrix-unary.hpp.

4 {CPPL_VERBOSE_REPORT;
5  return mat;
6 }
_zhematrix operator- ( const _zhematrix mat)
friend

-_zhematrix operator

Definition at line 10 of file _zhematrix-unary.hpp.

11 {CPPL_VERBOSE_REPORT;
12  for(CPPL_INT j=0; j<mat.n; j++){
13  for(CPPL_INT i=j; i<mat.n; i++){
14  mat.darray[j][i] =-mat.darray[j][i];
15  }
16  }
17 
18  return mat;
19 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
_zgematrix operator+ ( const _zhematrix matA,
const zgematrix matB 
)
friend

_zhematrix+zgematrix operator

Definition at line 3 of file _zhematrix-zgematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zgematrix newmat(matA.n, matA.n);
15 
16  for(CPPL_INT i=0; i<matA.n; i++){
17  for(CPPL_INT j=0; j<matA.n; j++){
18  newmat(i,j) =matA(i,j)+matB(i,j);
19  }
20  }
21 
22  matA.destroy();
23  return _(newmat);
24 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgematrix.hpp:10
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
CPPL_INT m
matrix row size
Definition: zgematrix.hpp:9
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator+ ( const _zhematrix matA,
const _zgematrix matB 
)
friend

_zgematrix+zhematrix operator

Definition at line 3 of file _zhematrix-_zgematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  for(CPPL_INT i=0; i<matA.n; i++){
15  for(CPPL_INT j=0; j<matA.n; j++){
16  matB(i,j) += matA(i,j);
17  }
18  }
19 
20  matA.destroy();
21  return matB;
22 }
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
friend _zgematrix i(const _zhematrix &)
CPPL_INT n
matrix column size
Definition: _zgematrix.hpp:10
_zhematrix operator+ ( const _zhematrix matA,
const zhematrix matB 
)
friend

_zhematrix+zhematrix operator

Definition at line 3 of file _zhematrix-zhematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  for(CPPL_INT j=0; j<matA.n; j++){
15  for(CPPL_INT i=j; i<matA.n; i++){
16  matA.darray[j][i] += matB.darray[j][i];
17  }
18  }
19 
20  return matA;
21 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zhematrix.hpp:11
comple ** darray
array of pointers of column head addresses
Definition: zhematrix.hpp:13
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
_zhematrix operator+ ( const _zhematrix matA,
const _zhematrix matB 
)
friend

_zhematrix+_zhematrix operator

Definition at line 3 of file _zhematrix-_zhematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  for(CPPL_INT j=0; j<matA.n; j++){
15  for(CPPL_INT i=j; i<matA.n; i++){
16  matA.darray[j][i] += matB.darray[j][i];
17  }
18  }
19 
20  matB.destroy();
21  return matA;
22 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
_zgematrix operator+ ( const _zhematrix matA,
const zgbmatrix matB 
)
friend

_zhematrix+zgbmatrix operator

Definition at line 3 of file _zhematrix-zgbmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zgematrix newmat(matA.n, matA.n);
15 
16  for(CPPL_INT i=0; i<matB.m; i++){
17  for(CPPL_INT j=0; j<matA.n; j++){
18  newmat(i,j) =matA(i,j);
19  }
20  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
21  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
22  newmat(i,j) += matB(i,j);
23  }
24  }
25 
26  matA.destroy();
27  return _(newmat);
28 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgbmatrix.hpp:10
CPPL_INT ku
upper band width
Definition: zgbmatrix.hpp:12
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: zgbmatrix.hpp:9
void destroy() const
CPPL_INT kl
lower band width
Definition: zgbmatrix.hpp:11
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator+ ( const _zhematrix matA,
const _zgbmatrix matB 
)
friend

_zhematrix+_zgbmatrix operator

Definition at line 3 of file _zhematrix-_zgbmatrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(matA.n!=matB.n || matA.n!=matB.m){
7  ERROR_REPORT;
8  std::cerr << "These two matrises can not make a summation." << std::endl
9  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zgematrix newmat(matA.n, matA.n);
15 
16  for(CPPL_INT i=0; i<matB.m; i++){
17  for(CPPL_INT j=0; j<matA.n; j++){
18  newmat(i,j) =matA(i,j);
19  }
20  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
21  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
22  newmat(i,j)+=matB(i,j);
23  }
24  }
25 
26  matA.destroy();
27  matB.destroy();
28  return _(newmat);
29 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator+ ( const _zhematrix ,
const zgsmatrix  
)
friend
_zgematrix operator+ ( const _zhematrix ,
const _zgsmatrix  
)
friend
_zhematrix operator+ ( const _zhematrix ,
const zhsmatrix  
)
friend
_zhematrix operator+ ( const _zhematrix ,
const _zhsmatrix  
)
friend
_zgematrix operator- ( const _zhematrix matA,
const zgematrix matB 
)
friend

_zhematrix-zgematrix operator

Definition at line 28 of file _zhematrix-zgematrix.hpp.

29 {CPPL_VERBOSE_REPORT;
30 #ifdef CPPL_DEBUG
31  if(matA.n!=matB.n || matA.n!=matB.m){
32  ERROR_REPORT;
33  std::cerr << "These two matrises can not make a subtraction." << std::endl
34  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl;
35  exit(1);
36  }
37 #endif//CPPL_DEBUG
38 
39  zgematrix newmat(matA.n, matA.n);
40 
41  for(CPPL_INT i=0; i<matA.n; i++){
42  for(CPPL_INT j=0; j<matA.n; j++){
43  newmat(i,j) =matA(i,j)-matB(i,j);
44  }
45  }
46 
47  matA.destroy();
48  return _(newmat);
49 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgematrix.hpp:10
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
CPPL_INT m
matrix row size
Definition: zgematrix.hpp:9
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator- ( const _zhematrix matA,
const _zgematrix matB 
)
friend

_zhematrix-zgematrix operator

Definition at line 26 of file _zhematrix-_zgematrix.hpp.

27 {CPPL_VERBOSE_REPORT;
28 #ifdef CPPL_DEBUG
29  if(matA.n!=matB.n || matA.n!=matB.m){
30  ERROR_REPORT;
31  std::cerr << "These two matrises can not make a subtraction." << std::endl
32  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl;
33  exit(1);
34  }
35 #endif//CPPL_DEBUG
36 
37  for(CPPL_INT i=0; i<matA.n; i++){
38  for(CPPL_INT j=0; j<matA.n; j++){
39  matB(i,j) =matA(i,j)-matB(i,j);
40  }
41  }
42 
43  matA.destroy();
44  return matB;
45 }
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
friend _zgematrix i(const _zhematrix &)
CPPL_INT n
matrix column size
Definition: _zgematrix.hpp:10
_zhematrix operator- ( const _zhematrix matA,
const zhematrix matB 
)
friend

_zhematrix-zhematrix operator

Definition at line 25 of file _zhematrix-zhematrix.hpp.

26 {CPPL_VERBOSE_REPORT;
27 #ifdef CPPL_DEBUG
28  if(matA.n!=matB.n){
29  ERROR_REPORT;
30  std::cerr << "These two matrises can not make a subtraction." << std::endl
31  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl;
32  exit(1);
33  }
34 #endif//CPPL_DEBUG
35 
36  for(CPPL_INT j=0; j<matA.n; j++){
37  for(CPPL_INT i=j; i<matA.n; i++){
38  matA.darray[j][i] -= matB.darray[j][i];
39  }
40  }
41 
42  return matA;
43 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zhematrix.hpp:11
comple ** darray
array of pointers of column head addresses
Definition: zhematrix.hpp:13
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
_zhematrix operator- ( const _zhematrix matA,
const _zhematrix matB 
)
friend

_zhematrix-_zhematrix operator

Definition at line 26 of file _zhematrix-_zhematrix.hpp.

27 {CPPL_VERBOSE_REPORT;
28 #ifdef CPPL_DEBUG
29  if(matA.n!=matB.n){
30  ERROR_REPORT;
31  std::cerr << "These two matrises can not make a subtraction." << std::endl
32  << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl;
33  exit(1);
34  }
35 #endif//CPPL_DEBUG
36 
37  for(CPPL_INT j=0; j<matA.n; j++){
38  for(CPPL_INT i=j; i<matA.n; i++){
39  matA.darray[j][i] -= matB.darray[j][i];
40  }
41  }
42 
43  matB.destroy();
44  return matA;
45 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
comple ** darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:13
friend _zgematrix i(const _zhematrix &)
_zgematrix operator- ( const _zhematrix matA,
const zgbmatrix matB 
)
friend

_zhematrix-zgbmatrix operator

Definition at line 32 of file _zhematrix-zgbmatrix.hpp.

33 {CPPL_VERBOSE_REPORT;
34 #ifdef CPPL_DEBUG
35  if(matA.n!=matB.n || matA.n!=matB.m){
36  ERROR_REPORT;
37  std::cerr << "These two matrises can not make a summation." << std::endl
38  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
39  exit(1);
40  }
41 #endif//CPPL_DEBUG
42 
43  zgematrix newmat(matA.n, matA.n);
44 
45  for(CPPL_INT i=0; i<matB.m; i++){
46  for(CPPL_INT j=0; j<matA.n; j++){
47  newmat(i,j) =matA(i,j);
48  }
49  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
50  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
51  newmat(i,j) -= matB(i,j);
52  }
53  }
54 
55  matA.destroy();
56  return _(newmat);
57 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgbmatrix.hpp:10
CPPL_INT ku
upper band width
Definition: zgbmatrix.hpp:12
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: zgbmatrix.hpp:9
void destroy() const
CPPL_INT kl
lower band width
Definition: zgbmatrix.hpp:11
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator- ( const _zhematrix matA,
const _zgbmatrix matB 
)
friend

_zhematrix-_zgbmatrix operator

Definition at line 33 of file _zhematrix-_zgbmatrix.hpp.

34 {CPPL_VERBOSE_REPORT;
35 #ifdef CPPL_DEBUG
36  if(matA.n!=matB.n || matA.n!=matB.m){
37  ERROR_REPORT;
38  std::cerr << "These two matrises can not make a summation." << std::endl
39  << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl;
40  exit(1);
41  }
42 #endif//CPPL_DEBUG
43 
44  zgematrix newmat(matA.n, matA.n);
45 
46  for(CPPL_INT i=0; i<matB.m; i++){
47  for(CPPL_INT j=0; j<matA.n; j++){
48  newmat(i,j) =matA(i,j);
49  }
50  const CPPL_INT jmax =std::min(matB.n,i+matB.ku+1);
51  for(CPPL_INT j=std::max(CPPL_INT(0),i-matB.kl); j<jmax; j++){
52  newmat(i,j)-=matB(i,j);
53  }
54  }
55 
56  matA.destroy();
57  matB.destroy();
58  return _(newmat);
59 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator- ( const _zhematrix ,
const zgsmatrix  
)
friend
_zgematrix operator- ( const _zhematrix ,
const _zgsmatrix  
)
friend
_zhematrix operator- ( const _zhematrix ,
const zhsmatrix  
)
friend
_zhematrix operator- ( const _zhematrix ,
const _zhsmatrix  
)
friend
_zcovector operator* ( const _zhematrix mat,
const zcovector vec 
)
friend

_zhematrix*zcovector operator

Definition at line 3 of file _zhematrix-zcovector.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(mat.n!=vec.l){
7  ERROR_REPORT;
8  std::cerr << "These matrix and vector can not make a product." << std::endl
9  << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zcovector newvec(mat.n);
15  char uplo ='l';
16  comple alpha =comple(1.,0.);
17  CPPL_INT inc =1;
18  comple beta =comple(0.,0.);
19 
20  zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  mat.destroy();
23  return _(newvec);
24 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
_dcovector _(dcovector &vec)
_zcovector operator* ( const _zhematrix mat,
const _zcovector vec 
)
friend

_zhematrix*_zcovector operator

Definition at line 3 of file _zhematrix-_zcovector.hpp.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(mat.n!=vec.l){
7  ERROR_REPORT;
8  std::cerr << "These matrix and vector can not make a product." << std::endl
9  << "Your input was (" << mat.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zcovector newvec(mat.n);
15  char uplo ='l';
16  comple alpha =comple(1.,0.);
17  CPPL_INT inc =1;
18  comple beta =comple(0.,0.);
19 
20  zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  mat.destroy();
23  vec.destroy();
24  return _(newvec);
25 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
comple * array
1D array to store vector data
Definition: _zcovector.hpp:10
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
CPPL_INT l
vector size
Definition: _zcovector.hpp:9
_dcovector _(dcovector &vec)
_zgematrix operator* ( const _zhematrix matA,
const zgematrix matB 
)
friend

_zhematrix*zgematrix operator

Definition at line 53 of file _zhematrix-zgematrix.hpp.

54 {CPPL_VERBOSE_REPORT;
55 #ifdef CPPL_DEBUG
56  if(matA.n!=matB.m){
57  ERROR_REPORT;
58  std::cerr << "These two matrises can not make a product." << std::endl
59  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
60  exit(1);
61  }
62 #endif//CPPL_DEBUG
63 
64  zgematrix newmat( matA.n, matB.n );
65  char side ='l';
66  char uplo ='l';
67  comple alpha =comple(1.,0.);
68  comple beta =comple(0.,0.);
69 
70  zhemm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
71 
72  matA.destroy();
73  return _(newmat);
74 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgematrix.hpp:10
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
CPPL_INT m
matrix row size
Definition: zgematrix.hpp:9
_dcovector _(dcovector &vec)
_zgematrix operator* ( const _zhematrix matA,
const _zgematrix matB 
)
friend

_zgematrix*zgematrix operator

Definition at line 49 of file _zhematrix-_zgematrix.hpp.

50 {CPPL_VERBOSE_REPORT;
51 #ifdef CPPL_DEBUG
52  if(matA.n!=matB.m){
53  ERROR_REPORT;
54  std::cerr << "These two matrises can not make a product." << std::endl
55  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
56  exit(1);
57  }
58 #endif//CPPL_DEBUG
59 
60  zgematrix newmat( matA.n, matB.n );
61  char side ='l';
62  char uplo ='l';
63  comple alpha =comple(1.,0.);
64  comple beta =comple(0.,0.);
65 
66  zhemm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.m, &beta, newmat.array, &newmat.m );
67 
68  matA.destroy();
69  matB.destroy();
70  return _(newmat);
71 }
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
comple * array
1D array to store matrix data
Definition: _zgematrix.hpp:11
_dcovector _(dcovector &vec)
CPPL_INT n
matrix column size
Definition: _zgematrix.hpp:10
_zgematrix operator* ( const _zhematrix matA,
const zhematrix matB 
)
friend

_zhematrix*zhematrix operator

Definition at line 47 of file _zhematrix-zhematrix.hpp.

48 {CPPL_VERBOSE_REPORT;
49 #ifdef CPPL_DEBUG
50  if(matA.n!=matB.n){
51  ERROR_REPORT;
52  std::cerr << "These two matrises can not make a product." << std::endl
53  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
54  exit(1);
55  }
56 #endif//CPPL_DEBUG
57 
58  matB.complete();
59 
60  zgematrix newmat( matA.n, matB.n );
61  char side ='l';
62  char uplo ='l';
63  comple alpha =comple(1.,0.);
64  comple beta =comple(0.,0.);
65 
66  zhemm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.n, &beta, newmat.array, &newmat.m );
67 
68  matA.destroy();
69  return _(newmat);
70 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void complete() const
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
CPPL_INT n
matrix column size
Definition: zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: zhematrix.hpp:12
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
_dcovector _(dcovector &vec)
_zgematrix operator* ( const _zhematrix matA,
const _zhematrix matB 
)
friend

_zhematrix*_zhematrix operator

Definition at line 49 of file _zhematrix-_zhematrix.hpp.

50 {CPPL_VERBOSE_REPORT;
51 #ifdef CPPL_DEBUG
52  if(matA.n!=matB.n){
53  ERROR_REPORT;
54  std::cerr << "These two matrises can not make a product." << std::endl
55  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
56  exit(1);
57  }
58 #endif//CPPL_DEBUG
59 
60  matB.complete();
61 
62  zgematrix newmat( matA.n, matB.n );
63  char side ='l';
64  char uplo ='l';
65  comple alpha =comple(1.,0.);
66  comple beta =comple(0.,0.);
67 
68  zhemm_( &side, &uplo, &matA.n, &matB.n, &alpha, matA.array, &matA.n, matB.array, &matB.n, &beta, newmat.array, &newmat.m );
69 
70  matA.destroy();
71  matB.destroy();
72  return _(newmat);
73 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void complete() const
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
void destroy() const
_dcovector _(dcovector &vec)
_zgematrix operator* ( const _zhematrix matA,
const zgbmatrix matB 
)
friend

_zgematrix*zgbmatrix operator

Definition at line 61 of file _zhematrix-zgbmatrix.hpp.

62 {CPPL_VERBOSE_REPORT;
63 #ifdef CPPL_DEBUG
64  if(matA.n!=matB.m){
65  ERROR_REPORT;
66  std::cerr << "These two matrises can not make a product." << std::endl
67  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
68  exit(1);
69  }
70 #endif//CPPL_DEBUG
71 
72  zgematrix newmat( matA.n, matB.n );
73  newmat.zero();
74 
75  for(CPPL_INT i=0; i<newmat.m; i++){
76  for(CPPL_INT j=0; j<newmat.n; j++){
77  const CPPL_INT kmax =std::min(matB.m,j+matB.kl+1);
78  for(CPPL_INT k=std::max(CPPL_INT(0),j-matB.ku); k<kmax; k++){
79  newmat(i,j) += matA(i,k)*matB(k,j);
80  }
81  }
82  }
83 
84  matA.destroy();
85  return _(newmat);
86 }
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
CPPL_INT n
matrix column size
Definition: zgbmatrix.hpp:10
CPPL_INT ku
upper band width
Definition: zgbmatrix.hpp:12
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
CPPL_INT m
matrix row size
Definition: zgbmatrix.hpp:9
void destroy() const
CPPL_INT kl
lower band width
Definition: zgbmatrix.hpp:11
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator* ( const _zhematrix matA,
const _zgbmatrix matB 
)
friend

_zhematrix*_zgbmatrix operator

Definition at line 63 of file _zhematrix-_zgbmatrix.hpp.

64 {CPPL_VERBOSE_REPORT;
65 #ifdef CPPL_DEBUG
66  if(matA.n!=matB.m){
67  ERROR_REPORT;
68  std::cerr << "These two matrises can not make a product." << std::endl
69  << "Your input was (" << matA.n << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl;
70  exit(1);
71  }
72 #endif//CPPL_DEBUG
73 
74  zgematrix newmat( matA.n, matB.n );
75  newmat.zero();
76 
77  for(CPPL_INT i=0; i<newmat.m; i++){
78  for(CPPL_INT j=0; j<newmat.n; j++){
79  const CPPL_INT kmax =std::min(matB.m,j+matB.kl+1);
80  for(CPPL_INT k=std::max(CPPL_INT(0),j-matB.ku); k<kmax; k++){
81  newmat(i,j)+=matA(i,k)*matB(k,j);
82  }
83  }
84  }
85 
86  matA.destroy();
87  matB.destroy();
88  return _(newmat);
89 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
void destroy() const
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
void destroy() const
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10
_dcovector _(dcovector &vec)
friend _zgematrix i(const _zhematrix &)
_zgematrix operator* ( const _zhematrix ,
const zgsmatrix  
)
friend
_zgematrix operator* ( const _zhematrix ,
const _zgsmatrix  
)
friend
_zgematrix operator* ( const _zhematrix ,
const zhsmatrix  
)
friend
_zgematrix operator* ( const _zhematrix ,
const _zhsmatrix  
)
friend
_zhematrix operator* ( const _zhematrix mat,
const double &  d 
)
friend

_zhematrix*double operator

Definition at line 3 of file _zhematrix-double.hpp.

4 {CPPL_VERBOSE_REPORT;
5  CPPL_INT size =mat.n*mat.n;
6  CPPL_INT inc =1;
7  zdscal_(&size, &d, mat.array, &inc);
8  return mat;
9 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
_zgematrix operator* ( const _zhematrix mat,
const comple &  d 
)
friend

_zhematrix*comple operator

Definition at line 3 of file _zhematrix-complex.hpp.

4 {CPPL_VERBOSE_REPORT;
5  zgematrix newmat =mat.to_zgematrix();
6 
7  CPPL_INT size =mat.n*mat.n;
8  CPPL_INT inc =1;
9  zscal_(&size, &d, newmat.array, &inc);
10 
11  return _(newmat);
12 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
_zgematrix to_zgematrix() const
_dcovector _(dcovector &vec)
_zhematrix operator/ ( const _zhematrix mat,
const double &  d 
)
friend

_zhematrix/double operator

Definition at line 13 of file _zhematrix-double.hpp.

14 {CPPL_VERBOSE_REPORT;
15  CPPL_INT size =mat.n*mat.n;
16  double dinv =1./d;
17  CPPL_INT inc =1;
18  zdscal_(&size, &dinv, mat.array, &inc);
19  return mat;
20 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
_zgematrix operator/ ( const _zhematrix mat,
const comple &  d 
)
friend

zhematrix/comple operator

Definition at line 16 of file _zhematrix-complex.hpp.

17 {CPPL_VERBOSE_REPORT;
18  zgematrix newmat =mat.to_zgematrix();
19 
20  CPPL_INT size =mat.n*mat.n;
21  comple dinv =1./d;
22  CPPL_INT inc =1;
23  zscal_(&size, &dinv, newmat.array, &inc);
24 
25  return _(newmat);
26 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
_zgematrix to_zgematrix() const
_dcovector _(dcovector &vec)
_zhematrix operator* ( const double &  d,
const _zhematrix mat 
)
friend

double*_zhematrix operator

Definition at line 3 of file double-_zhematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5  CPPL_INT size =mat.n*mat.n;
6  CPPL_INT inc =1;
7  zdscal_(&size, &d, mat.array, &inc);
8  return mat;
9 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
comple * array
1D array to store matrix data
Definition: _zhematrix.hpp:12
_zgematrix operator* ( const comple &  d,
const _zhematrix mat 
)
friend

comple*_zhematrix operator

Definition at line 3 of file complex-_zhematrix.hpp.

4 {CPPL_VERBOSE_REPORT;
5  zgematrix newmat =mat.to_zgematrix();
6 
7  CPPL_INT size =mat.n*mat.n;
8  CPPL_INT inc =1;
9  zscal_(&size, &d, newmat.array, &inc);
10 
11  mat.destroy();
12  return _(newmat);
13 }
CPPL_INT n
matrix column size
Definition: _zhematrix.hpp:11
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
void destroy() const
_zgematrix to_zgematrix() const
_dcovector _(dcovector &vec)

Member Data Documentation

CPPL_INT const& _zhematrix::m

matrix row and size

Definition at line 10 of file _zhematrix.hpp.

Referenced by operator*(), operator+(), and operator-().

CPPL_INT _zhematrix::n
mutable
comple* _zhematrix::array
mutable
comple** _zhematrix::darray
mutable

The documentation for this class was generated from the following files: