Camargue
io_util.hpp
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
8 #ifndef CMR_GRAPH_IO_HPP
9 #define CMR_GRAPH_IO_HPP
10 
11 #include "graph.hpp"
12 
13 #include <iostream>
14 #include <fstream>
15 #include <vector>
16 #include <string>
17 
18 namespace CMR {
19 namespace util {
20 
22 void write_tour_nodes(const std::vector<int> &tour_nodes,
23  const std::string &tour_nodes_fname);
24 
26 void write_tour_edges(const std::vector<int> &tour_edges,
27  const std::vector<Graph::Edge> &edges,
28  const int node_count,
29  const std::string &tour_edges_fname);
30 
32 void write_lp_edges(const std::vector<int> &lp_elist,
33  const std::vector<double> &lp_ecap,
34  const int node_count,
35  const std::string &lp_edges_fname);
36 
38 void write_xy_coords(const double *x, const double *y, const int ncount,
39  const std::string &xy_coords_fname);
40 
42 void get_tour_nodes(const int node_count, std::vector<int> &tour_nodes,
43  const std::string &tour_nodes_fname);
44 
45 
47 void get_lp_sol(const int node_count, std::vector<int> &support_elist,
48  std::vector<double> &support_ecap,
49  const std::string &lp_sol_fname);
50 
51 }
52 }
53 
54 
55 #endif
void write_xy_coords(const double *x, const double *y, const int ncount, const std::string &xy_coords_fname)
Dumps the xy-coordinates for nodes in a graph.
Definition: io_util.cpp:195
void get_tour_nodes(const int node_count, std::vector< int > &tour_nodes, const std::string &tour_nodes_fname)
Load a tour from file.
Definition: io_util.cpp:241
Header for classes/structures/functions to work with graphs.
void get_lp_sol(const int node_count, std::vector< int > &support_elist, std::vector< double > &support_ecap, const std::string &lp_sol_fname)
Loads an lp solution from file.
Definition: io_util.cpp:328
void write_tour_nodes(const std::vector< int > &tour_nodes, const std::string &tour_nodes_fname)
Writes a tour to file.
Definition: io_util.cpp:34
The namespace for this project.
Definition: abc_nodesel.hpp:20
void write_tour_edges(const std::vector< int > &tour_edges, const std::vector< Graph::Edge > &edges, const int node_count, const std::string &tour_edges_fname)
Writes tour edges to file.
Definition: io_util.cpp:86
void write_lp_edges(const std::vector< int > &lp_elist, const std::vector< double > &lp_ecap, const int node_count, const std::string &lp_edges_fname)
Writes LP edges to file.
Definition: io_util.cpp:144