CPPLapack
 All Classes Files Functions Variables Friends
drovector-calc.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! return a transposed column vector */
00003 inline _dcovector t(const drovector& rovec)
00004 {VERBOSE_REPORT;
00005   dcovector covec(rovec.l);
00006   dcopy_(rovec.l, rovec.array, 1, covec.array, 1);
00007   
00008   return _(covec);
00009 }
00010 
00011 //=============================================================================
00012 /*! return its Euclidean norm */
00013 inline double nrm2(const drovector& vec)
00014 {VERBOSE_REPORT;
00015   return dnrm2_(vec.l, vec.array, 1);
00016 }
00017 
00018 //=============================================================================
00019 /*! return the index of element having the largest absolute value
00020   in 0-based numbering system */
00021 inline long idamax(const drovector& vec)
00022 {VERBOSE_REPORT;
00023   return idamax_(vec.l, vec.array, 1) -1;
00024 }
00025 
00026 //=============================================================================
00027 /*! return its largest absolute value */
00028 inline double damax(const drovector& vec)
00029 {VERBOSE_REPORT;
00030   return vec.array[idamax_(vec.l, vec.array, 1) -1];
00031 }
 All Classes Files Functions Variables Friends