10 template <
class VertexIndexMap,
class EdgeIndexMap>
15 VertexIndexMap vertex_index_map;
16 EdgeIndexMap edge_index_map;
17 std::ostream & stream;
19 VertexIndexMap vertex_index_map,
20 EdgeIndexMap edge_index_map,
21 std::ostream & stream):
22 vertex_index_map(vertex_index_map),
23 edge_index_map(edge_index_map),
28 template <
class Vertex,
class Edge>
29 inline void lazy_path(
double length,
30 std::vector<Vertex> & vpath,
31 std::vector< std::pair<Edge,bool> > & eepath)
33 stream <<
"lazy_path_length " << length << std::endl;
34 stream <<
"lazy_path";
35 for (
unsigned int ui=0; ui<vpath.size(); ui++)
36 stream <<
" " <<
get(vertex_index_map,vpath[ui]);
38 stream <<
"lazy_path_edge";
39 for (
unsigned int ui=0; ui<eepath.size(); ui++)
40 stream <<
" " <<
get(edge_index_map,eepath[ui].first);
42 stream <<
"lazy_path_edge_evaled";
43 for (
unsigned int ui=0; ui<eepath.size(); ui++)
44 if (eepath[ui].second)
53 stream <<
"no_path" << std::endl;
56 inline void path_found()
58 stream <<
"path_found" << std::endl;
62 inline void edge_evaluate(Edge & e,
double e_weight)
64 stream <<
"eval_edge " <<
get(edge_index_map,e)
65 <<
" " << e_weight << std::endl;
69 template <
class VertexIndexMap,
class EdgeIndexMap>
71 make_lazysp_log_visitor(
72 VertexIndexMap vertex_index_map, EdgeIndexMap edge_index_map, std::ostream & stream)
75 vertex_index_map, edge_index_map, stream);
84 boost::chrono::high_resolution_clock::duration & dur_search;
85 boost::chrono::high_resolution_clock::duration & dur_eval;
86 boost::chrono::high_resolution_clock::duration & dur_selector;
87 boost::chrono::high_resolution_clock::duration & dur_selector_notify;
88 boost::chrono::high_resolution_clock::time_point time_begin;
90 boost::chrono::high_resolution_clock::duration & dur_search,
91 boost::chrono::high_resolution_clock::duration & dur_eval,
92 boost::chrono::high_resolution_clock::duration & dur_selector,
93 boost::chrono::high_resolution_clock::duration & dur_selector_notify):
94 dur_search(dur_search), dur_eval(dur_eval),
95 dur_selector(dur_selector), dur_selector_notify(dur_selector_notify)
98 inline void search_begin()
100 time_begin = boost::chrono::high_resolution_clock::now();
102 inline void search_end()
104 dur_search += boost::chrono::high_resolution_clock::now() - time_begin;
106 inline void eval_begin()
108 time_begin = boost::chrono::high_resolution_clock::now();
110 inline void eval_end()
112 dur_eval += boost::chrono::high_resolution_clock::now() - time_begin;
115 inline void selector_begin()
117 time_begin = boost::chrono::high_resolution_clock::now();
120 inline void selector_end()
122 dur_selector += boost::chrono::high_resolution_clock::now() - time_begin;
125 inline void selector_notify_begin()
127 time_begin = boost::chrono::high_resolution_clock::now();
130 inline void selector_notify_end()
132 dur_selector_notify += boost::chrono::high_resolution_clock::now() - time_begin;
Definition: lazysp_log_visitor.h:11
Definition: lazysp_log_visitor.h:81