Commit 95da611e authored by Pierre Kraemer's avatar Pierre Kraemer

debug newDart in mapMulti

parent 0c3be6e9
...@@ -147,7 +147,7 @@ protected: ...@@ -147,7 +147,7 @@ protected:
/** /**
* Add a dart to the map * Add a dart to the map
*/ */
virtual Dart newDart() ; Dart newDart() ;
/** /**
* Erase a dart of the map * Erase a dart of the map
......
...@@ -50,7 +50,7 @@ protected: ...@@ -50,7 +50,7 @@ protected:
* DARTS MANAGEMENT * * DARTS MANAGEMENT *
****************************************/ ****************************************/
inline virtual Dart newDart(); inline Dart newDart();
inline virtual void deleteDart(Dart d); inline virtual void deleteDart(Dart d);
......
...@@ -83,7 +83,7 @@ protected: ...@@ -83,7 +83,7 @@ protected:
* DARTS MANAGEMENT * * DARTS MANAGEMENT *
****************************************/ ****************************************/
inline virtual Dart newDart(); inline Dart newDart();
inline virtual void deleteDart(Dart d); inline virtual void deleteDart(Dart d);
......
...@@ -49,29 +49,22 @@ inline Dart MapMulti::newDart() ...@@ -49,29 +49,22 @@ inline Dart MapMulti::newDart()
(*m_mrLevels)[mrdi] = m_mrCurrentLevel ; // set the introduction level of the dart (*m_mrLevels)[mrdi] = m_mrCurrentLevel ; // set the introduction level of the dart
m_mrNbDarts[m_mrCurrentLevel]++ ; m_mrNbDarts[m_mrCurrentLevel]++ ;
Dart mrd = Dart::create(mrdi);
for (unsigned int i = 0; i < m_permutation.size(); ++i)
(*m_permutation[i])[d.index] = mrd ;
for (unsigned int i = 0; i < m_permutation_inv.size(); ++i)
(*m_permutation_inv[i])[d.index] = mrd ;
for (unsigned int i = 0; i < m_involution.size(); ++i)
(*m_involution[i])[d.index] = mrd ;
for(unsigned int i = 0; i < m_mrCurrentLevel; ++i) // for all previous levels for(unsigned int i = 0; i < m_mrCurrentLevel; ++i) // for all previous levels
(*m_mrDarts[i])[mrdi] = MRNULL ; // this MRdart does not exist (*m_mrDarts[i])[mrdi] = MRNULL ; // this MRdart does not exist
for(unsigned int i = m_mrCurrentLevel; i < m_mrDarts.size(); ++i) // for all levels from current to max for(unsigned int i = m_mrCurrentLevel; i < m_mrDarts.size(); ++i) // for all levels from current to max
(*m_mrDarts[i])[mrdi] = d.index ; // make this MRdart point to the new dart line (*m_mrDarts[i])[mrdi] = d.index ; // make this MRdart point to the new dart line
pushLevel() ; return mrd ;
for(unsigned int i = m_mrCurrentLevel; i < m_mrDarts.size(); ++i)
{
setCurrentLevel(i) ;
unsigned int d_index = dartIndex(d) ;
for (unsigned int i = 0; i < m_permutation.size(); ++i)
(*m_permutation[i])[d_index] = d ;
for (unsigned int i = 0; i < m_permutation_inv.size(); ++i)
(*m_permutation_inv[i])[d_index] = d ;
for (unsigned int i = 0; i < m_involution.size(); ++i)
(*m_involution[i])[d_index] = d ;
}
popLevel() ;
return Dart::create(mrdi) ;
} }
inline void MapMulti::deleteDart(Dart d) inline void MapMulti::deleteDart(Dart d)
......
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