Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 278d906f authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

debug importMRDAT

parent 2018e88a
...@@ -90,20 +90,20 @@ public: ...@@ -90,20 +90,20 @@ public:
do do
{ {
Dart next = map.phi1(it) ; Dart next = map.phi1(it) ;
unsigned int emb = map.getEmbedding<VERTEX>(it) ; unsigned int emb = map.template getEmbedding<VERTEX>(it) ;
unsigned int idx = emb == v0 ? 0 : emb == v1 ? 1 : 2 ; unsigned int idx = emb == v0 ? 0 : emb == v1 ? 1 : 2 ;
map.incCurrentLevel() ; map.incCurrentLevel() ;
Dart dd = map.phi1(next) ; Dart dd = map.phi1(next) ;
unsigned int oldEmb = map.getEmbedding<VERTEX>(dd) ; unsigned int oldEmb = map.template getEmbedding<VERTEX>(dd) ;
unsigned int newEmb = vID[children[0]->indices[idx]] ; unsigned int newEmb = vID[children[0]->indices[idx]] ;
if(oldEmb == EMBNULL) if(oldEmb == EMBNULL)
{ {
map.embedOrbit<VERTEX>(dd, newEmb) ; map.template embedOrbit<VERTEX>(dd, newEmb) ;
map.pushLevel() ; map.pushLevel() ;
for(unsigned int i = map.getCurrentLevel() + 1; i <= map.getMaxLevel(); ++i) for(unsigned int i = map.getCurrentLevel() + 1; i <= map.getMaxLevel(); ++i)
{ {
map.setCurrentLevel(i) ; map.setCurrentLevel(i) ;
map.embedOrbit<VERTEX>(dd, newEmb) ; map.template embedOrbit<VERTEX>(dd, newEmb) ;
} }
map.popLevel() ; map.popLevel() ;
} }
...@@ -120,7 +120,7 @@ public: ...@@ -120,7 +120,7 @@ public:
do do
{ {
unsigned int emb = map.getEmbedding<VERTEX>(it) ; unsigned int emb = map.template getEmbedding<VERTEX>(it) ;
unsigned int idx = emb == v0 ? 0 : emb == v1 ? 1 : 2 ; unsigned int idx = emb == v0 ? 0 : emb == v1 ? 1 : 2 ;
map.incCurrentLevel() ; map.incCurrentLevel() ;
children[idx+1]->embed<PFP>(map, it, vID) ; children[idx+1]->embed<PFP>(map, it, vID) ;
......
...@@ -41,14 +41,13 @@ inline void nextNonEmptyLine(std::ifstream& fp, std::string& line) ...@@ -41,14 +41,13 @@ inline void nextNonEmptyLine(std::ifstream& fp, std::string& line)
template <typename PFP> template <typename PFP>
bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, QuadTree& qt) bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, QuadTree& qt)
{ {
VertexAttribute<typename PFP::VEC3> position = map.template getAttribute<typename PFP::VEC3>(VERTEX, "position") ; VertexAttribute<typename PFP::VEC3> position = map.template getAttribute<typename PFP::VEC3, VERTEX>("position") ;
if (!position.isValid()) if (!position.isValid())
position = map.template addAttribute<typename PFP::VEC3>(VERTEX, "position") ; position = map.template addAttribute<typename PFP::VEC3, VERTEX>("position") ;
attrNames.push_back(position.name()) ; attrNames.push_back(position.name()) ;
AttributeContainer& container = map.getAttributeContainer(VERTEX) ; AttributeContainer& container = map.template getAttributeContainer<VERTEX>() ;
// open file // open file
std::ifstream fp(filename.c_str(), std::ios::in) ; std::ifstream fp(filename.c_str(), std::ios::in) ;
...@@ -206,7 +205,7 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -206,7 +205,7 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
unsigned int emb = qt.verticesID[idx] ; unsigned int emb = qt.verticesID[idx] ;
FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, emb) ; FunctorSetEmb<typename PFP::MAP, VERTEX> fsetemb(map, emb) ;
map.foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb) ; map.template foreach_dart_of_orbit<PFP::MAP::VERTEX_OF_PARENT>(d, fsetemb) ;
m.mark(d) ; // mark on the fly to unmark on second loop m.mark(d) ; // mark on the fly to unmark on second loop
vecDartsPerVertex[emb].push_back(d) ; // store incident darts for fast adjacency reconstruction vecDartsPerVertex[emb].push_back(d) ; // store incident darts for fast adjacency reconstruction
...@@ -223,11 +222,11 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto ...@@ -223,11 +222,11 @@ bool importMRDAT(typename PFP::MAP& map, const std::string& filename, std::vecto
// darts incident to end vertex of edge // darts incident to end vertex of edge
std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)] ; std::vector<Dart>& vec = vecDartsPerVertex[map.phi1(d)] ;
unsigned int embd = map.getEmbedding<VERTEX>(d) ; unsigned int embd = map.template getEmbedding<VERTEX>(d) ;
Dart good_dart = NIL ; Dart good_dart = NIL ;
for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it) for (typename std::vector<Dart>::iterator it = vec.begin(); it != vec.end() && good_dart == NIL; ++it)
{ {
if (map.getEmbedding<VERTEX>(map.phi1(*it)) == embd) if (map.template getEmbedding<VERTEX>(map.phi1(*it)) == embd)
good_dart = *it ; good_dart = *it ;
} }
......
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