Added support for scalar / array division.

This commit is contained in:
Hauke Heibel
2012-03-02 16:27:27 +01:00
parent 8a7d16d523
commit 8cb3e36e14
3 changed files with 31 additions and 1 deletions

View File

@@ -43,7 +43,10 @@ template<typename ArrayType> void array(const ArrayType& m)
RowVectorType rv1 = RowVectorType::Random(cols);
Scalar s1 = internal::random<Scalar>(),
s2 = internal::random<Scalar>();
s2 = internal::random<Scalar>();
// scalar by array division
VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());
// scalar addition
VERIFY_IS_APPROX(m1 + s1, s1 + m1);