CPPLapack
 All Classes Files Functions Variables Friends
Functions
zcovector-_zcovector.hpp File Reference

Go to the source code of this file.

Functions

_zcovector operator+ (const zcovector &vecA, const _zcovector &vecB)
_zcovector operator- (const zcovector &vecA, const _zcovector &vecB)
comple operator% (const zcovector &vecA, const _zcovector &vecB)

Function Documentation

_zcovector operator+ ( const zcovector vecA,
const _zcovector vecB 
) [inline]

zcovector+zcovector operator

Definition at line 57 of file zcovector-_zcovector.hpp.

References _zcovector::array, zcovector::array, i(), zcovector::l, and _zcovector::l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if(vecA.l!=vecB.l){
    ERROR_REPORT;
    std::cerr << "These two vectors can not make a sumation." << std::endl
              << "Your input was (" << vecA.l << ") + (" << vecB.l << ")." << std::endl;
    exit(1);
  }  
#endif//CPPL_DEBUG
  
  for(long i=0; i<vecA.l; i++){ vecB.array[i]+=vecA.array[i]; }
  
  return vecB;
}
_zcovector operator- ( const zcovector vecA,
const _zcovector vecB 
) [inline]

zcovector-zcovector operator

Definition at line 75 of file zcovector-_zcovector.hpp.

References _zcovector::array, zcovector::array, i(), zcovector::l, and _zcovector::l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if(vecA.l!=vecB.l){
    ERROR_REPORT;
    std::cerr << "These two vectors can not make a subtraction." << std::endl
              << "Your input was (" << vecA.l << ") - (" << vecB.l << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  for(long i=0; i<vecA.l; i++){
    vecB.array[i] =vecA.array[i]-vecB.array[i];
  }
  
  return vecB;
}
comple operator% ( const zcovector vecA,
const _zcovector vecB 
) [inline]

zcovector^T*zcovector operator (inner product)

Definition at line 95 of file zcovector-_zcovector.hpp.

References zcovector::array, _zcovector::array, _zcovector::destroy(), zcovector::l, and _zcovector::l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if(vecA.l!=vecB.l){
    ERROR_REPORT;
    std::cerr << "These two vectors can not make a dot product." << std::endl
              << "Your input was (" << vecA.l << ") % (" << vecB.l << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  comple val( zdotu_( vecA.l, vecA.array, 1, vecB.array, 1 ) );
  
  vecB.destroy();
  return val;
}
 All Classes Files Functions Variables Friends