Commit e63703fa authored by Sylvain Thery's avatar Sylvain Thery

add const in traversor2_closed

parent 026b5ffd
...@@ -44,12 +44,12 @@ template <typename MAP> ...@@ -44,12 +44,12 @@ template <typename MAP>
class Traversor2VE: public Traversor class Traversor2VE: public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2VE(MAP& map, Dart dart) ; Traversor2VE(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -61,12 +61,12 @@ template <typename MAP> ...@@ -61,12 +61,12 @@ template <typename MAP>
class Traversor2VF : public Traversor class Traversor2VF : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2VF(MAP& map, Dart dart) ; Traversor2VF(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -78,12 +78,12 @@ template <typename MAP> ...@@ -78,12 +78,12 @@ template <typename MAP>
class Traversor2VVaE : public Traversor class Traversor2VVaE : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2VVaE(MAP& map, Dart dart) ; Traversor2VVaE(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -95,14 +95,14 @@ template <typename MAP> ...@@ -95,14 +95,14 @@ template <typename MAP>
class Traversor2VVaF : public Traversor class Traversor2VVaF : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
Dart stop ; Dart stop ;
public: public:
Traversor2VVaF(MAP& map, Dart dart) ; Traversor2VVaF(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -118,12 +118,12 @@ template <typename MAP> ...@@ -118,12 +118,12 @@ template <typename MAP>
class Traversor2EV : public Traversor class Traversor2EV : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2EV(MAP& map, Dart dart) ; Traversor2EV(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -135,12 +135,12 @@ template <typename MAP> ...@@ -135,12 +135,12 @@ template <typename MAP>
class Traversor2EF : public Traversor class Traversor2EF : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2EF(MAP& map, Dart dart) ; Traversor2EF(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -152,14 +152,14 @@ template <typename MAP> ...@@ -152,14 +152,14 @@ template <typename MAP>
class Traversor2EEaV : public Traversor class Traversor2EEaV : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
Dart stop1, stop2 ; Dart stop1, stop2 ;
public: public:
Traversor2EEaV(MAP& map, Dart dart) ; Traversor2EEaV(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -171,14 +171,14 @@ template <typename MAP> ...@@ -171,14 +171,14 @@ template <typename MAP>
class Traversor2EEaF : public Traversor class Traversor2EEaF : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
Dart stop1, stop2 ; Dart stop1, stop2 ;
public: public:
Traversor2EEaF(MAP& map, Dart dart) ; Traversor2EEaF(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -194,12 +194,12 @@ template <typename MAP> ...@@ -194,12 +194,12 @@ template <typename MAP>
class Traversor2FV : public Traversor class Traversor2FV : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2FV(MAP& map, Dart dart) ; Traversor2FV(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -212,7 +212,7 @@ template <typename MAP> ...@@ -212,7 +212,7 @@ template <typename MAP>
class Traversor2FE: public Traversor2FV<MAP> class Traversor2FE: public Traversor2FV<MAP>
{ {
public: public:
Traversor2FE(MAP& map, Dart dart):Traversor2FV<MAP>(map,dart){} Traversor2FE(const MAP& map, Dart dart):Traversor2FV<MAP>(map,dart){}
} ; } ;
// Traverse the faces adjacent to a given face through sharing a common vertex // Traverse the faces adjacent to a given face through sharing a common vertex
...@@ -220,14 +220,14 @@ template <typename MAP> ...@@ -220,14 +220,14 @@ template <typename MAP>
class Traversor2FFaV : public Traversor class Traversor2FFaV : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
Dart stop ; Dart stop ;
public: public:
Traversor2FFaV(MAP& map, Dart dart) ; Traversor2FFaV(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
...@@ -239,12 +239,12 @@ template <typename MAP> ...@@ -239,12 +239,12 @@ template <typename MAP>
class Traversor2FFaE : public Traversor class Traversor2FFaE : public Traversor
{ {
private: private:
MAP& m ; const MAP& m ;
Dart start ; Dart start ;
Dart current ; Dart current ;
public: public:
Traversor2FFaE(MAP& map, Dart dart) ; Traversor2FFaE(const MAP& map, Dart dart) ;
Dart begin() ; Dart begin() ;
Dart end() ; Dart end() ;
......
...@@ -35,7 +35,7 @@ namespace ClosedMap ...@@ -35,7 +35,7 @@ namespace ClosedMap
// Traversor2VE // Traversor2VE
template <typename MAP> template <typename MAP>
Traversor2VE<MAP>::Traversor2VE(MAP& map, Dart dart) : m(map), start(dart) Traversor2VE<MAP>::Traversor2VE(const MAP& map, Dart dart) : m(map), start(dart)
{} {}
template <typename MAP> template <typename MAP>
...@@ -66,7 +66,7 @@ Dart Traversor2VE<MAP>::next() ...@@ -66,7 +66,7 @@ Dart Traversor2VE<MAP>::next()
// Traversor2VF // Traversor2VF
template <typename MAP> template <typename MAP>
Traversor2VF<MAP>::Traversor2VF(MAP& map, Dart dart) : m(map), start(dart) Traversor2VF<MAP>::Traversor2VF(const MAP& map, Dart dart) : m(map), start(dart)
{ {
} }
...@@ -98,7 +98,7 @@ Dart Traversor2VF<MAP>::next() ...@@ -98,7 +98,7 @@ Dart Traversor2VF<MAP>::next()
// Traversor2VVaE // Traversor2VVaE
template <typename MAP> template <typename MAP>
Traversor2VVaE<MAP>::Traversor2VVaE(MAP& map, Dart dart) : m(map) Traversor2VVaE<MAP>::Traversor2VVaE(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi2(dart) ; start = m.phi2(dart) ;
} }
...@@ -131,7 +131,7 @@ Dart Traversor2VVaE<MAP>::next() ...@@ -131,7 +131,7 @@ Dart Traversor2VVaE<MAP>::next()
// Traversor2VVaF // Traversor2VVaF
template <typename MAP> template <typename MAP>
Traversor2VVaF<MAP>::Traversor2VVaF(MAP& map, Dart dart) : m(map) Traversor2VVaF<MAP>::Traversor2VVaF(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi1(m.phi1(dart)) ; start = m.phi1(m.phi1(dart)) ;
if(start == dart) if(start == dart)
...@@ -179,7 +179,7 @@ Dart Traversor2VVaF<MAP>::next() ...@@ -179,7 +179,7 @@ Dart Traversor2VVaF<MAP>::next()
// Traversor2EV // Traversor2EV
template <typename MAP> template <typename MAP>
Traversor2EV<MAP>::Traversor2EV(MAP& map, Dart dart) : m(map), start(dart) Traversor2EV<MAP>::Traversor2EV(const MAP& map, Dart dart) : m(map), start(dart)
{} {}
template <typename MAP> template <typename MAP>
...@@ -210,7 +210,7 @@ Dart Traversor2EV<MAP>::next() ...@@ -210,7 +210,7 @@ Dart Traversor2EV<MAP>::next()
// Traversor2EF // Traversor2EF
template <typename MAP> template <typename MAP>
Traversor2EF<MAP>::Traversor2EF(MAP& map, Dart dart) : m(map), start(dart) Traversor2EF<MAP>::Traversor2EF(const MAP& map, Dart dart) : m(map), start(dart)
{ {
} }
...@@ -242,7 +242,7 @@ Dart Traversor2EF<MAP>::next() ...@@ -242,7 +242,7 @@ Dart Traversor2EF<MAP>::next()
// Traversor2EEaV // Traversor2EEaV
template <typename MAP> template <typename MAP>
Traversor2EEaV<MAP>::Traversor2EEaV(MAP& map, Dart dart) : m(map) Traversor2EEaV<MAP>::Traversor2EEaV(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi2(m.phi_1(dart)) ; start = m.phi2(m.phi_1(dart)) ;
stop1 = dart ; stop1 = dart ;
...@@ -279,7 +279,7 @@ Dart Traversor2EEaV<MAP>::next() ...@@ -279,7 +279,7 @@ Dart Traversor2EEaV<MAP>::next()
// Traversor2EEaF // Traversor2EEaF
template <typename MAP> template <typename MAP>
Traversor2EEaF<MAP>::Traversor2EEaF(MAP& map, Dart dart) : m(map) Traversor2EEaF<MAP>::Traversor2EEaF(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi1(dart) ; start = m.phi1(dart) ;
stop1 = dart ; stop1 = dart ;
...@@ -320,7 +320,7 @@ Dart Traversor2EEaF<MAP>::next() ...@@ -320,7 +320,7 @@ Dart Traversor2EEaF<MAP>::next()
// Traversor2FV // Traversor2FV
template <typename MAP> template <typename MAP>
Traversor2FV<MAP>::Traversor2FV(MAP& map, Dart dart) : m(map), start(dart) Traversor2FV<MAP>::Traversor2FV(const MAP& map, Dart dart) : m(map), start(dart)
{} {}
template <typename MAP> template <typename MAP>
...@@ -351,7 +351,7 @@ Dart Traversor2FV<MAP>::next() ...@@ -351,7 +351,7 @@ Dart Traversor2FV<MAP>::next()
// Traversor2FFaV // Traversor2FFaV
template <typename MAP> template <typename MAP>
Traversor2FFaV<MAP>::Traversor2FFaV(MAP& map, Dart dart) : m(map) Traversor2FFaV<MAP>::Traversor2FFaV(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi2(m.phi_1(m.phi2(m.phi_1(dart)))) ; start = m.phi2(m.phi_1(m.phi2(m.phi_1(dart)))) ;
current = start ; current = start ;
...@@ -402,7 +402,7 @@ Dart Traversor2FFaV<MAP>::next() ...@@ -402,7 +402,7 @@ Dart Traversor2FFaV<MAP>::next()
// Traversor2FFaE // Traversor2FFaE
template <typename MAP> template <typename MAP>
Traversor2FFaE<MAP>::Traversor2FFaE(MAP& map, Dart dart) : m(map) Traversor2FFaE<MAP>::Traversor2FFaE(const MAP& map, Dart dart) : m(map)
{ {
start = m.phi2(dart) ; start = m.phi2(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