mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fixes in determinant and homogeneous
This commit is contained in:
parent
3ac01b1400
commit
9822493aaf
@ -217,8 +217,8 @@ struct ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs>
|
|||||||
: m_lhs(lhs), m_rhs(rhs)
|
: m_lhs(lhs), m_rhs(rhs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
inline int rows() const { m_lhs.rows(); }
|
inline int rows() const { return m_lhs.rows(); }
|
||||||
inline int cols() const { m_rhs.cols(); }
|
inline int cols() const { return m_rhs.cols(); }
|
||||||
|
|
||||||
template<typename Dest> void evalTo(Dest& dst) const
|
template<typename Dest> void evalTo(Dest& dst) const
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,8 @@ const typename Derived::Scalar ei_bruteforce_det4_helper
|
|||||||
* (matrix.coeff(m,2) * matrix.coeff(n,3) - matrix.coeff(n,2) * matrix.coeff(m,3));
|
* (matrix.coeff(m,2) * matrix.coeff(n,3) - matrix.coeff(n,2) * matrix.coeff(m,3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME update computation of triangular det
|
||||||
|
|
||||||
const int TriangularDeterminant = 0;
|
const int TriangularDeterminant = 0;
|
||||||
|
|
||||||
template<typename Derived,
|
template<typename Derived,
|
||||||
|
@ -39,7 +39,7 @@ template<typename MatrixType> void determinant(const MatrixType& m)
|
|||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
Scalar x = ei_random<Scalar>();
|
Scalar x = ei_random<Scalar>();
|
||||||
VERIFY_IS_APPROX(MatrixType::Identity(size, size).determinant(), Scalar(1));
|
VERIFY_IS_APPROX(MatrixType::Identity(size, size).determinant(), Scalar(1));
|
||||||
VERIFY_IS_APPROX((m1*m2).determinant(), m1.determinant() * m2.determinant());
|
VERIFY_IS_APPROX((m1*m2).eval().determinant(), m1.determinant() * m2.determinant());
|
||||||
if(size==1) return;
|
if(size==1) return;
|
||||||
int i = ei_random<int>(0, size-1);
|
int i = ei_random<int>(0, size-1);
|
||||||
int j;
|
int j;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user