43 #pragma package(smart_init)
74 std::map < MCNode * , int > mapGraphNodeByP;
76 for (std::set<MCNode*>::iterator itP =
_facePoints.begin();
84 mapGraphNodeByP[mcNode]=n->
Id();
87 std::map<MG_FACE*, std::set<MCNode*> > map_listP_by_F;
88 std::map<MG_ARETE*, std::set<MCNode*> > map_listP_by_E;
89 std::map<MG_SOMMET*, std::set<MCNode*> > map_listP_by_V;
91 for (std::set<MCNode*>::iterator itP =
_facePoints.begin();
97 itF !=
P->GetRefFaceMapping().end();
102 if (
P->GetRefVertexMapping().size() <=1 ||
P->RefTopoIsInFace(F) )
104 if (map_listP_by_F.find(F) == map_listP_by_F.end())
108 std::set<MCNode*> listP;
110 map_listP_by_F.insert(std::make_pair(F,listP));
118 map_listP_by_F[F].insert(
P);
123 itE !=
P->GetRefEdgeMapping().end();
128 if (
P->GetRefVertexMapping().size() <=1 ||
P->RefTopoIsInEdge(E) )
130 if (map_listP_by_E.find(E) == map_listP_by_E.end())
134 std::set<MCNode*> listP;
136 map_listP_by_E.insert(std::make_pair(E,listP));
144 map_listP_by_E[E].insert(
P);
149 itV !=
P->GetRefVertexMapping().end();
154 if (map_listP_by_V.find(
V) == map_listP_by_V.end())
158 std::set<MCNode*> listP;
160 map_listP_by_V.insert(std::make_pair(
V,listP));
168 map_listP_by_V[
V].insert(
P);
175 double ShortestPath::Find(std::vector <MCNode *> * __shortestPathNodes, std::vector <MG_ELEMENT_TOPOLOGIQUE *> * __shortestPathTopo)
177 std::vector <Graph::Node *> path;
178 std::vector <Graph::Arc *> pathArcs;
193 for (
unsigned i=0; i<path.size();i++)
196 if (__shortestPathNodes)
198 for (
unsigned i=0; i<path.size();i++)
201 __shortestPathNodes->push_back(mcNode);
205 if (__shortestPathTopo)
207 for (
unsigned i=0; i<pathArcs.size();i++)
210 __shortestPathTopo->push_back(topo);