Commit 734ba6e6 authored by Sylvain Thery's avatar Sylvain Thery

constification of Topo

parent 0c1647ba
...@@ -222,7 +222,7 @@ void MyQT::traverse2() ...@@ -222,7 +222,7 @@ void MyQT::traverse2()
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl); Algo::Render::drawerCell<PFP>(VERTEX+m_second2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f); m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor<PFP::MAP>* tra = TraversorFactory<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2); Traversor* tra = TraversorFactory<PFP::MAP>::createIncident(myMap, m_selected, 2, VERTEX+m_second2, VERTEX+m_first2);
for (Dart d=tra->begin(); d != tra->end(); d= tra->next()) for (Dart d=tra->begin(); d != tra->end(); d= tra->next())
m_affDarts.push_back(d); m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl); Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
...@@ -231,7 +231,7 @@ void MyQT::traverse2() ...@@ -231,7 +231,7 @@ void MyQT::traverse2()
{ {
Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl); Algo::Render::drawerCell<PFP>(VERTEX+m_first2, m_drawer, myMap, m_selected, position, m_expl);
m_drawer.color3f(1.0f,0.0f,0.0f); m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor<PFP::MAP>* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap, m_selected, 2, VERTEX+m_first2, VERTEX+m_second2); Traversor* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap, m_selected, 2, VERTEX+m_first2, VERTEX+m_second2);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next()) for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
m_affDarts.push_back(d); m_affDarts.push_back(d);
Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl); Algo::Render::drawerCells<PFP>(VERTEX+m_first2, m_drawer, myMap, m_affDarts, position, m_expl);
...@@ -291,7 +291,7 @@ void MyQT::traverse3() ...@@ -291,7 +291,7 @@ void MyQT::traverse3()
dynamicMarkOrbit(VERTEX+m_second3); dynamicMarkOrbit(VERTEX+m_second3);
m_drawer.color3f(1.0f,0.0f,0.0f); m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor<PFP::MAP>* tra = TraversorFactory<PFP::MAP>::createIncident(myMap,m_selected, 3, VERTEX+m_second3, VERTEX+m_first3); Traversor* tra = TraversorFactory<PFP::MAP>::createIncident(myMap,m_selected, 3, VERTEX+m_second3, VERTEX+m_first3);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next()) for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
{ {
m_affDarts.push_back(d); m_affDarts.push_back(d);
...@@ -312,7 +312,7 @@ void MyQT::traverse3() ...@@ -312,7 +312,7 @@ void MyQT::traverse3()
dynamicMarkOrbit(VERTEX+m_first3); dynamicMarkOrbit(VERTEX+m_first3);
m_drawer.color3f(1.0f,0.0f,0.0f); m_drawer.color3f(1.0f,0.0f,0.0f);
Traversor<PFP::MAP>* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap,m_selected, 3, VERTEX+m_first3, VERTEX+m_second3); Traversor* tra = TraversorFactory<PFP::MAP>::createAdjacent(myMap,m_selected, 3, VERTEX+m_first3, VERTEX+m_second3);
for (Dart d = tra->begin(); d != tra->end(); d = tra->next()) for (Dart d = tra->begin(); d != tra->end(); d = tra->next())
{ {
m_affDarts.push_back(d); m_affDarts.push_back(d);
......
...@@ -67,7 +67,7 @@ void MyQT::orbit_list(int x) ...@@ -67,7 +67,7 @@ void MyQT::orbit_list(int x)
m_selected.clear(); m_selected.clear();
// easy way to traverse darts of orbit // easy way to traverse darts of orbit
Traversor<MAP>* tra = TraversorFactory<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]); Traversor* tra = TraversorFactory<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]);
for (Dart e = tra->begin(); e != tra->end(); e = tra->next()) for (Dart e = tra->begin(); e != tra->end(); e = tra->next())
m_selected.push_back(e); m_selected.push_back(e);
} }
...@@ -173,7 +173,7 @@ void MyQT::cb_mousePress(int /*button*/, int x, int y) ...@@ -173,7 +173,7 @@ void MyQT::cb_mousePress(int /*button*/, int x, int y)
m_selected.clear(); m_selected.clear();
// easy way to traverse darts of orbit // easy way to traverse darts of orbit
Traversor<MAP>* tra = TraversorFactory<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]); Traversor* tra = TraversorFactory<MAP>::createDartsOfOrbits(myMap,m_clicked,orbs[current_orbit]);
for (Dart e = tra->begin(); e != tra->end(); e = tra->next()) for (Dart e = tra->begin(); e != tra->end(); e = tra->next())
m_selected.push_back(e); m_selected.push_back(e);
} }
......
...@@ -120,25 +120,25 @@ public: ...@@ -120,25 +120,25 @@ public:
//@{ //@{
virtual Dart newDart() ; virtual Dart newDart() ;
Dart phi1(Dart d) ; Dart phi1(Dart d) const;
Dart phi_1(Dart d) ; Dart phi_1(Dart d) const;
Dart phi2(Dart d) ; Dart phi2(Dart d) const;
private: private:
Dart phi2bis(Dart d) ; Dart phi2bis(Dart d) const;
public: public:
Dart phi3(Dart d); Dart phi3(Dart d) const;
Dart alpha0(Dart d); Dart alpha0(Dart d) const;
Dart alpha1(Dart d); Dart alpha1(Dart d) const;
Dart alpha2(Dart d); Dart alpha2(Dart d) const;
Dart alpha_2(Dart d); Dart alpha_2(Dart d) const;
//@} //@}
/*! @name Topological Operators with Cells id management /*! @name Topological Operators with Cells id management
...@@ -207,7 +207,7 @@ public: ...@@ -207,7 +207,7 @@ public:
/*! /*!
* *
*/ */
unsigned int getCurrentLevel() ; unsigned int getCurrentLevel() const ;
//! //!
/*! /*!
...@@ -219,13 +219,13 @@ public: ...@@ -219,13 +219,13 @@ public:
/*! /*!
* *
*/ */
unsigned int getMaxLevel() ; unsigned int getMaxLevel() const ;
//! //!
/*! /*!
* *
*/ */
unsigned int getDartLevel(Dart d) ; unsigned int getDartLevel(Dart d) const ;
//! //!
/*! /*!
...@@ -290,7 +290,7 @@ public: ...@@ -290,7 +290,7 @@ public:
//! Return the level of insertion of the vertex of d //! Return the level of insertion of the vertex of d
/*! /*!
*/ */
unsigned int vertexInsertionLevel(Dart d) ; unsigned int vertexInsertionLevel(Dart d) const;
//! Return the level of the edge of d in the current level map //! Return the level of the edge of d in the current level map
/*! /*!
...@@ -379,28 +379,28 @@ public: ...@@ -379,28 +379,28 @@ public:
virtual void next(Dart& d) const ; virtual void next(Dart& d) const ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) ; virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) const ;
virtual bool foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread = 0) ; virtual bool foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread = 0) const ;
bool foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread = 0); bool foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread = 0) ; virtual bool foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread = 0) const ;
bool foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread = 0); bool foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread = 0) ; virtual bool foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread = 0) const ;
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread = 0) ; virtual bool foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread = 0) const ;
virtual bool foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int thread = 0); virtual bool foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int thread = 0); virtual bool foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int thread = 0) const;
virtual bool foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread = 0); virtual bool foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread = 0) const;
//@} //@}
template <unsigned int ORBIT> template <unsigned int ORBIT>
unsigned int getEmbedding(Dart d); unsigned int getEmbedding(Dart d) const;
} ; } ;
template <typename T, unsigned int ORBIT> template <typename T, unsigned int ORBIT>
......
...@@ -92,7 +92,7 @@ inline Dart ImplicitHierarchicalMap3::newDart() ...@@ -92,7 +92,7 @@ inline Dart ImplicitHierarchicalMap3::newDart()
return d ; return d ;
} }
inline Dart ImplicitHierarchicalMap3::phi1(Dart d) inline Dart ImplicitHierarchicalMap3::phi1(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
bool finished = false ; bool finished = false ;
...@@ -117,7 +117,7 @@ inline Dart ImplicitHierarchicalMap3::phi1(Dart d) ...@@ -117,7 +117,7 @@ inline Dart ImplicitHierarchicalMap3::phi1(Dart d)
return it ; return it ;
} }
inline Dart ImplicitHierarchicalMap3::phi_1(Dart d) inline Dart ImplicitHierarchicalMap3::phi_1(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
bool finished = false ; bool finished = false ;
...@@ -139,7 +139,7 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d) ...@@ -139,7 +139,7 @@ inline Dart ImplicitHierarchicalMap3::phi_1(Dart d)
return it ; return it ;
} }
inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d) inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d) const
{ {
unsigned int faceId = m_faceId[d]; unsigned int faceId = m_faceId[d];
Dart it = d; Dart it = d;
...@@ -161,14 +161,14 @@ inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d) ...@@ -161,14 +161,14 @@ inline Dart ImplicitHierarchicalMap3::phi2bis(Dart d)
} }
} }
inline Dart ImplicitHierarchicalMap3::phi2(Dart d) inline Dart ImplicitHierarchicalMap3::phi2(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return Map3::phi2(Map3::phi_1(phi1(d))) ; return Map3::phi2(Map3::phi_1(phi1(d))) ;
} }
inline Dart ImplicitHierarchicalMap3::phi3(Dart d) inline Dart ImplicitHierarchicalMap3::phi3(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
...@@ -178,26 +178,26 @@ inline Dart ImplicitHierarchicalMap3::phi3(Dart d) ...@@ -178,26 +178,26 @@ inline Dart ImplicitHierarchicalMap3::phi3(Dart d)
return Map3::phi3(Map3::phi_1(phi1(d))); return Map3::phi3(Map3::phi_1(phi1(d)));
} }
inline Dart ImplicitHierarchicalMap3::alpha0(Dart d) inline Dart ImplicitHierarchicalMap3::alpha0(Dart d) const
{ {
return phi3(d) ; return phi3(d) ;
} }
inline Dart ImplicitHierarchicalMap3::alpha1(Dart d) inline Dart ImplicitHierarchicalMap3::alpha1(Dart d) const
{ {
//assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; //assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return phi3(phi_1(d)) ; return phi3(phi_1(d)) ;
} }
inline Dart ImplicitHierarchicalMap3::alpha2(Dart d) inline Dart ImplicitHierarchicalMap3::alpha2(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return phi3(phi2(d)); return phi3(phi2(d));
} }
inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d) inline Dart ImplicitHierarchicalMap3::alpha_2(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
...@@ -225,7 +225,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d) const ...@@ -225,7 +225,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d) const
} while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ; } while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread) const
{ {
DartMarkerStore mv(*this, thread); // Lock a marker DartMarkerStore mv(*this, thread); // Lock a marker
bool found = false; // Last functor return value bool found = false; // Last functor return value
...@@ -258,7 +258,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType ...@@ -258,7 +258,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType
return found; return found;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread) const
{ {
Dart dNext = d; Dart dNext = d;
do { do {
...@@ -269,7 +269,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& ...@@ -269,7 +269,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType&
return false; return false;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/) inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/) const
{ {
Dart dNext = d ; Dart dNext = d ;
do do
...@@ -281,12 +281,12 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, Func ...@@ -281,12 +281,12 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, Func
return false ; return false ;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread) const
{ {
return foreach_dart_of_oriented_face(d, f, thread) || foreach_dart_of_oriented_face(phi3(d), f, thread); return foreach_dart_of_oriented_face(d, f, thread) || foreach_dart_of_oriented_face(phi3(d), f, thread);
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread) const
{ {
DartMarkerStore mark(*this, thread); // Lock a marker DartMarkerStore mark(*this, thread); // Lock a marker
bool found = false; // Last functor return value bool found = false; // Last functor return value
...@@ -322,12 +322,12 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, Fu ...@@ -322,12 +322,12 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, Fu
return found; return found;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread) const
{ {
return foreach_dart_of_oriented_volume(d, f, thread) ; return foreach_dart_of_oriented_volume(d, f, thread) ;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread) const
{ {
DartMarkerStore mark(*this, thread); // Lock a marker DartMarkerStore mark(*this, thread); // Lock a marker
bool found = false; // Last functor return value bool found = false; // Last functor return value
...@@ -401,7 +401,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f, ...@@ -401,7 +401,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f,
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int /*thread*/) inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorType& f, unsigned int /*thread*/) const
{ {
Dart dNext = d; Dart dNext = d;
do do
...@@ -413,14 +413,14 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorTyp ...@@ -413,14 +413,14 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex2(Dart d, FunctorTyp
return false; return false;
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int /*thread*/) inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge2(Dart d, FunctorType& f, unsigned int /*thread*/) const
{ {
if (f(d)) if (f(d))
return true; return true;
return f(phi2(d)); return f(phi2(d));
} }
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread) inline bool ImplicitHierarchicalMap3::foreach_dart_of_face2(Dart d, FunctorType& f, unsigned int thread) const
{ {
return foreach_dart_of_oriented_face(d,f,thread); return foreach_dart_of_oriented_face(d,f,thread);
} }
...@@ -447,7 +447,7 @@ inline void ImplicitHierarchicalMap3::decCurrentLevel() ...@@ -447,7 +447,7 @@ inline void ImplicitHierarchicalMap3::decCurrentLevel()
inline unsigned int ImplicitHierarchicalMap3::getCurrentLevel() inline unsigned int ImplicitHierarchicalMap3::getCurrentLevel() const
{ {
return m_curLevel ; return m_curLevel ;
} }
...@@ -457,12 +457,12 @@ inline void ImplicitHierarchicalMap3::setCurrentLevel(unsigned int l) ...@@ -457,12 +457,12 @@ inline void ImplicitHierarchicalMap3::setCurrentLevel(unsigned int l)
m_curLevel = l ; m_curLevel = l ;
} }
inline unsigned int ImplicitHierarchicalMap3::getMaxLevel() inline unsigned int ImplicitHierarchicalMap3::getMaxLevel() const
{ {
return m_maxLevel ; return m_maxLevel ;
} }
inline unsigned int ImplicitHierarchicalMap3::getDartLevel(Dart d) inline unsigned int ImplicitHierarchicalMap3::getDartLevel(Dart d) const
{ {
return m_dartLevel[d] ; return m_dartLevel[d] ;
} }
...@@ -571,7 +571,7 @@ inline void ImplicitHierarchicalMap3::setFaceId(Dart d, unsigned int i, unsigned ...@@ -571,7 +571,7 @@ inline void ImplicitHierarchicalMap3::setFaceId(Dart d, unsigned int i, unsigned
***************************************************/ ***************************************************/
//TODO //TODO
inline unsigned int ImplicitHierarchicalMap3::vertexInsertionLevel(Dart d) inline unsigned int ImplicitHierarchicalMap3::vertexInsertionLevel(Dart d) const
{ {
assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ; assert(m_dartLevel[d] <= m_curLevel || !"Access to a dart introduced after current level") ;
return m_dartLevel[d] ; return m_dartLevel[d] ;
...@@ -602,7 +602,7 @@ inline unsigned int ImplicitHierarchicalMap3::edgeLevel(Dart d) ...@@ -602,7 +602,7 @@ inline unsigned int ImplicitHierarchicalMap3::edgeLevel(Dart d)
} }
template <unsigned int ORBIT> template <unsigned int ORBIT>
inline unsigned int ImplicitHierarchicalMap3::getEmbedding(Dart d) inline unsigned int ImplicitHierarchicalMap3::getEmbedding(Dart d) const
{ {
unsigned int nbSteps = m_curLevel - vertexInsertionLevel(d); unsigned int nbSteps = m_curLevel - vertexInsertionLevel(d);
unsigned int index = EmbeddedMap3::getEmbedding<ORBIT>(d); unsigned int index = EmbeddedMap3::getEmbedding<ORBIT>(d);
......
...@@ -171,7 +171,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n ...@@ -171,7 +171,7 @@ void foreach_cell(MAP& map, std::vector<FunctorMapThreaded<MAP>*>& funcs, bool n
AttributeContainer* cont = NULL; AttributeContainer* cont = NULL;
DartMarker* dmark = NULL; DartMarker* dmark = NULL;
CellMarker<ORBIT>* cmark = NULL; CellMarker<ORBIT>* cmark = NULL;
AttributeMultiVector<Dart>* quickTraversal = map.template getQuickTraversal<ORBIT>() ; const AttributeMultiVector<Dart>* quickTraversal = map.template getQuickTraversal<ORBIT>() ;
// fill each vd buffers with SIZE_BUFFER_THREAD darts // fill each vd buffers with SIZE_BUFFER_THREAD darts
Dart d; Dart d;
......
...@@ -451,7 +451,7 @@ public: ...@@ -451,7 +451,7 @@ public:
* @param fs a file stream * @param fs a file stream
* @param id the id to save * @param id the id to save
*/ */
void saveBin(CGoGNostream& fs, unsigned int id); void saveBin(CGoGNostream& fs, unsigned int id) const;
/** /**
* get id from file binary stream * get id from file binary stream
......
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
releaseOnDestruct(true) releaseOnDestruct(true)
{} {}
~CellMarkerGen() ~CellMarkerGen()
{} {}
...@@ -94,8 +96,18 @@ public: ...@@ -94,8 +96,18 @@ public:
*/ */
CellMarkerBase(GenericMap& map, unsigned int thread = 0) : CellMarkerGen(map, CELL, thread) CellMarkerBase(GenericMap& map, unsigned int thread = 0) : CellMarkerGen(map, CELL, thread)
{ {
if(!map.isOrbitEmbedded<CELL>()) if(!m_map.isOrbitEmbedded<CELL>())
map.addEmbedding<CELL>() ; m_map.addEmbedding<CELL>() ;
m_mark = m_map.getMarkerSet<CELL>(m_thread).getNewMark() ;
m_markVector = m_map.getMarkVector<CELL>(m_thread) ;
m_map.cellMarkers[m_thread].push_back(this) ;
}
CellMarkerBase(const GenericMap& map, unsigned int thread = 0) :
CellMarkerGen(const_cast<GenericMap&>(map), CELL, thread)
{
if(!m_map.isOrbitEmbedded<CELL>())
m_map.addEmbedding<CELL>() ;
m_mark = m_map.getMarkerSet<CELL>(m_thread).getNewMark() ; m_mark = m_map.getMarkerSet<CELL>(m_thread).getNewMark() ;
m_markVector = m_map.getMarkVector<CELL>(m_thread) ; m_markVector = m_map.getMarkVector<CELL>(m_thread) ;
m_map.cellMarkers[m_thread].push_back(this) ; m_map.cellMarkers[m_thread].push_back(this) ;
...@@ -240,6 +252,10 @@ public: ...@@ -240,6 +252,10 @@ public: