Remove dead code.

This commit is contained in:
Gael Guennebaud 2016-02-12 16:13:35 +01:00
parent 2f5f56a820
commit 4252af6897

View File

@ -43,9 +43,6 @@ template<typename MatrixType, unsigned int Mode> class TriangularViewImpl<Matrix
EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType)
class InnerIterator;
class ReverseInnerIterator;
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename internal::remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
typedef typename internal::remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
@ -63,109 +60,6 @@ template<typename MatrixType, unsigned int Mode> class TriangularViewImpl<Matrix
};
template<typename MatrixType, unsigned int Mode>
class TriangularViewImpl<MatrixType,Mode,Sparse>::InnerIterator : public MatrixTypeNestedCleaned::InnerIterator
{
typedef typename MatrixTypeNestedCleaned::InnerIterator Base;
public:
EIGEN_STRONG_INLINE InnerIterator(const TriangularViewImpl& view, Index outer)
: Base(view.derived().nestedExpression(), outer), m_returnOne(false), m_containsDiag(Base::outer()<view.innerSize())
{
if(SkipFirst)
{
while((*this) && ((HasUnitDiag||SkipDiag) ? this->index()<=outer : this->index()<outer))
Base::operator++();
if(HasUnitDiag)
m_returnOne = m_containsDiag;
}
else if(HasUnitDiag && ((!Base::operator bool()) || Base::index()>=Base::outer()))
{
if((!SkipFirst) && Base::operator bool())
Base::operator++();
m_returnOne = m_containsDiag;
}
}
EIGEN_STRONG_INLINE InnerIterator& operator++()
{
if(HasUnitDiag && m_returnOne)
m_returnOne = false;
else
{
Base::operator++();
if(HasUnitDiag && (!SkipFirst) && ((!Base::operator bool()) || Base::index()>=Base::outer()))
{
if((!SkipFirst) && Base::operator bool())
Base::operator++();
m_returnOne = m_containsDiag;
}
}
return *this;
}
inline Index row() const { return (MatrixType::Flags&RowMajorBit ? Base::outer() : this->index()); }
inline Index col() const { return (MatrixType::Flags&RowMajorBit ? this->index() : Base::outer()); }
inline StorageIndex index() const
{
if(HasUnitDiag && m_returnOne) return Base::outer();
else return Base::index();
}
inline Scalar value() const
{
if(HasUnitDiag && m_returnOne) return Scalar(1);
else return Base::value();
}
EIGEN_STRONG_INLINE operator bool() const
{
if(HasUnitDiag && m_returnOne)
return true;
if(SkipFirst) return Base::operator bool();
else
{
if (SkipDiag) return (Base::operator bool() && this->index() < this->outer());
else return (Base::operator bool() && this->index() <= this->outer());
}
}
protected:
bool m_returnOne;
bool m_containsDiag;
};
template<typename MatrixType, unsigned int Mode>
class TriangularViewImpl<MatrixType,Mode,Sparse>::ReverseInnerIterator : public MatrixTypeNestedCleaned::ReverseInnerIterator
{
typedef typename MatrixTypeNestedCleaned::ReverseInnerIterator Base;
public:
EIGEN_STRONG_INLINE ReverseInnerIterator(const TriangularViewType& view, Index outer)
: Base(view.derived().nestedExpression(), outer)
{
eigen_assert((!HasUnitDiag) && "ReverseInnerIterator does not support yet triangular views with a unit diagonal");
if(SkipLast) {
while((*this) && (SkipDiag ? this->index()>=outer : this->index()>outer))
--(*this);
}
}
EIGEN_STRONG_INLINE ReverseInnerIterator& operator--()
{ Base::operator--(); return *this; }
inline Index row() const { return Base::row(); }
inline Index col() const { return Base::col(); }
EIGEN_STRONG_INLINE operator bool() const
{
if (SkipLast) return Base::operator bool() ;
else
{
if(SkipDiag) return (Base::operator bool() && this->index() > this->outer());
else return (Base::operator bool() && this->index() >= this->outer());
}
}
};
namespace internal {
template<typename ArgType, unsigned int Mode>