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 _dcovector::array, _drovector::array, _dcovector::cap, _drovector::cap, _drovector::l, _dcovector::l, and _drovector::nullify().

4 {CPPL_VERBOSE_REPORT;
5  _dcovector covec;
6  covec.l =rovec.l;
7  covec.cap =rovec.cap;
8  delete [] covec.array;
9  covec.array =rovec.array;
10 
11  rovec.nullify();
12  return covec;
13 }
void nullify() const
CPPL_INT l
vector size
Definition: _dcovector.hpp:9
double * array
1D array to store vector data
Definition: _drovector.hpp:11
CPPL_INT l
vector size
Definition: _drovector.hpp:9
CPPL_INT cap
vector capacity
Definition: _dcovector.hpp:10
CPPL_INT cap
vector capacity
Definition: _drovector.hpp:10
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
Definition: _dcovector.hpp:3
double * array
1D array to store vector data
Definition: _dcovector.hpp:11
double nrm2 ( const _drovector vec)
inline

return its Euclidean norm

Definition at line 17 of file _drovector-calc.hpp.

References _drovector::array, _drovector::destroy(), and _drovector::l.

18 {CPPL_VERBOSE_REPORT;
19  CPPL_INT inc =1;
20  double val =dnrm2_(&vec.l, vec.array, &inc);
21  vec.destroy();
22  return val;
23 }
double * array
1D array to store vector data
Definition: _drovector.hpp:11
CPPL_INT l
vector size
Definition: _drovector.hpp:9
void destroy() const
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 28 of file _drovector-calc.hpp.

References _drovector::array, _drovector::destroy(), i(), and _drovector::l.

29 {CPPL_VERBOSE_REPORT;
30  CPPL_INT inc =1;
31  CPPL_INT i =idamax_(&vec.l, vec.array, &inc) -1;
32  vec.destroy();
33  return i;
34 }
double * array
1D array to store vector data
Definition: _drovector.hpp:11
CPPL_INT l
vector size
Definition: _drovector.hpp:9
_dgematrix i(const _dgbmatrix &mat)
void destroy() const
double damax ( const _drovector vec)
inline

return its largest absolute value

Definition at line 38 of file _drovector-calc.hpp.

References _drovector::array, _drovector::destroy(), and _drovector::l.

39 {CPPL_VERBOSE_REPORT;
40  CPPL_INT inc =1;
41  double val =vec.array[idamax_(&vec.l, vec.array, &inc) -1];
42  vec.destroy();
43  return val;
44 }
double * array
1D array to store vector data
Definition: _drovector.hpp:11
CPPL_INT l
vector size
Definition: _drovector.hpp:9
void destroy() const