mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
extend the DenseStorageMatrix mechanism to all expressions
This commit is contained in:
@@ -109,13 +109,7 @@ template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived
|
||||
Transpose<Derived>
|
||||
>::ret AdjointReturnType;
|
||||
|
||||
// typedef Matrix<typename ei_traits<Derived>::Scalar,
|
||||
// ei_traits<Derived>::RowsAtCompileTime,
|
||||
// ei_traits<Derived>::ColsAtCompileTime,
|
||||
// AutoAlign | (ei_traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),
|
||||
// ei_traits<Derived>::MaxRowsAtCompileTime,
|
||||
// ei_traits<Derived>::MaxColsAtCompileTime
|
||||
// > PlainMatrixType;
|
||||
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainMatrixType;
|
||||
|
||||
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase
|
||||
#include "../plugins/CommonCwiseUnaryOps.h"
|
||||
@@ -376,6 +370,7 @@ template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived
|
||||
template<typename OtherDerived>
|
||||
Derived& operator*=(const SparseMatrixBase<OtherDerived>& other);
|
||||
|
||||
#ifdef EIGEN2_SUPPORT
|
||||
// deprecated
|
||||
template<typename OtherDerived>
|
||||
typename ei_plain_matrix_type_column_major<OtherDerived>::type
|
||||
@@ -386,6 +381,7 @@ template<typename Derived> class SparseMatrixBase : public AnyMatrixBase<Derived
|
||||
void solveTriangularInPlace(MatrixBase<OtherDerived>& other) const;
|
||||
// template<typename OtherDerived>
|
||||
// void solveTriangularInPlace(SparseMatrixBase<OtherDerived>& other) const;
|
||||
#endif // EIGEN2_SUPPORT
|
||||
|
||||
template<int Mode>
|
||||
inline const SparseTriangularView<Derived, Mode> triangularView() const;
|
||||
|
||||
@@ -52,6 +52,7 @@ struct SparseProductReturnType
|
||||
template<typename LhsNested, typename RhsNested>
|
||||
struct ei_traits<SparseProduct<LhsNested, RhsNested> >
|
||||
{
|
||||
typedef DenseStorageMatrix DenseStorageType;
|
||||
// clean the nested types:
|
||||
typedef typename ei_cleantype<LhsNested>::type _LhsNested;
|
||||
typedef typename ei_cleantype<RhsNested>::type _RhsNested;
|
||||
@@ -261,6 +262,7 @@ struct ei_traits<SparseTimeDenseProduct<Lhs,Rhs> >
|
||||
: ei_traits<ProductBase<SparseTimeDenseProduct<Lhs,Rhs>, Lhs, Rhs> >
|
||||
{
|
||||
typedef Dense StorageType;
|
||||
typedef DenseStorageMatrix DenseStorageType;
|
||||
};
|
||||
|
||||
template<typename Lhs, typename Rhs>
|
||||
|
||||
@@ -302,6 +302,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<Ot
|
||||
// other = otherCopy;
|
||||
}
|
||||
|
||||
#ifdef EIGEN2_SUPPORT
|
||||
|
||||
// deprecated stuff:
|
||||
|
||||
@@ -323,5 +324,6 @@ SparseMatrixBase<Derived>::solveTriangular(const MatrixBase<OtherDerived>& other
|
||||
derived().solveTriangularInPlace(res);
|
||||
return res;
|
||||
}
|
||||
#endif // EIGEN2_SUPPORT
|
||||
|
||||
#endif // EIGEN_SPARSETRIANGULARSOLVER_H
|
||||
|
||||
Reference in New Issue
Block a user