Skip to content
Snippets Groups Projects
Commit e67af6ac authored by Francois Hamonic's avatar Francois Hamonic
Browse files

output python

parent 523b0bf7
Branches
No related tags found
No related merge requests found
No preview for this file type
This diff is collapsed.
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: LEMON, graphToEps()
%%CreationDate: Thu Dec 5 03:27:44 2019
%%CreationDate: Thu Dec 5 03:39:26 2019
%%BoundingBox: -108 -94 108 113
%%EndComments
/lb { setlinewidth setrgbcolor newpath moveto
......@@ -68,41 +68,41 @@ gsave
100 dup scale
%Arcs:
gsave
0 0 0 0.0642791 0 0 0 0.00787469 l
0.312799 0 0 0 0 0 0 0.00787469 l
0.466503 0.297236 0.312799 0 0 0 0 0.00787469 l
0.404061 0.49723 0.466503 0.297236 0 0 0 0.00787469 l
0.196965 0.383206 0 0.0642791 0 0 0 0.00787469 l
0.196965 0.383206 0.312799 0 0 0 0 0.00787469 l
0.196965 0.383206 0.466503 0.297236 0 0 0 0.00787469 l
0.196965 0.383206 0.404061 0.49723 0 0 0 0.00787469 l
0 0.439313 0 0.0642791 0 0 0 0.00787469 l
0 0.439313 0.196965 0.383206 0 0 0 0.00787469 l
-0.951 0.309 0 0.0642791 0 0 0 0.00787469 l
-0.951 0.309 0 0.439313 0 0 0 0.00787469 l
-0.587 -0.809 0 0.0642791 0 0 0 0.00787469 l
0 0 0 0.0680909 0 0 0 0.00787469 l
0.310636 0 0 0 0 0 0 0.00787469 l
0.457636 0.290727 0.310636 0 0 0 0 0.00787469 l
0.402 0.491727 0.457636 0.290727 0 0 0 0.00787469 l
0.201 0.382091 0 0.0680909 0 0 0 0.00787469 l
0.201 0.382091 0.310636 0 0 0 0 0.00787469 l
0.201 0.382091 0.457636 0.290727 0 0 0 0.00787469 l
0.201 0.382091 0.402 0.491727 0 0 0 0.00787469 l
0 0.436909 0 0.0680909 0 0 0 0.00787469 l
0 0.436909 0.201 0.382091 0 0 0 0.00787469 l
-0.951 0.309 0 0.0680909 0 0 0 0.00787469 l
-0.951 0.309 0 0.436909 0 0 0 0.00787469 l
-0.587 -0.809 0 0.0680909 0 0 0 0.00787469 l
-0.587 -0.809 0 0 0 0 0 0.00787469 l
-0.587 -0.809 -0.951 0.309 0 0 0 0.00787469 l
0.587 -0.809 0.312799 0 0 0 0 0.00787469 l
0.587 -0.809 0.310636 0 0 0 0 0.00787469 l
0.587 -0.809 -0.587 -0.809 0 0 0 0.00787469 l
0.951 0.309 0.466503 0.297236 0 0 0 0.00787469 l
0.951 0.309 0.404061 0.49723 0 0 0 0.00787469 l
0.951 0.309 0.457636 0.290727 0 0 0 0.00787469 l
0.951 0.309 0.402 0.491727 0 0 0 0.00787469 l
0.951 0.309 0.587 -0.809 0 0 0 0.00787469 l
0 1 0.404061 0.49723 0 0 0 0.00787469 l
0 1 0.196965 0.383206 0 0 0 0.00787469 l
0 1 0 0.439313 0 0 0 0.00787469 l
0 1 0.402 0.491727 0 0 0 0.00787469 l
0 1 0.201 0.382091 0 0 0 0.00787469 l
0 1 0 0.436909 0 0 0 0.00787469 l
0 1 -0.951 0.309 0 0 0 0.00787469 l
0 1 0.951 0.309 0 0 0 0.00787469 l
grestore
%Nodes:
gsave
0 0.0642791 0.026249 1 1 1 nc
0 0.0680909 0.026249 1 1 1 nc
0 0 0.026249 1 1 1 nc
0.312799 0 0.026249 1 1 1 nc
0.466503 0.297236 0.026249 1 1 1 nc
0.404061 0.49723 0.026249 1 1 1 nc
0.196965 0.383206 0.026249 1 1 1 nc
0 0.439313 0.026249 1 1 1 nc
0.310636 0 0.026249 1 1 1 nc
0.457636 0.290727 0.026249 1 1 1 nc
0.402 0.491727 0.026249 1 1 1 nc
0.201 0.382091 0.026249 1 1 1 nc
0 0.436909 0.026249 1 1 1 nc
-0.951 0.309 0.026249 1 1 1 nc
-0.587 -0.809 0.026249 1 1 1 nc
0.587 -0.809 0.026249 1 1 1 nc
......
No preview for this file type
......@@ -177,12 +177,26 @@ int main (int argc, const char *argv[]) {
const double x_u = solution[x_var(u)];
const double y_u = solution[y_var(u)];
coordsMap[u] = Point_t(x_u, y_u);
std::cout << graph.id(u) << " (" << x_u << ", " << y_u << ")" << std::endl;
}
lemon::graphToEps(graph, "graph.eps").coords(coordsMap).run();
std::cout << "[";
Graph_t::NodeIt u(graph);
Point_t & p = coordsMap[u];
std::cout << "(" << p.x << ", " << p.y << ")";
for(++u; u != lemon::INVALID; ++u) {
p = coordsMap[u];
std::cout << ", (" << p.x << ", " << p.y << ")";
}
std::cout << "]" << std::endl << "[";
Graph_t::EdgeIt e(graph);
std::cout << "(" << graph.id(graph.u(e)) << ", " << graph.id(graph.v(e)) << ")";
for(++e; e != lemon::INVALID; ++e) {
std::cout << ", (" << graph.id(graph.u(e)) << ", " << graph.id(graph.v(e)) << ")";
}
std::cout << "]" << std::endl;
delete solver;
delete solver_builder;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment