diff --git a/Eigen/src/Core/util/SymbolicIndex.h b/Eigen/src/Core/util/SymbolicIndex.h index 6f603f301..beb9d4c13 100644 --- a/Eigen/src/Core/util/SymbolicIndex.h +++ b/Eigen/src/Core/util/SymbolicIndex.h @@ -87,6 +87,8 @@ public: { return AddExpr(derived(), b); } AddExpr operator-(Index a) const { return AddExpr(derived(), -a); } + ProductExpr operator*(Index a) const + { return ProductExpr(derived(),a); } QuotientExpr operator/(Index a) const { return QuotientExpr(derived(),a); } @@ -94,8 +96,10 @@ public: { return AddExpr(b.derived(), a); } friend AddExpr,ValueExpr> operator-(Index a, const BaseExpr& b) { return AddExpr,ValueExpr>(-b.derived(), a); } - friend AddExpr operator/(Index a, const BaseExpr& b) - { return AddExpr(a,b.derived()); } + friend ProductExpr operator*(Index a, const BaseExpr& b) + { return ProductExpr(a,b.derived()); } + friend QuotientExpr operator/(Index a, const BaseExpr& b) + { return QuotientExpr(a,b.derived()); } template AddExpr operator+(const BaseExpr &b) const @@ -105,6 +109,10 @@ public: AddExpr > operator-(const BaseExpr &b) const { return AddExpr >(derived(), -b.derived()); } + template + ProductExpr operator*(const BaseExpr &b) const + { return ProductExpr(derived(), b.derived()); } + template QuotientExpr operator/(const BaseExpr &b) const { return QuotientExpr(derived(), b.derived()); }