10#ifndef EIGEN_DETERMINANT_H
11#define EIGEN_DETERMINANT_H
17template<
typename Derived>
22 return matrix.coeff(0,a)
23 * (matrix.coeff(1,
b) * matrix.coeff(2,
c) - matrix.coeff(1,
c) * matrix.coeff(2,
b));
26template<
typename Derived,
27 int DeterminantType = Derived::RowsAtCompileTime
32 if(Derived::ColsAtCompileTime==
Dynamic && m.rows()==0)
34 return m.partialPivLu().determinant();
52 return m.coeff(0,0) * m.coeff(1,1) - m.coeff(1,0) * m.coeff(0,1);
73 Scalar d2_01 = det2(m, 0, 1);
74 Scalar d2_02 = det2(m, 0, 2);
75 Scalar d2_03 = det2(m, 0, 3);
76 Scalar d2_12 = det2(m, 1, 2);
77 Scalar d2_13 = det2(m, 1, 3);
78 Scalar d2_23 = det2(m, 2, 3);
79 Scalar d3_0 = det3(m, 1,d2_23, 2,d2_13, 3,d2_12);
80 Scalar d3_1 = det3(m, 0,d2_23, 2,d2_03, 3,d2_02);
81 Scalar d3_2 = det3(m, 0,d2_13, 1,d2_03, 3,d2_01);
82 Scalar d3_3 = det3(m, 0,d2_12, 1,d2_02, 2,d2_01);
90 return m(i0,0) * m(i1,1) - m(i1,0) * m(i0,1);
106template<
typename Derived>
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define eigen_assert(x)
Definition: Macros.h:1047
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
EIGEN_DEVICE_FUNC Scalar determinant() const
\lu_module
Definition: Determinant.h:108
EIGEN_STRONG_INLINE Packet4i pmadd(const Packet4i &a, const Packet4i &b, const Packet4i &c)
Definition: PacketMath.h:370
EIGEN_DEVICE_FUNC const Derived::Scalar bruteforce_det3_helper(const MatrixBase< Derived > &matrix, int a, int b, int c)
Definition: Determinant.h:20
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: Eigen_Colamd.h:50
static constexpr const velocity::meters_per_second_t c(299792458.0)
Speed of light in vacuum.
static EIGEN_DEVICE_FUNC traits< Derived >::Scalar run(const Derived &m)
Definition: Determinant.h:41
static EIGEN_DEVICE_FUNC traits< Derived >::Scalar run(const Derived &m)
Definition: Determinant.h:50
static EIGEN_DEVICE_FUNC traits< Derived >::Scalar run(const Derived &m)
Definition: Determinant.h:59
static EIGEN_DEVICE_FUNC Scalar det3(const Derived &m, Index i0, const Scalar &d0, Index i1, const Scalar &d1, Index i2, const Scalar &d2)
Definition: Determinant.h:94
static EIGEN_DEVICE_FUNC Scalar run(const Derived &m)
Definition: Determinant.h:71
traits< Derived >::Scalar Scalar
Definition: Determinant.h:69
static EIGEN_DEVICE_FUNC Scalar det2(const Derived &m, Index i0, Index i1)
Definition: Determinant.h:88
Definition: Determinant.h:29
static traits< Derived >::Scalar run(const Derived &m)
Definition: Determinant.h:30
Definition: ForwardDeclarations.h:17