mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Enable use of evaluators for noalias and lazyProduct, add conversion to scalar for inner products
This commit is contained in:
@@ -79,6 +79,12 @@ class Product : public ProductImpl<_Lhs,_Rhs,Option,
|
||||
|
||||
const LhsNestedCleaned& lhs() const { return m_lhs; }
|
||||
const RhsNestedCleaned& rhs() const { return m_rhs; }
|
||||
|
||||
/** Convertion to scalar for inner-products */
|
||||
operator const Scalar() const {
|
||||
EIGEN_STATIC_ASSERT(SizeAtCompileTime==1, IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY);
|
||||
return typename internal::evaluator<Product>::type(*this).coeff(0,0);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user