diff options
Diffstat (limited to 'src/libcola/straightener.h')
| -rw-r--r-- | src/libcola/straightener.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libcola/straightener.h b/src/libcola/straightener.h index 934be45ba..b1ce665f4 100644 --- a/src/libcola/straightener.h +++ b/src/libcola/straightener.h @@ -18,10 +18,10 @@ namespace straightener { xmin=ymin=DBL_MAX; xmax=ymax=-DBL_MAX; for(unsigned i=0;i<n;i++) { - xmin=min(xmin,xs[i]); - xmax=max(xmax,xs[i]); - ymin=min(ymin,ys[i]); - ymax=max(ymax,ys[i]); + xmin = std::min(xmin,xs[i]); + xmax = std::max(xmax,xs[i]); + ymin = std::min(ymin,ys[i]); + ymax = std::max(ymax,ys[i]); } } unsigned n; @@ -35,8 +35,8 @@ namespace straightener { unsigned startNode, endNode; Route* route; double xmin, xmax, ymin, ymax; - vector<unsigned> dummyNodes; - vector<unsigned> path; + std::vector<unsigned> dummyNodes; + std::vector<unsigned> path; Edge(unsigned id, unsigned start, unsigned end, Route* route) : id(id), startNode(start), endNode(end), route(route) { @@ -54,7 +54,7 @@ namespace straightener { if(startNode==n||endNode==n) return true; return false; } - void nodePath(vector<Node*>& nodes); + void nodePath(std::vector<Node*>& nodes); void createRouteFromPath(double* X, double* Y) { Route* r=new Route(path.size()); for(unsigned i=0;i<path.size();i++) { @@ -63,7 +63,7 @@ namespace straightener { } setRoute(r); } - void xpos(double y, vector<double>& xs) { + void xpos(double y, std::vector<double>& xs) { // search line segments for intersection points with y pos for(unsigned i=1;i<route->n;i++) { double ax=route->xs[i-1], bx=route->xs[i], ay=route->ys[i-1], by=route->ys[i]; @@ -74,7 +74,7 @@ namespace straightener { } } } - void ypos(double x, vector<double>& ys) { + void ypos(double x, std::vector<double>& ys) { // search line segments for intersection points with x pos for(unsigned i=1;i<route->n;i++) { double ax=route->xs[i-1], bx=route->xs[i], ay=route->ys[i-1], by=route->ys[i]; @@ -104,8 +104,8 @@ namespace straightener { edge(NULL),dummy(false),weight(-0.1),open(false) { } private: friend void sortNeighbours(Node* v, Node* l, Node* r, - double conjpos, vector<Edge*>& openEdges, - vector<Node*>& L,vector<Node*>& nodes, Dim dim); + double conjpos, std::vector<Edge*>& openEdges, + std::vector<Node*>& L, std::vector<Node*>& nodes, Dim dim); Node(unsigned id, double x, double y, Edge* e) : id(id),x(x),y(y), width(4), height(width), xmin(x-width/2),xmax(x+width/2), @@ -126,8 +126,8 @@ namespace straightener { } }; typedef std::set<Node*,CmpNodePos> NodeSet; - void generateConstraints(vector<Node*>& nodes, vector<Edge*>& edges,vector<SimpleConstraint*>& cs, Dim dim); - void nodePath(Edge& e,vector<Node*>& nodes, vector<unsigned>& path); + void generateConstraints(std::vector<Node*>& nodes, std::vector<Edge*>& edges, std::vector<SimpleConstraint*>& cs, Dim dim); + void nodePath(Edge& e, std::vector<Node*>& nodes, std::vector<unsigned>& path); } #endif |
