CPPLapack
 All Classes Files Functions Variables Friends
Functions
zrovector-misc.hpp File Reference

Go to the source code of this file.

Functions

void swap (zrovector &u, zrovector &v)
_zrovector _ (zrovector &vec)

Function Documentation

void swap ( zrovector u,
zrovector v 
) [inline]

swap two vectors

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

References zrovector::array, and zrovector::l.

{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;
}
_zrovector _ ( zrovector vec) [inline]

convert user object to smart-temporary object

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

References _zrovector::array, zrovector::array, _zrovector::l, and zrovector::l.

{VERBOSE_REPORT;
  _zrovector newvec;
  
  //////// shallow copy ////////
  newvec.l =vec.l;
  newvec.array =vec.array;
  
  //////// nullify ////////
  vec.l =0;
  vec.array =NULL;
  
  return newvec;
}
 All Classes Files Functions Variables Friends