VERB_code_2.3
dcovector-calc.hpp
1 //=============================================================================
3 inline _drovector t(const dcovector& covec)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] t(const dcovector&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  drovector rovec(covec.L);
11  dcopy_(covec.L, covec.Array, 1, rovec.array, 1);
12 
13  return _(rovec);
14 }
15 
16 //=============================================================================
18 inline double nrm2(const dcovector& vec)
19 {
20 #ifdef CPPL_VERBOSE
21  std::cerr << "# [MARK] nrm2(const dcovector&)"
22  << std::endl;
23 #endif//CPPL_VERBOSE
24 
25  return dnrm2_(vec.L, vec.Array, 1);
26 }
27 
28 //=============================================================================
31 inline long idamax(const dcovector& vec)
32 {
33 #ifdef CPPL_VERBOSE
34  std::cerr << "# [MARK] idamax(const dcovector&)"
35  << std::endl;
36 #endif//CPPL_VERBOSE
37 
38  return idamax_(vec.L, vec.Array, 1) -1;
39 }
40 
41 //=============================================================================
43 inline double damax(const dcovector& vec)
44 {
45 #ifdef CPPL_VERBOSE
46  std::cerr << "# [MARK] damax(const dcovector&)"
47  << std::endl;
48 #endif//CPPL_VERBOSE
49 
50  return vec.Array[idamax_(vec.L, vec.Array, 1) -1];
51 }
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Row Vector Class
Definition: _drovector.hpp:3
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
double *const & array
1D array to store vector data (readable)
Definition: drovector.hpp:13