CPPLapack
Public Member Functions | Public Attributes | Friends
zcovector Class Reference

Complex Double-precision Column Vector Class. More...

#include <zcovector.hpp>

List of all members.

Public Member Functions

 zcovector ()
 zcovector (const zcovector &)
 zcovector (const _zcovector &)
 zcovector (const long &)
 zcovector (const char *)
 ~zcovector ()
comple & operator() (const long &)
comple operator() (const long &) const
zcovectorset (const long &, const comple &)
void write (const char *) const
void read (const char *)
void clear ()
zcovectorzero ()
void chsign ()
void copy (const zcovector &)
void shallow_copy (const _zcovector &)
void alias (const zcovector &)
void unalias ()
void resize (const long &)
zcovectoroperator= (const zcovector &)
zcovectoroperator= (const _zcovector &)
zcovectoroperator+= (const zcovector &)
zcovectoroperator+= (const _zcovector &)
zcovectoroperator-= (const zcovector &)
zcovectoroperator-= (const _zcovector &)
zcovectoroperator*= (const double &)
zcovectoroperator*= (const comple &)
zcovectoroperator/= (const double &)
zcovectoroperator/= (const comple &)

Public Attributes

long l
 vector size
comple * array
 1D array to store vector data

Friends

std::ostream & operator<< (std::ostream &, const zcovector &)
_zrovector t (const zcovector &)
_zcovector conj (const zcovector &)
_zrovector conjt (const zcovector &)
double nrm2 (const zcovector &)
long idamax (const zcovector &)
comple damax (const zcovector &)
void swap (zcovector &, zcovector &)
_zcovector _ (zcovector &)
const zcovectoroperator+ (const zcovector &)
_zcovector operator- (const zcovector &)
_zcovector operator+ (const zcovector &, const zcovector &)
_zcovector operator+ (const zcovector &, const _zcovector &)
_zcovector operator- (const zcovector &, const zcovector &)
_zcovector operator- (const zcovector &, const _zcovector &)
_zgematrix operator* (const zcovector &, const zrovector &)
_zgematrix operator* (const zcovector &, const _zrovector &)
_zcovector operator* (const zcovector &, const double &)
_zcovector operator* (const zcovector &, const comple &)
_zcovector operator/ (const zcovector &, const double &)
_zcovector operator/ (const zcovector &, const comple &)
comple operator% (const zcovector &, const zcovector &)
comple operator% (const zcovector &, const _zcovector &)
_zcovector operator* (const double &, const zcovector &)
_zcovector operator* (const comple &, const zcovector &)

Detailed Description

Complex Double-precision Column Vector Class.

Definition at line 3 of file zcovector.hpp.


Constructor & Destructor Documentation

zcovector::zcovector ( ) [inline]

zcovector constructor

Definition at line 3 of file zcovector-constructor.hpp.

References array, and l.

{VERBOSE_REPORT;
  //////// initialize ////////
  l =0;
  array =NULL;
}
zcovector::zcovector ( const zcovector vec) [inline]

zcovector copy constructor

Definition at line 12 of file zcovector-constructor.hpp.

References array, and l.

{VERBOSE_REPORT;
  //////// initialize ////////
  l =vec.l;
  array =new comple[l];
  
  //////// copy ////////
  zcopy_(l, vec.array, 1, array, 1);
}
zcovector::zcovector ( const _zcovector vec) [inline]

zcovector constructor to cast _zcovector

Definition at line 24 of file zcovector-constructor.hpp.

References array, _zcovector::array, _zcovector::l, l, and _zcovector::nullify().

{VERBOSE_REPORT;
  //////// initialize ////////
  l =vec.l;
  array =vec.array;
  
  vec.nullify();
}
zcovector::zcovector ( const long &  _l) [inline]

zcovector constructor with size specification

Definition at line 35 of file zcovector-constructor.hpp.

