Go to the source code of this file.
|
double | det (const dsymat2 &) |
|
dsymat2 | inv (const dsymat2 &) |
|
dsymat2 | rotate (const dsymat2 &, const double &) |
|
double | det (const dsymat3 &) |
|
dsymat3 | inv (const dsymat3 &) |
|
dsymat3 | rotate (const dsymat3 &, const dquater &) |
|
double det |
( |
const dsymat2 & |
A | ) |
|
|
inline |
dsymat2 inv |
( |
const dsymat2 & |
A | ) |
|
|
inline |
calculate inverse
Definition at line 10 of file dsymatrix_small-specialized.hpp.
References det().
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;
double det(const dsymat2 &A)
dsymat2 rotate |
( |
const dsymat2 & |
m, |
|
|
const double & |
theta |
|
) |
| |
|
inline |
rotate 2D matrix by rotational angle
Definition at line 21 of file dsymatrix_small-specialized.hpp.
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;
double det |
( |
const dsymat3 & |
A | ) |
|
|
inline |
calculate determinant
Definition at line 44 of file dsymatrix_small-specialized.hpp.
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);
dsymat3 inv |
( |
const dsymat3 & |
A | ) |
|
|
inline |
calculate inverse
Definition at line 54 of file dsymatrix_small-specialized.hpp.
References det().
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;
double det(const dsymat2 &A)
dsymat3 rotate |
( |
const dsymat3 & |
m, |
|
|
const dquater & |
q |
|
) |
| |
|
inline |
rotate 3D matrix by quaternion
Definition at line 69 of file dsymatrix_small-specialized.hpp.
References i(), and q2m().
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)
dgemat3 q2m(const dquater &q)