Make kroneckerProduct take two arguments and return an expression, which is more straight-forward.

This commit is contained in:
Chen-Pang He
2012-10-15 00:21:12 +08:00
parent f34db6578a
commit c4b83461d9
5 changed files with 212 additions and 120 deletions

View File

@@ -165,6 +165,9 @@ template<typename Derived> class MatrixBase
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& lazyAssign(const MatrixPowerProductBase<ProductDerived, Lhs,Rhs>& other);
template<typename Lhs, typename Rhs>
Derived& lazyAssign(const KroneckerProduct<Lhs,Rhs>& other);
#endif // not EIGEN_PARSED_BY_DOXYGEN
template<typename OtherDerived>

View File

@@ -282,6 +282,9 @@ struct stem_function
};
}
// KroneckerProduct module
template<typename Lhs, typename Rhs> class KroneckerProduct;
template<typename Lhs, typename Rhs> class KroneckerProductSparse;
#ifdef EIGEN2_SUPPORT
template<typename ExpressionType> class Cwise;

View File

@@ -259,6 +259,9 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
template<typename Lhs, typename Rhs>
inline Derived& operator=(const SparseSparseProduct<Lhs,Rhs>& product);
template<typename Lhs, typename Rhs>
inline Derived& operator=(const KroneckerProductSparse<Lhs,Rhs>& product);
friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m)
{
typedef typename Derived::Nested Nested;