bug fix in SparseView::incrementToNonZero

This commit is contained in:
Gael Guennebaud 2011-11-30 19:31:11 +01:00
parent d1b54ecfa3
commit 00d4a360ba

View File

@ -1,7 +1,7 @@
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2011 Gael Guennebaud <gael.guennebaud@inria.fr>
// Copyright (C) 2010 Daniel Lowengrub <lowdanie@gmail.com>
//
// Eigen is free software; you can redistribute it and/or
@ -92,10 +92,10 @@ protected:
private:
void incrementToNonZero()
{
while(internal::isMuchSmallerThan(value(), m_view.m_reference, m_view.m_epsilon) && (bool(*this)))
{
IterBase::operator++();
}
while((bool(*this)) && internal::isMuchSmallerThan(value(), m_view.m_reference, m_view.m_epsilon))
{
IterBase::operator++();
}
}
};