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

Go to the source code of this file.

Functions

void swap (zcovector &u, zcovector &v)
 
_zcovector _ (zcovector &vec)
 

Function Documentation

void swap ( zcovector u,
zcovector v 
)
inline

swap two vectors

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

References zcovector::array, and zcovector::l.

94 {CPPL_VERBOSE_REPORT;
95  CPPL_INT u_l =u.l;
96  comple* u_array =u.array;
97  u.l=v.l; u.array=v.array;
98  v.l=u_l; v.array=u_array;
99 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
_zcovector _ ( zcovector vec)
inline

convert user object to smart-temporary object

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

References _zcovector::array, zcovector::array, _zcovector::l, and zcovector::l.

104 {CPPL_VERBOSE_REPORT;
105  _zcovector newvec;
106 
107  //////// shallow copy ////////
108  newvec.l =vec.l;
109  newvec.array =vec.array;
110 
111  //////// nullify ////////
112  vec.l =0;
113  vec.array =NULL;
114 
115  return newvec;
116 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
comple * array
1D array to store vector data
Definition: _zcovector.hpp:10
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
CPPL_INT l
vector size
Definition: _zcovector.hpp:9