6 std::cerr <<
"# [MARK] zhematrix::complete() const"
10 for(
long i=0;
i<N;
i++){
11 for(
long j=0; j<
i; j++){
12 Darray[
i][j] =std::conj(Darray[j][i]);
15 if(std::fabs(std::imag(
operator()(i,i))) > CPPL_EPS){
16 std::cerr <<
"[WARNING] zhematrix::complete() const" << std::endl
17 <<
"The " << i <<
"th diagonal component of the zhematrix"
18 <<
"is not a real number." << std::endl;
29 std::cerr <<
"# [MARK] zhematrix::clear()"
34 std::cerr <<
"# [NOTE] zhematrix::clear() "
35 <<
" An array at " <<
Array
36 <<
" is going to be cleared." << std::endl;
51 std::cerr <<
"# [MARK] zhematrix::zero()"
55 for(
long i=0;
i<N;
i++){
for(
long j=0; j<=
i; j++){
56 Array[
i] =std::complex<double>(0.0,0.0);
65 std::cerr <<
"# [MARK] zhematrix::identity()"
69 for(
long i=0;
i<N;
i++){
70 for(
long j=0; j<
i; j++){
71 Darray[j][
i] =std::complex<double>(0.0,0.0);
73 Darray[
i][
i] =std::complex<double>(1.0,0.0);
82 std::cerr <<
"# [MARK] zhematrix::chsign()"
86 for(
long i=0;
i<N;
i++){
87 for(
long j=0; j<=
i; j++){
88 Darray[j][
i] =-Darray[j][
i];
98 std::cerr <<
"# [MARK] zhematrix::copy(const zhematrix&)"
103 std::cerr <<
"# [NOTE] zhematrix::copy(const zhematrix&) "
104 <<
"A zhematrix at " <<
Array <<
" is going to be deleted.";
109 Array =
new std::complex<double>[N*N];
111 Darray =
new std::complex<double>*[N];
112 for(
int i=0;
i<N;
i++){ Darray[
i] =&Array[
i*N]; }
114 zcopy_(mat.N*mat.N, mat.Array, 1, Array, 1);
117 std::cerr <<
" Then, a COPY of a zhematrix has been cleated at "
118 << Array <<
"." << std::endl;
128 std::cerr <<
"# [MARK] zhematrix::shallow_copy(const _zhematrix&)"
133 std::cerr <<
"# [NOTE] zhematrix:shallow_copy(const _zhematrix&) "
134 <<
"A zhematrix at " <<
Array <<
" is going to be deleted, "
135 <<
"and point at " << mat.
Array <<
" instead." << std::endl;
150 std::cerr <<
"# [MARK] zhematrix::resize(const long&)"
156 std::cerr <<
"[ERROR] zhematrix::resize(const long&, const long&)"
158 <<
"Matrix sizes must be positive integers." << std::endl
159 <<
"Your input was (" << _n <<
")." << std::endl;
166 Array =
new std::complex<double>[N*N];
168 Darray =
new std::complex<double>*[N];
169 for(
int i=0;
i<N;
i++){ Darray[
i] =&
Array[
i*N]; }
177 std::cerr <<
"# [MARK] swap(zhematrix&, zhematrix&)"
182 std::complex<double>* A_array(A.Array);
183 std::complex<double>** A_darray = A.Darray;
184 A.N=B.N; A.Array=B.Array; A.Darray=B.Darray;
185 B.N=A_n; B.Array=A_array; B.Darray=A_darray;
193 std::cerr <<
"# [MARK] _(zhematrix&)"
200 newmat.
Array =mat.Array;
201 newmat.
Darray =mat.Darray;
std::complex< double > ** Darray
array of pointers of column head addresses
Definition: _zhematrix.hpp:9
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
void shallow_copy(const _zhematrix &)
Definition: zhematrix-misc.hpp:125
void clear()
Definition: zhematrix-misc.hpp:26
void complete() const
Definition: zhematrix-misc.hpp:3
void identity()
Definition: zhematrix-misc.hpp:62
void copy(const zhematrix &)
Definition: zhematrix-misc.hpp:95
friend _zgematrix i(const zhematrix &)
Definition: zhematrix-calc.hpp:20
void chsign()
Definition: zhematrix-misc.hpp:79
std::complex< double > * Array
1D Array to store matrix data
Definition: _zhematrix.hpp:8
Complex Double-precision Hermitian Matrix Class [L-type (UPLO=L) Strage].
Definition: zhematrix.hpp:4
long N
matrix column or row size
Definition: _zhematrix.hpp:7
void resize(const long &)
Definition: zhematrix-misc.hpp:147
void zero()
Definition: zhematrix-misc.hpp:48
std::complex< double > * Array
1D Array to store vector data
Definition: _zrovector.hpp:8