References array, and l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( _l<0 ){
    ERROR_REPORT;
    std::cerr << "Vector size must be positive integers. " << std::endl
              << "Your input was (" << _l << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  //////// initialize ////////
  l =_l;
  array =new comple[l];
}
zcovector::zcovector ( const char *  filename) [inline]

zcovector constructor with filename

Definition at line 53 of file zcovector-constructor.hpp.

References array, and read().

{VERBOSE_REPORT;
  array =NULL;
  
  //// copy ////
  read(filename);
}
zcovector::~zcovector ( ) [inline]

zcovector destructor

Definition at line 67 of file zcovector-constructor.hpp.

References array.

{VERBOSE_REPORT;
  //////// delete array ////////
  delete [] array;
}

Member Function Documentation

comple & zcovector::operator() ( const long &  i) [inline]

operator() for non-const object

Definition at line 3 of file zcovector-io.hpp.

References array, i(), and l.

Referenced by read(), and write().

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( i<0 || l<=i ){
    ERROR_REPORT;
    std::cerr << "The required component is out of the vector size." << std::endl
              << "Your input was (" << i << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  return array[i];
}
comple zcovector::operator() ( const long &  i) const [inline]

operator() for const object

Definition at line 19 of file zcovector-io.hpp.

References array, i(), and l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( i<0 || l<=i ){
    ERROR_REPORT;
    std::cerr << "The required component is out of the vector size." << std::endl
              << "Your input was (" << i << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  return array[i];
}
zcovector & zcovector::set ( const long &  i,
const comple &  v 
) [inline]

set value for const object

Definition at line 39 of file zcovector-io.hpp.

References array, i(), and l.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( i<0 || l<=i ){
    ERROR_REPORT;
    std::cerr << "The required component is out of the vector size." << std::endl
              << "Your input was (" << i << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  array[i] =v;
  return *this;
}
void zcovector::write ( const char *  filename) const [inline]

Definition at line 73 of file zcovector-io.hpp.

References i(), l, and operator()().

{VERBOSE_REPORT;
  std::ofstream ofs(filename, std::ios::trunc);
  ofs.setf(std::cout.flags());
  ofs.precision(std::cout.precision());
  ofs.width(std::cout.width());
  ofs.fill(std::cout.fill());
  
  ofs << "#zcovector" << " " << l << std::endl;
  for(long i=0; i<l; i++){
    ofs << operator()(i) << std::endl;
  }
  
  ofs.close();
}
void zcovector::read ( const char *  filename) [inline]

Definition at line 90 of file zcovector-io.hpp.

References i(), l, operator()(), and resize().

Referenced by zcovector().

{VERBOSE_REPORT;
  std::ifstream s(filename);
  if(!s){
    ERROR_REPORT;
    std::cerr << "The file \"" << filename << "\" can not be opened." << std::endl;
    exit(1);
  }

  std::string id;
  s >> id;
  if( id != "zcovector" && id != "#zcovector" ){
    ERROR_REPORT;
    std::cerr << "The type name of the file \"" << filename << "\" is not zcovector." << std::endl
              << "Its type name was " << id << " ." << std::endl;
    exit(1);
  }
  
  s >> l;
  resize(l);
  for(long i=0; i<l; i++){ 
    s >> operator()(i);
  }
  if(s.eof()){
    ERROR_REPORT;
    std::cerr << "There is something is wrong with the file \"" << filename << "\"." << std::endl
              << "Most likely, there is not enough data components, or a linefeed code or space code is missing at the end of the last line." << std::endl;
    exit(1);
  }
  
  s >> id;
  if(!s.eof()){
    ERROR_REPORT;
    std::cerr << "There is something is wrong with the file \"" << filename << "\"." << std::endl
              << "Most likely, there are extra data components." << std::endl;
    exit(1);
  }

  s.close();
}
void zcovector::clear ( ) [inline]

clear vector

Definition at line 3 of file zcovector-misc.hpp.

