From fa65b0966133d7feeea5ba6e6671e6a5f6a19a6a Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 29 Sep 2009 20:30:28 -0400 Subject: [PATCH] add outerproduct coeff(int,int) method. This is needed to make this expression work: (vec1*vec2.transpose())*vec3 Gael, no objection? Seems to make sense as that's fast. --- Eigen/src/Core/Product.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 287fc9c5b..3c5c56f1c 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -212,6 +212,11 @@ class GeneralProduct ei_outer_product_selector<(int(Dest::Flags)&RowMajorBit) ? RowMajor : ColMajor>::run(*this, dest, alpha); } + Scalar coeff(int row, int col) const + { + return this->lhs().coeff(row) * this->rhs().coeff(col); + } + private: GeneralProduct& operator=(const GeneralProduct&); };