mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
fix compilation (cwise and epsilon)
This commit is contained in:
parent
602778ea26
commit
48f5980669
@ -100,7 +100,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
inline void setNull() { setEmpty(); }
|
inline void setNull() { setEmpty(); }
|
||||||
|
|
||||||
/** \returns true if the box is empty. */
|
/** \returns true if the box is empty. */
|
||||||
inline bool isEmpty() const { return (m_min.cwise() > m_max).any(); }
|
inline bool isEmpty() const { return (m_min.array() > m_max.array()).any(); }
|
||||||
|
|
||||||
/** Makes \c *this an empty box. */
|
/** Makes \c *this an empty box. */
|
||||||
inline void setEmpty()
|
inline void setEmpty()
|
||||||
|
@ -121,7 +121,7 @@ bool MatrixFunctionAtomic<MatrixType>::taylorConverged(int s, const MatrixType&
|
|||||||
const int n = F.rows();
|
const int n = F.rows();
|
||||||
const RealScalar F_norm = F.cwiseAbs().rowwise().sum().maxCoeff();
|
const RealScalar F_norm = F.cwiseAbs().rowwise().sum().maxCoeff();
|
||||||
const RealScalar Fincr_norm = Fincr.cwiseAbs().rowwise().sum().maxCoeff();
|
const RealScalar Fincr_norm = Fincr.cwiseAbs().rowwise().sum().maxCoeff();
|
||||||
if (Fincr_norm < epsilon<Scalar>() * F_norm) {
|
if (Fincr_norm < NumTraits<Scalar>::epsilon() * F_norm) {
|
||||||
RealScalar delta = 0;
|
RealScalar delta = 0;
|
||||||
RealScalar rfactorial = 1;
|
RealScalar rfactorial = 1;
|
||||||
for (int r = 0; r < n; r++) {
|
for (int r = 0; r < n; r++) {
|
||||||
@ -133,7 +133,7 @@ bool MatrixFunctionAtomic<MatrixType>::taylorConverged(int s, const MatrixType&
|
|||||||
delta = std::max(delta, mx / rfactorial);
|
delta = std::max(delta, mx / rfactorial);
|
||||||
}
|
}
|
||||||
const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
|
const RealScalar P_norm = P.cwiseAbs().rowwise().sum().maxCoeff();
|
||||||
if (m_mu * delta * P_norm < epsilon<Scalar>() * F_norm)
|
if (m_mu * delta * P_norm < NumTraits<Scalar>::epsilon() * F_norm)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user