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

Go to the source code of this file.

Functions

_zhematrix t (const zhematrix &mat)
_zgematrix i (const zhematrix &mat)
_zhematrix conj (const zhematrix &mat)
_zhematrix conjt (const zhematrix &mat)

Function Documentation

_zhematrix t ( const zhematrix mat) [inline]

return transposed zgematrix

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

References _(), i(), and zhematrix::n.

{VERBOSE_REPORT;
  zhematrix newmat(mat.n);
  for(long i=0; i<newmat.n; i++){ for(long j=0; j<=i; j++){
    newmat(i,j) =mat(j,i);
  }}
  
  return _(newmat);
}
_zgematrix i ( const zhematrix mat) [inline]

return its inverse matrix

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

References _(), zgematrix::identity(), zhematrix::n, and zhematrix::zhesv().

{VERBOSE_REPORT;
  zhematrix mat_cp(mat);
  zgematrix mat_inv(mat.n,mat.n);
  mat_inv.identity();
  mat_cp.zhesv(mat_inv);
  
  return _(mat_inv);
}
_zhematrix conj ( const zhematrix mat) [inline]

return its conjugate matrix

Definition at line 31 of file zhematrix-calc.hpp.

References _(), conj(), i(), and zhematrix::n.

{VERBOSE_REPORT;
  zhematrix newmat(mat.n);
  
  for(long i=0; i<mat.n; i++){
    for(long j=0; j<=i; j++){
      newmat(i,j) =std::conj(mat(i,j));
    }
  }
  
  return _(newmat);
}
_zhematrix conjt ( const zhematrix mat) [inline]

return its conjugate transposed matrix

Definition at line 46 of file zhematrix-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
  
  zhematrix newmat(mat);
  return _(newmat);
}
 All Classes Files Functions Variables Friends