Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

Commit ec7f05bd authored by Sylvain Thery's avatar Sylvain Thery
Browse files

remove template orbit (replace by parameter) in Traversor3XY and Traversor3XXaY

parent 3036f4ac
......@@ -34,15 +34,16 @@ namespace CGoGN
* class Marker for Traversor usefull to combine
* several TraversorXY
*/
template <typename MAP, unsigned int ORBIT>
template <typename MAP>
class MarkerForTraversor
{
private:
MAP& m_map ;
DartMarkerStore* m_dmark ;
CellMarkerStore* m_cmark ;
unsigned int m_orbit;
public:
MarkerForTraversor(MAP& map, bool forceDartMarker = false, unsigned int thread = 0) ;
MarkerForTraversor(MAP& map, unsigned int orbit, bool forceDartMarker = false, unsigned int thread = 0) ;
~MarkerForTraversor();
DartMarkerStore* dmark();
CellMarkerStore* cmark();
......@@ -55,7 +56,7 @@ public:
* Generic class Traversor (do not use directly)
* Traverse all Y incident to X
*/
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
template <typename MAP>
class Traversor3XY
{
private:
......@@ -64,11 +65,13 @@ private:
CellMarkerStore* m_cmark ;
Dart m_current ;
TraversorDartsOfOrbit<MAP> m_tradoo;
unsigned int m_orbx;
unsigned int m_orby;
bool m_allocated;
bool m_first;
public:
Traversor3XY(MAP& map, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) ;
Traversor3XY(MAP& map, Dart dart, MarkerForTraversor<MAP,ORBIT_Y>& tmo, bool forceDartMarker = false, unsigned int thread = 0) ;
Traversor3XY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, bool forceDartMarker = false, unsigned int thread = 0) ;
Traversor3XY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, MarkerForTraversor<MAP>& tmo, bool forceDartMarker = false, unsigned int thread = 0) ;
~Traversor3XY();
Dart begin() ;
Dart end() ;
......@@ -80,7 +83,7 @@ public:
* Generic class Traversor (do not use directly)
* Traverse all X adjacent to X by an Y
*/
template <typename MAP, unsigned int ORB_X, unsigned int ORB_Y>
template <typename MAP>
class Traversor3XXaY
{
private:
......@@ -88,7 +91,7 @@ private:
std::vector<Dart> m_vecDarts;
std::vector<Dart>::iterator m_iter;
public:
Traversor3XXaY(MAP& map, Dart dart, bool forceDartMarker = false, unsigned int thread = 0);
Traversor3XXaY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, bool forceDartMarker = false, unsigned int thread = 0);
Dart begin();
......@@ -104,30 +107,30 @@ public:
* Traverse vertices incident to volume
*/
template <typename MAP>
class Traversor3WV: public Traversor3XY<MAP,VOLUME,VERTEX>
class Traversor3WV: public Traversor3XY<MAP>
{
public:
Traversor3WV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VOLUME,VERTEX>(m, dart, forceDartMarker, thread) {}
Traversor3WV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VOLUME,VERTEX,forceDartMarker, thread) {}
};
/**
* Traverse edges incident to volume
*/
template <typename MAP>
class Traversor3WE: public Traversor3XY<MAP,VOLUME,EDGE>
class Traversor3WE: public Traversor3XY<MAP>
{
public:
Traversor3WE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VOLUME,EDGE>(m, dart, forceDartMarker, thread) {}
Traversor3WE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VOLUME,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse faces incident to volume
*/
template <typename MAP>
class Traversor3WF: public Traversor3XY<MAP,VOLUME,FACE>
class Traversor3WF: public Traversor3XY<MAP>
{
public:
Traversor3WF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VOLUME,FACE>(m, dart, forceDartMarker, thread) {}
Traversor3WF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VOLUME,FACE, forceDartMarker, thread) {}
};
......@@ -135,30 +138,30 @@ public:
* Traverse vertices incident to face
*/
template <typename MAP>
class Traversor3FV: public Traversor3XY<MAP,FACE,VERTEX>
class Traversor3FV: public Traversor3XY<MAP>
{
public:
Traversor3FV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,FACE,VERTEX>(m, dart, forceDartMarker, thread) {}
Traversor3FV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,FACE,VERTEX, forceDartMarker, thread) {}
};
/**
* Traverse edges incident to face
*/
template <typename MAP>
class Traversor3FE: public Traversor3XY<MAP,FACE,EDGE>
class Traversor3FE: public Traversor3XY<MAP>
{
public:
Traversor3FE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,FACE,EDGE>(m, dart, forceDartMarker, thread) {}
Traversor3FE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,FACE,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse volumes incident to face
*/
template <typename MAP>
class Traversor3FW: public Traversor3XY<MAP,FACE,VOLUME>
class Traversor3FW: public Traversor3XY<MAP>
{
public:
Traversor3FW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,FACE,VOLUME>(m, dart, forceDartMarker, thread) {}
Traversor3FW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,FACE,VOLUME, forceDartMarker, thread) {}
};
......@@ -166,30 +169,30 @@ public:
* Traverse vertices incident to edge
*/
template <typename MAP>
class Traversor3EV: public Traversor3XY<MAP,EDGE,VERTEX>
class Traversor3EV: public Traversor3XY<MAP>
{
public:
Traversor3EV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,EDGE,VERTEX>(m, dart, forceDartMarker, thread) {}
Traversor3EV(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,EDGE,VERTEX, forceDartMarker, thread) {}
};
/**
* Traverse faces incident to edge
*/
template <typename MAP>
class Traversor3EF: public Traversor3XY<MAP,EDGE,FACE>
class Traversor3EF: public Traversor3XY<MAP>
{
public:
Traversor3EF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,EDGE,FACE>(m, dart, forceDartMarker, thread) {}
Traversor3EF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,EDGE,FACE, forceDartMarker, thread) {}
};
/**
* Traverse volumes incident to edge
*/
template <typename MAP>
class Traversor3EW: public Traversor3XY<MAP,EDGE,VOLUME>
class Traversor3EW: public Traversor3XY<MAP>
{
public:
Traversor3EW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,EDGE,VOLUME>(m, dart, forceDartMarker, thread) {}
Traversor3EW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,EDGE,VOLUME, forceDartMarker, thread) {}
};
......@@ -198,30 +201,30 @@ public:
* Traverse edges incident to vertex
*/
template <typename MAP>
class Traversor3VE: public Traversor3XY<MAP,VERTEX,EDGE>
class Traversor3VE: public Traversor3XY<MAP>
{
public:
Traversor3VE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VERTEX,EDGE>(m, dart, forceDartMarker, thread) {}
Traversor3VE(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VERTEX,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse faces incident to vertex
*/
template <typename MAP>
class Traversor3VF: public Traversor3XY<MAP,VERTEX,FACE>
class Traversor3VF: public Traversor3XY<MAP>
{
public:
Traversor3VF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VERTEX,FACE>(m, dart, forceDartMarker, thread) {}
Traversor3VF(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VERTEX,FACE, forceDartMarker, thread) {}
};
/**
* Traverse volumes incident to vertex
*/
template <typename MAP>
class Traversor3VW: public Traversor3XY<MAP,VERTEX,VOLUME>
class Traversor3VW: public Traversor3XY<MAP>
{
public:
Traversor3VW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP,VERTEX,VOLUME>(m, dart, forceDartMarker, thread) {}
Traversor3VW(MAP& m, Dart dart, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XY<MAP>(m, dart,VERTEX,VOLUME, forceDartMarker, thread) {}
};
......@@ -230,30 +233,30 @@ public:
* Traverse vertices adjacent to a vertex by an edge
*/
template <typename MAP>
class Traversor3VVaE: public Traversor3XXaY<MAP,VERTEX,EDGE>
class Traversor3VVaE: public Traversor3XXaY<MAP>
{
public:
Traversor3VVaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VERTEX,EDGE>(m, d, forceDartMarker, thread) {}
Traversor3VVaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VERTEX,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse vertices adjacent to a vertex by a face
*/
template <typename MAP>
class Traversor3VVaF: public Traversor3XXaY<MAP,VERTEX,FACE>
class Traversor3VVaF: public Traversor3XXaY<MAP>
{
public:
Traversor3VVaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VERTEX,FACE>(m, d, forceDartMarker, thread) {}
Traversor3VVaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VERTEX,FACE, forceDartMarker, thread) {}
};
/**
* Traverse vertices adjacent to a vertex by a volume
*/
template <typename MAP>
class Traversor3VVaW: public Traversor3XXaY<MAP,VERTEX,VOLUME>
class Traversor3VVaW: public Traversor3XXaY<MAP>
{
public:
Traversor3VVaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VERTEX,VOLUME>(m, d, forceDartMarker, thread) {}
Traversor3VVaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VERTEX,VOLUME, forceDartMarker, thread) {}
};
......@@ -261,30 +264,30 @@ public:
* Traverse edges adjacent to an egde by a vertex
*/
template <typename MAP>
class Traversor3EEaV: public Traversor3XXaY<MAP,EDGE,VERTEX>
class Traversor3EEaV: public Traversor3XXaY<MAP>
{
public:
Traversor3EEaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,EDGE,VERTEX>(m, d, forceDartMarker, thread) {}
Traversor3EEaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,EDGE,VERTEX, forceDartMarker, thread) {}
};
/**
* Traverse edges adjacent to an egde by a face
*/
template <typename MAP>
class Traversor3EEaF: public Traversor3XXaY<MAP,EDGE,FACE>
class Traversor3EEaF: public Traversor3XXaY<MAP>
{
public:
Traversor3EEaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,EDGE,FACE>(m, d, forceDartMarker, thread) {}
Traversor3EEaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,EDGE,FACE, forceDartMarker, thread) {}
};
/**
* Traverse edges adjacent to an egde by a volume
*/
template <typename MAP>
class Traversor3EEaW: public Traversor3XXaY<MAP,EDGE,VOLUME>
class Traversor3EEaW: public Traversor3XXaY<MAP>
{
public:
Traversor3EEaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,EDGE,VOLUME>(m, d, forceDartMarker, thread) {}
Traversor3EEaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,EDGE,VOLUME, forceDartMarker, thread) {}
};
......@@ -292,30 +295,30 @@ public:
* Traverse faces adjacent to a face by a vertex
*/
template <typename MAP>
class Traversor3FFaV: public Traversor3XXaY<MAP,FACE,VERTEX>
class Traversor3FFaV: public Traversor3XXaY<MAP>
{
public:
Traversor3FFaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,FACE,VERTEX>(m, d, forceDartMarker, thread) {}
Traversor3FFaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,FACE,VERTEX, forceDartMarker, thread) {}
};
/**
* Traverse faces adjacent to a face by an edge
*/
template <typename MAP>
class Traversor3FFaE: public Traversor3XXaY<MAP,FACE,EDGE>
class Traversor3FFaE: public Traversor3XXaY<MAP>
{
public:
Traversor3FFaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,FACE,EDGE>(m, d, forceDartMarker, thread) {}
Traversor3FFaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,FACE,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse faces adjacent to a face by a volume
*/
template <typename MAP>
class Traversor3FFaW: public Traversor3XXaY<MAP,FACE,VOLUME>
class Traversor3FFaW: public Traversor3XXaY<MAP>
{
public:
Traversor3FFaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,FACE,VOLUME>(m, d, forceDartMarker, thread) {}
Traversor3FFaW(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,FACE,VOLUME, forceDartMarker, thread) {}
};
......@@ -323,30 +326,30 @@ public:
* Traverse volumes adjacent to a volumee by a vertex
*/
template <typename MAP>
class Traversor3WWaV: public Traversor3XXaY<MAP,VOLUME,VERTEX>
class Traversor3WWaV: public Traversor3XXaY<MAP>
{
public:
Traversor3WWaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VOLUME,VERTEX>(m, d, forceDartMarker, thread) {}
Traversor3WWaV(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VOLUME,VERTEX, forceDartMarker, thread) {}
};
/**
* Traverse volumes adjacent to a volumee by an edge
*/
template <typename MAP>
class Traversor3WWaE: public Traversor3XXaY<MAP,VOLUME,EDGE>
class Traversor3WWaE: public Traversor3XXaY<MAP>
{
public:
Traversor3WWaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VOLUME,EDGE>(m, d, forceDartMarker, thread) {}
Traversor3WWaE(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VOLUME,EDGE, forceDartMarker, thread) {}
};
/**
* Traverse volumes adjacent to a volumee by a face
*/
template <typename MAP>
class Traversor3WWaF: public Traversor3XXaY<MAP,VOLUME,FACE>
class Traversor3WWaF: public Traversor3XXaY<MAP>
{
public:
Traversor3WWaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP,VOLUME,FACE>(m, d, forceDartMarker, thread) {}
Traversor3WWaF(MAP& m, Dart d, bool forceDartMarker = false, unsigned int thread = 0) : Traversor3XXaY<MAP>(m, d,VOLUME,FACE, forceDartMarker, thread) {}
};
......
......@@ -30,21 +30,22 @@ namespace CGoGN
// Marker for traversor
//**********************
template <typename MAP, unsigned int ORBIT>
MarkerForTraversor<MAP,ORBIT>::MarkerForTraversor(MAP& map, bool forceDartMarker, unsigned int thread) :
template <typename MAP>
MarkerForTraversor<MAP>::MarkerForTraversor(MAP& map, unsigned int orbit, bool forceDartMarker, unsigned int thread) :
m_map(map),
m_dmark(NULL),
m_cmark(NULL)
m_cmark(NULL),
m_orbit(orbit)
{
if(!forceDartMarker && map.isOrbitEmbedded(ORBIT))
m_cmark = new CellMarkerStore(map, ORBIT, thread) ;
if(!forceDartMarker && map.isOrbitEmbedded(m_orbit))
m_cmark = new CellMarkerStore(map, m_orbit, thread) ;
else
m_dmark = new DartMarkerStore(map, thread) ;
}
template <typename MAP, unsigned int ORBIT>
MarkerForTraversor<MAP,ORBIT>::~MarkerForTraversor()
template <typename MAP>
MarkerForTraversor<MAP>::~MarkerForTraversor()
{
if (m_cmark)
delete m_cmark;
......@@ -52,41 +53,41 @@ MarkerForTraversor<MAP,ORBIT>::~MarkerForTraversor()
delete m_dmark;
}
template <typename MAP, unsigned int ORBIT>
void MarkerForTraversor<MAP,ORBIT>::mark(Dart d)
template <typename MAP>
void MarkerForTraversor<MAP>::mark(Dart d)
{
if (m_cmark)
m_cmark->mark(d);
else
m_dmark->markOrbit(ORBIT,d);
m_dmark->markOrbit(m_orbit,d);
}
template <typename MAP, unsigned int ORBIT>
void MarkerForTraversor<MAP,ORBIT>::unmark(Dart d)
template <typename MAP>
void MarkerForTraversor<MAP>::unmark(Dart d)
{
if (m_cmark)
m_cmark->unmark(d);
else
m_dmark->unmarkOrbit(ORBIT,d);
m_dmark->unmarkOrbit(m_orbit,d);
}
template <typename MAP, unsigned int ORBIT>
bool MarkerForTraversor<MAP,ORBIT>::isMarked(Dart d)
template <typename MAP>
bool MarkerForTraversor<MAP>::isMarked(Dart d)
{
if (m_cmark)
return m_cmark->isMarked(d);
return m_dmark->isMarked(d);
}
template <typename MAP, unsigned int ORBIT>
CellMarkerStore* MarkerForTraversor<MAP,ORBIT>::cmark()
template <typename MAP>
CellMarkerStore* MarkerForTraversor<MAP>::cmark()
{
return m_cmark;
}
template <typename MAP, unsigned int ORBIT>
DartMarkerStore* MarkerForTraversor<MAP,ORBIT>::dmark()
template <typename MAP>
DartMarkerStore* MarkerForTraversor<MAP>::dmark()
{
return m_dmark;
}
......@@ -98,26 +99,30 @@ DartMarkerStore* MarkerForTraversor<MAP,ORBIT>::dmark()
//**************************************
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::Traversor3XY(MAP& map, Dart dart, bool forceDartMarker, unsigned int thread) :
template <typename MAP>
Traversor3XY<MAP>::Traversor3XY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, bool forceDartMarker, unsigned int thread) :
// Traversor3MarkOnly<MAP,ORBIT_Y>(map, forceDartMarker, thread, true),
m_map(map),
m_dmark(NULL),
m_cmark(NULL),
m_tradoo(map,ORBIT_X,dart,thread),
m_tradoo(map,orbX,dart,thread),
m_orbx(orbX),
m_orby(orbY),
m_allocated(true),
m_first(true)
{
if(!forceDartMarker && map.isOrbitEmbedded(ORBIT_Y))
m_cmark = new CellMarkerStore(map, ORBIT_Y, thread) ;
if(!forceDartMarker && map.isOrbitEmbedded(orbY))
m_cmark = new CellMarkerStore(map, orbY, thread) ;
else
m_dmark = new DartMarkerStore(map, thread) ;
}
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::Traversor3XY(MAP& map, Dart dart, MarkerForTraversor<MAP,ORBIT_Y>& tmo, bool forceDartMarker, unsigned int thread) :
template <typename MAP>
Traversor3XY<MAP>::Traversor3XY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, MarkerForTraversor<MAP>& tmo, bool forceDartMarker, unsigned int thread) :
m_map(map),
m_tradoo(map,ORBIT_X,dart,thread),
m_tradoo(map,orbX,dart,thread),
m_orbx(orbX),
m_orby(orbY),
m_allocated(false),
m_first(true)
{
......@@ -125,8 +130,8 @@ Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::Traversor3XY(MAP& map, Dart dart, MarkerForTr
m_dmark = tmo.dmark();
}
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::~Traversor3XY()
template <typename MAP>
Traversor3XY<MAP>::~Traversor3XY()
{
if (m_allocated)
{
......@@ -137,8 +142,8 @@ Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::~Traversor3XY()
}
}
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::begin()
template <typename MAP>
Dart Traversor3XY<MAP>::begin()
{
if (!m_first)
{
......@@ -167,14 +172,14 @@ Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::begin()
return m_current;
}
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::end()
template <typename MAP>
Dart Traversor3XY<MAP>::end()
{
return NIL ;
}
template <typename MAP, unsigned int ORBIT_X, unsigned int ORBIT_Y>
Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::next()
template <typename MAP>
Dart Traversor3XY<MAP>::next()
{
if(m_current != NIL)
{
......@@ -187,16 +192,16 @@ Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::next()
}
else
{
if (ORBIT_X==VOLUME)
if (m_orbx==VOLUME)
{
// if allocated we are in a local traversal of volume so we can mark only darts of volume
if (m_allocated)
m_dmark->markOrbit(MAP::ORBIT_IN_PARENT(ORBIT_Y), m_current);
m_dmark->markOrbit(MAP::ORBIT_IN_PARENT(m_orby), m_current);
else
m_dmark->markOrbit(ORBIT_Y, m_current); // here we need to mark all the darts
m_dmark->markOrbit(m_orby, m_current); // here we need to mark all the darts
}
else
m_dmark->markOrbit(ORBIT_Y, m_current);
m_dmark->markOrbit(m_orby, m_current);
m_current = m_tradoo.next();
while ((m_current != NIL) && m_dmark->isMarked(m_current))
m_current = m_tradoo.next();
......@@ -212,39 +217,39 @@ Dart Traversor3XY<MAP,ORBIT_X,ORBIT_Y>::next()
//*********************************************
template <typename MAP, unsigned int ORB_X, unsigned int ORB_Y>
Traversor3XXaY<MAP,ORB_X,ORB_Y>::Traversor3XXaY(MAP& map, Dart dart, bool forceDartMarker, unsigned int thread):
template <typename MAP>
Traversor3XXaY<MAP>::Traversor3XXaY(MAP& map, Dart dart, unsigned int orbX, unsigned int orbY, bool forceDartMarker, unsigned int thread):
m_map(map)
{
MarkerForTraversor<MAP,ORB_X> mk(map,forceDartMarker,thread);
MarkerForTraversor<MAP> mk(map,orbX,forceDartMarker,thread);
mk.mark(dart);
Traversor3XY<MAP,ORB_X,ORB_Y> traAdj(map, dart, forceDartMarker, thread);
Traversor3XY<MAP> traAdj(map, dart, orbX, orbY, forceDartMarker, thread);
for (Dart d = traAdj.begin(); d!=traAdj.end(); d=traAdj.next())
{
Traversor3XY<MAP,ORB_Y,ORB_X> traInci(map, d, mk, forceDartMarker, thread);
Traversor3XY<MAP> traInci(map, d, orbY, orbX, mk, forceDartMarker, thread);
for (Dart e = traInci.begin(); e!=traInci.end(); e=traInci.next())
m_vecDarts.push_back(e);
}
m_vecDarts.push_back(NIL);
}
template <typename MAP, unsigned int ORB_X, unsigned int ORB_Y>
Dart Traversor3XXaY<MAP,ORB_X,ORB_Y>::begin()
template <typename MAP>
Dart Traversor3XXaY<MAP>::begin()
{
m_iter = m_vecDarts.begin();
return *m_iter;