CPPLapack
 All Classes Files Functions Variables Friends
Functions
_zhsmatrix-calc.hpp File Reference

Go to the source code of this file.

Functions

_zhsmatrix t (const _zhsmatrix &mat)
_zhsmatrix conj (const _zhsmatrix &mat)
_zhsmatrix conjt (const _zhsmatrix &mat)
void idamax (long &i, long &j, const _zhsmatrix &mat)
comple damax (const _zhsmatrix &mat)

Function Documentation

_zhsmatrix t ( const _zhsmatrix mat) [inline]

return its transposed matrix

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

References conj(), and _zhsmatrix::data.

{VERBOSE_REPORT;
  for(std::vector<zcomponent>::iterator it=mat.data.begin(); it!=mat.data.end(); it++){
    it->v =std::conj(it->v);
  }
  return mat;
}
_zhsmatrix conj ( const _zhsmatrix mat) [inline]

return its conjugate matrix

Definition at line 13 of file _zhsmatrix-calc.hpp.

References conj(), and _zhsmatrix::data.

{VERBOSE_REPORT;
  for(std::vector<zcomponent>::iterator it=mat.data.begin(); it!=mat.data.end(); it++){
    it->v =std::conj(it->v);
  }
  return mat;
}
_zhsmatrix conjt ( const _zhsmatrix mat) [inline]

return its conjugate transposed matrix

Definition at line 23 of file _zhsmatrix-calc.hpp.

{VERBOSE_REPORT;
  return mat;
}
void idamax ( long &  i,
long &  j,
const _zhsmatrix mat 
) [inline]

search the index of element having the largest absolute value in 0-based numbering system

Definition at line 35 of file _zhsmatrix-calc.hpp.

References _zhsmatrix::data, and _zhsmatrix::destroy().

{VERBOSE_REPORT;
  std::vector<zcomponent>::const_iterator itx(mat.data.begin());
  double vmax =0.;
  for(std::vector<zcomponent>::const_iterator it=mat.data.begin(); it!=mat.data.end(); it++){
    if( vmax < norm(it->v) ){
      vmax =norm(it->v);
      itx =it;
    }
  }
  i=itx->i;
  j=itx->j;
  
  mat.destroy();
}
comple damax ( const _zhsmatrix mat) [inline]

return its largest absolute value

Definition at line 53 of file _zhsmatrix-calc.hpp.

References _zhsmatrix::data, and _zhsmatrix::destroy().

{VERBOSE_REPORT;
  std::vector<zcomponent>::const_iterator itx(mat.data.begin());
  double vmax =0.;
  for(std::vector<zcomponent>::const_iterator it=mat.data.begin(); it!=mat.data.end(); it++){
    if( vmax < norm(it->v) ){
      vmax =norm(it->v);
      itx =it;
    }
  }
  mat.destroy();
  return itx->v;
}
 All Classes Files Functions Variables Friends