Commit 13408457 authored by Pierre Kraemer's avatar Pierre Kraemer

correction begin / end / next pour MR

parent b263ad7f
...@@ -258,20 +258,34 @@ inline AttributeMultiVector<unsigned int>* GenericMap::getEmbeddingAttributeVect ...@@ -258,20 +258,34 @@ inline AttributeMultiVector<unsigned int>* GenericMap::getEmbeddingAttributeVect
inline Dart GenericMap::begin() inline Dart GenericMap::begin()
{ {
return Dart::create(m_attribs[DART].begin()); if (m_isMultiRes)
{
unsigned int d = m_mrattribs.begin() ;
while (getDartLevel(d) > m_mrCurrentLevel)
m_mrattribs.next(d) ;
return Dart::create(d) ;
}
return Dart::create(m_attribs[DART].begin()) ;
} }
inline Dart GenericMap::end() inline Dart GenericMap::end()
{ {
if (m_isMultiRes)
return Dart::create(m_mrattribs.end()) ;
return Dart::create(m_attribs[DART].end()) ; return Dart::create(m_attribs[DART].end()) ;
} }
inline void GenericMap::next(Dart& d) inline void GenericMap::next(Dart& d)
{ {
unsigned int d_index = dartIndex(d); if (m_isMultiRes)
m_attribs[DART].next(d_index) ; {
while ((d.index != m_mrattribs.end() ) && (getDartLevel(d.index) > m_mrCurrentLevel))
d = Dart::create(d_index); m_mrattribs.next(d.index) ;
}
else
m_attribs[DART].next(d.index) ;
} }
/**************************************** /****************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment