mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
bug #564: document the fact that minCoeff/maxCoeff members have undefined behavior if the matrix contains NaN.
This commit is contained in:
parent
3cb6e21f80
commit
d7f3cfb56e
@ -330,7 +330,8 @@ DenseBase<Derived>::redux(const Func& func) const
|
|||||||
::run(derived(), func);
|
::run(derived(), func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the minimum of all coefficients of *this
|
/** \returns the minimum of all coefficients of \c *this.
|
||||||
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar
|
EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar
|
||||||
@ -339,7 +340,8 @@ DenseBase<Derived>::minCoeff() const
|
|||||||
return this->redux(Eigen::internal::scalar_min_op<Scalar>());
|
return this->redux(Eigen::internal::scalar_min_op<Scalar>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the maximum of all coefficients of *this
|
/** \returns the maximum of all coefficients of \c *this.
|
||||||
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar
|
EIGEN_STRONG_INLINE typename internal::traits<Derived>::Scalar
|
||||||
|
@ -278,6 +278,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
|||||||
/** \returns a row (or column) vector expression of the smallest coefficient
|
/** \returns a row (or column) vector expression of the smallest coefficient
|
||||||
* of each column (or row) of the referenced expression.
|
* of each column (or row) of the referenced expression.
|
||||||
*
|
*
|
||||||
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
|
*
|
||||||
* Example: \include PartialRedux_minCoeff.cpp
|
* Example: \include PartialRedux_minCoeff.cpp
|
||||||
* Output: \verbinclude PartialRedux_minCoeff.out
|
* Output: \verbinclude PartialRedux_minCoeff.out
|
||||||
*
|
*
|
||||||
@ -288,6 +290,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
|||||||
/** \returns a row (or column) vector expression of the largest coefficient
|
/** \returns a row (or column) vector expression of the largest coefficient
|
||||||
* of each column (or row) of the referenced expression.
|
* of each column (or row) of the referenced expression.
|
||||||
*
|
*
|
||||||
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
|
*
|
||||||
* Example: \include PartialRedux_maxCoeff.cpp
|
* Example: \include PartialRedux_maxCoeff.cpp
|
||||||
* Output: \verbinclude PartialRedux_maxCoeff.out
|
* Output: \verbinclude PartialRedux_maxCoeff.out
|
||||||
*
|
*
|
||||||
|
@ -164,8 +164,8 @@ struct functor_traits<max_coeff_visitor<Scalar> > {
|
|||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
|
||||||
/** \returns the minimum of all coefficients of *this
|
/** \returns the minimum of all coefficients of *this and puts in *row and *col its location.
|
||||||
* and puts in *row and *col its location.
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*
|
*
|
||||||
* \sa DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::minCoeff()
|
* \sa DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::minCoeff()
|
||||||
*/
|
*/
|
||||||
@ -181,8 +181,8 @@ DenseBase<Derived>::minCoeff(IndexType* rowId, IndexType* colId) const
|
|||||||
return minVisitor.res;
|
return minVisitor.res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the minimum of all coefficients of *this
|
/** \returns the minimum of all coefficients of *this and puts in *index its location.
|
||||||
* and puts in *index its location.
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*
|
*
|
||||||
* \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::minCoeff()
|
* \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::minCoeff()
|
||||||
*/
|
*/
|
||||||
@ -198,8 +198,8 @@ DenseBase<Derived>::minCoeff(IndexType* index) const
|
|||||||
return minVisitor.res;
|
return minVisitor.res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the maximum of all coefficients of *this
|
/** \returns the maximum of all coefficients of *this and puts in *row and *col its location.
|
||||||
* and puts in *row and *col its location.
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*
|
*
|
||||||
* \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
|
* \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
|
||||||
*/
|
*/
|
||||||
@ -215,8 +215,8 @@ DenseBase<Derived>::maxCoeff(IndexType* rowPtr, IndexType* colPtr) const
|
|||||||
return maxVisitor.res;
|
return maxVisitor.res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns the maximum of all coefficients of *this
|
/** \returns the maximum of all coefficients of *this and puts in *index its location.
|
||||||
* and puts in *index its location.
|
* \warning the result is undefined if \c *this contains NaN.
|
||||||
*
|
*
|
||||||
* \sa DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
|
* \sa DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff()
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user