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 transposed zhsmatrix

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

References _(), conj(), and zhsmatrix::data.

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

return its conjugate matrix

Definition at line 20 of file zhsmatrix-calc.hpp.

References _(), conj(), and zhsmatrix::data.

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

return its conjugate matrix

Definition at line 33 of file zhsmatrix-calc.hpp.

References _().

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  WARNING_REPORT;
  std::cerr << "This function call has no effect since the matrix is Hermitian." << std::endl;
#endif//CPPL_DEBUG
  
  zhsmatrix newmat(mat);
  return _(newmat);
}
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 51 of file zhsmatrix-calc.hpp.

References zhsmatrix::data.

{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;
}
comple damax ( const zhsmatrix mat) [inline]

return its largest absolute value

Definition at line 67 of file zhsmatrix-calc.hpp.

References zhsmatrix::data.

{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;
    }
  }
  return itx->v;
}
 All Classes Files Functions Variables Friends