CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
_drovector-_dcovector.hpp File Reference

Go to the source code of this file.

Functions

double operator* (const _drovector &rovec, const _dcovector &covec)
 

Function Documentation

double operator* ( const _drovector rovec,
const _dcovector covec 
)
inline

_drovector*_dcovector operator

Definition at line 3 of file _drovector-_dcovector.hpp.

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

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(rovec.l!=covec.l){
7  ERROR_REPORT;
8  std::cerr << "These two vectors can not make a product." << std::endl
9  << "Your input was (" << rovec.l << ") * (" << covec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  CPPL_INT inc =1;
15  double val =ddot_( &rovec.l, rovec.array, &inc, covec.array, &inc );
16 
17  rovec.destroy();
18  covec.destroy();
19  return val;
20 }
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
void destroy() const
void destroy() const
double * array
1D array to store vector data
Definition: _dcovector.hpp:11