Commit 4ed7e53d authored by Sylvain Thery's avatar Sylvain Thery

update quick traversors

parent cccae9c1
......@@ -483,28 +483,28 @@ public:
template <typename MAP, unsigned int ORBIT, unsigned int INCI>
void enableQuickLocalIncidentTraversal(MAP& map);
void enableQuickIncidentTraversal();
template <typename MAP, unsigned int ORBIT, unsigned int INCI>
void updateQuickLocalIncidentTraversal(MAP& map);
void updateQuickIncidentTraversal();
template <unsigned int ORBIT, unsigned int INCI>
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* getQuickLocalIncidentTraversal();
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* getQuickIncidentTraversal();
template <unsigned int ORBIT, unsigned int INCI>
void disableQuickLocalIncidentTraversal();
void disableQuickIncidentTraversal();
template <typename MAP, unsigned int ORBIT, unsigned int ADJ>
void enableQuickLocalAdjacentTraversal(MAP& map);
void enableQuickAdjacentTraversal();
template <typename MAP, unsigned int ORBIT, unsigned int ADJ>
void updateQuickLocalAdjacentTraversal(MAP& map);
void updateQuickAdjacentTraversal();
template <unsigned int ORBIT, unsigned int INCI>
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* getQuickLocalAdjacentTraversal();
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* getQuickAdjacentTraversal();
template <unsigned int ORBIT, unsigned int ADJ>
void disableQuickLocalAdjacentTraversal();
void disableQuickAdjacentTraversal();
/****************************************
* ATTRIBUTES MANAGEMENT *
......
......@@ -488,7 +488,7 @@ inline void GenericMap::disableQuickTraversal()
template <typename MAP, unsigned int ORBIT, unsigned int INCI>
inline void GenericMap::enableQuickLocalIncidentTraversal(MAP& map)
inline void GenericMap::enableQuickIncidentTraversal()
{
if(m_quickLocalIncidentTraversal[ORBIT][INCI] == NULL)
{
......@@ -498,11 +498,11 @@ inline void GenericMap::enableQuickLocalIncidentTraversal(MAP& map)
ss << "quickLocalIncidentTraversal_" << INCI;
m_quickLocalIncidentTraversal[ORBIT][INCI] = m_attribs[ORBIT].addAttribute<NoTypeNameAttribute<std::vector<Dart> > >(ss.str()) ;
}
updateQuickLocalIncidentTraversal<MAP,ORBIT,INCI>(map) ;
updateQuickIncidentTraversal<MAP,ORBIT,INCI>() ;
}
template <typename MAP, unsigned int ORBIT, unsigned int INCI>
inline void GenericMap::updateQuickLocalIncidentTraversal(MAP& map)
inline void GenericMap::updateQuickIncidentTraversal()
{
assert(m_quickLocalIncidentTraversal[ORBIT][INCI] != NULL || !"updateQuickTraversal on a disabled orbit") ;
......@@ -512,6 +512,8 @@ inline void GenericMap::updateQuickLocalIncidentTraversal(MAP& map)
std::vector<Dart> buffer;
buffer.reserve(100);
MAP& map = static_cast<MAP&>(*this);
TraversorCell<MAP,ORBIT> tra_glob(map);
for (Dart d = tra_glob.begin(); d != tra_glob.end(); d = tra_glob.next())
{
......@@ -543,13 +545,13 @@ inline void GenericMap::updateQuickLocalIncidentTraversal(MAP& map)
}
template <unsigned int ORBIT, unsigned int INCI>
inline AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* GenericMap::getQuickLocalIncidentTraversal()
inline AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* GenericMap::getQuickIncidentTraversal()
{
return m_quickLocalIncidentTraversal[ORBIT][INCI] ;
}
template <unsigned int ORBIT, unsigned int INCI>
inline void GenericMap::disableQuickLocalIncidentTraversal()
inline void GenericMap::disableQuickIncidentTraversal()
{
if(m_quickLocalIncidentTraversal[ORBIT][INCI] != NULL)
{
......@@ -561,7 +563,7 @@ inline void GenericMap::disableQuickLocalIncidentTraversal()
template <typename MAP, unsigned int ORBIT, unsigned int ADJ>
inline void GenericMap::enableQuickLocalAdjacentTraversal(MAP& map)
inline void GenericMap::enableQuickAdjacentTraversal()
{
if(m_quickLocalAdjacentTraversal[ORBIT][ADJ] == NULL)
{
......@@ -571,17 +573,19 @@ inline void GenericMap::enableQuickLocalAdjacentTraversal(MAP& map)
ss << "m_quickLocalAdjacentTraversal" << ADJ;
m_quickLocalAdjacentTraversal[ORBIT][ADJ] = m_attribs[ORBIT].addAttribute<NoTypeNameAttribute<std::vector<Dart> > >(ss.str()) ;
}
updateQuickLocalAdjacentTraversal<MAP,ORBIT,ADJ>(map) ;
updateQuickAdjacentTraversal<MAP,ORBIT,ADJ>() ;
}
template <typename MAP, unsigned int ORBIT, unsigned int ADJ>
inline void GenericMap::updateQuickLocalAdjacentTraversal(MAP& map)
inline void GenericMap::updateQuickAdjacentTraversal()
{
assert(m_quickLocalAdjacentTraversal[ORBIT][ADJ] != NULL || !"updateQuickTraversal on a disabled orbit") ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* ptrVD = m_quickLocalAdjacentTraversal[ORBIT][ADJ];
m_quickLocalAdjacentTraversal[ORBIT][ADJ] = NULL;
MAP& map = static_cast<MAP&>(*this);
std::vector<Dart> buffer;
buffer.reserve(100);
......@@ -615,14 +619,14 @@ inline void GenericMap::updateQuickLocalAdjacentTraversal(MAP& map)
m_quickLocalAdjacentTraversal[ORBIT][ADJ] = ptrVD;
}
template <unsigned int ORBIT, unsigned int INCI>
inline AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* GenericMap::getQuickLocalAdjacentTraversal()
template <unsigned int ORBIT, unsigned int ADJ>
inline AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* GenericMap::getQuickAdjacentTraversal()
{
return m_quickLocalAdjacentTraversal[ORBIT][INCI] ;
return m_quickLocalAdjacentTraversal[ORBIT][ADJ] ;
}
template <unsigned int ORBIT, unsigned int ADJ>
inline void GenericMap::disableQuickLocalAdjacentTraversal()
inline void GenericMap::disableQuickAdjacentTraversal()
{
if(m_quickLocalAdjacentTraversal[ORBIT][ADJ] != NULL)
{
......
......@@ -34,7 +34,7 @@ namespace CGoGN
template <typename MAP>
Traversor2VE<MAP>::Traversor2VE(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<VERTEX,EDGE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart)));
......@@ -83,7 +83,7 @@ Dart Traversor2VE<MAP>::next()
template <typename MAP>
Traversor2VF<MAP>::Traversor2VF(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<VERTEX,FACE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart)));
......@@ -137,7 +137,7 @@ Dart Traversor2VF<MAP>::next()
template <typename MAP>
Traversor2VVaE<MAP>::Traversor2VVaE(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<VERTEX,EDGE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,EDGE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart)));
......@@ -188,7 +188,7 @@ Dart Traversor2VVaE<MAP>::next()
template <typename MAP>
Traversor2VVaF<MAP>::Traversor2VVaF(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<VERTEX,FACE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<VERTEX,FACE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<VERTEX>(dart)));
......@@ -261,7 +261,7 @@ Dart Traversor2VVaF<MAP>::next()
template <typename MAP>
Traversor2EV<MAP>::Traversor2EV(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{ AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<EDGE,VERTEX>() ;
{ AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart)));
......@@ -308,7 +308,7 @@ Dart Traversor2EV<MAP>::next()
template <typename MAP>
Traversor2EF<MAP>::Traversor2EF(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<EDGE,FACE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart)));
......@@ -360,7 +360,7 @@ Dart Traversor2EF<MAP>::next()
template <typename MAP>
Traversor2EEaV<MAP>::Traversor2EEaV(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<EDGE,VERTEX>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,VERTEX>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart)));
......@@ -415,7 +415,7 @@ Dart Traversor2EEaV<MAP>::next()
template <typename MAP>
Traversor2EEaF<MAP>::Traversor2EEaF(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<EDGE,FACE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<EDGE,FACE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<EDGE>(dart)));
......@@ -474,7 +474,7 @@ Dart Traversor2EEaF<MAP>::next()
template <typename MAP>
Traversor2FV<MAP>::Traversor2FV(MAP& map, Dart dart) : m(map), start(dart),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<FACE,VERTEX>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart)));
......@@ -521,7 +521,7 @@ Dart Traversor2FV<MAP>::next()
template <typename MAP>
Traversor2FFaV<MAP>::Traversor2FFaV(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<FACE,VERTEX>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,VERTEX>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart)));
......@@ -594,7 +594,7 @@ Dart Traversor2FFaV<MAP>::next()
template <typename MAP>
Traversor2FFaE<MAP>::Traversor2FFaE(MAP& map, Dart dart) : m(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<FACE,EDGE>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<FACE,EDGE>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<FACE>(dart)));
......
......@@ -105,7 +105,7 @@ Traversor3XY<MAP, ORBX, ORBY>::Traversor3XY(MAP& map, Dart dart, bool forceDartM
m_allocated(true),
m_first(true)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalIncidentTraversal<ORBX,ORBY>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickIncidentTraversal<ORBX,ORBY>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<ORBX>(dart)));
......@@ -258,7 +258,7 @@ template <typename MAP, unsigned int ORBX, unsigned int ORBY>
Traversor3XXaY<MAP, ORBX, ORBY>::Traversor3XXaY(MAP& map, Dart dart, bool forceDartMarker, unsigned int thread):
m_map(map),m_QLT(NULL)
{
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickLocalAdjacentTraversal<ORBX,ORBY>() ;
AttributeMultiVector<NoTypeNameAttribute<std::vector<Dart> > >* quickTraversal = map.template getQuickAdjacentTraversal<ORBX,ORBY>() ;
if (quickTraversal != NULL)
{
m_QLT = &(quickTraversal->operator[](map.template getEmbedding<ORBX>(dart)));
......
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