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

Go to the source code of this file.

Functions

_drovector t (const dcovector &covec)
 
double nrm2 (const dcovector &vec)
 
CPPL_INT idamax (const dcovector &vec)
 
double damax (const dcovector &vec)
 

Function Documentation

_drovector t ( const dcovector covec)
inline

return a transposed row vector

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

References _(), dcovector::array, drovector::array, and dcovector::l.

4 {CPPL_VERBOSE_REPORT;
5  drovector rovec(covec.l);
6 
7  CPPL_INT inc =1;
8 
9  dcopy_(&covec.l, covec.array, &inc, rovec.array, &inc);
10 
11  return _(rovec);
12 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
_dcovector _(dcovector &vec)
double nrm2 ( const dcovector vec)
inline

return its Euclidean norm

Definition at line 16 of file dcovector-calc.hpp.

References dcovector::array, and dcovector::l.

17 {CPPL_VERBOSE_REPORT;
18  CPPL_INT inc =1;
19  return dnrm2_(&vec.l, vec.array, &inc);
20 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
CPPL_INT idamax ( const dcovector vec)
inline

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

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

References dcovector::array, and dcovector::l.

26 {CPPL_VERBOSE_REPORT;
27  CPPL_INT inc=1;
28  return idamax_(&vec.l, vec.array, &inc) -1;
29 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
double damax ( const dcovector vec)
inline

return its largest absolute value

Definition at line 33 of file dcovector-calc.hpp.

References dcovector::array, and dcovector::l.

34 {CPPL_VERBOSE_REPORT;
35  CPPL_INT inc =1;
36  return vec.array[idamax_(&vec.l, vec.array, &inc) -1];
37 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11