00001 //============================================================================= 00002 /*! return a transposed column vector */ 00003 inline _dcovector t(const _drovector& rovec) 00004 {VERBOSE_REPORT; 00005 _dcovector covec; 00006 covec.l =rovec.l; 00007 covec.cap =rovec.cap; 00008 delete [] covec.array; 00009 covec.array =rovec.array; 00010 00011 rovec.nullify(); 00012 return covec; 00013 } 00014 00015 //============================================================================= 00016 /*! return its Euclidean norm */ 00017 inline double nrm2(const _drovector& vec) 00018 {VERBOSE_REPORT; 00019 double val( dnrm2_(vec.l, vec.array, 1) ); 00020 vec.destroy(); 00021 return val; 00022 } 00023 00024 //============================================================================= 00025 /*! return the index of element having the largest absolute value 00026 in 0-based numbering system */ 00027 inline long idamax(const _drovector& vec) 00028 {VERBOSE_REPORT; 00029 long i( idamax_(vec.l, vec.array, 1) -1 ); 00030 vec.destroy(); 00031 return i; 00032 } 00033 00034 //============================================================================= 00035 /*! return its largest absolute value */ 00036 inline double damax(const _drovector& vec) 00037 {VERBOSE_REPORT; 00038 double val( vec.array[idamax_(vec.l, vec.array, 1)-1] ); 00039 vec.destroy(); 00040 return val; 00041 }