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

Go to the source code of this file.

Functions

void swap (zgbmatrix &A, zgbmatrix &B)
 
_zgbmatrix _ (zgbmatrix &mat)
 

Function Documentation

void swap ( zgbmatrix A,
zgbmatrix B 
)
inline

swap two matrices

Definition at line 182 of file zgbmatrix-misc.hpp.

References zgbmatrix::array, zgbmatrix::darray, zgbmatrix::kl, zgbmatrix::ku, zgbmatrix::m, and zgbmatrix::n.

183 {CPPL_VERBOSE_REPORT;
184  CPPL_INT A_m =A.m, A_n =A.n, A_kl =A.kl, A_ku =A.ku;
185  comple* A_array =A.array;
186  comple** A_darray =A.darray;
187 
188  A.m=B.m; A.n=B.n; A.kl=B.kl; A.ku=B.ku; A.array=B.array; A.darray=B.darray;
189  B.m=A_m; B.n=A_n; B.kl=A_kl; B.ku=A_ku; B.array=A_array; B.darray=A_darray;
190 }
comple ** darray
array of pointers of column head addresses
Definition: zgbmatrix.hpp:14
CPPL_INT n
matrix column size
Definition: zgbmatrix.hpp:10
CPPL_INT ku
upper band width
Definition: zgbmatrix.hpp:12
CPPL_INT m
matrix row size
Definition: zgbmatrix.hpp:9
CPPL_INT kl
lower band width
Definition: zgbmatrix.hpp:11
comple * array
1D array to store matrix data
Definition: zgbmatrix.hpp:13
_zgbmatrix _ ( zgbmatrix mat)
inline

convert user object to smart-temporary object

Definition at line 194 of file zgbmatrix-misc.hpp.

References _zgbmatrix::array, zgbmatrix::array, _zgbmatrix::darray, zgbmatrix::darray, _zgbmatrix::kl, zgbmatrix::kl, zgbmatrix::ku, _zgbmatrix::ku, zgbmatrix::m, _zgbmatrix::m, _zgbmatrix::n, and zgbmatrix::n.

195 {CPPL_VERBOSE_REPORT;
196  _zgbmatrix newmat;
197 
198  //////// shallow copy ////////
199  newmat.m =mat.m;
200  newmat.n =mat.n;
201  newmat.kl =mat.kl;
202  newmat.ku =mat.ku;
203  newmat.array =mat.array;
204  newmat.darray =mat.darray;
205 
206  //////// nullify ////////
207  mat.m =0;
208  mat.n =0;
209  mat.kl =0;
210  mat.ku =0;
211  mat.array =NULL;
212  mat.darray =NULL;
213 
214  return newmat;
215 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
comple ** darray
array of pointers of column head addresses
Definition: zgbmatrix.hpp:14
CPPL_INT n
matrix column size
Definition: zgbmatrix.hpp:10
CPPL_INT ku
upper band width
Definition: zgbmatrix.hpp:12
CPPL_INT m
matrix row size
Definition: zgbmatrix.hpp:9
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
CPPL_INT kl
lower band width
Definition: zgbmatrix.hpp:11
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
comple * array
1D array to store matrix data
Definition: _zgbmatrix.hpp:13
comple ** darray
array of pointers of column head addresses
Definition: _zgbmatrix.hpp:14
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10
comple * array
1D array to store matrix data
Definition: zgbmatrix.hpp:13