Main Page | Class List | File List | Class Members | File Members | Related Pages

dgematrix-misc.hpp File Reference

Go to the source code of this file.

Functions

void swap (dgematrix &A, dgematrix &B)


Function Documentation

void swap dgematrix A,
dgematrix B
[inline]
 

swap two matrices

Definition at line 114 of file dgematrix-misc.hpp.

References dgematrix::Array, dgematrix::Desc, dgematrix::M, dgematrix::Ml, dgematrix::N, and dgematrix::Nl.

00115 {
00116   long A_M(A.M), A_N(A.N), A_Ml(A.Ml), A_Nl(A.Nl), A_Desc[9];
00117   double* A_Array(A.Array);
00118   A.M=B.M; A.N=B.N; A.Ml=B.Ml; A.Nl=B.Nl;  A.Array=B.Array;
00119   B.M=A_M; B.N=A_N; B.Ml=A_Ml; B.Nl=A_Nl;  B.Array=A_Array;
00120   for(int i=0; i<9; i++){
00121     A_Desc[i] =A.Desc[i];
00122     A.Desc[i] =B.Desc[i];
00123     B.Desc[i] =A_Desc[i];
00124   }
00125 }


Generated on Sat Jan 31 19:25:44 2004 for CPPScaLapack by doxygen 1.3.5