References array, and l.

Referenced by zgematrix::zgels(), and zgematrix::zgelss().

{VERBOSE_REPORT;
  l =0;
  delete [] array;
  array =NULL;
}
zcovector & zcovector::zero ( ) [inline]

make vector into zero vector

Definition at line 12 of file zcovector-misc.hpp.

References array, i(), and l.

Referenced by operator*().

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){ array[i] =comple(0.0,0.0); }
  return *this;
}
void zcovector::chsign ( ) [inline]

change sign(+/-) of the vector

Definition at line 20 of file zcovector-misc.hpp.

References array, i(), and l.

{VERBOSE_REPORT;
  for(long i=0; i<l; i++){ array[i] =-array[i]; }
}
void zcovector::copy ( const zcovector vec) [inline]

make a deep copy of the zcovector

Definition at line 27 of file zcovector-misc.hpp.

References array, and l.

Referenced by operator=().

{VERBOSE_REPORT;
  l =vec.l;
  delete [] array;
  array =new comple[vec.l];
  zcopy_(vec.l, vec.array, 1, array, 1);
}
void zcovector::shallow_copy ( const _zcovector vec) [inline]

make a shallow copy of the vector
This function is not desinged to be used in project codes.

Definition at line 38 of file zcovector-misc.hpp.

References array, _zcovector::array, _zcovector::l, l, and _zcovector::nullify().

Referenced by operator=().

{VERBOSE_REPORT;
  l =vec.l;
  delete [] array;
  array =vec.array;
  
  vec.nullify();
}
void zcovector::alias ( const zcovector vec) [inline]

make an alias of the vector
Be carefull to use this function not to cause double free.

Definition at line 50 of file zcovector-misc.hpp.

References array, and l.

{VERBOSE_REPORT;
  l =vec.l;
  //cap =vec.cap;
  delete [] array;
  array =vec.array;
}
void zcovector::unalias ( ) [inline]

unalias the vector

Definition at line 60 of file zcovector-misc.hpp.

References array, and l.

{VERBOSE_REPORT;
  l =0;
  //cap =0;
  array =NULL;
}
void zcovector::resize ( const long &  _l) [inline]

resize vector

Definition at line 69 of file zcovector-misc.hpp.

References array, and l.

Referenced by dgematrix::dgeev(), and read().

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( _l<0 ){
    ERROR_REPORT;
    std::cerr << "Vector size must be positive integers." << std::endl
              << "Your input was (" << _l << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  l =_l;
  delete [] array;
  array =new comple[_l];
}
zcovector & zcovector::operator= ( const zcovector vec) [inline]

zcovector=zcovector operator

Definition at line 3 of file zcovector-zcovector.hpp.

References array, and copy().

{VERBOSE_REPORT;
  if(array!=vec.array){ // if it is NOT self substitution
    copy(vec);
  }
  return *this;
}
zcovector & zcovector::operator= ( const _zcovector vec) [inline]

zcovector=_zcovector operator

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

References shallow_copy().

{VERBOSE_REPORT;
  shallow_copy(vec);
  return *this;
}
zcovector & zcovector::operator+= ( const zcovector vec) [inline]

zcovector+=zcovector operator

Definition at line 17 of file zcovector-zcovector.hpp.

References array, i(), and l.

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

zcovector+=_zcovector operator

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

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

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

zcovector operator-=

Definition at line 35 of file zcovector-zcovector.hpp.

References array, i(), and l.

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

zcovector operator-=

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

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

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if( l!=vec.l ){
    ERROR_REPORT;
    std::cerr << "These two vectors can not make a subtraction." << std::endl
              << "Your input was (" << l << ") -= (" << vec.l << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  for(long i=0; i<l; i++){ array[i]-=vec.array[i]; }
  
  vec.destroy();
  return *this;
}
zcovector & zcovector::operator*= ( const double &  d) [inline]

