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

Go to the source code of this file.

Functions

_zcovector t (const _zrovector &rovec)
 
_zrovector conj (const _zrovector &vec)
 
_zcovector conjt (const _zrovector &rovec)
 
double nrm2 (const _zrovector &vec)
 
CPPL_INT idamax (const _zrovector &vec)
 
comple damax (const _zrovector &vec)
 

Function Documentation

_zcovector t ( const _zrovector rovec)
inline

return a transposed column vector

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

References _zcovector::array, _zrovector::array, _zcovector::l, and _zrovector::l.

4 {CPPL_VERBOSE_REPORT;
5  _zcovector covec;
6  covec.l =rovec.l;
7  delete [] covec.array;
8  covec.array =rovec.array;
9 
10  return covec;
11 }
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
comple * array
1D array to store vector data
Definition: _zrovector.hpp:10
comple * array
1D array to store vector data
Definition: _zcovector.hpp:10
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
CPPL_INT l
vector size
Definition: _zcovector.hpp:9
_zrovector conj ( const _zrovector vec)
inline

return its conjugated vector

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

References i(), and _zrovector::l.

Referenced by conjt().

16 {CPPL_VERBOSE_REPORT;
17  for(CPPL_INT i=0; i<vec.l; i++){
18  vec(i) =std::conj(vec(i));
19  }
20  return vec;
21 }
_zrovector conj(const _zrovector &vec)
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
_zcovector conjt ( const _zrovector rovec)
inline

return a conjugate transposed column vector

Definition at line 25 of file _zrovector-calc.hpp.

References _(), conj(), _zrovector::destroy(), i(), and _zrovector::l.

26 {CPPL_VERBOSE_REPORT;
27  zcovector covec(rovec.l);
28  for(CPPL_INT i=0; i<rovec.l; i++){
29  covec(i) =std::conj(rovec(i));
30  }
31 
32  rovec.destroy();
33  return _(covec);
34 }
_zrovector conj(const _zrovector &vec)
void destroy() const
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
_dcovector _(dcovector &vec)
double nrm2 ( const _zrovector vec)
inline

return its Euclidean norm

Definition at line 42 of file _zrovector-calc.hpp.

References _zrovector::array, _zrovector::destroy(), and _zrovector::l.

43 {CPPL_VERBOSE_REPORT;
44  CPPL_INT inc =1;
45  double val =dznrm2_(&vec.l, vec.array, &inc);
46  vec.destroy();
47  return val;
48 }
void destroy() const
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
comple * array
1D array to store vector data
Definition: _zrovector.hpp:10
CPPL_INT idamax ( const _zrovector vec)
inline

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

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

References _zrovector::array, _zrovector::destroy(), i(), and _zrovector::l.

54 {CPPL_VERBOSE_REPORT;
55  CPPL_INT inc =1;
56  CPPL_INT i =izamax_(&vec.l, vec.array, &inc) -1;
57  vec.destroy();
58  return i;
59 }
void destroy() const
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
comple * array
1D array to store vector data
Definition: _zrovector.hpp:10
comple damax ( const _zrovector vec)
inline

return its largest absolute value

Definition at line 63 of file _zrovector-calc.hpp.

References _zrovector::array, _zrovector::destroy(), and _zrovector::l.

64 {CPPL_VERBOSE_REPORT;
65  CPPL_INT inc =1;
66  comple val =vec.array[izamax_(&vec.l, vec.array, &inc) -1];
67  vec.destroy();
68  return val;
69 }
void destroy() const
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
comple * array
1D array to store vector data
Definition: _zrovector.hpp:10