| 174 | df::coord getRoot(df::coord point, unordered_map<df::coord, df::coord>& rootMap); |
| 175 | |
| 176 | class PointComp { |
| 177 | public: |
| 178 | unordered_map<df::coord, cost_t, PointHash> *pointCost; |
| 179 | PointComp(unordered_map<df::coord, cost_t, PointHash> *p): pointCost(p) { |
| 180 | |
| 181 | } |
| 182 | |
| 183 | int32_t operator()(df::coord p1, df::coord p2) const { |
| 184 | if ( p1 == p2 ) return 0; |
| 185 | auto i1 = pointCost->find(p1); |
| 186 | auto i2 = pointCost->find(p2); |
| 187 | if ( i1 == pointCost->end() && i2 == pointCost->end() ) |
| 188 | return p1 < p2; |
| 189 | if ( i1 == pointCost->end() ) |
| 190 | return true; |
| 191 | if ( i2 == pointCost->end() ) |
| 192 | return false; |
| 193 | cost_t c1 = (*i1).second; |
| 194 | cost_t c2 = (*i2).second; |
| 195 | if ( c1 != c2 ) |
| 196 | return c1 < c2; |
| 197 | return p1 < p2; |
| 198 | } |
| 199 | }; |
| 200 | |
| 201 | //bool important(df::coord pos, map<df::coord, set<Edge> >& edges, df::coord prev, set<df::coord>& importantPoints, set<Edge>& importantEdges); |
| 202 | |