+ // Concept Graph:
+ inline int null_vertex() { return -1; }
+
+ // Concept IncidenceGraph:
+ inline int source(int f, const Graph&) { return f&VMASK; }
+ inline int target(int f, const Graph&) {
+ int v2= EDGE_END2(f&VMASK, f>>ESHIFT);
+ //printf("traversed %03x..%02x\n",f,v2);
+ return v2;
+ }
+ inline std::pair<OutEdgeIterator,OutEdgeIterator>
+ out_edges(int v, const Graph&) {
+ return std::make_pair(OutEdgeIterator(v, OutEdgeIterator::voe_min(v)),
+ OutEdgeIterator(v, OutEdgeIterator::voe_max(v)));
+ }
+ inline unsigned out_degree(int v, const Graph&) {
+ return OutEdgeIterator::voe_degree(v);
+ }
+
+ // Concept VertexListGraph:
+ inline
+ std::pair<VertexIterator,VertexIterator> vertices(const Graph&) {
+ return std::make_pair(VertexIterator(0), VertexIterator(N));
+ }
+ inline unsigned num_vertices(const Graph&) { return N; }
+};
+
+static void single_source_shortest_paths(int v1,
+ const double edge_weights[/*f*/],
+ double vertex_distances[/*v*/]) {
+ Graph g;
+
+ dijkstra_shortest_paths(g, v1,
+ weight_map(edge_weights).
+ vertex_index_map(identity_property_map()).
+ distance_map(vertex_distances));