CPPLapack
 All Classes Files Functions Variables Friends Pages
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 (CPPL_INT &i, CPPL_INT &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.

4 {CPPL_VERBOSE_REPORT;
5  const std::vector<zcomponent>::iterator mat_data_end =mat.data.end();
6  for(std::vector<zcomponent>::iterator it=mat.data.begin(); it!=mat_data_end; it++){
7  it->v =std::conj(it->v);
8  }
9 
10  return mat;
11 }
std::vector< zcomponent > data
matrix data
Definition: _zhsmatrix.hpp:12
_zhsmatrix conj(const _zhsmatrix &mat)
_zhsmatrix conj ( const _zhsmatrix mat)
inline

return its conjugate matrix

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

References _zhsmatrix::data.

Referenced by t().

16 {CPPL_VERBOSE_REPORT;
17  const std::vector<zcomponent>::iterator mat_data_end =mat.data.end();
18  for(std::vector<zcomponent>::iterator it=mat.data.begin(); it!=mat_data_end; it++){
19  it->v =std::conj(it->v);
20  }
21 
22  return mat;
23 }
std::vector< zcomponent > data
matrix data
Definition: _zhsmatrix.hpp:12
_zhsmatrix conj(const _zhsmatrix &mat)
_zhsmatrix conjt ( const _zhsmatrix mat)
inline

return its conjugate transposed matrix

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

28 {CPPL_VERBOSE_REPORT;
29  return mat;
30 }
void idamax ( CPPL_INT &  i,
CPPL_INT &  j,
const _zhsmatrix mat 
)
inline

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

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

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

40 {CPPL_VERBOSE_REPORT;
41  std::vector<zcomponent>::const_iterator itx(mat.data.begin());
42  double vmax =0.;
43 
44  const std::vector<zcomponent>::const_iterator mat_data_end =mat.data.end();
45  for(std::vector<zcomponent>::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){
46  if( vmax < norm(it->v) ){
47  vmax =norm(it->v);
48  itx =it;
49  }
50  }
51 
52  i=itx->i;
53  j=itx->j;
54 
55  mat.destroy();
56 }
std::vector< zcomponent > data
matrix data
Definition: _zhsmatrix.hpp:12
void destroy() const
_dgematrix i(const _dgbmatrix &mat)
friend _dgematrix i(const _dgematrix &)
comple damax ( const _zhsmatrix mat)
inline

return its largest absolute value

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

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

61 {CPPL_VERBOSE_REPORT;
62  std::vector<zcomponent>::const_iterator itx(mat.data.begin());
63  double vmax =0.;
64 
65  const std::vector<zcomponent>::const_iterator mat_data_end =mat.data.end();
66  for(std::vector<zcomponent>::const_iterator it=mat.data.begin(); it!=mat_data_end; it++){
67  if( vmax < norm(it->v) ){
68  vmax =norm(it->v);
69  itx =it;
70  }
71  }
72 
73  mat.destroy();
74  return itx->v;
75 }
std::vector< zcomponent > data
matrix data
Definition: _zhsmatrix.hpp:12
void destroy() const