40 #ifndef GEOGRAM_BASIC_DETERMINANT
41 #define GEOGRAM_BASIC_DETERMINANT
59 const T& a11,
const T& a12,
60 const T& a21,
const T& a22
62 return a11*a22-a12*a21 ;
70 const T& a11,
const T& a12,
const T& a13,
71 const T& a21,
const T& a22,
const T& a23,
72 const T& a31,
const T& a32,
const T& a33
75 a11*
det2x2(a22,a23,a32,a33)
76 -a21*
det2x2(a12,a13,a32,a33)
77 +a31*
det2x2(a12,a13,a22,a23);
86 const T& a11,
const T& a12,
const T& a13,
const T& a14,
87 const T& a21,
const T& a22,
const T& a23,
const T& a24,
88 const T& a31,
const T& a32,
const T& a33,
const T& a34,
89 const T& a41,
const T& a42,
const T& a43,
const T& a44
91 T m12 = a21*a12 - a11*a22;
92 T m13 = a31*a12 - a11*a32;
93 T m14 = a41*a12 - a11*a42;
94 T m23 = a31*a22 - a21*a32;
95 T m24 = a41*a22 - a21*a42;
96 T m34 = a41*a32 - a31*a42;
98 T m123 = m23*a13 - m13*a23 + m12*a33;
99 T m124 = m24*a13 - m14*a23 + m12*a43;
100 T m134 = m34*a13 - m14*a33 + m13*a43;
101 T m234 = m34*a23 - m24*a33 + m23*a43;
103 return (m234*a14 - m134*a24 + m124*a34 - m123*a44);
Common include file, providing basic definitions. Should be included before anything else by all head...
Global Vorpaline namespace.
T det3x3(const T &a11, const T &a12, const T &a13, const T &a21, const T &a22, const T &a23, const T &a31, const T &a32, const T &a33)
Computes a three-by-three determinant.
T det4x4(const T &a11, const T &a12, const T &a13, const T &a14, const T &a21, const T &a22, const T &a23, const T &a24, const T &a31, const T &a32, const T &a33, const T &a34, const T &a41, const T &a42, const T &a43, const T &a44)
Computes a four-by-four determinant.
T det2x2(const T &a11, const T &a12, const T &a21, const T &a22)
Computes a two-by-two determinant.