CPPLapack
 All Classes Files Functions Variables Friends
zcovector-calc.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! return a transposed row vector */
00003 inline _zrovector t(const zcovector& covec)
00004 {VERBOSE_REPORT;
00005   zrovector rovec(covec.l);
00006   zcopy_(covec.l, covec.array, 1, rovec.array, 1);
00007   
00008   return _(rovec);
00009 }
00010 //=============================================================================
00011 /*! return its conjugated vector */
00012 inline _zcovector conj(const zcovector& vec)
00013 {VERBOSE_REPORT;
00014   zcovector newvec(vec.l);
00015   for(long i=0; i<vec.l; i++){ newvec(i) =std::conj(vec(i)); }
00016   
00017   return _(newvec);
00018 }
00019 
00020 //=============================================================================
00021 /*! return a conjugate transposed row vector */
00022 inline _zrovector conjt(const zcovector& covec)
00023 {VERBOSE_REPORT;
00024   zrovector rovec(covec.l);
00025   for(long i=0; i<covec.l; i++){ rovec(i) =std::conj(covec(i)); }
00026   
00027   return _(rovec);
00028 }
00029 
00030 ///////////////////////////////////////////////////////////////////////////////
00031 ///////////////////////////////////////////////////////////////////////////////
00032 ///////////////////////////////////////////////////////////////////////////////
00033 
00034 //=============================================================================
00035 /*! return its Euclidean norm */
00036 inline double nrm2(const zcovector& vec)
00037 {VERBOSE_REPORT;
00038   return dznrm2_(vec.l, vec.array, 1);
00039 }
00040 
00041 //=============================================================================
00042 /*! return the index of element having the largest absolute value
00043  in 0-based numbering system */
00044 inline long idamax(const zcovector& vec)
00045 {VERBOSE_REPORT;
00046   return izamax_(vec.l, vec.array, 1) -1;
00047 }
00048 
00049 //=============================================================================
00050 /*! return its largest absolute value */
00051 inline comple damax(const zcovector& vec)
00052 {VERBOSE_REPORT;
00053   return vec.array[izamax_(vec.l, vec.array, 1) -1];
00054 }
 All Classes Files Functions Variables Friends