tools/lgf-gen.cc
changeset 2619 30fb4d68b0e8
parent 2569 12c2c5c4330b
equal deleted inserted replaced
11:0adf5239244e 12:9efbb0adaba9
   118   double luv=std::sqrt((coords[v]-coords[u]).normSquare());
   118   double luv=std::sqrt((coords[v]-coords[u]).normSquare());
   119   Node u2=u;
   119   Node u2=u;
   120   Node v2=v;
   120   Node v2=v;
   121   do {
   121   do {
   122     Node n;
   122     Node n;
   123     for(IncEdgeIt e(g,v2);(n=g.runningNode(e))==u2;++e);
   123     for(IncEdgeIt e(g,v2);(n=g.runningNode(e))==u2;++e) { }
   124     u2=v2;
   124     u2=v2;
   125     v2=n;
   125     v2=n;
   126     if(luv+std::sqrt((coords[v2]-coords[u2]).normSquare())-EPSILON>
   126     if(luv+std::sqrt((coords[v2]-coords[u2]).normSquare())-EPSILON>
   127        std::sqrt((coords[u]-coords[u2]).normSquare())+
   127        std::sqrt((coords[u]-coords[u2]).normSquare())+
   128        std::sqrt((coords[v]-coords[v2]).normSquare()))
   128        std::sqrt((coords[v]-coords[v2]).normSquare()))