- move: DerivedTraits becomes MatrixBase::Traits

- the static constants are private again in the Derived classes
- more documentation and code snippets
- new isDiagonal() method
This commit is contained in:
Benoit Jacob
2008-01-06 16:35:21 +00:00
parent aaf889e72b
commit 84934ea217
40 changed files with 304 additions and 177 deletions

View File

@@ -30,7 +30,7 @@ template<typename Scalar, typename Derived>
template<typename OtherDerived>
bool MatrixBase<Scalar, Derived>::isApprox(
const OtherDerived& other,
const typename NumTraits<Scalar>::Real& prec = precision<Scalar>()
typename NumTraits<Scalar>::Real prec = precision<Scalar>()
) const
{
assert(rows() == other.rows() && cols() == other.cols());
@@ -51,7 +51,7 @@ bool MatrixBase<Scalar, Derived>::isApprox(
template<typename Scalar, typename Derived>
bool MatrixBase<Scalar, Derived>::isMuchSmallerThan(
const typename NumTraits<Scalar>::Real& other,
const typename NumTraits<Scalar>::Real& prec = precision<Scalar>()
typename NumTraits<Scalar>::Real prec = precision<Scalar>()
) const
{
if(Traits::IsVectorAtCompileTime)
@@ -71,7 +71,7 @@ template<typename Scalar, typename Derived>
template<typename OtherDerived>
bool MatrixBase<Scalar, Derived>::isMuchSmallerThan(
const MatrixBase<Scalar, OtherDerived>& other,
const typename NumTraits<Scalar>::Real& prec = precision<Scalar>()
typename NumTraits<Scalar>::Real prec = precision<Scalar>()
) const
{
assert(rows() == other.rows() && cols() == other.cols());