3 inline comple
det(
const zgemat2& A)
5 return A(0,0)*A(1,1)-A(0,1)*A(1,0);
10 inline zgemat2
inv(
const zgemat2& A)
12 const comple Adet(
det(A) );
14 Ainv(0,0)= A(1,1)/Adet; Ainv(0,1)=-A(0,1)/Adet;
15 Ainv(1,0)=-A(1,0)/Adet; Ainv(1,1)= A(0,0)/Adet;
25 inline comple
det(
const zgemat3& A)
28 +A(0,0)*A(1,1)*A(2,2) -A(0,0)*A(1,2)*A(2,1)
29 +A(0,1)*A(1,2)*A(2,0) -A(0,1)*A(1,0)*A(2,2)
30 +A(0,2)*A(1,0)*A(2,1) -A(0,2)*A(1,1)*A(2,0);
35 inline zgemat3
inv(
const zgemat3& A)
37 const comple Adet(
det(A) );
39 Ainv(0,0) =(A(1,1)*A(2,2)-A(1,2)*A(2,1))/Adet;
40 Ainv(0,1) =(A(0,2)*A(2,1)-A(0,1)*A(2,2))/Adet;
41 Ainv(0,2) =(A(0,1)*A(1,2)-A(0,2)*A(1,1))/Adet;
42 Ainv(1,0) =(A(1,2)*A(2,0)-A(1,0)*A(2,2))/Adet;
43 Ainv(1,1) =(A(0,0)*A(2,2)-A(0,2)*A(2,0))/Adet;
44 Ainv(1,2) =(A(0,2)*A(1,0)-A(0,0)*A(1,2))/Adet;
45 Ainv(2,0) =(A(1,0)*A(2,1)-A(1,1)*A(2,0))/Adet;
46 Ainv(2,1) =(A(0,1)*A(2,0)-A(0,0)*A(2,1))/Adet;
47 Ainv(2,2) =(A(0,0)*A(1,1)-A(0,1)*A(1,0))/Adet;
zgemat2 inv(const zgemat2 &A)
comple det(const zgemat2 &A)