zcovector*=double operator

Definition at line 3 of file zcovector-double.hpp.

References array, and l.

{VERBOSE_REPORT;
  zdscal_(l, d, array, 1);
  return *this;
}
zcovector & zcovector::operator*= ( const comple &  d) [inline]

zcovector*=comple operator

Definition at line 3 of file zcovector-complex.hpp.

References array, and l.

{VERBOSE_REPORT;
  zscal_(l, d, array, 1);
  return *this;
}
zcovector & zcovector::operator/= ( const double &  d) [inline]

zcovector/=double operator

Definition at line 11 of file zcovector-double.hpp.

References array, and l.

{VERBOSE_REPORT;
  zdscal_(l, 1./d, array, 1);
  return *this;
}
zcovector & zcovector::operator/= ( const comple &  d) [inline]

zcovector/=comple operator

Definition at line 11 of file zcovector-complex.hpp.

References array, and l.

{VERBOSE_REPORT;
  zscal_(l, 1./d, array, 1);
  return *this;
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const zcovector vec 
) [friend]

Definition at line 59 of file zcovector-io.hpp.

{VERBOSE_REPORT;
  for(long i=0; i<vec.l; i++){
    s << " " << vec.array[i] << std::endl;
  }
  
  return s;
}
_zrovector t ( const zcovector covec) [friend]

return a transposed row vector

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

{VERBOSE_REPORT;
  zrovector rovec(covec.l);
  zcopy_(covec.l, covec.array, 1, rovec.array, 1);
  
  return _(rovec);
}
_zcovector conj ( const zcovector vec) [friend]

return its conjugated vector

Definition at line 12 of file zcovector-calc.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec(i) =std::conj(vec(i)); }
  
  return _(newvec);
}
_zrovector conjt ( const zcovector covec) [friend]

return a conjugate transposed row vector

Definition at line 22 of file zcovector-calc.hpp.

{VERBOSE_REPORT;
  zrovector rovec(covec.l);
  for(long i=0; i<covec.l; i++){ rovec(i) =std::conj(covec(i)); }
  
  return _(rovec);
}
double nrm2 ( const zcovector vec) [friend]

return its Euclidean norm

Definition at line 36 of file zcovector-calc.hpp.

{VERBOSE_REPORT;
  return dznrm2_(vec.l, vec.array, 1);
}
long idamax ( const zcovector vec) [friend]

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

Definition at line 44 of file zcovector-calc.hpp.

{VERBOSE_REPORT;
  return izamax_(vec.l, vec.array, 1) -1;
}
comple damax ( const zcovector vec) [friend]

return its largest absolute value

Definition at line 51 of file zcovector-calc.hpp.

{VERBOSE_REPORT;
  return vec.array[izamax_(vec.l, vec.array, 1) -1];
}
void swap ( zcovector u,
zcovector v 
) [friend]

swap two vectors

Definition at line 87 of file zcovector-misc.hpp.

{VERBOSE_REPORT;
  long u_l(u.l);
  comple* u_array(u.array);
  u.l=v.l; u.array=v.array;
  v.l=u_l; v.array=u_array;
}
_zcovector _ ( zcovector vec) [friend]

convert user object to smart-temporary object

Definition at line 97 of file zcovector-misc.hpp.

{VERBOSE_REPORT;
  _zcovector newvec;
  
  //////// shallow copy ////////
  newvec.l =vec.l;
  newvec.array =vec.array;
  
  //////// nullify ////////
  vec.l =0;
  vec.array =NULL;
  
  return newvec;
}
const zcovector& operator+ ( const zcovector vec) [friend]

+zcovector operator

Definition at line 3 of file zcovector-unary.hpp.

{VERBOSE_REPORT;
  return vec;
}
_zcovector operator- ( const zcovector vec) [friend]

-zcovector operator

