backout changeset d4a9e615699bd7f26864d57d2b28021b9f64b6ff

: the extended SparseView is not needed anymore
This commit is contained in:
Gael Guennebaud 2016-01-30 14:43:21 +01:00
parent 8ed1553d20
commit 1bc207c528
3 changed files with 17 additions and 16 deletions

View File

@ -126,7 +126,7 @@ template<typename PlainObjectType, int Options = 0,
template<typename Derived> class TriangularBase; template<typename Derived> class TriangularBase;
template<typename MatrixType, unsigned int Mode> class TriangularView; template<typename MatrixType, unsigned int Mode> class TriangularView;
template<typename MatrixType, unsigned int Mode> class SelfAdjointView; template<typename MatrixType, unsigned int Mode> class SelfAdjointView;
template<typename MatrixType,bool KeepZeros=false> class SparseView; template<typename MatrixType> class SparseView;
template<typename ExpressionType> class WithFormat; template<typename ExpressionType> class WithFormat;
template<typename MatrixType> struct CommaInitializer; template<typename MatrixType> struct CommaInitializer;
template<typename Derived> class ReturnByValue; template<typename Derived> class ReturnByValue;

View File

@ -56,6 +56,7 @@ template<typename _Scalar, int _Flags = 0, typename _StorageIndex = int> class
template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView; template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView;
template<typename Lhs, typename Rhs> class SparseDiagonalProduct; template<typename Lhs, typename Rhs> class SparseDiagonalProduct;
template<typename MatrixType> class SparseView;
template<typename Lhs, typename Rhs> class SparseSparseProduct; template<typename Lhs, typename Rhs> class SparseSparseProduct;
template<typename Lhs, typename Rhs> class SparseTimeDenseProduct; template<typename Lhs, typename Rhs> class SparseTimeDenseProduct;

View File

@ -1,7 +1,7 @@
// This file is part of Eigen, a lightweight C++ template library // This file is part of Eigen, a lightweight C++ template library
// for linear algebra. // for linear algebra.
// //
// Copyright (C) 2011-2015 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2011-2014 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2010 Daniel Lowengrub <lowdanie@gmail.com> // Copyright (C) 2010 Daniel Lowengrub <lowdanie@gmail.com>
// //
// This Source Code Form is subject to the terms of the Mozilla // This Source Code Form is subject to the terms of the Mozilla
@ -15,8 +15,8 @@ namespace Eigen {
namespace internal { namespace internal {
template<typename MatrixType, bool KeepZeros> template<typename MatrixType>
struct traits<SparseView<MatrixType,KeepZeros> > : traits<MatrixType> struct traits<SparseView<MatrixType> > : traits<MatrixType>
{ {
typedef typename MatrixType::StorageIndex StorageIndex; typedef typename MatrixType::StorageIndex StorageIndex;
typedef Sparse StorageKind; typedef Sparse StorageKind;
@ -27,8 +27,8 @@ struct traits<SparseView<MatrixType,KeepZeros> > : traits<MatrixType>
} // end namespace internal } // end namespace internal
template<typename MatrixType, bool KeepZeros> template<typename MatrixType>
class SparseView : public SparseMatrixBase<SparseView<MatrixType,KeepZeros> > class SparseView : public SparseMatrixBase<SparseView<MatrixType> >
{ {
typedef typename MatrixType::Nested MatrixTypeNested; typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested; typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;
@ -66,13 +66,13 @@ namespace internal {
// This is tricky because implementing an inner iterator on top of an IndexBased evaluator is // This is tricky because implementing an inner iterator on top of an IndexBased evaluator is
// not easy because the evaluators do not expose the sizes of the underlying expression. // not easy because the evaluators do not expose the sizes of the underlying expression.
template<typename ArgType,bool KeepZeros> template<typename ArgType>
struct unary_evaluator<SparseView<ArgType,KeepZeros>, IteratorBased> struct unary_evaluator<SparseView<ArgType>, IteratorBased>
: public evaluator_base<SparseView<ArgType,KeepZeros> > : public evaluator_base<SparseView<ArgType> >
{ {
typedef typename evaluator<ArgType>::InnerIterator EvalIterator; typedef typename evaluator<ArgType>::InnerIterator EvalIterator;
public: public:
typedef SparseView<ArgType,KeepZeros> XprType; typedef SparseView<ArgType> XprType;
class InnerIterator : public EvalIterator class InnerIterator : public EvalIterator
{ {
@ -88,7 +88,7 @@ struct unary_evaluator<SparseView<ArgType,KeepZeros>, IteratorBased>
EIGEN_STRONG_INLINE InnerIterator& operator++() EIGEN_STRONG_INLINE InnerIterator& operator++()
{ {
EvalIterator::operator++(); EvalIterator::operator++();
if(!KeepZeros) incrementToNonZero(); incrementToNonZero();
return *this; return *this;
} }
@ -119,12 +119,12 @@ struct unary_evaluator<SparseView<ArgType,KeepZeros>, IteratorBased>
const XprType &m_view; const XprType &m_view;
}; };
template<typename ArgType,bool KeepZeros> template<typename ArgType>
struct unary_evaluator<SparseView<ArgType,KeepZeros>, IndexBased> struct unary_evaluator<SparseView<ArgType>, IndexBased>
: public evaluator_base<SparseView<ArgType,KeepZeros> > : public evaluator_base<SparseView<ArgType> >
{ {
public: public:
typedef SparseView<ArgType,KeepZeros> XprType; typedef SparseView<ArgType> XprType;
protected: protected:
enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit }; enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit };
typedef typename XprType::Scalar Scalar; typedef typename XprType::Scalar Scalar;
@ -144,7 +144,7 @@ struct unary_evaluator<SparseView<ArgType,KeepZeros>, IndexBased>
EIGEN_STRONG_INLINE InnerIterator& operator++() EIGEN_STRONG_INLINE InnerIterator& operator++()
{ {
m_inner++; m_inner++;
if(!KeepZeros) incrementToNonZero(); incrementToNonZero();
return *this; return *this;
} }