in ScalarMultiple, make the factor type independent from the matrix scalar type.

This is an optimization for complex matrices, allowing to do only a real multiplication
when a complex multiplication is not needed, e.g. in normalized().
This commit is contained in:
Benoit Jacob
2007-12-26 08:30:21 +00:00
parent dad245af56
commit 05a49547e1
5 changed files with 40 additions and 22 deletions

View File

@@ -149,7 +149,7 @@ template<typename Scalar, typename Derived> class MatrixBase
Scalar dot(const OtherDerived& other) const;
RealScalar norm2() const;
RealScalar norm() const;
ScalarMultiple<Derived> normalized() const;
const ScalarMultiple<RealScalar, Derived> normalized() const;
static Eval<Random<Derived> > random(int rows, int cols);
static Eval<Random<Derived> > random(int size);