aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-29 20:30:28 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-09-29 20:30:28 -0400
commitfa65b0966133d7feeea5ba6e6671e6a5f6a19a6a (patch)
treee920700a9cd204d9351094b28ac2c353adc1f3bf /Eigen
parent457b7cba96517328b086d23b9ee47a50176c5982 (diff)
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.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/Product.h5
1 files changed, 5 insertions, 0 deletions
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<Lhs, Rhs, OuterProduct>
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&);
};