Definition at line 10 of file zcovector-unary.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<newvec.l; i++){ newvec.array[i]=-vec.array[i]; }
  
  return _(newvec);
}
_zcovector operator+ ( const zcovector vecA,
const zcovector vecB 
) [friend]

zcovector+zcovector operator

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

{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
  
  zcovector newvec(vecA.l);
  for(long i=0; i<newvec.l; i++){
    newvec.array[i] =vecA.array[i]+vecB.array[i];
  }
  
  return _(newvec);
}
_zcovector operator+ ( const zcovector vecA,
const _zcovector vecB 
) [friend]

zcovector+zcovector operator

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

{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 
) [friend]

zcovector-zcovector operator

Definition at line 79 of file zcovector-zcovector.hpp.

{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
  
  zcovector newvec(vecA.l);
  for(long i=0; i<newvec.l; i++){
    newvec.array[i] =vecA.array[i]-vecB.array[i];
  }
  
  return _(newvec);
}
_zcovector operator- ( const zcovector vecA,
const _zcovector vecB 
) [friend]

zcovector-zcovector operator

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

{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;
}
_zgematrix operator* ( const zcovector covec,
const zrovector rovec 
) [friend]

zcovector*zrovector operator

Definition at line 3 of file zcovector-zrovector.hpp.

{VERBOSE_REPORT;
  zgematrix newmat(covec.l, rovec.l);
  for(long i=0; i<newmat.m; i++){
    for(long j=0; j<newmat.n; j++){
      newmat(i,j) =covec(i)*rovec(j);
    }
  }
  
  return _(newmat);
}
_zgematrix operator* ( const zcovector covec,
const _zrovector rovec 
) [friend]

zcovector*_zrovector operator

Definition at line 3 of file zcovector-_zrovector.hpp.

{VERBOSE_REPORT;
  zgematrix newmat(covec.l, rovec.l);
  for(long i=0; i<newmat.m; i++){
    for(long j=0; j<newmat.n; j++){
      newmat(i,j) =covec(i)*rovec(j);
    }
  }
  
  rovec.destroy();
  return _(newmat);
}
_zcovector operator* ( const zcovector vec,
const double &  d 
) [friend]

zcovector*double operator

Definition at line 23 of file zcovector-double.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =vec.array[i]*d; }
  
  return _(newvec);
}
_zcovector operator* ( const zcovector vec,
const comple &  d 
) [friend]

zcovector*comple operator

Definition at line 23 of file zcovector-complex.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =vec.array[i]*d; }
  
  return _(newvec);
}
_zcovector operator/ ( const zcovector vec,
const double &  d 
) [friend]

zcovector/double operator

Definition at line 33 of file zcovector-double.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =vec.array[i]/d; }
  
  return _(newvec);
}
_zcovector operator/ ( const zcovector vec,
const comple &  d 
) [friend]

zcovector/comple operator

Definition at line 33 of file zcovector-complex.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =vec.array[i]/d; }
  
  return _(newvec);
}
comple operator% ( const zcovector vecA,
const zcovector vecB 
) [friend]

zcovector^T*zcovector operator (inner product)

Definition at line 100 of file zcovector-zcovector.hpp.

{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 ) );
  
  return val;
}
comple operator% ( const zcovector vecA,
const _zcovector vecB 
) [friend]

zcovector^T*zcovector operator (inner product)

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

{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;
}
_zcovector operator* ( const double &  d,
const zcovector vec 
) [friend]

double*zcovector operator

Definition at line 3 of file double-zcovector.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =d*vec.array[i]; }
  return _(newvec);
}
_zcovector operator* ( const comple &  d,
const zcovector vec 
) [friend]

comple*zcovector operator

Definition at line 3 of file complex-zcovector.hpp.

{VERBOSE_REPORT;
  zcovector newvec(vec.l);
  for(long i=0; i<vec.l; i++){ newvec.array[i] =d*vec.array[i]; }
  
  return _(newvec);
}

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends