6 if( i<0 || j<0 ||
n<=i ||
n<=j ){
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;
25 for(CPPL_INT
i=0;
i<mat.
n;
i++){
26 for(CPPL_INT j=0; j<mat.
n; j++){
28 s <<
" " << mat(
i,j) <<
" ";
31 s <<
" " << std::real(mat(
i,
i)) <<
" ";
42 std::cerr <<
"The " <<
i <<
"th diagonal component of the zhematrix is not a real number." << std::endl;
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());
64 ofs <<
"#zhematrix " <<
n << std::endl;
65 for(CPPL_INT
i=0;
i<
n;
i++){
66 for(CPPL_INT j=0; j<=
i; j++ ){
72 if(std::fabs(
std::imag(
operator()(
i,
i))) > DBL_MIN){
74 std::cerr <<
"The " <<
i <<
"th diagonal component of the zhematrix is not a real number." << std::endl;
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
CPPL_INT n
matrix column size
_dgematrix i(const _dgbmatrix &mat)
zhecomplex operator()(const CPPL_INT &, const CPPL_INT &) const
std::ostream & operator<<(std::ostream &s, const _zhematrix &mat)
_zcovector conj(const _zcovector &vec)
void write(const char *) const
(DO NOT USE) Complex-double Class for Hermitian matrices
dcovec3 imag(const dquater &q)
comple ** darray
array of pointers of column head addresses
friend _zgematrix i(const _zhematrix &)