mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
generalized ei_traits<>.
Finally the importing macro is named EIGEN_BASIC_PUBLIC_INTERFACE because it does not only import the ei_traits, it also makes the base class a friend, etc.
This commit is contained in:
@@ -49,7 +49,7 @@ bool MatrixBase<Derived>::isApprox(
|
||||
) const
|
||||
{
|
||||
assert(rows() == other.rows() && cols() == other.cols());
|
||||
if(Traits::IsVectorAtCompileTime)
|
||||
if(IsVectorAtCompileTime)
|
||||
{
|
||||
return((*this - other).norm2() <= std::min(norm2(), other.norm2()) * prec * prec);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ bool MatrixBase<Derived>::isMuchSmallerThan(
|
||||
typename NumTraits<Scalar>::Real prec
|
||||
) const
|
||||
{
|
||||
if(Traits::IsVectorAtCompileTime)
|
||||
if(IsVectorAtCompileTime)
|
||||
{
|
||||
return(norm2() <= ei_abs2(other * prec));
|
||||
}
|
||||
@@ -110,7 +110,7 @@ bool MatrixBase<Derived>::isMuchSmallerThan(
|
||||
) const
|
||||
{
|
||||
assert(rows() == other.rows() && cols() == other.cols());
|
||||
if(Traits::IsVectorAtCompileTime)
|
||||
if(IsVectorAtCompileTime)
|
||||
{
|
||||
return(norm2() <= other.norm2() * prec * prec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user