3 inline double det(
const dsymat2& A)
5 return A(0,0)*A(1,1) -A(1,0)*A(1,0);
10 inline dsymat2
inv(
const dsymat2& A)
12 const double Adet(
det(A) );
14 Ainv(0,0)= A(1,1)/Adet;
15 Ainv(1,0)=-A(1,0)/Adet; Ainv(1,1)= A(0,0)/Adet;
21 inline dsymat2
rotate(
const dsymat2& m,
const double& theta)
23 double c(std::cos(theta)), s(std::sin(theta));
24 double cc(c*c), cs(c*s), ss(s*s);
26 mat(0,0) =m(0,0)*cc -2.*m(1,0)*cs +m(1,1)*ss;
27 mat(1,0) =m(1,0)*cc +(m(0,0)-m(1,1))*cs -m(1,0)*ss;
28 mat(1,1) =m(1,1)*cc +2.*m(1,0)*cs +m(0,0)*ss;
44 inline double det(
const dsymat3& A)
47 +A(0,0)*A(1,1)*A(2,2) -A(0,0)*A(2,1)*A(2,1)
48 +A(1,0)*A(2,1)*A(2,0) -A(1,0)*A(1,0)*A(2,2)
49 +A(2,0)*A(1,0)*A(2,1) -A(2,0)*A(1,1)*A(2,0);
54 inline dsymat3
inv(
const dsymat3& A)
56 const double Adet(
det(A) );
58 Ainv(0,0) =(A(1,1)*A(2,2)-A(2,1)*A(2,1))/Adet;
59 Ainv(1,0) =(A(2,1)*A(2,0)-A(1,0)*A(2,2))/Adet;
60 Ainv(1,1) =(A(0,0)*A(2,2)-A(2,0)*A(2,0))/Adet;
61 Ainv(2,0) =(A(1,0)*A(2,1)-A(1,1)*A(2,0))/Adet;
62 Ainv(2,1) =(A(1,0)*A(2,0)-A(0,0)*A(2,1))/Adet;
63 Ainv(2,2) =(A(0,0)*A(1,1)-A(1,0)*A(1,0))/Adet;
69 inline dsymat3
rotate(
const dsymat3& m,
const dquater& q)
76 for(CPPL_INT
i=0;
i<3;
i++){
77 for(CPPL_INT j=0; j<=
i; j++){
78 for(CPPL_INT k=0; k<3; k++){
79 RmRT(
i,j) +=Rm(
i,k)*R(j,k);
_dgematrix i(const _dgbmatrix &mat)
dsymat2 inv(const dsymat2 &A)
dgemat3 q2m(const dquater &q)
dsymat2 rotate(const dsymat2 &m, const double &theta)
double det(const dsymat2 &A)