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

Go to the source code of this file.

Functions

_dcovector t (const drovector &rovec)
 
double nrm2 (const drovector &vec)
 
CPPL_INT idamax (const drovector &vec)
 
double damax (const drovector &vec)
 

Function Documentation

_dcovector t ( const drovector rovec)
inline

return a transposed column vector

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

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

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

return its Euclidean norm

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

References drovector::array, and drovector::l.

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

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

Definition at line 24 of file drovector-calc.hpp.

References drovector::array, and drovector::l.

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

return its largest absolute value

Definition at line 32 of file drovector-calc.hpp.

References drovector::array, and drovector::l.

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