bug #977: add stableNormalize[d] methods: they are analogues to normalize[d] but with carefull handling of under/over-flow

This commit is contained in:
Gael Guennebaud
2016-01-23 22:40:11 +01:00
parent 369d6d1ae3
commit 1cf85bd875
3 changed files with 62 additions and 0 deletions

View File

@@ -204,7 +204,9 @@ template<typename Derived> class MatrixBase
RealScalar blueNorm() const;
RealScalar hypotNorm() const;
EIGEN_DEVICE_FUNC const PlainObject normalized() const;
EIGEN_DEVICE_FUNC const PlainObject stableNormalized() const;
EIGEN_DEVICE_FUNC void normalize();
EIGEN_DEVICE_FUNC void stableNormalize();
EIGEN_DEVICE_FUNC const AdjointReturnType adjoint() const;
EIGEN_DEVICE_FUNC void adjointInPlace();