summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/graph/example
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/graph/example
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/graph/example')
-rw-r--r--src/boost/libs/graph/example/Jamfile.v2226
-rw-r--r--src/boost/libs/graph/example/accum-compile-times.cpp100
-rw-r--r--src/boost/libs/graph/example/actor_clustering.cpp219
-rw-r--r--src/boost/libs/graph/example/adj_list_ra_edgelist.cpp36
-rw-r--r--src/boost/libs/graph/example/adjacency_list.cpp111
-rw-r--r--src/boost/libs/graph/example/adjacency_list.expected15
-rw-r--r--src/boost/libs/graph/example/adjacency_list_io.cpp113
-rw-r--r--src/boost/libs/graph/example/adjacency_matrix.cpp75
-rw-r--r--src/boost/libs/graph/example/astar-cities.cpp237
-rw-r--r--src/boost/libs/graph/example/astar_maze.cpp344
-rw-r--r--src/boost/libs/graph/example/bcsstk0196
-rw-r--r--src/boost/libs/graph/example/bcsstk01.rsa78
-rw-r--r--src/boost/libs/graph/example/bellman-example.cpp134
-rw-r--r--src/boost/libs/graph/example/bellman-ford-internet.cpp70
-rw-r--r--src/boost/libs/graph/example/bellman_ford.expected5
-rw-r--r--src/boost/libs/graph/example/bfs-example.cpp95
-rw-r--r--src/boost/libs/graph/example/bfs-example2.cpp119
-rw-r--r--src/boost/libs/graph/example/bfs-name-printer.cpp92
-rw-r--r--src/boost/libs/graph/example/bfs.cpp159
-rw-r--r--src/boost/libs/graph/example/bfs.expected16
-rw-r--r--src/boost/libs/graph/example/bfs_basics.expected2
-rw-r--r--src/boost/libs/graph/example/bfs_neighbor.cpp150
-rw-r--r--src/boost/libs/graph/example/biconnected_components.cpp75
-rw-r--r--src/boost/libs/graph/example/bipartite_example.cpp125
-rw-r--r--src/boost/libs/graph/example/boost_web.dat34
-rw-r--r--src/boost/libs/graph/example/boost_web_graph.cpp220
-rw-r--r--src/boost/libs/graph/example/boost_web_graph.expected37
-rw-r--r--src/boost/libs/graph/example/boykov_kolmogorov-eg.cpp114
-rw-r--r--src/boost/libs/graph/example/bron_kerbosch_clique_number.cpp37
-rw-r--r--src/boost/libs/graph/example/bron_kerbosch_print_cliques.cpp71
-rw-r--r--src/boost/libs/graph/example/bucket_sorter.cpp115
-rw-r--r--src/boost/libs/graph/example/canonical_ordering.cpp80
-rw-r--r--src/boost/libs/graph/example/cc-internet.cpp47
-rw-r--r--src/boost/libs/graph/example/city_visitor.cpp148
-rw-r--r--src/boost/libs/graph/example/closeness_centrality.cpp85
-rw-r--r--src/boost/libs/graph/example/clustering_coefficient.cpp68
-rw-r--r--src/boost/libs/graph/example/comm_network.graph12
-rw-r--r--src/boost/libs/graph/example/components_on_edgelist.cpp93
-rw-r--r--src/boost/libs/graph/example/components_on_edgelist.expected14
-rw-r--r--src/boost/libs/graph/example/concept_checks.expected0
-rw-r--r--src/boost/libs/graph/example/connected-components.cpp38
-rw-r--r--src/boost/libs/graph/example/connected_components.cpp62
-rw-r--r--src/boost/libs/graph/example/connected_components.expected8
-rw-r--r--src/boost/libs/graph/example/container_gen.cpp50
-rw-r--r--src/boost/libs/graph/example/container_gen.expected0
-rw-r--r--src/boost/libs/graph/example/copy-example.cpp54
-rw-r--r--src/boost/libs/graph/example/csr-example.cpp61
-rw-r--r--src/boost/libs/graph/example/cuthill_mckee_ordering.cpp138
-rw-r--r--src/boost/libs/graph/example/cuthill_mckee_ordering.expected8
-rw-r--r--src/boost/libs/graph/example/cycle-file-dep.cpp94
-rw-r--r--src/boost/libs/graph/example/cycle-file-dep2.cpp133
-rw-r--r--src/boost/libs/graph/example/cycle_canceling_example.cpp27
-rw-r--r--src/boost/libs/graph/example/cycle_ratio_example.cpp85
-rw-r--r--src/boost/libs/graph/example/dag_shortest_paths.cpp78
-rw-r--r--src/boost/libs/graph/example/data1.txt12
-rw-r--r--src/boost/libs/graph/example/data2.txt16
-rw-r--r--src/boost/libs/graph/example/data3.txt12
-rw-r--r--src/boost/libs/graph/example/dave.cpp238
-rw-r--r--src/boost/libs/graph/example/dave.expected24
-rw-r--r--src/boost/libs/graph/example/default-constructor.cpp45
-rw-r--r--src/boost/libs/graph/example/default-constructor2.cpp48
-rw-r--r--src/boost/libs/graph/example/degree_centrality.cpp66
-rw-r--r--src/boost/libs/graph/example/dfs-example.cpp104
-rw-r--r--src/boost/libs/graph/example/dfs-parenthesis.cpp53
-rw-r--r--src/boost/libs/graph/example/dfs.cpp124
-rw-r--r--src/boost/libs/graph/example/dfs.expected20
-rw-r--r--src/boost/libs/graph/example/dfs_basics.expected2
-rw-r--r--src/boost/libs/graph/example/dfs_parenthesis.cpp69
-rw-r--r--src/boost/libs/graph/example/dfs_parenthesis.expected2
-rw-r--r--src/boost/libs/graph/example/dijkstra-example-listS.cpp103
-rw-r--r--src/boost/libs/graph/example/dijkstra-example.cpp89
-rw-r--r--src/boost/libs/graph/example/dijkstra-no-color-map-example.cpp93
-rw-r--r--src/boost/libs/graph/example/dijkstra.expected13
-rw-r--r--src/boost/libs/graph/example/directed_graph.cpp27
-rw-r--r--src/boost/libs/graph/example/eccentricity.cpp88
-rw-r--r--src/boost/libs/graph/example/edge-connectivity.cpp186
-rw-r--r--src/boost/libs/graph/example/edge-function.cpp146
-rw-r--r--src/boost/libs/graph/example/edge-iter-constructor.cpp49
-rw-r--r--src/boost/libs/graph/example/edge_basics.cpp83
-rw-r--r--src/boost/libs/graph/example/edge_basics.expected1
-rw-r--r--src/boost/libs/graph/example/edge_coloring.cpp75
-rw-r--r--src/boost/libs/graph/example/edge_connectivity.cpp63
-rw-r--r--src/boost/libs/graph/example/edge_iterator_constructor.cpp120
-rw-r--r--src/boost/libs/graph/example/edge_iterator_constructor.dat12
-rw-r--r--src/boost/libs/graph/example/edge_property.cpp165
-rw-r--r--src/boost/libs/graph/example/edge_property.expected38
-rw-r--r--src/boost/libs/graph/example/edmonds-karp-eg.cpp96
-rw-r--r--src/boost/libs/graph/example/exterior_properties.cpp123
-rw-r--r--src/boost/libs/graph/example/exterior_properties.expected18
-rw-r--r--src/boost/libs/graph/example/exterior_property_map.cpp93
-rw-r--r--src/boost/libs/graph/example/exterior_property_map.expected11
-rw-r--r--src/boost/libs/graph/example/family_tree.cpp61
-rw-r--r--src/boost/libs/graph/example/family_tree.expected7
-rw-r--r--src/boost/libs/graph/example/fibonacci_heap.cpp86
-rw-r--r--src/boost/libs/graph/example/fibonacci_heap.expected1
-rw-r--r--src/boost/libs/graph/example/figs/cc-internet.dot67
-rw-r--r--src/boost/libs/graph/example/figs/dfs-example.dot28
-rw-r--r--src/boost/libs/graph/example/figs/edge-connectivity.dot21
-rw-r--r--src/boost/libs/graph/example/figs/ospf-graph.dot96
-rw-r--r--src/boost/libs/graph/example/figs/scc.dot33
-rw-r--r--src/boost/libs/graph/example/figs/telephone-network.dot42
-rw-r--r--src/boost/libs/graph/example/file_dependencies.cpp198
-rw-r--r--src/boost/libs/graph/example/file_dependencies.expected28
-rw-r--r--src/boost/libs/graph/example/filtered-copy-example.cpp74
-rw-r--r--src/boost/libs/graph/example/filtered_graph.cpp77
-rw-r--r--src/boost/libs/graph/example/filtered_graph.expected7
-rw-r--r--src/boost/libs/graph/example/filtered_graph_edge_range.cpp88
-rw-r--r--src/boost/libs/graph/example/filtered_vec_as_graph.cpp68
-rw-r--r--src/boost/libs/graph/example/fr_layout.cpp158
-rw-r--r--src/boost/libs/graph/example/gerdemann.cpp164
-rw-r--r--src/boost/libs/graph/example/gerdemann.expected13
-rw-r--r--src/boost/libs/graph/example/girth.cpp162
-rw-r--r--src/boost/libs/graph/example/graph-assoc-types.cpp98
-rw-r--r--src/boost/libs/graph/example/graph-property-iter-eg.cpp34
-rw-r--r--src/boost/libs/graph/example/graph-thingie.cpp108
-rw-r--r--src/boost/libs/graph/example/graph.cpp165
-rw-r--r--src/boost/libs/graph/example/graph_as_tree.cpp65
-rw-r--r--src/boost/libs/graph/example/graph_property.cpp34
-rw-r--r--src/boost/libs/graph/example/graphviz.cpp79
-rw-r--r--src/boost/libs/graph/example/graphviz_example.dot7
-rw-r--r--src/boost/libs/graph/example/graphviz_test.dot39
-rw-r--r--src/boost/libs/graph/example/grid_graph_example.cpp91
-rw-r--r--src/boost/libs/graph/example/grid_graph_properties.cpp42
-rw-r--r--src/boost/libs/graph/example/hawick_circuits.cpp94
-rw-r--r--src/boost/libs/graph/example/helper.hpp122
-rw-r--r--src/boost/libs/graph/example/implicit_graph.cpp564
-rw-r--r--src/boost/libs/graph/example/in_edges.cpp54
-rw-r--r--src/boost/libs/graph/example/in_edges.expected5
-rw-r--r--src/boost/libs/graph/example/inclusive_mean_geodesic.cpp153
-rw-r--r--src/boost/libs/graph/example/incremental-components-eg.cpp86
-rw-r--r--src/boost/libs/graph/example/incremental_components.cpp120
-rw-r--r--src/boost/libs/graph/example/incremental_components.expected18
-rw-r--r--src/boost/libs/graph/example/influence_prestige.cpp73
-rw-r--r--src/boost/libs/graph/example/info_network.graph11
-rw-r--r--src/boost/libs/graph/example/interior_pmap_bundled.cpp92
-rw-r--r--src/boost/libs/graph/example/interior_property_map.cpp112
-rw-r--r--src/boost/libs/graph/example/interior_property_map.expected12
-rw-r--r--src/boost/libs/graph/example/iohb.c1610
-rw-r--r--src/boost/libs/graph/example/iohb.h70
-rw-r--r--src/boost/libs/graph/example/isomorphism.cpp95
-rw-r--r--src/boost/libs/graph/example/iteration_macros.cpp65
-rw-r--r--src/boost/libs/graph/example/iterator-property-map-eg.cpp21
-rw-r--r--src/boost/libs/graph/example/johnson-eg.cpp83
-rw-r--r--src/boost/libs/graph/example/johnson.expected7
-rw-r--r--src/boost/libs/graph/example/kevin-bacon.cpp124
-rw-r--r--src/boost/libs/graph/example/kevin-bacon.dat50
-rw-r--r--src/boost/libs/graph/example/kevin-bacon2.cpp109
-rw-r--r--src/boost/libs/graph/example/kevin-bacon2.dat1
-rw-r--r--src/boost/libs/graph/example/kevin-bacon2.expected51
-rw-r--r--src/boost/libs/graph/example/kevin_bacon.expected101
-rw-r--r--src/boost/libs/graph/example/king_ordering.cpp138
-rw-r--r--src/boost/libs/graph/example/knights_tour.cpp286
-rw-r--r--src/boost/libs/graph/example/knights_tour.expected8
-rw-r--r--src/boost/libs/graph/example/kruskal-example.cpp75
-rw-r--r--src/boost/libs/graph/example/kruskal-telephone.cpp69
-rw-r--r--src/boost/libs/graph/example/kruskal.expected5
-rw-r--r--src/boost/libs/graph/example/kuratowski_subgraph.cpp85
-rw-r--r--src/boost/libs/graph/example/labeled_graph.cpp74
-rw-r--r--src/boost/libs/graph/example/last-mod-time.cpp113
-rw-r--r--src/boost/libs/graph/example/leda-concept-check.cpp21
-rw-r--r--src/boost/libs/graph/example/leda-graph-eg.cpp27
-rw-r--r--src/boost/libs/graph/example/leda-regression.cfg10
-rw-r--r--src/boost/libs/graph/example/loops_dfs.cpp205
-rw-r--r--src/boost/libs/graph/example/make_biconnected_planar.cpp95
-rw-r--r--src/boost/libs/graph/example/make_connected.cpp51
-rw-r--r--src/boost/libs/graph/example/make_maximal_planar.cpp119
-rw-r--r--src/boost/libs/graph/example/makefile-dependencies.dat20
-rw-r--r--src/boost/libs/graph/example/makefile-target-names.dat15
-rw-r--r--src/boost/libs/graph/example/matching_example.cpp125
-rw-r--r--src/boost/libs/graph/example/max_flow.cpp98
-rw-r--r--src/boost/libs/graph/example/max_flow.dat25
-rw-r--r--src/boost/libs/graph/example/max_flow.expected24
-rw-r--r--src/boost/libs/graph/example/max_flow2.dat4
-rw-r--r--src/boost/libs/graph/example/max_flow3.dat46
-rw-r--r--src/boost/libs/graph/example/max_flow4.dat104
-rw-r--r--src/boost/libs/graph/example/max_flow5.dat6004
-rw-r--r--src/boost/libs/graph/example/max_flow6.dat404
-rw-r--r--src/boost/libs/graph/example/max_flow7.dat10004
-rw-r--r--src/boost/libs/graph/example/max_flow8.dat8004
-rw-r--r--src/boost/libs/graph/example/max_flow9.dat10004
-rw-r--r--src/boost/libs/graph/example/mcgregor_subgraphs_example.cpp152
-rw-r--r--src/boost/libs/graph/example/mean_geodesic.cpp88
-rw-r--r--src/boost/libs/graph/example/miles_span.cpp126
-rw-r--r--src/boost/libs/graph/example/miles_span.expected2
-rw-r--r--src/boost/libs/graph/example/min_max_paths.cpp106
-rw-r--r--src/boost/libs/graph/example/minimum_degree_ordering.cpp199
-rw-r--r--src/boost/libs/graph/example/modify_graph.cpp208
-rw-r--r--src/boost/libs/graph/example/modify_graph.expected0
-rw-r--r--src/boost/libs/graph/example/neighbor_bfs.cpp149
-rw-r--r--src/boost/libs/graph/example/ordered_out_edges.cpp147
-rw-r--r--src/boost/libs/graph/example/ordered_out_edges.expected10
-rw-r--r--src/boost/libs/graph/example/ospf-example.cpp118
-rw-r--r--src/boost/libs/graph/example/parallel-compile-time.cpp199
-rw-r--r--src/boost/libs/graph/example/planar_face_traversal.cpp99
-rw-r--r--src/boost/libs/graph/example/prim-example.cpp56
-rw-r--r--src/boost/libs/graph/example/prim-telephone.cpp72
-rw-r--r--src/boost/libs/graph/example/prim.expected9
-rw-r--r--src/boost/libs/graph/example/print-adjacent-vertices.cpp118
-rw-r--r--src/boost/libs/graph/example/print-edges.cpp89
-rw-r--r--src/boost/libs/graph/example/print-in-edges.cpp117
-rw-r--r--src/boost/libs/graph/example/print-out-edges.cpp118
-rw-r--r--src/boost/libs/graph/example/prism_3_2.graph16
-rw-r--r--src/boost/libs/graph/example/prob_network.graph18
-rw-r--r--src/boost/libs/graph/example/property-map-traits-eg.cpp24
-rw-r--r--src/boost/libs/graph/example/property_iterator.cpp129
-rw-r--r--src/boost/libs/graph/example/push-relabel-eg.cpp87
-rw-r--r--src/boost/libs/graph/example/put-get-helper-eg.cpp60
-rw-r--r--src/boost/libs/graph/example/quick-tour.cpp105
-rw-r--r--src/boost/libs/graph/example/quick_tour.cpp156
-rw-r--r--src/boost/libs/graph/example/quick_tour.expected22
-rw-r--r--src/boost/libs/graph/example/r_c_shortest_paths_example.cpp332
-rw-r--r--src/boost/libs/graph/example/reachable-loop-head.cpp105
-rw-r--r--src/boost/libs/graph/example/reachable-loop-tail.cpp76
-rw-r--r--src/boost/libs/graph/example/read_graphviz.cpp61
-rw-r--r--src/boost/libs/graph/example/read_write_dimacs-eg.cpp133
-rw-r--r--src/boost/libs/graph/example/regression.cfg114
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_bidir.cpp101
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_bidir.expected19
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_dir.cpp69
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_dir.expected16
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_undir.cpp99
-rw-r--r--src/boost/libs/graph/example/remove_edge_if_undir.expected19
-rw-r--r--src/boost/libs/graph/example/reverse_graph.cpp49
-rw-r--r--src/boost/libs/graph/example/reverse_graph.expected13
-rw-r--r--src/boost/libs/graph/example/roget_components.cpp146
-rw-r--r--src/boost/libs/graph/example/scaled_closeness_centrality.cpp114
-rw-r--r--src/boost/libs/graph/example/scc.cpp48
-rw-r--r--src/boost/libs/graph/example/scc.dot33
-rw-r--r--src/boost/libs/graph/example/sgb-regression.cfg11
-rw-r--r--src/boost/libs/graph/example/simple_planarity_test.cpp67
-rw-r--r--src/boost/libs/graph/example/sloan_ordering.cpp234
-rw-r--r--src/boost/libs/graph/example/social_network.graph12
-rw-r--r--src/boost/libs/graph/example/stoer_wagner.cpp83
-rw-r--r--src/boost/libs/graph/example/straight_line_drawing.cpp110
-rw-r--r--src/boost/libs/graph/example/strong-components.cpp39
-rw-r--r--src/boost/libs/graph/example/strong_components.cpp86
-rw-r--r--src/boost/libs/graph/example/strong_components.expected23
-rw-r--r--src/boost/libs/graph/example/subgraph.cpp106
-rw-r--r--src/boost/libs/graph/example/subgraph.expected20
-rw-r--r--src/boost/libs/graph/example/subgraph_properties.cpp147
-rw-r--r--src/boost/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp27
-rw-r--r--src/boost/libs/graph/example/target-compile-costs.dat15
-rw-r--r--src/boost/libs/graph/example/tc.dot13
-rw-r--r--src/boost/libs/graph/example/test-astar-cities.dot36
-rw-r--r--src/boost/libs/graph/example/tiernan_girth_circumference.cpp39
-rw-r--r--src/boost/libs/graph/example/tiernan_print_cycles.cpp66
-rw-r--r--src/boost/libs/graph/example/topo-sort-file-dep.cpp91
-rw-r--r--src/boost/libs/graph/example/topo-sort-file-dep2.cpp134
-rw-r--r--src/boost/libs/graph/example/topo-sort-with-leda.cpp53
-rw-r--r--src/boost/libs/graph/example/topo-sort-with-sgb.cpp46
-rw-r--r--src/boost/libs/graph/example/topo-sort1.cpp44
-rw-r--r--src/boost/libs/graph/example/topo-sort2.cpp44
-rw-r--r--src/boost/libs/graph/example/topo_sort.cpp70
-rw-r--r--src/boost/libs/graph/example/topo_sort.expected1
-rw-r--r--src/boost/libs/graph/example/transitive_closure.cpp49
-rw-r--r--src/boost/libs/graph/example/transpose-example.cpp57
-rw-r--r--src/boost/libs/graph/example/two_graphs_common_spanning_trees.cpp72
-rw-r--r--src/boost/libs/graph/example/undirected_adjacency_list.cpp113
-rw-r--r--src/boost/libs/graph/example/undirected_adjacency_list.expected9
-rw-r--r--src/boost/libs/graph/example/undirected_dfs.cpp79
-rw-r--r--src/boost/libs/graph/example/undirected_graph.cpp30
-rw-r--r--src/boost/libs/graph/example/vector_as_graph.cpp48
-rw-r--r--src/boost/libs/graph/example/vector_as_graph.expected2
-rw-r--r--src/boost/libs/graph/example/vertex-name-property.cpp86
-rw-r--r--src/boost/libs/graph/example/vertex_basics.cpp154
-rw-r--r--src/boost/libs/graph/example/vertex_basics.expected26
-rw-r--r--src/boost/libs/graph/example/vf2_sub_graph_iso_example.cpp52
-rw-r--r--src/boost/libs/graph/example/vf2_sub_graph_iso_multi_example.cpp95
-rw-r--r--src/boost/libs/graph/example/visitor.cpp102
-rw-r--r--src/boost/libs/graph/example/visitor.expected21
-rw-r--r--src/boost/libs/graph/example/weighted_matching_example.cpp121
-rw-r--r--src/boost/libs/graph/example/write_graphviz.cpp62
272 files changed, 56777 insertions, 0 deletions
diff --git a/src/boost/libs/graph/example/Jamfile.v2 b/src/boost/libs/graph/example/Jamfile.v2
new file mode 100644
index 000000000..f1bc9d994
--- /dev/null
+++ b/src/boost/libs/graph/example/Jamfile.v2
@@ -0,0 +1,226 @@
+# Copyright (C) 2007-2009 Andrew Sutton
+#
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+import ../../config/checks/config : requires ;
+import modules ;
+import path ;
+
+path-constant TEST_DIR : . ;
+
+run accum-compile-times.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ;
+exe actor_clustering : actor_clustering.cpp ;
+run adj_list_ra_edgelist.cpp ;
+run adjacency_list.cpp ;
+run adjacency_list_io.cpp ;
+run adjacency_matrix.cpp ;
+run astar-cities.cpp ;
+run astar_maze.cpp ;
+run bellman-example.cpp ;
+run bellman-ford-internet.cpp ;
+run bfs.cpp ;
+run bfs_neighbor.cpp ;
+run bfs-example.cpp ;
+run bfs-example2.cpp ;
+run bfs-name-printer.cpp ;
+run biconnected_components.cpp ;
+run bipartite_example.cpp ;
+run boost_web_graph.cpp : $(TEST_DIR)/boost_web.dat ;
+exe boykov_kolmogorov-eg : boykov_kolmogorov-eg.cpp ;
+exe bron_kerbosch_clique_number : bron_kerbosch_clique_number.cpp ;
+exe bron_kerbosch_print_cliques : bron_kerbosch_print_cliques.cpp ;
+run bucket_sorter.cpp ;
+run canonical_ordering.cpp ;
+run city_visitor.cpp ;
+exe closeness_centrality : closeness_centrality.cpp ;
+exe clustering_coefficient : clustering_coefficient.cpp ;
+run components_on_edgelist.cpp ;
+run connected_components.cpp ;
+run connected-components.cpp ;
+run container_gen.cpp ;
+run copy-example.cpp ;
+run csr-example.cpp ;
+run cuthill_mckee_ordering.cpp ;
+run cycle_canceling_example.cpp ;
+run cycle_ratio_example.cpp ;
+run cycle-file-dep.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run cycle-file-dep2.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run dag_shortest_paths.cpp ;
+run dave.cpp ;
+run default-constructor.cpp : $(TEST_DIR)/makefile-dependencies.dat ;
+run default-constructor2.cpp : $(TEST_DIR)/makefile-dependencies.dat ;
+exe degree_centrality : degree_centrality.cpp ;
+run dfs.cpp ;
+run dfs_parenthesis.cpp ;
+run dfs-example.cpp ;
+run dijkstra-example.cpp ;
+run dijkstra-example-listS.cpp ;
+run dijkstra-no-color-map-example.cpp ;
+run directed_graph.cpp ;
+exe eccentricity : eccentricity.cpp ;
+run edge_basics.cpp ;
+run edge_coloring.cpp ;
+run edge_iterator_constructor.cpp : $(TEST_DIR)/edge_iterator_constructor.dat ;
+run edge_property.cpp ;
+run edge-function.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run edge-iter-constructor.cpp : $(TEST_DIR)/makefile-dependencies.dat ;
+exe edmonds-karp-eg : edmonds-karp-eg.cpp ;
+run exterior_properties.cpp ;
+run exterior_property_map.cpp ;
+run family_tree.cpp ;
+run fibonacci_heap.cpp ;
+run file_dependencies.cpp ;
+run filtered_graph.cpp ;
+run filtered_graph_edge_range.cpp ;
+run filtered_vec_as_graph.cpp ;
+run filtered-copy-example.cpp ;
+exe fr_layout : fr_layout.cpp ;
+run gerdemann.cpp ;
+run graph.cpp ;
+run graph_as_tree.cpp ;
+run graph_property.cpp ;
+run graph-assoc-types.cpp ;
+run graph-property-iter-eg.cpp ;
+run graph-thingie.cpp ../build//boost_graph ;
+run graphviz.cpp ../build//boost_graph : $(TEST_DIR)/graphviz_example.dot ;
+run grid_graph_example.cpp ;
+run grid_graph_properties.cpp ;
+exe hawick_circuits : hawick_circuits.cpp ;
+run implicit_graph.cpp ;
+run in_edges.cpp ;
+exe inclusive_mean_geodesic : inclusive_mean_geodesic.cpp ;
+run incremental_components.cpp ;
+run incremental-components-eg.cpp ;
+exe influence_prestige : influence_prestige.cpp ;
+run interior_pmap_bundled.cpp ;
+run interior_property_map.cpp ;
+run isomorphism.cpp ;
+run iteration_macros.cpp ;
+run iterator-property-map-eg.cpp ;
+run johnson-eg.cpp ;
+run kevin-bacon.cpp : $(TEST_DIR)/kevin-bacon.dat ;
+run king_ordering.cpp ;
+run knights_tour.cpp ;
+run kruskal-example.cpp ;
+run kuratowski_subgraph.cpp ;
+run make_biconnected_planar.cpp ;
+run make_connected.cpp ;
+run make_maximal_planar.cpp ;
+run matching_example.cpp ;
+exe max_flow : max_flow.cpp ;
+run mcgregor_subgraphs_example.cpp ;
+exe mean_geodesic : mean_geodesic.cpp ;
+exe minimum_degree_ordering : minimum_degree_ordering.cpp ;
+run modify_graph.cpp ;
+run neighbor_bfs.cpp ;
+run ospf-example.cpp ../build//boost_graph : $(TEST_DIR)/figs/ospf-graph.dot $(TEST_DIR)/figs/ospf-sptree.dot $(TEST_DIR)/routing-table.dat ;
+run parallel-compile-time.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat $(TEST_DIR)/target-compile-costs.dat ;
+run planar_face_traversal.cpp ;
+run prim-example.cpp ;
+run print-adjacent-vertices.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run print-edges.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run print-in-edges.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run print-out-edges.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+exe property_iterator : property_iterator.cpp ;
+run property-map-traits-eg.cpp ;
+exe push-relable : push-relabel-eg.cpp ;
+run put-get-helper-eg.cpp ;
+run quick_tour.cpp ;
+run quick-tour.cpp ;
+run r_c_shortest_paths_example.cpp ;
+run read_graphviz.cpp ../build//boost_graph ;
+exe read_write_dimacs : read_write_dimacs-eg.cpp ;
+run remove_edge_if_bidir.cpp ;
+run remove_edge_if_dir.cpp ;
+run remove_edge_if_undir.cpp ;
+run reverse_graph.cpp ;
+exe scaled_closeness_centrality : scaled_closeness_centrality.cpp ;
+run simple_planarity_test.cpp ;
+run sloan_ordering.cpp ;
+run stoer_wagner.cpp ;
+run straight_line_drawing.cpp ;
+run strong-components.cpp ;
+run subgraph.cpp ;
+run subgraph_properties.cpp ;
+run successive_shortest_path_nonnegative_weights_example.cpp ;
+exe tiernan_girth_circumference : tiernan_girth_circumference.cpp ;
+exe tiernan_print_cycles : tiernan_print_cycles.cpp ;
+run topo_sort.cpp ;
+run topo-sort1.cpp ;
+run topo-sort2.cpp ;
+run topo-sort-file-dep.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run topo-sort-file-dep2.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run transitive_closure.cpp ;
+run transpose-example.cpp ;
+run two_graphs_common_spanning_trees.cpp ;
+run undirected_adjacency_list.cpp ;
+run undirected_dfs.cpp ;
+run undirected_graph.cpp ;
+run vector_as_graph.cpp ;
+run vertex_basics.cpp ;
+run vertex-name-property.cpp : $(TEST_DIR)/makefile-dependencies.dat $(TEST_DIR)/makefile-target-names.dat ;
+run vf2_sub_graph_iso_example.cpp ;
+run vf2_sub_graph_iso_multi_example.cpp ;
+run visitor.cpp ;
+run write_graphviz.cpp ;
+
+#
+# These require LEDA:
+#
+run leda-graph-eg.cpp ;
+run leda-concept-check.cpp ;
+run topo-sort-with-leda.cpp ;
+explicit leda-graph-eg ;
+explicit leda-concept-check ;
+explicit topo-sort-with-leda ;
+
+#
+# These require standford-graph:
+#
+run miles_span.cpp ;
+explicit miles_span ;
+run roget_components.cpp ;
+explicit roget_components ;
+run topo-sort-with-sgb.cpp ;
+explicit topo-sort-with-sgb ;
+run girth.cpp ;
+explicit girth ;
+
+#
+# This example appears incorrect:
+#
+#run min_max_paths.cpp ;
+
+#
+# These all use an interface that has been removed:
+#
+#run kruskal-telephone.cpp ;
+#run loops_dfs.cpp ;
+#run scc.cpp ;
+#run reachable-loop-head.cpp ;
+#run cc-internet.cpp ;
+#run reachable-loop-tail.cpp ;
+#run prim-telephone.cpp ;
+#run dfs-parenthesis.cpp ;
+#run edge_connectivity.cpp ;
+#run edge-connectivity.cpp ;
+#
+# These compile, but still use the old graphviz interface and die and runtime:
+# run strong_components.cpp ../build//boost_graph ;
+
+
+#
+# Use API that's not defined for this graph type, clear bug?
+#
+# run labeled_graph.cpp ;
+#
+# This one crashes at runtime:
+#
+# run kevin-bacon2.cpp /boost/serialization//boost_serialization : $(TEST_DIR)/kevin-bacon.dat ;
+# Crashes with msvc-12.0:
+# run last-mod-time.cpp : $(TEST_DIR)/makefile-dependencies.dat ;
+#
+# This one dereferences a null-iterator:
+#
+# run ordered_out_edges.cpp ;
diff --git a/src/boost/libs/graph/example/accum-compile-times.cpp b/src/boost/libs/graph/example/accum-compile-times.cpp
new file mode 100644
index 000000000..cc0d48fd8
--- /dev/null
+++ b/src/boost/libs/graph/example/accum-compile-times.cpp
@@ -0,0 +1,100 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <numeric>
+#include <iterator>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/property_iter_range.hpp>
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+namespace boost
+{
+enum vertex_compile_cost_t
+{
+ vertex_compile_cost
+};
+BOOST_INSTALL_PROPERTY(vertex, compile_cost);
+}
+
+using namespace boost;
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ listS, // Store vertex set in a std::list
+ directedS, // The file dependency graph is directed
+ // vertex properties
+ property< vertex_name_t, std::string,
+ property< vertex_compile_cost_t, float,
+ property< vertex_distance_t, float,
+ property< vertex_color_t, default_color_type > > > >,
+ // an edge property
+ property< edge_weight_t, float > >
+ file_dep_graph2;
+
+typedef graph_traits< file_dep_graph2 >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph2 >::edge_descriptor edge_t;
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph2 >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // std::istream_iterator causes trouble with VC++
+ std::vector< vertex_t > id2vertex;
+ file_dep_graph2 g;
+ for (std::size_t i = 0; i < n_vertices; ++i)
+ id2vertex.push_back(add_vertex(g));
+ std::pair< size_type, size_type > p;
+ while (file_in >> p)
+ add_edge(id2vertex[p.first], id2vertex[p.second], g);
+#else
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+ file_dep_graph2 g(input_begin, input_end, n_vertices);
+#endif
+
+ typedef property_map< file_dep_graph2, vertex_name_t >::type name_map_t;
+ typedef property_map< file_dep_graph2, vertex_compile_cost_t >::type
+ compile_cost_map_t;
+
+ name_map_t name_map = get(vertex_name, g);
+ compile_cost_map_t compile_cost_map = get(vertex_compile_cost, g);
+
+ std::ifstream name_in(argc >= 3 ? argv[2] : "makefile-target-names.dat");
+ std::ifstream compile_cost_in(
+ argc >= 4 ? argv[3] : "target-compile-costs.dat");
+ graph_traits< file_dep_graph2 >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ name_in >> name_map[*vi];
+ compile_cost_in >> compile_cost_map[*vi];
+ }
+
+ graph_property_iter_range< file_dep_graph2,
+ vertex_compile_cost_t >::iterator ci,
+ ci_end;
+ boost::tie(ci, ci_end) = get_property_iter_range(g, vertex_compile_cost);
+ std::cout << "total (sequential) compile time: "
+ << std::accumulate(ci, ci_end, 0.0) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/actor_clustering.cpp b/src/boost/libs/graph/example/actor_clustering.cpp
new file mode 100644
index 000000000..5564a9e9c
--- /dev/null
+++ b/src/boost/libs/graph/example/actor_clustering.cpp
@@ -0,0 +1,219 @@
+// Copyright 2004 The Trustees of Indiana University.
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Authors: Douglas Gregor
+// Andrew Lumsdaine
+
+// This program performs betweenness centrality (BC) clustering on the
+// actor collaboration graph available at
+// http://www.nd.edu/~networks/resources/actor/actor.dat.gz and outputs the
+// result of clustering in Pajek format.
+//
+// This program mimics the BC clustering algorithm program implemented
+// by Shashikant Penumarthy for JUNG, so that we may compare results
+// and timings.
+#include <boost/graph/bc_clustering.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <boost/tokenizer.hpp>
+#include <boost/lexical_cast.hpp>
+#include <map>
+
+using namespace boost;
+
+struct Actor
+{
+ Actor(int id = -1) : id(id) {}
+
+ int id;
+};
+
+typedef adjacency_list< vecS, vecS, undirectedS, Actor,
+ property< edge_centrality_t, double > >
+ ActorGraph;
+typedef graph_traits< ActorGraph >::vertex_descriptor Vertex;
+typedef graph_traits< ActorGraph >::edge_descriptor Edge;
+
+void load_actor_graph(std::istream& in, ActorGraph& g)
+{
+ std::map< int, Vertex > actors;
+
+ std::string line;
+ while (getline(in, line))
+ {
+ std::vector< Vertex > actors_in_movie;
+
+ // Map from the actor numbers on this line to the actor vertices
+ typedef tokenizer< char_separator< char > > Tok;
+ Tok tok(line, char_separator< char >(" "));
+ for (Tok::iterator id = tok.begin(); id != tok.end(); ++id)
+ {
+ int actor_id = lexical_cast< int >(*id);
+ std::map< int, Vertex >::iterator v = actors.find(actor_id);
+ if (v == actors.end())
+ {
+ Vertex new_vertex = add_vertex(Actor(actor_id), g);
+ actors[actor_id] = new_vertex;
+ actors_in_movie.push_back(new_vertex);
+ }
+ else
+ {
+ actors_in_movie.push_back(v->second);
+ }
+ }
+
+ for (std::vector< Vertex >::iterator i = actors_in_movie.begin();
+ i != actors_in_movie.end(); ++i)
+ {
+ for (std::vector< Vertex >::iterator j = i + 1;
+ j != actors_in_movie.end(); ++j)
+ {
+ if (!edge(*i, *j, g).second)
+ add_edge(*i, *j, g);
+ }
+ }
+ }
+}
+
+template < typename Graph, typename VertexIndexMap, typename VertexNameMap >
+std::ostream& write_pajek_graph(std::ostream& out, const Graph& g,
+ VertexIndexMap vertex_index, VertexNameMap vertex_name)
+{
+ out << "*Vertices " << num_vertices(g) << '\n';
+ typedef typename graph_traits< Graph >::vertex_iterator vertex_iterator;
+ for (vertex_iterator v = vertices(g).first; v != vertices(g).second; ++v)
+ {
+ out << get(vertex_index, *v) + 1 << " \"" << get(vertex_name, *v)
+ << "\"\n";
+ }
+
+ out << "*Edges\n";
+ typedef typename graph_traits< Graph >::edge_iterator edge_iterator;
+ for (edge_iterator e = edges(g).first; e != edges(g).second; ++e)
+ {
+ out << get(vertex_index, source(*e, g)) + 1 << ' '
+ << get(vertex_index, target(*e, g)) + 1 << " 1.0\n"; // HACK!
+ }
+ return out;
+}
+
+class actor_clustering_threshold : public bc_clustering_threshold< double >
+{
+ typedef bc_clustering_threshold< double > inherited;
+
+public:
+ actor_clustering_threshold(
+ double threshold, const ActorGraph& g, bool normalize)
+ : inherited(threshold, g, normalize), iter(1)
+ {
+ }
+
+ bool operator()(double max_centrality, Edge e, const ActorGraph& g)
+ {
+ std::cout << "Iter: " << iter
+ << " Max Centrality: " << (max_centrality / dividend)
+ << std::endl;
+ ++iter;
+ return inherited::operator()(max_centrality, e, g);
+ }
+
+private:
+ unsigned int iter;
+};
+
+int main(int argc, char* argv[])
+{
+ std::string in_file;
+ std::string out_file;
+ double threshold = -1.0;
+ bool normalize = false;
+
+ // Parse command-line options
+ {
+ int on_arg = 1;
+ while (on_arg < argc)
+ {
+ std::string arg(argv[on_arg]);
+ if (arg == "-in")
+ {
+ ++on_arg;
+ assert(on_arg < argc);
+ in_file = argv[on_arg];
+ }
+ else if (arg == "-out")
+ {
+ ++on_arg;
+ assert(on_arg < argc);
+ out_file = argv[on_arg];
+ }
+ else if (arg == "-threshold")
+ {
+ ++on_arg;
+ assert(on_arg < argc);
+ threshold = lexical_cast< double >(argv[on_arg]);
+ }
+ else if (arg == "-normalize")
+ {
+ normalize = true;
+ }
+ else
+ {
+ std::cerr << "Unrecognized parameter \"" << arg << "\".\n";
+ return -1;
+ }
+ ++on_arg;
+ }
+
+ if (in_file.empty() || out_file.empty() || threshold < 0)
+ {
+ std::cerr << "error: syntax is actor_clustering [options]\n\n"
+ << "options are:\n"
+ << "\t-in <infile>\tInput file\n"
+ << "\t-out <outfile>\tOutput file\n"
+ << "\t-threshold <value>\tA threshold value\n"
+ << "\t-normalize\tNormalize edge centrality scores\n";
+ return -1;
+ }
+ }
+
+ ActorGraph g;
+
+ // Load the actor graph
+ {
+ std::cout << "Building graph." << std::endl;
+ std::ifstream in(in_file.c_str());
+ if (!in)
+ {
+ std::cerr << "Unable to open file \"" << in_file
+ << "\" for input.\n";
+ return -2;
+ }
+ load_actor_graph(in, g);
+ }
+
+ // Run the algorithm
+ std::cout << "Clusting..." << std::endl;
+ betweenness_centrality_clustering(g,
+ actor_clustering_threshold(threshold, g, normalize),
+ get(edge_centrality, g));
+
+ // Output the graph
+ {
+ std::cout << "Writing graph to file: " << out_file << std::endl;
+ std::ofstream out(out_file.c_str());
+ if (!out)
+ {
+ std::cerr << "Unable to open file \"" << out_file
+ << "\" for output.\n";
+ return -3;
+ }
+ write_pajek_graph(out, g, get(vertex_index, g), get(&Actor::id, g));
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/adj_list_ra_edgelist.cpp b/src/boost/libs/graph/example/adj_list_ra_edgelist.cpp
new file mode 100644
index 000000000..d6380efae
--- /dev/null
+++ b/src/boost/libs/graph/example/adj_list_ra_edgelist.cpp
@@ -0,0 +1,36 @@
+//=======================================================================
+// Copyright 2001 Indiana University.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <iostream>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, bidirectionalS, no_property,
+ property< int, edge_weight_t >, no_property, vecS >
+ Graph;
+
+ const std::size_t n = 3;
+ typedef std::pair< std::size_t, std::size_t > E;
+ E edge_array[] = { E(0, 1), E(0, 2), E(0, 1) };
+ const std::size_t m = sizeof(edge_array) / sizeof(E);
+ Graph g(edge_array, edge_array + m, n);
+
+ graph_traits< Graph >::edge_iterator edge_iterator;
+ for (std::size_t i = 0; i < m; ++i)
+ {
+ const graph_traits< Graph >::edge_iterator e = edges(g).first + i;
+ std::cout << *e << " ";
+ }
+ std::cout << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/adjacency_list.cpp b/src/boost/libs/graph/example/adjacency_list.cpp
new file mode 100644
index 000000000..916a98c02
--- /dev/null
+++ b/src/boost/libs/graph/example/adjacency_list.cpp
@@ -0,0 +1,111 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <utility>
+#include <string>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/property_map/property_map.hpp>
+
+/*
+ Sample Output
+
+ graph name: foo
+ 0 --joe--> 1
+ 1 --joe--> 0 --curly--> 2 --dick--> 3
+ 2 --curly--> 1 --tom--> 4
+ 3 --dick--> 1 --harry--> 4
+ 4 --tom--> 2 --harry--> 3
+ (0,1) (1,2) (1,3) (2,4) (3,4)
+
+ removing edge (1,3):
+ 0 --joe--> 1
+ 1 --joe--> 0 --curly--> 2
+ 2 --curly--> 1 --tom--> 4
+ 3 --harry--> 4
+ 4 --tom--> 2 --harry--> 3
+ (0,1) (1,2) (2,4) (3,4)
+
+ */
+
+struct EdgeProperties
+{
+ EdgeProperties(const std::string& n) : name(n) {}
+ std::string name;
+};
+
+struct VertexProperties
+{
+ std::size_t index;
+ boost::default_color_type color;
+};
+
+int main(int, char*[])
+{
+ using namespace boost;
+ using namespace std;
+
+ typedef adjacency_list< vecS, listS, undirectedS, VertexProperties,
+ EdgeProperties >
+ Graph;
+
+ const int V = 5;
+ Graph g(V);
+
+ property_map< Graph, std::size_t VertexProperties::* >::type id
+ = get(&VertexProperties::index, g);
+ property_map< Graph, std::string EdgeProperties::* >::type name
+ = get(&EdgeProperties::name, g);
+
+ boost::graph_traits< Graph >::vertex_iterator vi, viend;
+ int vnum = 0;
+
+ for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi)
+ id[*vi] = vnum++;
+
+ add_edge(vertex(0, g), vertex(1, g), EdgeProperties("joe"), g);
+ add_edge(vertex(1, g), vertex(2, g), EdgeProperties("curly"), g);
+ add_edge(vertex(1, g), vertex(3, g), EdgeProperties("dick"), g);
+ add_edge(vertex(2, g), vertex(4, g), EdgeProperties("tom"), g);
+ add_edge(vertex(3, g), vertex(4, g), EdgeProperties("harry"), g);
+
+ graph_traits< Graph >::vertex_iterator i, end;
+ graph_traits< Graph >::out_edge_iterator ei, edge_end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << id[*i] << " ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ cout << " --" << name[*ei] << "--> " << id[target(*ei, g)] << " ";
+ cout << endl;
+ }
+ print_edges(g, id);
+
+ cout << endl << "removing edge (1,3): " << endl;
+ remove_edge(vertex(1, g), vertex(3, g), g);
+
+ ei = out_edges(vertex(1, g), g).first;
+ cout << "removing edge (" << id[source(*ei, g)] << "," << id[target(*ei, g)]
+ << ")" << endl;
+ remove_edge(ei, g);
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << id[*i] << " ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ cout << " --" << name[*ei] << "--> " << id[target(*ei, g)] << " ";
+ cout << endl;
+ }
+
+ print_edges(g, id);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/adjacency_list.expected b/src/boost/libs/graph/example/adjacency_list.expected
new file mode 100644
index 000000000..8fbdaeaa0
--- /dev/null
+++ b/src/boost/libs/graph/example/adjacency_list.expected
@@ -0,0 +1,15 @@
+0 --joe--> 1
+1 --joe--> 0 --curly--> 2 --dick--> 3
+2 --curly--> 1 --tom--> 4
+3 --dick--> 1 --harry--> 4
+4 --tom--> 2 --harry--> 3
+(0,1) (1,2) (1,3) (2,4) (3,4)
+
+removing edge (1,3):
+removing edge (1,0)
+0
+1 --curly--> 2
+2 --curly--> 1 --tom--> 4
+3 --harry--> 4
+4 --tom--> 2 --harry--> 3
+(1,2) (2,4) (3,4)
diff --git a/src/boost/libs/graph/example/adjacency_list_io.cpp b/src/boost/libs/graph/example/adjacency_list_io.cpp
new file mode 100644
index 000000000..bfc0280c5
--- /dev/null
+++ b/src/boost/libs/graph/example/adjacency_list_io.cpp
@@ -0,0 +1,113 @@
+// (C) Copyright Francois Faure 2001
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+#error adjacency_list_io.hpp has not been ported to work with VC++
+#endif
+
+#include <boost/graph/adjacency_list_io.hpp>
+#include <fstream>
+
+using namespace boost;
+
+//======== my data structure
+struct MyStruct
+{
+ double value;
+};
+std::ostream& operator<<(std::ostream& out, const MyStruct& s)
+{
+ out << s.value << " ";
+ return out;
+}
+std::istream& operator>>(std::istream& in, MyStruct& s)
+{
+ in >> s.value;
+ return in;
+}
+
+//======== vertex properties
+struct n1_t
+{
+ enum
+ {
+ num = 23063
+ };
+ typedef vertex_property_tag kind;
+};
+struct n2_t
+{
+ enum
+ {
+ num = 23062
+ };
+ typedef vertex_property_tag kind;
+};
+struct n3_t
+{
+ enum
+ {
+ num = 23061
+ };
+ typedef vertex_property_tag kind;
+};
+typedef property< n1_t, int,
+ property< n2_t, double, property< n3_t, MyStruct > > >
+ VertexProperty;
+
+//====== edge properties
+struct e1_t
+{
+ enum
+ {
+ num = 23064
+ };
+ typedef edge_property_tag kind;
+};
+typedef property< e1_t, double > EdgeProperty;
+
+//===== graph types
+
+typedef adjacency_list< vecS, listS, directedS, no_property, no_property >
+ Graph1;
+
+typedef adjacency_list< setS, setS, bidirectionalS, VertexProperty,
+ EdgeProperty >
+ Graph2;
+
+int main()
+{
+ // read Graph1
+ Graph1 g1;
+ std::ifstream readFile1("data1.txt");
+ readFile1 >> read(g1);
+ std::cout << "graph g1 from file data1.txt:\n" << write(g1) << std::endl;
+
+ // read Graph2 and all internal properties
+ Graph2 g2;
+ std::ifstream readFile2("data2.txt");
+ readFile2 >> read(g2);
+ std::cout << "graph g2 from file data2.txt:\n" << write(g2) << std::endl;
+
+ // read Graph2, no property given. Write no property.
+ Graph2 g21;
+ std::ifstream readFile21("data1.txt");
+ readFile21 >> read(g21, no_property(), no_property());
+ std::cout << "graph g21 from file data1.txt:\n"
+ << write(g21, no_property(), no_property()) << std::endl;
+
+ // read Graph2, incomplete data in a different order. Write it diffently.
+ Graph2 g31;
+ std::ifstream readFile31("data3.txt");
+ typedef property< n3_t, MyStruct, property< n1_t, int > > readNodeProp;
+ readFile31 >> read(g31, readNodeProp(), EdgeProperty());
+ std::cout << "graph g31 from file data3.txt:\n"
+ << write(g31, property< n3_t, MyStruct >(), EdgeProperty())
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/adjacency_matrix.cpp b/src/boost/libs/graph/example/adjacency_matrix.cpp
new file mode 100644
index 000000000..4f36ead98
--- /dev/null
+++ b/src/boost/libs/graph/example/adjacency_matrix.cpp
@@ -0,0 +1,75 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_matrix.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main()
+{
+ using namespace boost;
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ F,
+ N
+ };
+ const char* name = "ABCDEF";
+
+ // A directed graph
+
+ typedef adjacency_matrix< directedS > Graph;
+ Graph g(N);
+ add_edge(B, C, g);
+ add_edge(B, F, g);
+ add_edge(C, A, g);
+ add_edge(C, C, g);
+ add_edge(D, E, g);
+ add_edge(E, D, g);
+ add_edge(F, A, g);
+
+ std::cout << "vertex set: ";
+ print_vertices(g, name);
+ std::cout << std::endl;
+
+ std::cout << "edge set: ";
+ print_edges(g, name);
+ std::cout << std::endl;
+
+ std::cout << "out-edges: " << std::endl;
+ print_graph(g, name);
+ std::cout << std::endl;
+
+ // An undirected graph
+
+ typedef adjacency_matrix< undirectedS > UGraph;
+ UGraph ug(N);
+ add_edge(B, C, ug);
+ add_edge(B, F, ug);
+ add_edge(C, A, ug);
+ add_edge(D, E, ug);
+ add_edge(F, A, ug);
+
+ std::cout << "vertex set: ";
+ print_vertices(ug, name);
+ std::cout << std::endl;
+
+ std::cout << "edge set: ";
+ print_edges(ug, name);
+ std::cout << std::endl;
+
+ std::cout << "incident edges: " << std::endl;
+ print_graph(ug, name);
+ std::cout << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/astar-cities.cpp b/src/boost/libs/graph/example/astar-cities.cpp
new file mode 100644
index 000000000..3437e6abd
--- /dev/null
+++ b/src/boost/libs/graph/example/astar-cities.cpp
@@ -0,0 +1,237 @@
+
+
+//
+//=======================================================================
+// Copyright (c) 2004 Kristopher Beevers
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+
+#include <boost/graph/astar_search.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/random.hpp>
+#include <boost/random.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <ctime>
+#include <vector>
+#include <list>
+#include <iostream>
+#include <fstream>
+#include <math.h> // for sqrt
+
+using namespace boost;
+using namespace std;
+
+// auxiliary types
+struct location
+{
+ float y, x; // lat, long
+};
+typedef float cost;
+
+template < class Name, class LocMap > class city_writer
+{
+public:
+ city_writer(Name n, LocMap l, float _minx, float _maxx, float _miny,
+ float _maxy, unsigned int _ptx, unsigned int _pty)
+ : name(n)
+ , loc(l)
+ , minx(_minx)
+ , maxx(_maxx)
+ , miny(_miny)
+ , maxy(_maxy)
+ , ptx(_ptx)
+ , pty(_pty)
+ {
+ }
+ template < class Vertex >
+ void operator()(ostream& out, const Vertex& v) const
+ {
+ float px = 1 - (loc[v].x - minx) / (maxx - minx);
+ float py = (loc[v].y - miny) / (maxy - miny);
+ out << "[label=\"" << name[v] << "\", pos=\""
+ << static_cast< unsigned int >(ptx * px) << ","
+ << static_cast< unsigned int >(pty * py) << "\", fontsize=\"11\"]";
+ }
+
+private:
+ Name name;
+ LocMap loc;
+ float minx, maxx, miny, maxy;
+ unsigned int ptx, pty;
+};
+
+template < class WeightMap > class time_writer
+{
+public:
+ time_writer(WeightMap w) : wm(w) {}
+ template < class Edge > void operator()(ostream& out, const Edge& e) const
+ {
+ out << "[label=\"" << wm[e] << "\", fontsize=\"11\"]";
+ }
+
+private:
+ WeightMap wm;
+};
+
+// euclidean distance heuristic
+template < class Graph, class CostType, class LocMap >
+class distance_heuristic : public astar_heuristic< Graph, CostType >
+{
+public:
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ distance_heuristic(LocMap l, Vertex goal) : m_location(l), m_goal(goal) {}
+ CostType operator()(Vertex u)
+ {
+ CostType dx = m_location[m_goal].x - m_location[u].x;
+ CostType dy = m_location[m_goal].y - m_location[u].y;
+ return ::sqrt(dx * dx + dy * dy);
+ }
+
+private:
+ LocMap m_location;
+ Vertex m_goal;
+};
+
+struct found_goal
+{
+}; // exception for termination
+
+// visitor that terminates when we find the goal
+template < class Vertex >
+class astar_goal_visitor : public boost::default_astar_visitor
+{
+public:
+ astar_goal_visitor(Vertex goal) : m_goal(goal) {}
+ template < class Graph > void examine_vertex(Vertex u, Graph& g)
+ {
+ if (u == m_goal)
+ throw found_goal();
+ }
+
+private:
+ Vertex m_goal;
+};
+
+int main(int argc, char** argv)
+{
+
+ // specify some types
+ typedef adjacency_list< listS, vecS, undirectedS, no_property,
+ property< edge_weight_t, cost > >
+ mygraph_t;
+ typedef property_map< mygraph_t, edge_weight_t >::type WeightMap;
+ typedef mygraph_t::vertex_descriptor vertex;
+ typedef mygraph_t::edge_descriptor edge_descriptor;
+ typedef std::pair< int, int > edge;
+
+ // specify data
+ enum nodes
+ {
+ Troy,
+ LakePlacid,
+ Plattsburgh,
+ Massena,
+ Watertown,
+ Utica,
+ Syracuse,
+ Rochester,
+ Buffalo,
+ Ithaca,
+ Binghamton,
+ Woodstock,
+ NewYork,
+ N
+ };
+ const char* name[] = { "Troy", "Lake Placid", "Plattsburgh", "Massena",
+ "Watertown", "Utica", "Syracuse", "Rochester", "Buffalo", "Ithaca",
+ "Binghamton", "Woodstock", "New York" };
+ location locations[] = { // lat/long
+ { 42.73, 73.68 }, { 44.28, 73.99 }, { 44.70, 73.46 }, { 44.93, 74.89 },
+ { 43.97, 75.91 }, { 43.10, 75.23 }, { 43.04, 76.14 }, { 43.17, 77.61 },
+ { 42.89, 78.86 }, { 42.44, 76.50 }, { 42.10, 75.91 }, { 42.04, 74.11 },
+ { 40.67, 73.94 }
+ };
+ edge edge_array[]
+ = { edge(Troy, Utica), edge(Troy, LakePlacid), edge(Troy, Plattsburgh),
+ edge(LakePlacid, Plattsburgh), edge(Plattsburgh, Massena),
+ edge(LakePlacid, Massena), edge(Massena, Watertown),
+ edge(Watertown, Utica), edge(Watertown, Syracuse),
+ edge(Utica, Syracuse), edge(Syracuse, Rochester),
+ edge(Rochester, Buffalo), edge(Syracuse, Ithaca),
+ edge(Ithaca, Binghamton), edge(Ithaca, Rochester),
+ edge(Binghamton, Troy), edge(Binghamton, Woodstock),
+ edge(Binghamton, NewYork), edge(Syracuse, Binghamton),
+ edge(Woodstock, Troy), edge(Woodstock, NewYork) };
+ unsigned int num_edges = sizeof(edge_array) / sizeof(edge);
+ cost weights[] = { // estimated travel time (mins)
+ 96, 134, 143, 65, 115, 133, 117, 116, 74, 56, 84, 73, 69, 70, 116, 147,
+ 173, 183, 74, 71, 124
+ };
+
+ // create graph
+ mygraph_t g(N);
+ WeightMap weightmap = get(edge_weight, g);
+ for (std::size_t j = 0; j < num_edges; ++j)
+ {
+ edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted)
+ = add_edge(edge_array[j].first, edge_array[j].second, g);
+ weightmap[e] = weights[j];
+ }
+
+ // pick random start/goal
+ boost::mt19937 gen(std::time(0));
+ vertex start = random_vertex(g, gen);
+ vertex goal = random_vertex(g, gen);
+
+ cout << "Start vertex: " << name[start] << endl;
+ cout << "Goal vertex: " << name[goal] << endl;
+
+ ofstream dotfile;
+ dotfile.open("test-astar-cities.dot");
+ write_graphviz(dotfile, g,
+ city_writer< const char**, location* >(
+ name, locations, 73.46, 78.86, 40.67, 44.93, 480, 400),
+ time_writer< WeightMap >(weightmap));
+
+ vector< mygraph_t::vertex_descriptor > p(num_vertices(g));
+ vector< cost > d(num_vertices(g));
+ try
+ {
+ // call astar named parameter interface
+ astar_search_tree(g, start,
+ distance_heuristic< mygraph_t, cost, location* >(locations, goal),
+ predecessor_map(
+ make_iterator_property_map(p.begin(), get(vertex_index, g)))
+ .distance_map(
+ make_iterator_property_map(d.begin(), get(vertex_index, g)))
+ .visitor(astar_goal_visitor< vertex >(goal)));
+ }
+ catch (found_goal fg)
+ { // found a path to the goal
+ list< vertex > shortest_path;
+ for (vertex v = goal;; v = p[v])
+ {
+ shortest_path.push_front(v);
+ if (p[v] == v)
+ break;
+ }
+ cout << "Shortest path from " << name[start] << " to " << name[goal]
+ << ": ";
+ list< vertex >::iterator spi = shortest_path.begin();
+ cout << name[start];
+ for (++spi; spi != shortest_path.end(); ++spi)
+ cout << " -> " << name[*spi];
+ cout << endl << "Total travel time: " << d[goal] << endl;
+ return 0;
+ }
+
+ cout << "Didn't find a path from " << name[start] << "to" << name[goal]
+ << "!" << endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/astar_maze.cpp b/src/boost/libs/graph/example/astar_maze.cpp
new file mode 100644
index 000000000..4c437ee87
--- /dev/null
+++ b/src/boost/libs/graph/example/astar_maze.cpp
@@ -0,0 +1,344 @@
+
+// Copyright W.P. McNeill 2010.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// This program uses the A-star search algorithm in the Boost Graph Library to
+// solve a maze. It is an example of how to apply Boost Graph Library
+// algorithms to implicit graphs.
+//
+// This program generates a random maze and then tries to find the shortest
+// path from the lower left-hand corner to the upper right-hand corner. Mazes
+// are represented by two-dimensional grids where a cell in the grid may
+// contain a barrier. You may move up, down, right, or left to any adjacent
+// cell that does not contain a barrier.
+//
+// Once a maze solution has been attempted, the maze is printed. If a
+// solution was found it will be shown in the maze printout and its length
+// will be returned. Note that not all mazes have solutions.
+//
+// The default maze size is 20x10, though different dimensions may be
+// specified on the command line.
+
+/*
+ IMPORTANT:
+ ~~~~~~~~~~
+
+ This example appears to be broken and crashes at runtime, see
+ https://github.com/boostorg/graph/issues/148
+
+*/
+
+#include <boost/graph/astar_search.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/grid_graph.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/variate_generator.hpp>
+#include <boost/unordered_map.hpp>
+#include <boost/unordered_set.hpp>
+#include <ctime>
+#include <iostream>
+
+boost::mt19937 random_generator;
+
+// Distance traveled in the maze
+typedef double distance;
+
+#define GRID_RANK 2
+typedef boost::grid_graph< GRID_RANK > grid;
+typedef boost::graph_traits< grid >::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits< grid >::vertices_size_type vertices_size_type;
+
+// A hash function for vertices.
+struct vertex_hash
+{
+ typedef vertex_descriptor argument_type;
+ typedef std::size_t result_type;
+ std::size_t operator()(vertex_descriptor const& u) const
+ {
+ std::size_t seed = 0;
+ boost::hash_combine(seed, u[0]);
+ boost::hash_combine(seed, u[1]);
+ return seed;
+ }
+};
+
+typedef boost::unordered_set< vertex_descriptor, vertex_hash > vertex_set;
+typedef boost::vertex_subset_complement_filter< grid, vertex_set >::type
+ filtered_grid;
+
+// A searchable maze
+//
+// The maze is grid of locations which can either be empty or contain a
+// barrier. You can move to an adjacent location in the grid by going up,
+// down, left and right. Moving onto a barrier is not allowed. The maze can
+// be solved by finding a path from the lower-left-hand corner to the
+// upper-right-hand corner. If no open path exists between these two
+// locations, the maze is unsolvable.
+//
+// The maze is implemented as a filtered grid graph where locations are
+// vertices. Barrier vertices are filtered out of the graph.
+//
+// A-star search is used to find a path through the maze. Each edge has a
+// weight of one, so the total path length is equal to the number of edges
+// traversed.
+class maze
+{
+public:
+ friend std::ostream& operator<<(std::ostream&, const maze&);
+ friend void random_maze(maze&);
+
+ maze()
+ : m_grid(create_grid(0, 0)), m_barrier_grid(create_barrier_grid()) {};
+ maze(std::size_t x, std::size_t y)
+ : m_grid(create_grid(x, y)), m_barrier_grid(create_barrier_grid()) {};
+
+ // The length of the maze along the specified dimension.
+ vertices_size_type length(std::size_t d) const { return m_grid.length(d); }
+
+ bool has_barrier(vertex_descriptor u) const
+ {
+ return m_barriers.find(u) != m_barriers.end();
+ }
+
+ // Try to find a path from the lower-left-hand corner source (0,0) to the
+ // upper-right-hand corner goal (x-1, y-1).
+ vertex_descriptor source() const { return vertex(0, m_grid); }
+ vertex_descriptor goal() const
+ {
+ return vertex(num_vertices(m_grid) - 1, m_grid);
+ }
+
+ bool solve();
+ bool solved() const { return !m_solution.empty(); }
+ bool solution_contains(vertex_descriptor u) const
+ {
+ return m_solution.find(u) != m_solution.end();
+ }
+
+private:
+ // Create the underlying rank-2 grid with the specified dimensions.
+ grid create_grid(std::size_t x, std::size_t y)
+ {
+ boost::array< std::size_t, GRID_RANK > lengths = { { x, y } };
+ return grid(lengths);
+ }
+
+ // Filter the barrier vertices out of the underlying grid.
+ filtered_grid create_barrier_grid()
+ {
+ return boost::make_vertex_subset_complement_filter(m_grid, m_barriers);
+ }
+
+ // The grid underlying the maze
+ grid m_grid;
+ // The barriers in the maze
+ vertex_set m_barriers;
+ // The underlying maze grid with barrier vertices filtered out
+ filtered_grid m_barrier_grid;
+ // The vertices on a solution path through the maze
+ vertex_set m_solution;
+ // The length of the solution path
+ distance m_solution_length;
+};
+
+// Euclidean heuristic for a grid
+//
+// This calculates the Euclidean distance between a vertex and a goal
+// vertex.
+class euclidean_heuristic
+: public boost::astar_heuristic< filtered_grid, double >
+{
+public:
+ euclidean_heuristic(vertex_descriptor goal) : m_goal(goal) {};
+
+ double operator()(vertex_descriptor v)
+ {
+ return sqrt(pow(double(m_goal[0] - v[0]), 2)
+ + pow(double(m_goal[1] - v[1]), 2));
+ }
+
+private:
+ vertex_descriptor m_goal;
+};
+
+// Exception thrown when the goal vertex is found
+struct found_goal
+{
+};
+
+// Visitor that terminates when we find the goal vertex
+struct astar_goal_visitor : public boost::default_astar_visitor
+{
+ astar_goal_visitor(vertex_descriptor goal) : m_goal(goal) {};
+
+ void examine_vertex(vertex_descriptor u, const filtered_grid&)
+ {
+ if (u == m_goal)
+ throw found_goal();
+ }
+
+private:
+ vertex_descriptor m_goal;
+};
+
+// Solve the maze using A-star search. Return true if a solution was found.
+bool maze::solve()
+{
+ boost::static_property_map< distance > weight(1);
+ // The predecessor map is a vertex-to-vertex mapping.
+ typedef boost::unordered_map< vertex_descriptor, vertex_descriptor,
+ vertex_hash >
+ pred_map;
+ pred_map predecessor;
+ boost::associative_property_map< pred_map > pred_pmap(predecessor);
+ // The distance map is a vertex-to-distance mapping.
+ typedef boost::unordered_map< vertex_descriptor, distance, vertex_hash >
+ dist_map;
+ dist_map distance;
+ boost::associative_property_map< dist_map > dist_pmap(distance);
+
+ vertex_descriptor s = source();
+ vertex_descriptor g = goal();
+ euclidean_heuristic heuristic(g);
+ astar_goal_visitor visitor(g);
+
+ try
+ {
+ astar_search(m_barrier_grid, s, heuristic,
+ boost::weight_map(weight)
+ .predecessor_map(pred_pmap)
+ .distance_map(dist_pmap)
+ .visitor(visitor));
+ }
+ catch (found_goal fg)
+ {
+ // Walk backwards from the goal through the predecessor chain adding
+ // vertices to the solution path.
+ for (vertex_descriptor u = g; u != s; u = predecessor[u])
+ m_solution.insert(u);
+ m_solution.insert(s);
+ m_solution_length = distance[g];
+ return true;
+ }
+
+ return false;
+}
+
+#define BARRIER "#"
+// Print the maze as an ASCII map.
+std::ostream& operator<<(std::ostream& output, const maze& m)
+{
+ // Header
+ for (vertices_size_type i = 0; i < m.length(0) + 2; i++)
+ output << BARRIER;
+ output << std::endl;
+ // Body
+ for (int y = m.length(1) - 1; y >= 0; y--)
+ {
+ // Enumerate rows in reverse order and columns in regular order so that
+ // (0,0) appears in the lower left-hand corner. This requires that y be
+ // int and not the unsigned vertices_size_type because the loop exit
+ // condition is y==-1.
+ for (vertices_size_type x = 0; x < m.length(0); x++)
+ {
+ // Put a barrier on the left-hand side.
+ if (x == 0)
+ output << BARRIER;
+ // Put the character representing this point in the maze grid.
+ vertex_descriptor u = { { x, vertices_size_type(y) } };
+ if (m.solution_contains(u))
+ output << ".";
+ else if (m.has_barrier(u))
+ output << BARRIER;
+ else
+ output << " ";
+ // Put a barrier on the right-hand side.
+ if (x == m.length(0) - 1)
+ output << BARRIER;
+ }
+ // Put a newline after every row except the last one.
+ output << std::endl;
+ }
+ // Footer
+ for (vertices_size_type i = 0; i < m.length(0) + 2; i++)
+ output << BARRIER;
+ if (m.solved())
+ output << std::endl << "Solution length " << m.m_solution_length;
+ return output;
+}
+
+// Return a random integer in the interval [a, b].
+std::size_t random_int(std::size_t a, std::size_t b)
+{
+ if (b < a)
+ b = a;
+ boost::uniform_int<> dist(a, b);
+ boost::variate_generator< boost::mt19937&, boost::uniform_int<> > generate(
+ random_generator, dist);
+ return generate();
+}
+
+// Generate a maze with a random assignment of barriers.
+void random_maze(maze& m)
+{
+ vertices_size_type n = num_vertices(m.m_grid);
+ vertex_descriptor s = m.source();
+ vertex_descriptor g = m.goal();
+ // One quarter of the cells in the maze should be barriers.
+ int barriers = n / 4;
+ while (barriers > 0)
+ {
+ // Choose horizontal or vertical direction.
+ std::size_t direction = random_int(0, 1);
+ // Walls range up to one quarter the dimension length in this direction.
+ vertices_size_type wall = random_int(1, m.length(direction) / 4);
+ // Create the wall while decrementing the total barrier count.
+ vertex_descriptor u = vertex(random_int(0, n - 1), m.m_grid);
+ while (wall)
+ {
+ // Start and goal spaces should never be barriers.
+ if (u != s && u != g)
+ {
+ wall--;
+ if (!m.has_barrier(u))
+ {
+ m.m_barriers.insert(u);
+ barriers--;
+ }
+ }
+ vertex_descriptor v = m.m_grid.next(u, direction);
+ // Stop creating this wall if we reached the maze's edge.
+ if (u == v)
+ break;
+ u = v;
+ }
+ }
+}
+
+int main(int argc, char const* argv[])
+{
+ // The default maze size is 20x10. A different size may be specified on
+ // the command line.
+ std::size_t x = 20;
+ std::size_t y = 10;
+
+ if (argc == 3)
+ {
+ x = boost::lexical_cast< std::size_t >(argv[1]);
+ y = boost::lexical_cast< std::size_t >(argv[2]);
+ }
+
+ random_generator.seed(std::time(0));
+ maze m(x, y);
+ random_maze(m);
+ if (m.solve())
+ std::cout << "Solved the maze." << std::endl;
+ else
+ std::cout << "The maze is not solvable." << std::endl;
+ std::cout << m << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/bcsstk01 b/src/boost/libs/graph/example/bcsstk01
new file mode 100644
index 000000000..a99a2f430
--- /dev/null
+++ b/src/boost/libs/graph/example/bcsstk01
@@ -0,0 +1,96 @@
+ 24
+ 37
+ 30
+ 26
+ 25
+ 38
+ 22
+ 31
+ 29
+ 15
+ 14
+ 13
+ 39
+ 32
+ 33
+ 20
+ 40
+ 41
+ 42
+ 43
+ 34
+ 12
+ 11
+ 10
+ 5
+ 4
+ 3
+ 6
+ 2
+ 1
+ 19
+ 21
+ 44
+ 27
+ 45
+ 35
+ 46
+ 28
+ 47
+ 9
+ 8
+ 7
+ 23
+ 16
+ 18
+ 17
+ 36
+ 48
+ 30
+ 29
+ 27
+ 26
+ 25
+ 28
+ 42
+ 41
+ 40
+ 24
+ 23
+ 22
+ 12
+ 11
+ 10
+ 44
+ 46
+ 45
+ 31
+ 16
+ 32
+ 7
+ 43
+ 1
+ 5
+ 4
+ 34
+ 38
+ 9
+ 3
+ 8
+ 14
+ 15
+ 21
+ 36
+ 47
+ 2
+ 6
+ 13
+ 17
+ 18
+ 19
+ 20
+ 33
+ 35
+ 37
+ 39
+ 48
diff --git a/src/boost/libs/graph/example/bcsstk01.rsa b/src/boost/libs/graph/example/bcsstk01.rsa
new file mode 100644
index 000000000..428488786
--- /dev/null
+++ b/src/boost/libs/graph/example/bcsstk01.rsa
@@ -0,0 +1,78 @@
+1SYMMETRIC STIFFNESS MATRIX SMALL GENERALIZED EIGENVALUE PROBLEM BCSSTK01
+ 74 4 14 56 0
+RSA 48 48 224 0
+(16I5) (16I5) (4E20.12)
+ 1 9 17 25 31 37 43 49 55 62 66 70 75 85 95 104
+ 112 120 127 132 136 141 144 146 149 154 158 161 164 167 169 173
+ 178 183 185 188 191 196 201 205 208 211 213 216 219 221 222 224
+ 225
+ 1 5 6 7 11 19 25 30 2 4 6 8 10 20 24 26
+ 3 4 5 9 21 23 27 28 4 8 10 22 27 28 5 7
+ 11 21 23 29 6 12 20 24 25 30 7 11 12 13 31 36
+ 8 10 12 14 18 32 9 10 11 15 17 33 34 10 16 33
+ 34 11 15 17 35 12 14 18 31 36 13 17 18 19 23 37
+ 42 43 47 48 14 15 16 18 20 22 38 44 45 46 15 16
+ 17 21 39 40 44 45 46 16 20 22 39 40 44 45 46 17
+ 18 19 23 41 43 47 48 18 24 37 42 43 47 48 19 23
+ 24 43 48 20 22 24 44 21 22 23 45 46 22 45 46 23
+ 47 24 43 48 25 29 30 31 35 26 28 32 34 27 28 33
+ 28 32 34 29 31 35 30 36 31 35 36 37 32 34 36 38
+ 42 33 34 35 39 41 34 40 35 39 41 36 38 42 37 41
+ 42 43 47 38 40 42 44 46 39 40 41 45 40 44 46 41
+ 43 47 42 48 43 47 48 44 45 46 45 46 46 47 48 48
+ .283226851852E+07 .100000000000E+07 .208333333333E+07 -.333333333333E+04
+ .100000000000E+07 -.280000000000E+07 -.289351851852E+05 .208333333333E+07
+ .163544753086E+07 -.200000000000E+07 .555555555555E+07 -.666666666667E+04
+ -.200000000000E+07 -.308641975309E+05 .555555555555E+07 -.159791666667E+07
+ .172436728395E+07 -.208333333333E+07 -.277777777778E+07 -.168000000000E+07
+ -.154320987654E+05 -.277777777778E+07 -.289351851852E+05 -.208333333333E+07
+ .100333333333E+10 .200000000000E+07 .400000000000E+09 -.333333333333E+07
+ .208333333333E+07 .100000000000E+09 .106750000000E+10 -.100000000000E+07
+ .200000000000E+09 .277777777778E+07 .333333333333E+09 -.833333333333E+06
+ .153533333333E+10 -.200000000000E+07 -.555555555555E+07 .666666666667E+09
+ -.208333333333E+07 .100000000000E+09 .283226851852E+07 -.100000000000E+07
+ .208333333333E+07 -.280000000000E+07 -.289351851852E+05 .208333333333E+07
+ .163544753086E+07 .200000000000E+07 .555555555555E+07 -.308641975309E+05
+ .555555555555E+07 -.159791666667E+07 .172436728395E+07 -.208333333333E+07
+ -.277777777778E+07 -.154320987654E+05 -.277777777778E+07 -.289351851852E+05
+ -.208333333333E+07 .100333333333E+10 -.333333333333E+07 .208333333333E+07
+ .100000000000E+09 .106750000000E+10 .277777777778E+07 .333333333333E+09
+ -.833333333333E+06 .153533333333E+10 -.555555555555E+07 .666666666667E+09
+ -.208333333333E+07 .100000000000E+09 .283609946950E+07 -.214928529451E+07
+ .235916180402E+07 -.333333333333E+04 -.100000000000E+07 -.289351851852E+05
+ .208333333333E+07 -.383095098171E+04 -.114928529451E+07 .275828470683E+06
+ .176741074446E+07 .517922131816E+06 .429857058902E+07 -.555555555555E+07
+ -.666666666667E+04 .200000000000E+07 -.159791666667E+07 -.131963213599E+06
+ -.517922131816E+06 .229857058902E+07 .389003806848E+07 -.263499027470E+07
+ .277777777778E+07 -.168000000000E+07 -.289351851852E+05 -.208333333333E+07
+ -.517922131816E+06 -.216567078453E+07 -.551656941367E+06 .197572063531E+10
+ -.200000000000E+07 .400000000000E+09 .208333333333E+07 .100000000000E+09
+ -.229857058902E+07 .551656941366E+06 .486193650990E+09 .152734651547E+10
+ -.109779731332E+09 .100000000000E+07 .200000000000E+09 -.833333333333E+06
+ .114928529451E+07 .229724661236E+09 -.557173510779E+08 .156411143711E+10
+ -.200000000000E+07 -.208333333333E+07 .100000000000E+09 -.275828470683E+06
+ -.557173510779E+08 .109411960038E+08 .283226851852E+07 .100000000000E+07
+ .208333333333E+07 -.289351851852E+05 .208333333333E+07 .163544753086E+07
+ -.200000000000E+07 -.555555555555E+07 -.159791666667E+07 .172436728395E+07
+ -.208333333333E+07 .277777777778E+07 -.289351851852E+05 -.208333333333E+07
+ .100333333333E+10 .208333333333E+07 .100000000000E+09 .106750000000E+10
+ -.833333333333E+06 .153533333333E+10 -.208333333333E+07 .100000000000E+09
+ .608796296296E+05 .125000000000E+07 .416666666667E+06 -.416666666667E+04
+ .125000000000E+07 .337291666667E+07 -.250000000000E+07 -.833333333333E+04
+ -.250000000000E+07 .241171296296E+07 -.416666666667E+06 -.235500000000E+07
+ .150000000000E+10 .250000000000E+07 .500000000000E+09 .501833333333E+09
+ -.125000000000E+07 .250000000000E+09 .502500000000E+09 -.250000000000E+07
+ .398587962963E+07 -.125000000000E+07 .416666666667E+06 -.392500000000E+07
+ .341149691358E+07 .250000000000E+07 .694444444444E+07 -.385802469136E+05
+ .694444444445E+07 .243100308642E+07 -.416666666667E+06 -.347222222222E+07
+ -.192901234568E+05 -.347222222222E+07 .150416666667E+10 -.416666666667E+07
+ .133516666667E+10 .347222222222E+07 .416666666667E+09 .216916666667E+10
+ -.694444444444E+07 .833333333333E+09 .398587962963E+07 -.125000000000E+07
+ .416666666667E+06 -.416666666667E+04 -.125000000000E+07 .341149691358E+07
+ .250000000000E+07 -.694444444445E+07 -.833333333333E+04 .250000000000E+07
+ .243100308642E+07 -.416666666667E+06 .347222222222E+07 -.235500000000E+07
+ .150416666667E+10 -.250000000000E+07 .500000000000E+09 .133516666667E+10
+ .125000000000E+07 .250000000000E+09 .216916666667E+10 -.250000000000E+07
+ .647105806113E+05 .239928529451E+07 .140838195984E+06 .350487988027E+07
+ .517922131816E+06 -.479857058902E+07 .457738374749E+07 .134990274700E+06
+ .247238730198E+10 .961679848804E+09 -.109779731332E+09 .531278103775E+09
diff --git a/src/boost/libs/graph/example/bellman-example.cpp b/src/boost/libs/graph/example/bellman-example.cpp
new file mode 100644
index 000000000..69bce6397
--- /dev/null
+++ b/src/boost/libs/graph/example/bellman-example.cpp
@@ -0,0 +1,134 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/bellman_ford_shortest_paths.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename ParentMap > struct edge_writer
+{
+ edge_writer(const Graph& g, const ParentMap& p) : m_g(g), m_parent(p) {}
+
+ template < typename Edge >
+ void operator()(std::ostream& out, const Edge& e) const
+ {
+ out << "[label=\"" << get(edge_weight, m_g, e) << "\"";
+ typename graph_traits< Graph >::vertex_descriptor u = source(e, m_g),
+ v = target(e, m_g);
+ if (m_parent[v] == u)
+ out << ", color=\"black\"";
+ else
+ out << ", color=\"grey\"";
+ out << "]";
+ }
+ const Graph& m_g;
+ ParentMap m_parent;
+};
+template < typename Graph, typename Parent >
+edge_writer< Graph, Parent > make_edge_writer(const Graph& g, const Parent& p)
+{
+ return edge_writer< Graph, Parent >(g, p);
+}
+
+struct EdgeProperties
+{
+ int weight;
+};
+
+int main()
+{
+ enum
+ {
+ u,
+ v,
+ x,
+ y,
+ z,
+ N
+ };
+ char name[] = { 'u', 'v', 'x', 'y', 'z' };
+ typedef std::pair< int, int > E;
+ const int n_edges = 10;
+ E edge_array[] = { E(u, y), E(u, x), E(u, v), E(v, u), E(x, y), E(x, v),
+ E(y, v), E(y, z), E(z, u), E(z, x) };
+ int weight[n_edges] = { -4, 8, 5, -2, 9, -3, 7, 2, 6, 7 };
+
+ typedef adjacency_list< vecS, vecS, directedS, no_property, EdgeProperties >
+ Graph;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ Graph g(N);
+ for (std::size_t j = 0; j < n_edges; ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ Graph g(edge_array, edge_array + n_edges, N);
+#endif
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+ property_map< Graph, int EdgeProperties::* >::type weight_pmap
+ = get(&EdgeProperties::weight, g);
+ int i = 0;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei, ++i)
+ weight_pmap[*ei] = weight[i];
+
+ std::vector< int > distance(N, (std::numeric_limits< short >::max)());
+ std::vector< std::size_t > parent(N);
+ for (i = 0; i < N; ++i)
+ parent[i] = i;
+ distance[z] = 0;
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ bool r = bellman_ford_shortest_paths(g, int(N), weight_pmap, &parent[0],
+ &distance[0], closed_plus< int >(), std::less< int >(),
+ default_bellman_visitor());
+#else
+ bool r = bellman_ford_shortest_paths(g, int(N),
+ weight_map(weight_pmap)
+ .distance_map(&distance[0])
+ .predecessor_map(&parent[0]));
+#endif
+
+ if (r)
+ for (i = 0; i < N; ++i)
+ std::cout << name[i] << ": " << std::setw(3) << distance[i] << " "
+ << name[parent[i]] << std::endl;
+ else
+ std::cout << "negative cycle" << std::endl;
+
+ std::ofstream dot_file("figs/bellman-eg.dot");
+ dot_file << "digraph D {\n"
+ << " rankdir=LR\n"
+ << " size=\"5,3\"\n"
+ << " ratio=\"fill\"\n"
+ << " edge[style=\"bold\"]\n"
+ << " node[shape=\"circle\"]\n";
+
+ {
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ graph_traits< Graph >::edge_descriptor e = *ei;
+ graph_traits< Graph >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ // VC++ doesn't like the 3-argument get function, so here
+ // we workaround by using 2-nested get()'s.
+ dot_file << name[u] << " -> " << name[v] << "[label=\""
+ << get(get(&EdgeProperties::weight, g), e) << "\"";
+ if (parent[v] == u)
+ dot_file << ", color=\"black\"";
+ else
+ dot_file << ", color=\"grey\"";
+ dot_file << "]";
+ }
+ }
+ dot_file << "}";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/bellman-ford-internet.cpp b/src/boost/libs/graph/example/bellman-ford-internet.cpp
new file mode 100644
index 000000000..a761373d3
--- /dev/null
+++ b/src/boost/libs/graph/example/bellman-ford-internet.cpp
@@ -0,0 +1,70 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/edge_list.hpp>
+#include <boost/graph/bellman_ford_shortest_paths.hpp>
+
+int main()
+{
+ using namespace boost;
+ // ID numbers for the routers (vertices).
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ F,
+ G,
+ H,
+ n_vertices
+ };
+ const int n_edges = 11;
+ typedef std::pair< int, int > Edge;
+
+ // The list of connections between routers stored in an array.
+ Edge edges[] = { Edge(A, B), Edge(A, C), Edge(B, D), Edge(B, E), Edge(C, E),
+ Edge(C, F), Edge(D, H), Edge(D, E), Edge(E, H), Edge(F, G),
+ Edge(G, H) };
+
+ // Specify the graph type and declare a graph object
+ typedef edge_list< Edge*, Edge, std::ptrdiff_t,
+ std::random_access_iterator_tag >
+ Graph;
+ Graph g(edges, edges + n_edges);
+
+ // The transmission delay values for each edge.
+ float delay[] = { 5.0, 1.0, 1.3, 3.0, 10.0, 2.0, 6.3, 0.4, 1.3, 1.2, 0.5 };
+
+ // Declare some storage for some "external" vertex properties.
+ char name[] = "ABCDEFGH";
+ int parent[n_vertices];
+ for (int i = 0; i < n_vertices; ++i)
+ parent[i] = i;
+ float distance[n_vertices];
+ std::fill(
+ distance, distance + n_vertices, (std::numeric_limits< float >::max)());
+ // Specify A as the source vertex
+ distance[A] = 0;
+
+ bool r = bellman_ford_shortest_paths(g, int(n_vertices),
+ weight_map(
+ make_iterator_property_map(&delay[0], get(edge_index, g), delay[0]))
+ .distance_map(&distance[0])
+ .predecessor_map(&parent[0]));
+
+ if (r)
+ for (int i = 0; i < n_vertices; ++i)
+ std::cout << name[i] << ": " << distance[i] << " "
+ << name[parent[i]] << std::endl;
+ else
+ std::cout << "negative cycle" << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/bellman_ford.expected b/src/boost/libs/graph/example/bellman_ford.expected
new file mode 100644
index 000000000..7d3885756
--- /dev/null
+++ b/src/boost/libs/graph/example/bellman_ford.expected
@@ -0,0 +1,5 @@
+u: 2 v
+v: 4 x
+x: 7 z
+y: -2 u
+z: 0 z
diff --git a/src/boost/libs/graph/example/bfs-example.cpp b/src/boost/libs/graph/example/bfs-example.cpp
new file mode 100644
index 000000000..c42bef153
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs-example.cpp
@@ -0,0 +1,95 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/pending/indirect_cmp.hpp>
+#include <boost/range/irange.hpp>
+
+#include <iostream>
+
+using namespace boost;
+template < typename TimeMap >
+class bfs_time_visitor : public default_bfs_visitor
+{
+ typedef typename property_traits< TimeMap >::value_type T;
+
+public:
+ bfs_time_visitor(TimeMap tmap, T& t) : m_timemap(tmap), m_time(t) {}
+ template < typename Vertex, typename Graph >
+ void discover_vertex(Vertex u, const Graph& g) const
+ {
+ put(m_timemap, u, m_time++);
+ }
+ TimeMap m_timemap;
+ T& m_time;
+};
+
+int main()
+{
+ using namespace boost;
+ // Select the graph type we wish to use
+ typedef adjacency_list< vecS, vecS, undirectedS > graph_t;
+ // Set up the vertex IDs and names
+ enum
+ {
+ r,
+ s,
+ t,
+ u,
+ v,
+ w,
+ x,
+ y,
+ N
+ };
+ const char* name = "rstuvwxy";
+ // Specify the edges in the graph
+ typedef std::pair< int, int > E;
+ E edge_array[] = { E(r, s), E(r, v), E(s, w), E(w, r), E(w, t), E(w, x),
+ E(x, t), E(t, u), E(x, y), E(u, y) };
+ // Create the graph object
+ const int n_edges = sizeof(edge_array) / sizeof(E);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the edge iterator constructor
+ graph_t g(N);
+ for (std::size_t j = 0; j < n_edges; ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ typedef graph_traits< graph_t >::vertices_size_type v_size_t;
+ graph_t g(edge_array, edge_array + n_edges, v_size_t(N));
+#endif
+
+ // Typedefs
+ typedef graph_traits< graph_t >::vertices_size_type Size;
+
+ // a vector to hold the discover time property for each vertex
+ std::vector< Size > dtime(num_vertices(g));
+ typedef iterator_property_map< std::vector< Size >::iterator,
+ property_map< graph_t, vertex_index_t >::const_type >
+ dtime_pm_type;
+ dtime_pm_type dtime_pm(dtime.begin(), get(vertex_index, g));
+
+ Size time = 0;
+ bfs_time_visitor< dtime_pm_type > vis(dtime_pm, time);
+ breadth_first_search(g, vertex(s, g), visitor(vis));
+
+ // Use std::sort to order the vertices by their discover time
+ std::vector< graph_traits< graph_t >::vertices_size_type > discover_order(
+ N);
+ integer_range< int > range(0, N);
+ std::copy(range.begin(), range.end(), discover_order.begin());
+ std::sort(discover_order.begin(), discover_order.end(),
+ indirect_cmp< dtime_pm_type, std::less< Size > >(dtime_pm));
+
+ std::cout << "order of discovery: ";
+ for (int i = 0; i < N; ++i)
+ std::cout << name[discover_order[i]] << " ";
+ std::cout << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/bfs-example2.cpp b/src/boost/libs/graph/example/bfs-example2.cpp
new file mode 100644
index 000000000..564c70313
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs-example2.cpp
@@ -0,0 +1,119 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/pending/indirect_cmp.hpp>
+#include <boost/range/irange.hpp>
+#include <boost/property_map/property_map.hpp>
+
+#include <iostream>
+
+using namespace boost;
+template < typename TimeMap >
+class bfs_time_visitor : public default_bfs_visitor
+{
+ typedef typename property_traits< TimeMap >::value_type T;
+
+public:
+ bfs_time_visitor(TimeMap tmap, T& t) : m_timemap(tmap), m_time(t) {}
+ template < typename Vertex, typename Graph >
+ void discover_vertex(Vertex u, const Graph& g) const
+ {
+ put(m_timemap, u, m_time++);
+ }
+ TimeMap m_timemap;
+ T& m_time;
+};
+
+struct VertexProps
+{
+ boost::default_color_type color;
+ std::size_t discover_time;
+ unsigned int index;
+};
+
+int main()
+{
+ using namespace boost;
+ // Select the graph type we wish to use
+ typedef adjacency_list< listS, listS, undirectedS, VertexProps > graph_t;
+ // Set up the vertex IDs and names
+ enum
+ {
+ r,
+ s,
+ t,
+ u,
+ v,
+ w,
+ x,
+ y,
+ N
+ };
+ const char* name = "rstuvwxy";
+ // Specify the edges in the graph
+ typedef std::pair< int, int > E;
+ E edge_array[] = { E(r, s), E(r, v), E(s, w), E(w, r), E(w, t), E(w, x),
+ E(x, t), E(t, u), E(x, y), E(u, y) };
+ // Create the graph object
+ const int n_edges = sizeof(edge_array) / sizeof(E);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the edge iterator constructor
+ graph_t g;
+ std::vector< graph_traits< graph_t >::vertex_descriptor > verts;
+ for (std::size_t i = 0; i < N; ++i)
+ verts.push_back(add_vertex(g));
+ for (std::size_t j = 0; j < n_edges; ++j)
+ add_edge(verts[edge_array[j].first], verts[edge_array[j].second], g);
+#else
+ typedef graph_traits< graph_t >::vertices_size_type v_size_t;
+ graph_t g(edge_array, edge_array + n_edges, v_size_t(N));
+#endif
+
+ // Typedefs
+ typedef graph_traits< graph_t >::vertices_size_type Size;
+
+ Size time = 0;
+ typedef property_map< graph_t, std::size_t VertexProps::* >::type
+ dtime_map_t;
+ dtime_map_t dtime_map = get(&VertexProps::discover_time, g);
+ bfs_time_visitor< dtime_map_t > vis(dtime_map, time);
+ breadth_first_search(
+ g, vertex(s, g), color_map(get(&VertexProps::color, g)).visitor(vis));
+
+ // a vector to hold the discover time property for each vertex
+ std::vector< Size > dtime(num_vertices(g));
+ typedef iterator_property_map< std::vector< Size >::iterator,
+ property_map< graph_t, unsigned int VertexProps::* >::type >
+ dtime_pm_type;
+ graph_traits< graph_t >::vertex_iterator vi, vi_end;
+ std::size_t c = 0;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi, ++c)
+ {
+ dtime[c] = dtime_map[*vi];
+ put(&VertexProps::index, g, *vi, c);
+ }
+ dtime_pm_type dtime_pm(dtime.begin(), get(&VertexProps::index, g));
+
+ // Use std::sort to order the vertices by their discover time
+ std::vector< graph_traits< graph_t >::vertices_size_type > discover_order(
+ N);
+ integer_range< int > range(0, N);
+ std::copy(range.begin(), range.end(), discover_order.begin());
+ std::sort(discover_order.begin(), discover_order.end(),
+ make_indirect_cmp(std::less< Size >(),
+ make_iterator_property_map(
+ dtime.begin(), typed_identity_property_map< std::size_t >())));
+
+ std::cout << "order of discovery: ";
+ for (int i = 0; i < N; ++i)
+ std::cout << name[discover_order[i]] << " ";
+ std::cout << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/bfs-name-printer.cpp b/src/boost/libs/graph/example/bfs-name-printer.cpp
new file mode 100644
index 000000000..bc0da3bc3
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs-name-printer.cpp
@@ -0,0 +1,92 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+using namespace boost;
+
+template < typename Graph, typename VertexNameMap, typename TransDelayMap >
+void build_router_network(
+ Graph& g, VertexNameMap name_map, TransDelayMap delay_map)
+{
+ typename graph_traits< Graph >::vertex_descriptor a, b, c, d, e;
+ a = add_vertex(g);
+ name_map[a] = 'a';
+ b = add_vertex(g);
+ name_map[b] = 'b';
+ c = add_vertex(g);
+ name_map[c] = 'c';
+ d = add_vertex(g);
+ name_map[d] = 'd';
+ e = add_vertex(g);
+ name_map[e] = 'e';
+
+ typename graph_traits< Graph >::edge_descriptor ed;
+ bool inserted;
+
+ boost::tie(ed, inserted) = add_edge(a, b, g);
+ delay_map[ed] = 1.2;
+ boost::tie(ed, inserted) = add_edge(a, d, g);
+ delay_map[ed] = 4.5;
+ boost::tie(ed, inserted) = add_edge(b, d, g);
+ delay_map[ed] = 1.8;
+ boost::tie(ed, inserted) = add_edge(c, a, g);
+ delay_map[ed] = 2.6;
+ boost::tie(ed, inserted) = add_edge(c, e, g);
+ delay_map[ed] = 5.2;
+ boost::tie(ed, inserted) = add_edge(d, c, g);
+ delay_map[ed] = 0.4;
+ boost::tie(ed, inserted) = add_edge(d, e, g);
+ delay_map[ed] = 3.3;
+}
+
+template < typename VertexNameMap >
+class bfs_name_printer : public default_bfs_visitor
+{
+ // inherit default (empty) event point actions
+public:
+ bfs_name_printer(VertexNameMap n_map) : m_name_map(n_map) {}
+ template < typename Vertex, typename Graph >
+ void discover_vertex(Vertex u, const Graph&) const
+ {
+ std::cout << get(m_name_map, u) << ' ';
+ }
+
+private:
+ VertexNameMap m_name_map;
+};
+
+struct VP
+{
+ char name;
+};
+
+struct EP
+{
+ double weight;
+};
+
+int main()
+{
+ typedef adjacency_list< listS, vecS, directedS, VP, EP > graph_t;
+ graph_t g;
+
+ property_map< graph_t, char VP::* >::type name_map = get(&VP::name, g);
+ property_map< graph_t, double EP::* >::type delay_map = get(&EP::weight, g);
+
+ build_router_network(g, name_map, delay_map);
+
+ typedef property_map< graph_t, char VP::* >::type VertexNameMap;
+ graph_traits< graph_t >::vertex_descriptor a = *vertices(g).first;
+ bfs_name_printer< VertexNameMap > vis(name_map);
+ std::cout << "BFS vertex discover order: ";
+ breadth_first_search(g, a, visitor(vis));
+ std::cout << std::endl;
+}
diff --git a/src/boost/libs/graph/example/bfs.cpp b/src/boost/libs/graph/example/bfs.cpp
new file mode 100644
index 000000000..1c9ddc5d7
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs.cpp
@@ -0,0 +1,159 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+
+#include <algorithm>
+#include <vector>
+#include <utility>
+#include <iostream>
+
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+/*
+
+ This examples shows how to use the breadth_first_search() GGCL
+ algorithm, specifically the 3 argument variant of bfs that assumes
+ the graph has a color property (property) stored internally.
+
+ Two pre-defined visitors are used to record the distance of each
+ vertex from the source vertex, and also to record the parent of each
+ vertex. Any number of visitors can be layered and passed to a GGCL
+ algorithm.
+
+ The call to vertices(G) returns an STL-compatible container which
+ contains all of the vertices in the graph. In this example we use
+ the vertices container in the STL for_each() function.
+
+ Sample Output:
+
+ 0 --> 2
+ 1 --> 1 3 4
+ 2 --> 1 3 4
+ 3 --> 1 4
+ 4 --> 0 1
+ 0 --> 2
+ 1 --> 1 3 4
+ 2 --> 1 3 4
+ 3 --> 1 4
+ 4 --> 0 1
+ distances: 0 2 1 2 2
+ parent[0] = 0
+ parent[1] = 2
+ parent[2] = 0
+ parent[3] = 2
+ parent[4] = 2
+
+*/
+
+template < class ParentDecorator > struct print_parent
+{
+ print_parent(const ParentDecorator& p_) : p(p_) {}
+ template < class Vertex > void operator()(const Vertex& v) const
+ {
+ std::cout << "parent[" << v << "] = " << p[v] << std::endl;
+ }
+ ParentDecorator p;
+};
+
+template < class NewGraph, class Tag >
+struct graph_copier
+: public boost::base_visitor< graph_copier< NewGraph, Tag > >
+{
+ typedef Tag event_filter;
+
+ graph_copier(NewGraph& graph) : new_g(graph) {}
+
+ template < class Edge, class Graph > void operator()(Edge e, Graph& g)
+ {
+ boost::add_edge(boost::source(e, g), boost::target(e, g), new_g);
+ }
+
+private:
+ NewGraph& new_g;
+};
+
+template < class NewGraph, class Tag >
+inline graph_copier< NewGraph, Tag > copy_graph(NewGraph& g, Tag)
+{
+ return graph_copier< NewGraph, Tag >(g);
+}
+
+int main(int, char*[])
+{
+ typedef boost::adjacency_list< boost::mapS, boost::vecS,
+ boost::bidirectionalS,
+ boost::property< boost::vertex_color_t, boost::default_color_type,
+ boost::property< boost::vertex_degree_t, int,
+ boost::property< boost::vertex_in_degree_t, int,
+ boost::property< boost::vertex_out_degree_t, int > > > > >
+ Graph;
+
+ Graph G(5);
+ boost::add_edge(0, 2, G);
+ boost::add_edge(1, 1, G);
+ boost::add_edge(1, 3, G);
+ boost::add_edge(1, 4, G);
+ boost::add_edge(2, 1, G);
+ boost::add_edge(2, 3, G);
+ boost::add_edge(2, 4, G);
+ boost::add_edge(3, 1, G);
+ boost::add_edge(3, 4, G);
+ boost::add_edge(4, 0, G);
+ boost::add_edge(4, 1, G);
+
+ typedef Graph::vertex_descriptor Vertex;
+
+ Graph G_copy(5);
+ // Array to store predecessor (parent) of each vertex. This will be
+ // used as a Decorator (actually, its iterator will be).
+ std::vector< Vertex > p(boost::num_vertices(G));
+ // VC++ version of std::vector has no ::pointer, so
+ // I use ::value_type* instead.
+ typedef std::vector< Vertex >::value_type* Piter;
+
+ // Array to store distances from the source to each vertex . We use
+ // a built-in array here just for variety. This will also be used as
+ // a Decorator.
+ boost::graph_traits< Graph >::vertices_size_type d[5];
+ std::fill_n(d, 5, 0);
+
+ // The source vertex
+ Vertex s = *(boost::vertices(G).first);
+ p[s] = s;
+ boost::breadth_first_search(G, s,
+ boost::visitor(boost::make_bfs_visitor(
+ std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
+ std::make_pair(
+ boost::record_predecessors(&p[0], boost::on_tree_edge()),
+ copy_graph(G_copy, boost::on_examine_edge()))))));
+
+ boost::print_graph(G);
+ boost::print_graph(G_copy);
+
+ if (boost::num_vertices(G) < 11)
+ {
+ std::cout << "distances: ";
+#ifdef BOOST_OLD_STREAM_ITERATORS
+ std::copy(d, d + 5, std::ostream_iterator< int, char >(std::cout, " "));
+#else
+ std::copy(d, d + 5, std::ostream_iterator< int >(std::cout, " "));
+#endif
+ std::cout << std::endl;
+
+ std::for_each(boost::vertices(G).first, boost::vertices(G).second,
+ print_parent< Piter >(&p[0]));
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/bfs.expected b/src/boost/libs/graph/example/bfs.expected
new file mode 100644
index 000000000..825341197
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs.expected
@@ -0,0 +1,16 @@
+0 --> 2
+1 --> 1 3 4
+2 --> 1 3 4
+3 --> 1 4
+4 --> 0 1
+0 --> 2
+1 --> 1 3 4
+2 --> 1 3 4
+3 --> 1 4
+4 --> 0 1
+distances: 0 2 1 2 2
+parent[0] = 0
+parent[1] = 2
+parent[2] = 0
+parent[3] = 2
+parent[4] = 2
diff --git a/src/boost/libs/graph/example/bfs_basics.expected b/src/boost/libs/graph/example/bfs_basics.expected
new file mode 100644
index 000000000..4a914d1ff
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs_basics.expected
@@ -0,0 +1,2 @@
+order of discovery: s r w v t x u y
+order of finish: s r w v t x u y
diff --git a/src/boost/libs/graph/example/bfs_neighbor.cpp b/src/boost/libs/graph/example/bfs_neighbor.cpp
new file mode 100644
index 000000000..7beb9fa5d
--- /dev/null
+++ b/src/boost/libs/graph/example/bfs_neighbor.cpp
@@ -0,0 +1,150 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+
+#include <algorithm>
+#include <vector>
+#include <utility>
+#include <iostream>
+
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/neighbor_bfs.hpp>
+#include <boost/property_map/property_map.hpp>
+
+/*
+
+ This examples shows how to use the breadth_first_search() GGCL
+ algorithm, specifically the 3 argument variant of bfs that assumes
+ the graph has a color property (property) stored internally.
+
+ Two pre-defined visitors are used to record the distance of each
+ vertex from the source vertex, and also to record the parent of each
+ vertex. Any number of visitors can be layered and passed to a GGCL
+ algorithm.
+
+ The call to vertices(G) returns an STL-compatible container which
+ contains all of the vertices in the graph. In this example we use
+ the vertices container in the STL for_each() function.
+
+ Sample Output:
+
+ 0 --> 2
+ 1 --> 1 3 4
+ 2 --> 1 3 4
+ 3 --> 1 4
+ 4 --> 0 1
+ distances: 1 2 1 2 0
+ parent[0] = 4
+ parent[1] = 2
+ parent[2] = 0
+ parent[3] = 2
+ parent[4] = 0
+
+*/
+
+template < class ParentDecorator > struct print_parent
+{
+ print_parent(const ParentDecorator& p_) : p(p_) {}
+ template < class Vertex > void operator()(const Vertex& v) const
+ {
+ std::cout << "parent[" << v << "] = " << p[v] << std::endl;
+ }
+ ParentDecorator p;
+};
+
+template < class NewGraph, class Tag >
+struct graph_copier
+: public boost::base_visitor< graph_copier< NewGraph, Tag > >
+{
+ typedef Tag event_filter;
+
+ graph_copier(NewGraph& graph) : new_g(graph) {}
+
+ template < class Edge, class Graph > void operator()(Edge e, Graph& g)
+ {
+ boost::add_edge(boost::source(e, g), boost::target(e, g), new_g);
+ }
+
+private:
+ NewGraph& new_g;
+};
+
+template < class NewGraph, class Tag >
+inline graph_copier< NewGraph, Tag > copy_graph(NewGraph& g, Tag)
+{
+ return graph_copier< NewGraph, Tag >(g);
+}
+
+int main(int, char*[])
+{
+ typedef boost::adjacency_list< boost::mapS, boost::vecS,
+ boost::bidirectionalS,
+ boost::property< boost::vertex_color_t, boost::default_color_type,
+ boost::property< boost::vertex_degree_t, int,
+ boost::property< boost::vertex_in_degree_t, int,
+ boost::property< boost::vertex_out_degree_t, int > > > > >
+ Graph;
+
+ Graph G(5);
+ boost::add_edge(0, 2, G);
+ boost::add_edge(1, 1, G);
+ boost::add_edge(1, 3, G);
+ boost::add_edge(1, 4, G);
+ boost::add_edge(2, 1, G);
+ boost::add_edge(2, 3, G);
+ boost::add_edge(2, 4, G);
+ boost::add_edge(3, 1, G);
+ boost::add_edge(3, 4, G);
+ boost::add_edge(4, 0, G);
+ boost::add_edge(4, 1, G);
+
+ typedef Graph::vertex_descriptor Vertex;
+
+ // Array to store predecessor (parent) of each vertex. This will be
+ // used as a Decorator (actually, its iterator will be).
+ std::vector< Vertex > p(boost::num_vertices(G));
+ // VC++ version of std::vector has no ::pointer, so
+ // I use ::value_type* instead.
+ typedef std::vector< Vertex >::value_type* Piter;
+
+ // Array to store distances from the source to each vertex . We use
+ // a built-in array here just for variety. This will also be used as
+ // a Decorator.
+ boost::graph_traits< Graph >::vertices_size_type d[5];
+ std::fill_n(d, 5, 0);
+
+ // The source vertex
+ Vertex s = *(boost::vertices(G).first);
+ p[s] = s;
+ boost::neighbor_breadth_first_search(G, s,
+ boost::visitor(boost::make_neighbor_bfs_visitor(
+ std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
+ boost::record_predecessors(&p[0], boost::on_tree_edge())))));
+
+ boost::print_graph(G);
+
+ if (boost::num_vertices(G) < 11)
+ {
+ std::cout << "distances: ";
+#ifdef BOOST_OLD_STREAM_ITERATORS
+ std::copy(d, d + 5, std::ostream_iterator< int, char >(std::cout, " "));
+#else
+ std::copy(d, d + 5, std::ostream_iterator< int >(std::cout, " "));
+#endif
+ std::cout << std::endl;
+
+ std::for_each(boost::vertices(G).first, boost::vertices(G).second,
+ print_parent< Piter >(&p[0]));
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/biconnected_components.cpp b/src/boost/libs/graph/example/biconnected_components.cpp
new file mode 100644
index 000000000..8c1b58946
--- /dev/null
+++ b/src/boost/libs/graph/example/biconnected_components.cpp
@@ -0,0 +1,75 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <vector>
+#include <list>
+#include <boost/graph/biconnected_components.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <iterator>
+#include <iostream>
+
+namespace boost
+{
+struct edge_component_t
+{
+ enum
+ {
+ num = 555
+ };
+ typedef edge_property_tag kind;
+} edge_component;
+}
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_component_t, std::size_t > >
+ graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_t;
+ graph_t g(9);
+ add_edge(0, 5, g);
+ add_edge(0, 1, g);
+ add_edge(0, 6, g);
+ add_edge(1, 2, g);
+ add_edge(1, 3, g);
+ add_edge(1, 4, g);
+ add_edge(2, 3, g);
+ add_edge(4, 5, g);
+ add_edge(6, 8, g);
+ add_edge(6, 7, g);
+ add_edge(7, 8, g);
+
+ property_map< graph_t, edge_component_t >::type component
+ = get(edge_component, g);
+
+ std::size_t num_comps = biconnected_components(g, component);
+ std::cerr << "Found " << num_comps << " biconnected components.\n";
+
+ std::vector< vertex_t > art_points;
+ articulation_points(g, std::back_inserter(art_points));
+ std::cerr << "Found " << art_points.size() << " articulation points.\n";
+
+ std::cout << "graph A {\n"
+ << " node[shape=\"circle\"]\n";
+
+ for (std::size_t i = 0; i < art_points.size(); ++i)
+ {
+ std::cout << (char)(art_points[i] + 'A')
+ << " [ style=\"filled\", fillcolor=\"red\" ];" << std::endl;
+ }
+
+ graph_traits< graph_t >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ std::cout << (char)(source(*ei, g) + 'A') << " -- "
+ << (char)(target(*ei, g) + 'A') << "[label=\""
+ << component[*ei] << "\"]\n";
+ std::cout << "}\n";
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/bipartite_example.cpp b/src/boost/libs/graph/example/bipartite_example.cpp
new file mode 100644
index 000000000..99ac316ff
--- /dev/null
+++ b/src/boost/libs/graph/example/bipartite_example.cpp
@@ -0,0 +1,125 @@
+/**
+ *
+ * Copyright (c) 2010 Matthias Walter (xammy@xammy.homelinux.net)
+ *
+ * Authors: Matthias Walter
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/bipartite.hpp>
+
+using namespace boost;
+
+/// Example to test for bipartiteness and print the certificates.
+
+template < typename Graph > void print_bipartite(const Graph& g)
+{
+ typedef graph_traits< Graph > traits;
+ typename traits::vertex_iterator vertex_iter, vertex_end;
+
+ /// Most simple interface just tests for bipartiteness.
+
+ bool bipartite = is_bipartite(g);
+
+ if (bipartite)
+ {
+ typedef std::vector< default_color_type > partition_t;
+ typedef
+ typename property_map< Graph, vertex_index_t >::type index_map_t;
+ typedef iterator_property_map< partition_t::iterator, index_map_t >
+ partition_map_t;
+
+ partition_t partition(num_vertices(g));
+ partition_map_t partition_map(partition.begin(), get(vertex_index, g));
+
+ /// A second interface yields a bipartition in a color map, if the graph
+ /// is bipartite.
+
+ is_bipartite(g, get(vertex_index, g), partition_map);
+
+ for (boost::tie(vertex_iter, vertex_end) = vertices(g);
+ vertex_iter != vertex_end; ++vertex_iter)
+ {
+ std::cout
+ << "Vertex " << *vertex_iter << " has color "
+ << (get(partition_map, *vertex_iter)
+ == color_traits< default_color_type >::white()
+ ? "white"
+ : "black")
+ << std::endl;
+ }
+ }
+ else
+ {
+ typedef std::vector< typename traits::vertex_descriptor >
+ vertex_vector_t;
+ vertex_vector_t odd_cycle;
+
+ /// A third interface yields an odd-cycle if the graph is not bipartite.
+
+ find_odd_cycle(g, get(vertex_index, g), std::back_inserter(odd_cycle));
+
+ std::cout << "Odd cycle consists of the vertices:";
+ for (size_t i = 0; i < odd_cycle.size(); ++i)
+ {
+ std::cout << " " << odd_cycle[i];
+ }
+ std::cout << std::endl;
+ }
+}
+
+int main(int argc, char** argv)
+{
+ typedef adjacency_list< vecS, vecS, undirectedS > vector_graph_t;
+ typedef std::pair< int, int > E;
+
+ /**
+ * Create the graph drawn below.
+ *
+ * 0 - 1 - 2
+ * | |
+ * 3 - 4 - 5 - 6
+ * / \ /
+ * | 7
+ * | |
+ * 8 - 9 - 10
+ **/
+
+ E bipartite_edges[]
+ = { E(0, 1), E(0, 4), E(1, 2), E(2, 6), E(3, 4), E(3, 8), E(4, 5),
+ E(4, 7), E(5, 6), E(6, 7), E(7, 10), E(8, 9), E(9, 10) };
+ vector_graph_t bipartite_vector_graph(&bipartite_edges[0],
+ &bipartite_edges[0] + sizeof(bipartite_edges) / sizeof(E), 11);
+
+ /**
+ * Create the graph drawn below.
+ *
+ * 2 - 1 - 0
+ * | |
+ * 3 - 6 - 5 - 4
+ * / \ /
+ * | 7
+ * | /
+ * 8 ---- 9
+ *
+ **/
+
+ E non_bipartite_edges[] = { E(0, 1), E(0, 4), E(1, 2), E(2, 6), E(3, 6),
+ E(3, 8), E(4, 5), E(4, 7), E(5, 6), E(6, 7), E(7, 9), E(8, 9) };
+ vector_graph_t non_bipartite_vector_graph(&non_bipartite_edges[0],
+ &non_bipartite_edges[0] + sizeof(non_bipartite_edges) / sizeof(E), 10);
+
+ /// Call test routine for a bipartite and a non-bipartite graph.
+
+ print_bipartite(bipartite_vector_graph);
+
+ print_bipartite(non_bipartite_vector_graph);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/boost_web.dat b/src/boost/libs/graph/example/boost_web.dat
new file mode 100644
index 000000000..b52a03198
--- /dev/null
+++ b/src/boost/libs/graph/example/boost_web.dat
@@ -0,0 +1,34 @@
+www.boost.org|Libraries|Boost Libraries
+www.boost.org|Home|www.boost.org
+www.boost.org|More|More Information
+www.boost.org|People|Boost People
+www.boost.org|FAQ|Frequently Asked Questions
+More Information|More|More Information
+More Information|Header Dependencies|Boost Header Dependencies
+More Information|Compiler Status|Compiler Status
+More Information|Library Formal Review Process|Formal Review Process
+More Information|Home|www.boost.org
+More Information|FAQ|Frequently Asked Questions
+More Information|People|Boost People
+More Information|Libraries|Boost Libraries
+Frequently Asked Questions|FAQ|Frequently Asked Questions
+Frequently Asked Questions|Home|www.boost.org
+Frequently Asked Questions|People|Boost People
+Frequently Asked Questions|Library Guidlines|Boost Library Requirements and Guidelines
+Frequently Asked Questions|License Requirements|Boost Library Requirements and Guidelines
+Frequently Asked Questions|More|More Information
+Frequently Asked Questions|Libraries|Boost Libraries
+Boost People|Dave Abrahams|Dave Abrahams
+Boost People|Darin Adler|Darin Adler
+Boost People|More|More Information
+Boost People|Home|www.boost.org
+Boost People|FAQ|Frequently Asked Questions
+Boost People|Libraries|Boost Libraries
+Boost People|People|Boost People
+Boost Libraries|call_traits|Call Traits
+Boost Libraries|compose|Compose Library
+Boost Libraries|graph|Boost Graph Library
+Boost Libraries|property_map|Property Map Library
+Boost Libraries|array|Array wrapper
+Boost Libraries|Libraries|Boost Libraries
+Boost Libraries|People|Boost Libraries
diff --git a/src/boost/libs/graph/example/boost_web_graph.cpp b/src/boost/libs/graph/example/boost_web_graph.cpp
new file mode 100644
index 000000000..3d640c8df
--- /dev/null
+++ b/src/boost/libs/graph/example/boost_web_graph.cpp
@@ -0,0 +1,220 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <algorithm>
+#include <map>
+#include <boost/pending/stringtok.hpp>
+#include <boost/utility.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/depth_first_search.hpp>
+
+template < class Distance >
+class calc_distance_visitor : public boost::bfs_visitor<>
+{
+public:
+ calc_distance_visitor(Distance d) : distance(d) {}
+
+ template < class Graph >
+ void tree_edge(
+ typename boost::graph_traits< Graph >::edge_descriptor e, Graph& g)
+ {
+ typename boost::graph_traits< Graph >::vertex_descriptor u, v;
+ u = boost::source(e, g);
+ v = boost::target(e, g);
+ distance[v] = distance[u] + 1;
+ }
+
+private:
+ Distance distance;
+};
+
+template < class VertexNameMap, class DistanceMap >
+class print_tree_visitor : public boost::dfs_visitor<>
+{
+public:
+ print_tree_visitor(VertexNameMap n, DistanceMap d) : name(n), distance(d) {}
+ template < class Graph >
+ void discover_vertex(
+ typename boost::graph_traits< Graph >::vertex_descriptor v, Graph&)
+ {
+ typedef typename boost::property_traits< DistanceMap >::value_type Dist;
+ // indentation based on depth
+ for (Dist i = 0; i < distance[v]; ++i)
+ std::cout << " ";
+ std::cout << name[v] << std::endl;
+ }
+
+ template < class Graph >
+ void tree_edge(
+ typename boost::graph_traits< Graph >::edge_descriptor e, Graph& g)
+ {
+ distance[boost::target(e, g)] = distance[boost::source(e, g)] + 1;
+ }
+
+private:
+ VertexNameMap name;
+ DistanceMap distance;
+};
+
+int main(int argc, const char** argv)
+{
+ using namespace boost;
+
+ std::ifstream datafile(argc >= 2 ? argv[1] : "./boost_web.dat");
+ if (!datafile)
+ {
+ std::cerr << "No ./boost_web.dat file" << std::endl;
+ return -1;
+ }
+
+ //===========================================================================
+ // Declare the graph type and object, and some property maps.
+
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string,
+ property< vertex_color_t, default_color_type > >,
+ property< edge_name_t, std::string, property< edge_weight_t, int > > >
+ Graph;
+
+ typedef graph_traits< Graph > Traits;
+ typedef Traits::vertex_descriptor Vertex;
+ typedef Traits::edge_descriptor Edge;
+
+ typedef std::map< std::string, Vertex > NameVertexMap;
+ NameVertexMap name2vertex;
+ Graph g;
+
+ typedef property_map< Graph, vertex_name_t >::type NameMap;
+ NameMap node_name = get(vertex_name, g);
+ property_map< Graph, edge_name_t >::type link_name = get(edge_name, g);
+
+ //===========================================================================
+ // Read the data file and construct the graph.
+
+ std::string line;
+ while (std::getline(datafile, line))
+ {
+
+ std::list< std::string > line_toks;
+ boost::stringtok(line_toks, line, "|");
+
+ NameVertexMap::iterator pos;
+ bool inserted;
+ Vertex u, v;
+
+ std::list< std::string >::iterator i = line_toks.begin();
+
+ boost::tie(pos, inserted)
+ = name2vertex.insert(std::make_pair(*i, Vertex()));
+ if (inserted)
+ {
+ u = add_vertex(g);
+ put(node_name, u, *i);
+ pos->second = u;
+ }
+ else
+ u = pos->second;
+ ++i;
+
+ std::string hyperlink_name = *i++;
+
+ boost::tie(pos, inserted)
+ = name2vertex.insert(std::make_pair(*i, Vertex()));
+ if (inserted)
+ {
+ v = add_vertex(g);
+ put(node_name, v, *i);
+ pos->second = v;
+ }
+ else
+ v = pos->second;
+
+ Edge e;
+ boost::tie(e, inserted) = add_edge(u, v, g);
+ if (inserted)
+ {
+ put(link_name, e, hyperlink_name);
+ }
+ }
+
+ //===========================================================================
+ // Calculate the diameter of the graph.
+
+ typedef Traits::vertices_size_type size_type;
+ typedef std::vector< size_type > IntVector;
+ // Create N x N matrix for storing the shortest distances
+ // between each vertex. Initialize all distances to zero.
+ std::vector< IntVector > d_matrix(
+ num_vertices(g), IntVector(num_vertices(g), 0));
+
+ size_type i;
+ for (i = 0; i < num_vertices(g); ++i)
+ {
+ calc_distance_visitor< size_type* > vis(&d_matrix[i][0]);
+ Traits::vertex_descriptor src = vertices(g).first[i];
+ breadth_first_search(g, src, boost::visitor(vis));
+ }
+
+ size_type diameter = 0;
+ BOOST_USING_STD_MAX();
+ for (i = 0; i < num_vertices(g); ++i)
+ diameter = max BOOST_PREVENT_MACRO_SUBSTITUTION(diameter,
+ *std::max_element(d_matrix[i].begin(), d_matrix[i].end()));
+
+ std::cout << "The diameter of the boost web-site graph is " << diameter
+ << std::endl
+ << std::endl;
+
+ std::cout << "Number of clicks from the home page: " << std::endl;
+ Traits::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ std::cout << d_matrix[0][*vi] << "\t" << node_name[*vi] << std::endl;
+ std::cout << std::endl;
+
+ //===========================================================================
+ // Print out the breadth-first search tree starting at the home page
+
+ // Create storage for a mapping from vertices to their parents
+ std::vector< Traits::vertex_descriptor > parent(num_vertices(g));
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ parent[*vi] = *vi;
+
+ // Do a BFS starting at the home page, recording the parent of each
+ // vertex (where parent is with respect to the search tree).
+ Traits::vertex_descriptor src = vertices(g).first[0];
+ breadth_first_search(g, src,
+ boost::visitor(
+ make_bfs_visitor(record_predecessors(&parent[0], on_tree_edge()))));
+
+ // Add all the search tree edges into a new graph
+ Graph search_tree(num_vertices(g));
+ boost::tie(vi, vi_end) = vertices(g);
+ ++vi;
+ for (; vi != vi_end; ++vi)
+ add_edge(parent[*vi], *vi, search_tree);
+
+ std::cout << "The breadth-first search tree:" << std::endl;
+
+ // Print out the search tree. We use DFS because it visits
+ // the tree nodes in the order that we want to print out:
+ // a directory-structure like format.
+ std::vector< size_type > dfs_distances(num_vertices(g), 0);
+ print_tree_visitor< NameMap, size_type* > tree_printer(
+ node_name, &dfs_distances[0]);
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ get(vertex_color, g)[*vi] = white_color;
+ depth_first_visit(search_tree, src, tree_printer, get(vertex_color, g));
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/boost_web_graph.expected b/src/boost/libs/graph/example/boost_web_graph.expected
new file mode 100644
index 000000000..5c60774ed
--- /dev/null
+++ b/src/boost/libs/graph/example/boost_web_graph.expected
@@ -0,0 +1,37 @@
+The diameter of the boost web-site graph is 2
+
+Number of clicks from the home page:
+0 www.boost.org
+1 Boost Libraries
+1 More Information
+1 Boost People
+1 Frequently Asked Questions
+2 Boost Header Dependencies
+2 Compiler Status
+2 Formal Review Process
+2 Boost Library Requirements and Guidelines
+2 Dave Abrahams
+2 Darin Adler
+2 Call Traits
+2 Compose Library
+2 Boost Graph Library
+2 Property Map Library
+2 Array wrapper
+
+The breadth-first search tree:
+www.boost.org
+ Boost Libraries
+ Call Traits
+ Compose Library
+ Boost Graph Library
+ Property Map Library
+ Array wrapper
+ More Information
+ Boost Header Dependencies
+ Compiler Status
+ Formal Review Process
+ Boost People
+ Dave Abrahams
+ Darin Adler
+ Frequently Asked Questions
+ Boost Library Requirements and Guidelines
diff --git a/src/boost/libs/graph/example/boykov_kolmogorov-eg.cpp b/src/boost/libs/graph/example/boykov_kolmogorov-eg.cpp
new file mode 100644
index 000000000..5dd8d03e4
--- /dev/null
+++ b/src/boost/libs/graph/example/boykov_kolmogorov-eg.cpp
@@ -0,0 +1,114 @@
+// Copyright (c) 2006, Stephan Diederich
+//
+// This code may be used under either of the following two licences:
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE.
+//
+// Or:
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
+#include <boost/graph/read_dimacs.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+// Use a DIMACS network flow file as stdin.
+// boykov_kolmogorov-eg < max_flow.dat
+//
+// Sample output:
+// c The total flow:
+// s 13
+//
+// c flow values:
+// f 0 6 3
+// f 0 1 6
+// f 0 2 4
+// f 1 5 1
+// f 1 0 0
+// f 1 3 5
+// f 2 4 4
+// f 2 3 0
+// f 2 0 0
+// f 3 7 5
+// f 3 2 0
+// f 3 1 0
+// f 4 5 0
+// f 4 6 4
+// f 5 4 0
+// f 5 7 1
+// f 6 7 7
+// f 6 4 0
+// f 7 6 0
+// f 7 5 0
+
+int main()
+{
+ using namespace boost;
+
+ typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string,
+ property< vertex_index_t, long,
+ property< vertex_color_t, boost::default_color_type,
+ property< vertex_distance_t, long,
+ property< vertex_predecessor_t,
+ Traits::edge_descriptor > > > > >,
+
+ property< edge_capacity_t, long,
+ property< edge_residual_capacity_t, long,
+ property< edge_reverse_t, Traits::edge_descriptor > > > >
+ Graph;
+
+ Graph g;
+ property_map< Graph, edge_capacity_t >::type capacity
+ = get(edge_capacity, g);
+ property_map< Graph, edge_residual_capacity_t >::type residual_capacity
+ = get(edge_residual_capacity, g);
+ property_map< Graph, edge_reverse_t >::type rev = get(edge_reverse, g);
+ Traits::vertex_descriptor s, t;
+ read_dimacs_max_flow(g, capacity, rev, s, t);
+
+ std::vector< default_color_type > color(num_vertices(g));
+ std::vector< long > distance(num_vertices(g));
+ long flow = boykov_kolmogorov_max_flow(g, s, t);
+
+ std::cout << "c The total flow:" << std::endl;
+ std::cout << "s " << flow << std::endl << std::endl;
+
+ std::cout << "c flow values:" << std::endl;
+ graph_traits< Graph >::vertex_iterator u_iter, u_end;
+ graph_traits< Graph >::out_edge_iterator ei, e_end;
+ for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
+ for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
+ if (capacity[*ei] > 0)
+ std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
+ << (capacity[*ei] - residual_capacity[*ei])
+ << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/bron_kerbosch_clique_number.cpp b/src/boost/libs/graph/example/bron_kerbosch_clique_number.cpp
new file mode 100644
index 000000000..bf551867f
--- /dev/null
+++ b/src/boost/libs/graph/example/bron_kerbosch_clique_number.cpp
@@ -0,0 +1,37 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[code_bron_kerbosch_clique_number
+#include <iostream>
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/bron_kerbosch_all_cliques.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph<> Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and read it from standard input.
+ Graph g;
+ read_graph(g, cin);
+
+ // Use the Bron-Kerbosch algorithm to find all cliques, and
+ size_t c = bron_kerbosch_clique_number(g);
+ cout << "clique number: " << c << endl;
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/bron_kerbosch_print_cliques.cpp b/src/boost/libs/graph/example/bron_kerbosch_print_cliques.cpp
new file mode 100644
index 000000000..21c83b690
--- /dev/null
+++ b/src/boost/libs/graph/example/bron_kerbosch_print_cliques.cpp
@@ -0,0 +1,71 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[code_bron_kerbosch_print_cliques
+#include <iostream>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/bron_kerbosch_all_cliques.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The clique_printer is a visitor that will print the vertices that comprise
+// a clique. Note that the vertices are not given in any specific order.
+template < typename OutputStream > struct clique_printer
+{
+ clique_printer(OutputStream& stream) : os(stream) {}
+
+ template < typename Clique, typename Graph >
+ void clique(const Clique& c, const Graph& g)
+ {
+ // Iterate over the clique and print each vertex within it.
+ typename Clique::const_iterator i, end = c.end();
+ for (i = c.begin(); i != end; ++i)
+ {
+ os << g[*i].name << " ";
+ }
+ os << endl;
+ }
+ OutputStream& os;
+};
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and and its name map accessor.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Instantiate the visitor for printing cliques
+ clique_printer< ostream > vis(cout);
+
+ // Use the Bron-Kerbosch algorithm to find all cliques, printing them
+ // as they are found.
+ bron_kerbosch_all_cliques(g, vis);
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/bucket_sorter.cpp b/src/boost/libs/graph/example/bucket_sorter.cpp
new file mode 100644
index 000000000..4f176a428
--- /dev/null
+++ b/src/boost/libs/graph/example/bucket_sorter.cpp
@@ -0,0 +1,115 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+
+#include <stdlib.h>
+#include <boost/pending/bucket_sorter.hpp>
+
+int main()
+{
+ using namespace std;
+ using boost::bucket_sorter;
+
+ const std::size_t N = 10;
+
+ vector< std::size_t > bucket(N);
+ for (std::size_t i = 0; i < N; i++)
+ {
+ bucket[i] = rand() % N;
+ cout.width(6);
+ cout << "Number " << i << " is in bucket " << bucket[i] << endl;
+ }
+
+ typedef boost::identity_property_map ID;
+ typedef bucket_sorter< std::size_t, int, vector< std::size_t >::iterator,
+ ID >
+ BS;
+ BS my_bucket_sorter(N, N, bucket.begin());
+
+ for (std::size_t ii = 0; ii < N; ii++)
+ my_bucket_sorter.push(ii);
+
+ std::size_t j;
+ for (j = 0; j < N; j++)
+ {
+ cout << "The bucket " << j;
+ if (!my_bucket_sorter[j].empty())
+ {
+ cout << " has number ";
+ do
+ {
+ int v = my_bucket_sorter[j].top();
+ my_bucket_sorter[j].pop();
+ cout << v << " ";
+ } while (!my_bucket_sorter[j].empty());
+ cout << endl;
+ }
+ else
+ {
+ cout << " has no number associated with it." << endl;
+ }
+ }
+
+ for (std::size_t k = 0; k < N; k++)
+ my_bucket_sorter.push(k);
+
+ my_bucket_sorter.remove(5);
+ my_bucket_sorter.remove(7);
+
+ cout << "After removing numbers 5 and 7, check correctness again." << endl;
+
+ for (j = 0; j < N; j++)
+ {
+ cout << "The bucket " << j;
+ if (!my_bucket_sorter[j].empty())
+ {
+ cout << " has number ";
+ do
+ {
+ int v = my_bucket_sorter[j].top();
+ my_bucket_sorter[j].pop();
+ cout << v << " ";
+ } while (!my_bucket_sorter[j].empty());
+ cout << endl;
+ }
+ else
+ {
+ cout << " has no number associated with it." << endl;
+ }
+ }
+
+ std::size_t iii;
+ for (iii = 0; iii < N; iii++)
+ {
+ std::size_t current = rand() % N;
+ if (!my_bucket_sorter[current].empty())
+ {
+ int v = my_bucket_sorter[current].top();
+ my_bucket_sorter[current].pop();
+ bucket[v] = rand() % N;
+ my_bucket_sorter.push(v);
+ }
+ }
+
+ for (iii = 0; iii < N; iii++)
+ {
+ std::size_t current = rand() % N;
+ if (!my_bucket_sorter[current].empty())
+ {
+ int v = my_bucket_sorter[current].top();
+ bucket[v] = rand() % N;
+ my_bucket_sorter.update(v);
+ }
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/canonical_ordering.cpp b/src/boost/libs/graph/example/canonical_ordering.cpp
new file mode 100644
index 000000000..7695f8d24
--- /dev/null
+++ b/src/boost/libs/graph/example/canonical_ordering.cpp
@@ -0,0 +1,80 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/ref.hpp>
+#include <vector>
+
+#include <boost/graph/planar_canonical_ordering.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+using namespace boost;
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int >, property< edge_index_t, int > >
+ graph;
+
+ // Create a maximal planar graph on 6 vertices
+ graph g(6);
+
+ add_edge(0, 1, g);
+ add_edge(1, 2, g);
+ add_edge(2, 3, g);
+ add_edge(3, 4, g);
+ add_edge(4, 5, g);
+ add_edge(5, 0, g);
+
+ add_edge(0, 2, g);
+ add_edge(0, 3, g);
+ add_edge(0, 4, g);
+
+ add_edge(1, 3, g);
+ add_edge(1, 4, g);
+ add_edge(1, 5, g);
+
+ // Initialize the interior edge index
+ property_map< graph, edge_index_t >::type e_index = get(edge_index, g);
+ graph_traits< graph >::edges_size_type edge_count = 0;
+ graph_traits< graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity - we know it is planar, we just want to
+ // compute the planar embedding as a side-effect
+ typedef std::vector< graph_traits< graph >::edge_descriptor > vec_t;
+ std::vector< vec_t > embedding(num_vertices(g));
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = make_iterator_property_map(
+ embedding.begin(), get(vertex_index, g))))
+ std::cout << "Input graph is planar" << std::endl;
+ else
+ std::cout << "Input graph is not planar" << std::endl;
+
+ typedef std::vector< graph_traits< graph >::vertex_descriptor >
+ ordering_storage_t;
+
+ ordering_storage_t ordering;
+ planar_canonical_ordering(g,
+ make_iterator_property_map(embedding.begin(), get(vertex_index, g)),
+ std::back_inserter(ordering));
+
+ ordering_storage_t::iterator oi, oi_end;
+ oi_end = ordering.end();
+ std::cout << "The planar canonical ordering is: ";
+ for (oi = ordering.begin(); oi != oi_end; ++oi)
+ std::cout << *oi << " ";
+ std::cout << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cc-internet.cpp b/src/boost/libs/graph/example/cc-internet.cpp
new file mode 100644
index 000000000..929d5e236
--- /dev/null
+++ b/src/boost/libs/graph/example/cc-internet.cpp
@@ -0,0 +1,47 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <fstream>
+#include <vector>
+#include <string>
+#include <boost/graph/connected_components.hpp>
+#include <boost/graph/graphviz.hpp>
+
+int main()
+{
+ using namespace boost;
+ GraphvizGraph g;
+ read_graphviz("figs/cc-internet.dot", g);
+
+ std::vector< int > component(num_vertices(g));
+
+ connected_components(g,
+ make_iterator_property_map(
+ component.begin(), get(vertex_index, g), component[0]));
+
+ property_map< GraphvizGraph, vertex_attribute_t >::type vertex_attr_map
+ = get(vertex_attribute, g);
+ std::string color[] = { "white", "gray", "black", "lightgray" };
+ graph_traits< GraphvizGraph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ vertex_attr_map[*vi]["color"] = color[component[*vi]];
+ vertex_attr_map[*vi]["style"] = "filled";
+ if (vertex_attr_map[*vi]["color"] == "black")
+ vertex_attr_map[*vi]["fontcolor"] = "white";
+ }
+ write_graphviz("figs/cc-internet-out.dot", g);
+}
diff --git a/src/boost/libs/graph/example/city_visitor.cpp b/src/boost/libs/graph/example/city_visitor.cpp
new file mode 100644
index 000000000..ba98c25e8
--- /dev/null
+++ b/src/boost/libs/graph/example/city_visitor.cpp
@@ -0,0 +1,148 @@
+//
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/graph_utility.hpp> // for boost::make_list
+
+/*
+ Example of using a visitor with the depth first search
+ and breadth first search algorithm
+
+ Sacramento ---- Reno ---- Salt Lake City
+ |
+ San Francisco
+ |
+ San Jose ---- Fresno
+ |
+ Los Angeles ---- Las Vegas ---- Phoenix
+ |
+ San Diego
+
+
+ The visitor has three main functions:
+
+ discover_vertex(u,g) is invoked when the algorithm first arrives at the
+ vertex u. This will happen in the depth first or breadth first
+ order depending on which algorithm you use.
+
+ examine_edge(e,g) is invoked when the algorithm first checks an edge to see
+ whether it has already been there. Whether using BFS or DFS, all
+ the edges of vertex u are examined immediately after the call to
+ visit(u).
+
+ finish_vertex(u,g) is called when after all the vertices reachable from vertex
+ u have already been visited.
+
+ */
+
+using namespace std;
+using namespace boost;
+
+struct city_arrival : public base_visitor< city_arrival >
+{
+ city_arrival(string* n) : names(n) {}
+ typedef on_discover_vertex event_filter;
+ template < class Vertex, class Graph >
+ inline void operator()(Vertex u, Graph&)
+ {
+ cout << endl
+ << "arriving at " << names[u] << endl
+ << " neighboring cities are: ";
+ }
+ string* names;
+};
+
+struct neighbor_cities : public base_visitor< neighbor_cities >
+{
+ neighbor_cities(string* n) : names(n) {}
+ typedef on_examine_edge event_filter;
+ template < class Edge, class Graph >
+ inline void operator()(Edge e, Graph& g)
+ {
+ cout << names[target(e, g)] << ", ";
+ }
+ string* names;
+};
+
+struct finish_city : public base_visitor< finish_city >
+{
+ finish_city(string* n) : names(n) {}
+ typedef on_finish_vertex event_filter;
+ template < class Vertex, class Graph >
+ inline void operator()(Vertex u, Graph&)
+ {
+ cout << endl << "finished with " << names[u] << endl;
+ }
+ string* names;
+};
+
+int main(int, char*[])
+{
+
+ enum
+ {
+ SanJose,
+ SanFran,
+ LA,
+ SanDiego,
+ Fresno,
+ LasVegas,
+ Reno,
+ Sacramento,
+ SaltLake,
+ Phoenix,
+ N
+ };
+
+ string names[]
+ = { "San Jose", "San Francisco", "Los Angeles", "San Diego", "Fresno",
+ "Las Vegas", "Reno", "Sacramento", "Salt Lake City", "Phoenix" };
+
+ typedef std::pair< int, int > E;
+ E edge_array[]
+ = { E(Sacramento, Reno), E(Sacramento, SanFran), E(Reno, SaltLake),
+ E(SanFran, SanJose), E(SanJose, Fresno), E(SanJose, LA),
+ E(LA, LasVegas), E(LA, SanDiego), E(LasVegas, Phoenix) };
+
+ /* Create the graph type we want. */
+ typedef adjacency_list< vecS, vecS, undirectedS > Graph;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the edge iterator constructor
+ Graph G(N);
+ for (std::size_t j = 0; j < sizeof(edge_array) / sizeof(E); ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, G);
+#else
+ Graph G(edge_array, edge_array + sizeof(edge_array) / sizeof(E), N);
+#endif
+
+ cout << "*** Depth First ***" << endl;
+ depth_first_search(G,
+ visitor(make_dfs_visitor(boost::make_list(
+ city_arrival(names), neighbor_cities(names), finish_city(names)))));
+ cout << endl;
+
+ /* Get the source vertex */
+ boost::graph_traits< Graph >::vertex_descriptor s = vertex(SanJose, G);
+
+ cout << "*** Breadth First ***" << endl;
+ breadth_first_search(G, s,
+ visitor(make_bfs_visitor(boost::make_list(
+ city_arrival(names), neighbor_cities(names), finish_city(names)))));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/closeness_centrality.cpp b/src/boost/libs/graph/example/closeness_centrality.cpp
new file mode 100644
index 000000000..9703bf3d3
--- /dev/null
+++ b/src/boost/libs/graph/example/closeness_centrality.cpp
@@ -0,0 +1,85 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[closeness_centrality_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/floyd_warshall_shortest.hpp>
+#include <boost/graph/closeness_centrality.hpp>
+#include <boost/graph/property_maps/constant_property_map.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a matrix type and its corresponding property map that
+// will contain the distances between each pair of vertices.
+typedef exterior_vertex_property< Graph, int > DistanceProperty;
+typedef DistanceProperty::matrix_type DistanceMatrix;
+typedef DistanceProperty::matrix_map_type DistanceMatrixMap;
+
+// Declare the weight map so that each edge returns the same value.
+typedef constant_property_map< Edge, int > WeightMap;
+
+// Declare a container and its corresponding property map that
+// will contain the resulting closeness centralities of each
+// vertex in the graph.
+typedef boost::exterior_vertex_property< Graph, float > ClosenessProperty;
+typedef ClosenessProperty::container_type ClosenessContainer;
+typedef ClosenessProperty::map_type ClosenessMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a property map that provides access to[
+ // tha actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the distances between all pairs of vertices using
+ // the Floyd-Warshall algorithm. Note that the weight map is
+ // created so that every edge has a weight of 1.
+ DistanceMatrix distances(num_vertices(g));
+ DistanceMatrixMap dm(distances, g);
+ WeightMap wm(1);
+ floyd_warshall_all_pairs_shortest_paths(g, dm, weight_map(wm));
+
+ // Compute the closeness centrality for graph.
+ ClosenessContainer cents(num_vertices(g));
+ ClosenessMap cm(cents, g);
+ all_closeness_centralities(g, dm, cm);
+
+ // Print the closeness centrality of each vertex.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << get(cm, *i)
+ << endl;
+ }
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/clustering_coefficient.cpp b/src/boost/libs/graph/example/clustering_coefficient.cpp
new file mode 100644
index 000000000..cb2ef39bf
--- /dev/null
+++ b/src/boost/libs/graph/example/clustering_coefficient.cpp
@@ -0,0 +1,68 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[code_clustering_coefficient
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/clustering_coefficient.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// The clustering property, container, and map define the containment
+// and abstract accessor for the clustering coefficients of vertices.
+typedef exterior_vertex_property< Graph, float > ClusteringProperty;
+typedef ClusteringProperty::container_type ClusteringContainer;
+typedef ClusteringProperty::map_type ClusteringMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a name map that provides access to
+ // then actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the clustering coefficients of each vertex in the graph
+ // and the mean clustering coefficient which is returned from the
+ // computation.
+ ClusteringContainer coefs(num_vertices(g));
+ ClusteringMap cm(coefs, g);
+ float cc = all_clustering_coefficients(g, cm);
+
+ // Print the clustering coefficient of each vertex.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << get(cm, *i)
+ << endl;
+ }
+ cout << "mean clustering coefficient: " << cc << endl;
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/comm_network.graph b/src/boost/libs/graph/example/comm_network.graph
new file mode 100644
index 000000000..d4a4a9f53
--- /dev/null
+++ b/src/boost/libs/graph/example/comm_network.graph
@@ -0,0 +1,12 @@
+Mary,Jill
+Jill,Scott
+Scott,Mary
+Scott,Bill
+Bill,Josh
+Josh,Frank
+Frank,Scott
+Frank,Anne
+Anne,Howard
+Howard,Frank
+Frank,Laurie
+Laurie,Mary
diff --git a/src/boost/libs/graph/example/components_on_edgelist.cpp b/src/boost/libs/graph/example/components_on_edgelist.cpp
new file mode 100644
index 000000000..233405148
--- /dev/null
+++ b/src/boost/libs/graph/example/components_on_edgelist.cpp
@@ -0,0 +1,93 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <iterator>
+#include <vector>
+#include <algorithm>
+#include <utility>
+#include <boost/graph/edge_list.hpp>
+#include <boost/graph/incremental_components.hpp>
+#include <boost/pending/disjoint_sets.hpp>
+#include <boost/utility.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+/*
+
+ This example demonstrates the usage of the
+ connected_components_on_edgelist algorithm. This differs from the
+ connect_components algorithm in that the graph object
+ only needs to provide access to the "list" of edges (via the
+ edges() function).
+
+ The example graphs come from "Introduction to
+ Algorithms", Cormen, Leiserson, and Rivest p. 87 (though we number
+ the vertices from zero instead of one).
+
+ Sample output:
+
+ An undirected graph (edge list):
+ (0,1) (1,4) (4,0) (2,5)
+ Total number of components: 3
+ Vertex 0 is in the component who's representative is 1
+ Vertex 1 is in the component who's representative is 1
+ Vertex 2 is in the component who's representative is 5
+ Vertex 3 is in the component who's representative is 3
+ Vertex 4 is in the component who's representative is 1
+ Vertex 5 is in the component who's representative is 5
+
+ component 0 contains: 4 1 0
+ component 1 contains: 3
+ component 2 contains: 5 2
+
+ */
+
+using namespace std;
+using boost::tie;
+
+int main(int, char*[])
+{
+ using namespace boost;
+ typedef int Index; // ID of a Vertex
+ typedef pair< Index, Index > Edge;
+ const int N = 6;
+ const int E = 4;
+ Edge edgelist[] = { Edge(0, 1), Edge(1, 4), Edge(4, 0), Edge(2, 5) };
+
+ edge_list< Edge*, Edge, ptrdiff_t, std::random_access_iterator_tag > g(
+ edgelist, edgelist + E);
+ cout << "An undirected graph (edge list):" << endl;
+ print_edges(g, identity_property_map());
+ cout << endl;
+
+ disjoint_sets_with_storage<> ds(N);
+ incremental_components(g, ds);
+
+ component_index< int > components(
+ &ds.parents()[0], &ds.parents()[0] + ds.parents().size());
+
+ cout << "Total number of components: " << components.size() << endl;
+ for (int k = 0; k != N; ++k)
+ cout << "Vertex " << k
+ << " is in the component who's representative is "
+ << ds.find_set(k) << endl;
+ cout << endl;
+
+ for (std::size_t i = 0; i < components.size(); ++i)
+ {
+ cout << "component " << i << " contains: ";
+ component_index< int >::component_iterator j = components[i].first,
+ jend = components[i].second;
+ for (; j != jend; ++j)
+ cout << *j << " ";
+ cout << endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/components_on_edgelist.expected b/src/boost/libs/graph/example/components_on_edgelist.expected
new file mode 100644
index 000000000..997df1a54
--- /dev/null
+++ b/src/boost/libs/graph/example/components_on_edgelist.expected
@@ -0,0 +1,14 @@
+An undirected graph (edge list):
+(0,1) (1,4) (4,0) (2,5)
+
+Total number of components: 3
+Vertex 0 is in the component who's representative is 1
+Vertex 1 is in the component who's representative is 1
+Vertex 2 is in the component who's representative is 5
+Vertex 3 is in the component who's representative is 3
+Vertex 4 is in the component who's representative is 1
+Vertex 5 is in the component who's representative is 5
+
+component 0 contains: 4 1 0
+component 1 contains: 3
+component 2 contains: 5 2
diff --git a/src/boost/libs/graph/example/concept_checks.expected b/src/boost/libs/graph/example/concept_checks.expected
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/libs/graph/example/concept_checks.expected
diff --git a/src/boost/libs/graph/example/connected-components.cpp b/src/boost/libs/graph/example/connected-components.cpp
new file mode 100644
index 000000000..034a78807
--- /dev/null
+++ b/src/boost/libs/graph/example/connected-components.cpp
@@ -0,0 +1,38 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <boost/graph/connected_components.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, undirectedS > Graph;
+
+ const int N = 6;
+ Graph G(N);
+ add_edge(0, 1, G);
+ add_edge(1, 4, G);
+ add_edge(4, 0, G);
+ add_edge(2, 5, G);
+
+ std::vector< int > c(num_vertices(G));
+ int num = connected_components(
+ G, make_iterator_property_map(c.begin(), get(vertex_index, G), c[0]));
+
+ std::cout << std::endl;
+ std::vector< int >::iterator i;
+ std::cout << "Total number of components: " << num << std::endl;
+ for (i = c.begin(); i != c.end(); ++i)
+ std::cout << "Vertex " << i - c.begin() << " is in component " << *i
+ << std::endl;
+ std::cout << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/connected_components.cpp b/src/boost/libs/graph/example/connected_components.cpp
new file mode 100644
index 000000000..4af273d23
--- /dev/null
+++ b/src/boost/libs/graph/example/connected_components.cpp
@@ -0,0 +1,62 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <utility>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/connected_components.hpp>
+
+/*
+
+ This example demonstrates the usage of the connected_components
+ algorithm on a undirected graph. The example graphs come from
+ "Introduction to Algorithms", Cormen, Leiserson, and Rivest p. 87
+ (though we number the vertices from zero instead of one).
+
+ Sample output:
+
+ Total number of components: 3
+ Vertex 0 is in component 0
+ Vertex 1 is in component 0
+ Vertex 2 is in component 1
+ Vertex 3 is in component 2
+ Vertex 4 is in component 0
+ Vertex 5 is in component 1
+
+ */
+
+using namespace std;
+
+int main(int, char*[])
+{
+ using namespace boost;
+ {
+ typedef adjacency_list< vecS, vecS, undirectedS > Graph;
+
+ Graph G;
+ add_edge(0, 1, G);
+ add_edge(1, 4, G);
+ add_edge(4, 0, G);
+ add_edge(2, 5, G);
+
+ std::vector< int > component(num_vertices(G));
+ int num = connected_components(G, &component[0]);
+
+ std::vector< int >::size_type i;
+ cout << "Total number of components: " << num << endl;
+ for (i = 0; i != component.size(); ++i)
+ cout << "Vertex " << i << " is in component " << component[i]
+ << endl;
+ cout << endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/connected_components.expected b/src/boost/libs/graph/example/connected_components.expected
new file mode 100644
index 000000000..862d93475
--- /dev/null
+++ b/src/boost/libs/graph/example/connected_components.expected
@@ -0,0 +1,8 @@
+Total number of components: 3
+Vertex 0 is in component 0
+Vertex 1 is in component 0
+Vertex 2 is in component 1
+Vertex 3 is in component 2
+Vertex 4 is in component 0
+Vertex 5 is in component 1
+
diff --git a/src/boost/libs/graph/example/container_gen.cpp b/src/boost/libs/graph/example/container_gen.cpp
new file mode 100644
index 000000000..17fb7f7b3
--- /dev/null
+++ b/src/boost/libs/graph/example/container_gen.cpp
@@ -0,0 +1,50 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/adjacency_list.hpp>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_STD_ALLOCATOR)
+
+template < class Allocator > struct list_with_allocatorS
+{
+};
+
+namespace boost
+{
+template < class Alloc, class ValueType >
+struct container_gen< list_with_allocatorS< Alloc >, ValueType >
+{
+ typedef typename Alloc::template rebind< ValueType >::other Allocator;
+ typedef std::list< ValueType, Allocator > type;
+};
+template < class Alloc >
+struct parallel_edge_traits< list_with_allocatorS< Alloc > >
+{
+ typedef allow_parallel_edge_tag type;
+};
+
+}
+
+// now you can define a graph using std::list and a specific allocator
+typedef boost::adjacency_list< list_with_allocatorS< std::allocator< int > >,
+ boost::vecS, boost::directedS >
+ MyGraph;
+
+int main(int, char*[])
+{
+ MyGraph g(5);
+
+ return 0;
+}
+
+#else
+
+int main(int, char*[]) { return 0; }
+
+#endif
diff --git a/src/boost/libs/graph/example/container_gen.expected b/src/boost/libs/graph/example/container_gen.expected
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/libs/graph/example/container_gen.expected
diff --git a/src/boost/libs/graph/example/copy-example.cpp b/src/boost/libs/graph/example/copy-example.cpp
new file mode 100644
index 000000000..7b629d479
--- /dev/null
+++ b/src/boost/libs/graph/example/copy-example.cpp
@@ -0,0 +1,54 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/copy.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, char > >
+ graph_t;
+
+ enum
+ {
+ a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ N
+ };
+ graph_t G(N);
+ property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, G);
+ char name = 'a';
+ graph_traits< graph_t >::vertex_iterator v, v_end;
+ for (boost::tie(v, v_end) = vertices(G); v != v_end; ++v, ++name)
+ name_map[*v] = name;
+
+ typedef std::pair< int, int > E;
+ E edges[] = { E(a, c), E(a, d), E(b, a), E(b, d), E(c, f), E(d, c), E(d, e),
+ E(d, f), E(e, b), E(e, g), E(f, e), E(f, g) };
+ for (int i = 0; i < 12; ++i)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ print_graph(G, name_map);
+ std::cout << std::endl;
+
+ graph_t G_copy;
+ copy_graph(G, G_copy);
+
+ print_graph(G_copy, name_map);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/csr-example.cpp b/src/boost/libs/graph/example/csr-example.cpp
new file mode 100644
index 000000000..a471e6997
--- /dev/null
+++ b/src/boost/libs/graph/example/csr-example.cpp
@@ -0,0 +1,61 @@
+// Copyright 2005 The Trustees of Indiana University.
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Authors: Douglas Gregor
+// Andrew Lumsdaine
+
+#include <boost/graph/compressed_sparse_row_graph.hpp>
+#include <string>
+#include <boost/graph/iteration_macros.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/graph/graphviz.hpp>
+
+using namespace boost;
+
+class WebPage
+{
+public:
+ std::string url;
+};
+
+int main()
+{
+ typedef std::pair< int, int > E;
+ const char* urls[6] = {
+ "http://www.boost.org/libs/graph/doc/index.html",
+ "http://www.boost.org/libs/graph/doc/table_of_contents.html",
+ "http://www.boost.org/libs/graph/doc/adjacency_list.html",
+ "http://www.boost.org/libs/graph/doc/history.html",
+ "http://www.boost.org/libs/graph/doc/bundles.html",
+ "http://www.boost.org/libs/graph/doc/using_adjacency_list.html",
+ };
+
+ E the_edges[] = { E(0, 1), E(0, 2), E(0, 3), E(1, 0), E(1, 3), E(1, 5),
+ E(2, 0), E(2, 5), E(3, 1), E(3, 4), E(4, 1), E(5, 0), E(5, 2) };
+
+ typedef compressed_sparse_row_graph< directedS, WebPage > WebGraph;
+ WebGraph g(boost::edges_are_sorted, &the_edges[0],
+ &the_edges[0] + sizeof(the_edges) / sizeof(E), 6);
+
+ // Set the URLs of each vertex
+ int index = 0;
+ BGL_FORALL_VERTICES(v, g, WebGraph)
+ g[v].url = urls[index++];
+
+ // Output each of the links
+ std::cout << "The web graph:" << std::endl;
+ BGL_FORALL_EDGES(e, g, WebGraph)
+ std::cout << " " << g[source(e, g)].url << " -> " << g[target(e, g)].url
+ << std::endl;
+
+ // Output the graph in DOT format
+ dynamic_properties dp;
+ dp.property("label", get(&WebPage::url, g));
+ std::ofstream out("web-graph.dot");
+ write_graphviz_dp(out, g, dp, std::string(), get(vertex_index, g));
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cuthill_mckee_ordering.cpp b/src/boost/libs/graph/example/cuthill_mckee_ordering.cpp
new file mode 100644
index 000000000..13a329f2c
--- /dev/null
+++ b/src/boost/libs/graph/example/cuthill_mckee_ordering.cpp
@@ -0,0 +1,138 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+// Doug Gregor, D. Kevin McGrath
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/cuthill_mckee_ordering.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/bandwidth.hpp>
+
+/*
+ Sample Output
+ original bandwidth: 8
+ Reverse Cuthill-McKee ordering starting at: 6
+ 8 3 0 9 2 5 1 4 7 6
+ bandwidth: 4
+ Reverse Cuthill-McKee ordering starting at: 0
+ 9 1 4 6 7 2 8 5 3 0
+ bandwidth: 4
+ Reverse Cuthill-McKee ordering:
+ 0 8 5 7 3 6 4 2 1 9
+ bandwidth: 4
+ */
+int main(int, char*[])
+{
+ using namespace boost;
+ using namespace std;
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_color_t, default_color_type,
+ property< vertex_degree_t, int > > >
+ Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+
+ typedef std::pair< std::size_t, std::size_t > Pair;
+ Pair edges[14] = { Pair(0, 3), // a-d
+ Pair(0, 5), // a-f
+ Pair(1, 2), // b-c
+ Pair(1, 4), // b-e
+ Pair(1, 6), // b-g
+ Pair(1, 9), // b-j
+ Pair(2, 3), // c-d
+ Pair(2, 4), // c-e
+ Pair(3, 5), // d-f
+ Pair(3, 8), // d-i
+ Pair(4, 6), // e-g
+ Pair(5, 6), // f-g
+ Pair(5, 7), // f-h
+ Pair(6, 7) }; // g-h
+
+ Graph G(10);
+ for (int i = 0; i < 14; ++i)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ graph_traits< Graph >::vertex_iterator ui, ui_end;
+
+ property_map< Graph, vertex_degree_t >::type deg = get(vertex_degree, G);
+ for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
+ deg[*ui] = degree(*ui, G);
+
+ property_map< Graph, vertex_index_t >::type index_map
+ = get(vertex_index, G);
+
+ std::cout << "original bandwidth: " << bandwidth(G) << std::endl;
+
+ std::vector< Vertex > inv_perm(num_vertices(G));
+ std::vector< size_type > perm(num_vertices(G));
+ {
+ Vertex s = vertex(6, G);
+ // reverse cuthill_mckee_ordering
+ cuthill_mckee_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
+ get(vertex_degree, G));
+ cout << "Reverse Cuthill-McKee ordering starting at: " << s << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+ {
+ Vertex s = vertex(0, G);
+ // reverse cuthill_mckee_ordering
+ cuthill_mckee_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
+ get(vertex_degree, G));
+ cout << "Reverse Cuthill-McKee ordering starting at: " << s << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+
+ {
+ // reverse cuthill_mckee_ordering
+ cuthill_mckee_ordering(
+ G, inv_perm.rbegin(), get(vertex_color, G), make_degree_map(G));
+
+ cout << "Reverse Cuthill-McKee ordering:" << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cuthill_mckee_ordering.expected b/src/boost/libs/graph/example/cuthill_mckee_ordering.expected
new file mode 100644
index 000000000..f5103467c
--- /dev/null
+++ b/src/boost/libs/graph/example/cuthill_mckee_ordering.expected
@@ -0,0 +1,8 @@
+degree:
+2 4 3 4 3 4 4 2 1 1
+Reverse Cuthill-McKee ordering starting at :6
+8 3 0 9 2 5 1 4 7 6
+Reverse Cuthill-McKee ordering starting at :0
+9 1 4 6 7 2 8 5 3 0
+Reverse Cuthill-McKee ordering:
+0 8 5 7 3 6 4 2 1 9
diff --git a/src/boost/libs/graph/example/cycle-file-dep.cpp b/src/boost/libs/graph/example/cycle-file-dep.cpp
new file mode 100644
index 000000000..a1d55ef7b
--- /dev/null
+++ b/src/boost/libs/graph/example/cycle-file-dep.cpp
@@ -0,0 +1,94 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The file dependency graph is directed
+ >
+ file_dep_graph;
+
+typedef graph_traits< file_dep_graph >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph >::edge_descriptor edge_t;
+
+bool has_cycle_dfs(
+ const file_dep_graph& g, vertex_t u, default_color_type* color)
+{
+ color[u] = gray_color;
+ graph_traits< file_dep_graph >::adjacency_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = adjacent_vertices(u, g); vi != vi_end; ++vi)
+ if (color[*vi] == white_color)
+ {
+ if (has_cycle_dfs(g, *vi, color))
+ return true; // cycle detected, return immediately
+ }
+ else if (color[*vi] == gray_color) // *vi is an ancestor!
+ return true;
+ color[u] = black_color;
+ return false;
+}
+
+bool has_cycle(const file_dep_graph& g)
+{
+ std::vector< default_color_type > color(num_vertices(g), white_color);
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (color[*vi] == white_color)
+ if (has_cycle_dfs(g, *vi, &color[0]))
+ return true;
+ return false;
+}
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the edge iterator constructor
+ file_dep_graph g(n_vertices);
+ while (input_begin != input_end)
+ {
+ size_type i, j;
+ boost::tie(i, j) = *input_begin++;
+ add_edge(i, j, g);
+ }
+#else
+ file_dep_graph g(input_begin, input_end, n_vertices);
+#endif
+
+ std::vector< std::string > name(num_vertices(g));
+ std::ifstream name_in(argc >= 3 ? argv[2] : "makefile-target-names.dat");
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ name_in >> name[*vi];
+
+ assert(has_cycle(g) == false);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cycle-file-dep2.cpp b/src/boost/libs/graph/example/cycle-file-dep2.cpp
new file mode 100644
index 000000000..678727a22
--- /dev/null
+++ b/src/boost/libs/graph/example/cycle-file-dep2.cpp
@@ -0,0 +1,133 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+// can't do using namespace boost because then
+// we get conflict with boost::default_dfs_visitor.
+using namespace boost;
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The file dependency graph is directed
+ >
+ file_dep_graph;
+
+typedef graph_traits< file_dep_graph >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph >::edge_descriptor edge_t;
+
+template < typename Visitor >
+void dfs_v1(
+ const file_dep_graph& g, vertex_t u, default_color_type* color, Visitor vis)
+{
+ color[u] = gray_color;
+ vis.discover_vertex(u, g);
+ graph_traits< file_dep_graph >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei)
+ {
+ if (color[target(*ei, g)] == white_color)
+ {
+ vis.tree_edge(*ei, g);
+ dfs_v1(g, target(*ei, g), color, vis);
+ }
+ else if (color[target(*ei, g)] == gray_color)
+ vis.back_edge(*ei, g);
+ else
+ vis.forward_or_cross_edge(*ei, g);
+ }
+ color[u] = black_color;
+ vis.finish_vertex(u, g);
+}
+
+template < typename Visitor >
+void generic_dfs_v1(const file_dep_graph& g, Visitor vis)
+{
+ std::vector< default_color_type > color(num_vertices(g), white_color);
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ if (color[*vi] == white_color)
+ dfs_v1(g, *vi, &color[0], vis);
+ }
+}
+
+struct dfs_visitor_default
+{
+ template < typename V, typename G > void discover_vertex(V, const G&) {}
+
+ template < typename E, typename G > void tree_edge(E, const G&) {}
+
+ template < typename E, typename G > void back_edge(E, const G&) {}
+
+ template < typename E, typename G > void forward_or_cross_edge(E, const G&)
+ {
+ }
+
+ template < typename V, typename G > void finish_vertex(V, const G&) {}
+};
+
+struct cycle_detector : public dfs_visitor_default
+{
+ cycle_detector(bool& cycle) : has_cycle(cycle) {}
+ void back_edge(edge_t, const file_dep_graph&) { has_cycle = true; }
+ bool& has_cycle;
+};
+
+bool has_cycle(const file_dep_graph& g)
+{
+ bool has_cycle = false;
+ cycle_detector vis(has_cycle);
+ generic_dfs_v1(g, vis);
+ return has_cycle;
+}
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the edge iterator constructor
+ file_dep_graph g(n_vertices);
+ while (input_begin != input_end)
+ {
+ size_type i, j;
+ boost::tie(i, j) = *input_begin++;
+ add_edge(i, j, g);
+ }
+#else
+ file_dep_graph g(input_begin, input_end, n_vertices);
+#endif
+
+ std::vector< std::string > name(num_vertices(g));
+ std::ifstream name_in(argc >= 3 ? argv[2] : "makefile-target-names.dat");
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ name_in >> name[*vi];
+
+ assert(has_cycle(g) == false);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cycle_canceling_example.cpp b/src/boost/libs/graph/example/cycle_canceling_example.cpp
new file mode 100644
index 000000000..63033848c
--- /dev/null
+++ b/src/boost/libs/graph/example/cycle_canceling_example.cpp
@@ -0,0 +1,27 @@
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/cycle_canceling.hpp>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
+
+#include "../test/min_cost_max_flow_utils.hpp"
+
+int main()
+{
+ boost::SampleGraph::vertex_descriptor s, t;
+ boost::SampleGraph::Graph g;
+ boost::SampleGraph::getSampleGraph(g, s, t);
+
+ boost::edmonds_karp_max_flow(g, s, t);
+ boost::cycle_canceling(g);
+
+ int cost = boost::find_flow_cost(g);
+ assert(cost == 29);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/cycle_ratio_example.cpp b/src/boost/libs/graph/example/cycle_ratio_example.cpp
new file mode 100644
index 000000000..121bebe66
--- /dev/null
+++ b/src/boost/libs/graph/example/cycle_ratio_example.cpp
@@ -0,0 +1,85 @@
+// Copyright (C) 2006-2009 Dmitry Bufistov and Andrey Parfenov
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cassert>
+#include <ctime>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_real.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/random.hpp>
+#include <boost/graph/howard_cycle_ratio.hpp>
+
+/**
+ * @author Dmitry Bufistov
+ * @author Andrey Parfenov
+ */
+
+using namespace boost;
+typedef adjacency_list< listS, listS, directedS,
+ property< vertex_index_t, int >,
+ property< edge_weight_t, double, property< edge_weight2_t, double > > >
+ grap_real_t;
+
+template < typename TG > void gen_rand_graph(TG& g, size_t nV, size_t nE)
+{
+ g.clear();
+ mt19937 rng;
+ rng.seed(0 /*uint32_t(time(0))*/); // Reproducable seed.
+ boost::generate_random_graph(g, nV, nE, rng, true, true);
+ boost::uniform_real<> ur(-1, 10);
+ boost::variate_generator< boost::mt19937&, boost::uniform_real<> > ew1rg(
+ rng, ur);
+ randomize_property< edge_weight_t >(g, ew1rg);
+ boost::uniform_int< size_t > uint(1, 5);
+ boost::variate_generator< boost::mt19937&, boost::uniform_int< size_t > >
+ ew2rg(rng, uint);
+ randomize_property< edge_weight2_t >(g, ew2rg);
+}
+
+int main(int argc, char* argv[])
+{
+ using std::cout;
+ using std::endl;
+ const double epsilon = 0.0000001;
+ double min_cr, max_cr; /// Minimum and maximum cycle ratio
+ typedef std::vector< graph_traits< grap_real_t >::edge_descriptor >
+ ccReal_t;
+ ccReal_t cc; /// critical cycle
+
+ grap_real_t tgr;
+ property_map< grap_real_t, vertex_index_t >::type vim
+ = get(vertex_index, tgr);
+ property_map< grap_real_t, edge_weight_t >::type ew1
+ = get(edge_weight, tgr);
+ property_map< grap_real_t, edge_weight2_t >::type ew2
+ = get(edge_weight2, tgr);
+
+ gen_rand_graph(tgr, 1000, 30000);
+ cout << "Vertices number: " << num_vertices(tgr) << endl;
+ cout << "Edges number: " << num_edges(tgr) << endl;
+ int i = 0;
+ graph_traits< grap_real_t >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(tgr); vi != vi_end; vi++)
+ {
+ vim[*vi] = i++; /// Initialize vertex index property
+ }
+ max_cr = maximum_cycle_ratio(tgr, vim, ew1, ew2);
+ cout << "Maximum cycle ratio is " << max_cr << endl;
+ min_cr = minimum_cycle_ratio(tgr, vim, ew1, ew2, &cc);
+ cout << "Minimum cycle ratio is " << min_cr << endl;
+ std::pair< double, double > cr(.0, .0);
+ cout << "Critical cycle:\n";
+ for (ccReal_t::iterator itr = cc.begin(); itr != cc.end(); ++itr)
+ {
+ cr.first += ew1[*itr];
+ cr.second += ew2[*itr];
+ std::cout << "(" << vim[source(*itr, tgr)] << ","
+ << vim[target(*itr, tgr)] << ") ";
+ }
+ cout << endl;
+ assert(std::abs(cr.first / cr.second - min_cr) < epsilon * 2);
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/dag_shortest_paths.cpp b/src/boost/libs/graph/example/dag_shortest_paths.cpp
new file mode 100644
index 000000000..4e22457dd
--- /dev/null
+++ b/src/boost/libs/graph/example/dag_shortest_paths.cpp
@@ -0,0 +1,78 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/dag_shortest_paths.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+#include <iostream>
+
+// Example from Introduction to Algorithms by Cormen, et all p.537.
+
+// Sample output:
+// r: inifinity
+// s: 0
+// t: 2
+// u: 6
+// v: 5
+// x: 3
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_distance_t, int >, property< edge_weight_t, int > >
+ graph_t;
+ graph_t g(6);
+ enum verts
+ {
+ r,
+ s,
+ t,
+ u,
+ v,
+ x
+ };
+ char name[] = "rstuvx";
+ add_edge(r, s, 5, g);
+ add_edge(r, t, 3, g);
+ add_edge(s, t, 2, g);
+ add_edge(s, u, 6, g);
+ add_edge(t, u, 7, g);
+ add_edge(t, v, 4, g);
+ add_edge(t, x, 2, g);
+ add_edge(u, v, -1, g);
+ add_edge(u, x, 1, g);
+ add_edge(v, x, -2, g);
+
+ property_map< graph_t, vertex_distance_t >::type d_map
+ = get(vertex_distance, g);
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the named-parameter mechanism, so
+ // we make a direct call to the underlying implementation function.
+ std::vector< default_color_type > color(num_vertices(g));
+ std::vector< std::size_t > pred(num_vertices(g));
+ default_dijkstra_visitor vis;
+ std::less< int > compare;
+ closed_plus< int > combine;
+ property_map< graph_t, edge_weight_t >::type w_map = get(edge_weight, g);
+ dag_shortest_paths(g, s, d_map, w_map, &color[0], &pred[0], vis, compare,
+ combine, (std::numeric_limits< int >::max)(), 0);
+#else
+ dag_shortest_paths(g, s, distance_map(d_map));
+#endif
+
+ graph_traits< graph_t >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (d_map[*vi] == (std::numeric_limits< int >::max)())
+ std::cout << name[*vi] << ": inifinity\n";
+ else
+ std::cout << name[*vi] << ": " << d_map[*vi] << '\n';
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/data1.txt b/src/boost/libs/graph/example/data1.txt
new file mode 100644
index 000000000..d8db9eb5d
--- /dev/null
+++ b/src/boost/libs/graph/example/data1.txt
@@ -0,0 +1,12 @@
+# Copyright (c) 2002 Trustees of Indiana University
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# five vertices
+n 5
+# the edges
+e
+1 2
+0 1
+2 0
diff --git a/src/boost/libs/graph/example/data2.txt b/src/boost/libs/graph/example/data2.txt
new file mode 100644
index 000000000..fa665f6c9
--- /dev/null
+++ b/src/boost/libs/graph/example/data2.txt
@@ -0,0 +1,16 @@
+# Copyright (c) 2002 Trustees of Indiana University
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# vertices
+v
+0 0.5 4.1 #
+1 1.5 5.1 # second vertex
+2 2.5 6.1
+
+# the edges
+e
+1 2 0.1
+0 1 0.2
+1 0 0.3
diff --git a/src/boost/libs/graph/example/data3.txt b/src/boost/libs/graph/example/data3.txt
new file mode 100644
index 000000000..25ec6d561
--- /dev/null
+++ b/src/boost/libs/graph/example/data3.txt
@@ -0,0 +1,12 @@
+# Copyright (c) 2002 Trustees of Indiana University
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# vertices and edges can be interleaved
+v 3.14 0
+v 3.15 1
+e 0 1 0.1
+e 1 0 1.0
+v 3.16 2
+e 1 2 1.2
diff --git a/src/boost/libs/graph/example/dave.cpp b/src/boost/libs/graph/example/dave.cpp
new file mode 100644
index 000000000..0cf807fb8
--- /dev/null
+++ b/src/boost/libs/graph/example/dave.cpp
@@ -0,0 +1,238 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <iterator>
+#include <vector>
+#include <list>
+// Use boost::queue instead of std::queue because std::queue doesn't
+// model Buffer; it has to top() function. -Jeremy
+#include <boost/pending/queue.hpp>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace std;
+using namespace boost;
+/*
+ This example does a best-first-search (using dijkstra's) and
+ simultaneously makes a copy of the graph (assuming the graph is
+ connected).
+
+ Example Graph: (p. 90 "Data Structures and Network Algorithms", Tarjan)
+
+ g
+ 3+ +2
+ / 1 \
+ e+----f
+ |+0 5++
+ | \ / |
+ 10| d |12
+ |8++\7|
+ +/ | +|
+ b 4| c
+ \ | +
+ 6+|/3
+ a
+
+ Sample Output:
+a --> c d
+b --> a d
+c --> f
+d --> c e f
+e --> b g
+f --> e g
+g -->
+Starting graph:
+a(32767); c d
+c(32767); f
+d(32767); c e f
+f(32767); e g
+e(32767); b g
+g(32767);
+b(32767); a d
+Result:
+a(0); d c
+d(4); f e c
+c(3); f
+f(9); g e
+e(4); g b
+g(7);
+b(14); d a
+
+*/
+
+typedef property< vertex_color_t, default_color_type,
+ property< vertex_distance_t, int > >
+ VProperty;
+typedef int weight_t;
+typedef property< edge_weight_t, weight_t > EProperty;
+
+typedef adjacency_list< vecS, vecS, directedS, VProperty, EProperty > Graph;
+
+template < class Tag >
+struct endl_printer : public boost::base_visitor< endl_printer< Tag > >
+{
+ typedef Tag event_filter;
+ endl_printer(std::ostream& os) : m_os(os) {}
+ template < class T, class Graph > void operator()(T, Graph&)
+ {
+ m_os << std::endl;
+ }
+ std::ostream& m_os;
+};
+template < class Tag > endl_printer< Tag > print_endl(std::ostream& os, Tag)
+{
+ return endl_printer< Tag >(os);
+}
+
+template < class PA, class Tag >
+struct edge_printer : public boost::base_visitor< edge_printer< PA, Tag > >
+{
+ typedef Tag event_filter;
+
+ edge_printer(PA pa, std::ostream& os) : m_pa(pa), m_os(os) {}
+
+ template < class T, class Graph > void operator()(T x, Graph& g)
+ {
+ m_os << "(" << get(m_pa, source(x, g)) << "," << get(m_pa, target(x, g))
+ << ") ";
+ }
+ PA m_pa;
+ std::ostream& m_os;
+};
+template < class PA, class Tag >
+edge_printer< PA, Tag > print_edge(PA pa, std::ostream& os, Tag)
+{
+ return edge_printer< PA, Tag >(pa, os);
+}
+
+template < class NewGraph, class Tag >
+struct graph_copier
+: public boost::base_visitor< graph_copier< NewGraph, Tag > >
+{
+ typedef Tag event_filter;
+
+ graph_copier(NewGraph& graph) : new_g(graph) {}
+
+ template < class Edge, class Graph > void operator()(Edge e, Graph& g)
+ {
+ add_edge(source(e, g), target(e, g), new_g);
+ }
+
+private:
+ NewGraph& new_g;
+};
+template < class NewGraph, class Tag >
+inline graph_copier< NewGraph, Tag > copy_graph(NewGraph& g, Tag)
+{
+ return graph_copier< NewGraph, Tag >(g);
+}
+
+template < class Graph, class Name > void print(Graph& G, Name name)
+{
+ typename boost::graph_traits< Graph >::vertex_iterator ui, uiend;
+ for (boost::tie(ui, uiend) = vertices(G); ui != uiend; ++ui)
+ {
+ cout << name[*ui] << " --> ";
+ typename boost::graph_traits< Graph >::adjacency_iterator vi, viend;
+ for (boost::tie(vi, viend) = adjacent_vertices(*ui, G); vi != viend;
+ ++vi)
+ cout << name[*vi] << " ";
+ cout << endl;
+ }
+}
+
+int main(int, char*[])
+{
+ // Name and ID numbers for the vertices
+ char name[] = "abcdefg";
+ enum
+ {
+ a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ N
+ };
+
+ Graph G(N);
+ boost::property_map< Graph, vertex_index_t >::type vertex_id
+ = get(vertex_index, G);
+
+ std::vector< weight_t > distance(N, (numeric_limits< weight_t >::max)());
+ typedef boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ std::vector< Vertex > parent(N);
+
+ typedef std::pair< int, int > E;
+
+ E edges[] = { E(a, c), E(a, d), E(b, a), E(b, d), E(c, f), E(d, c), E(d, e),
+ E(d, f), E(e, b), E(e, g), E(f, e), E(f, g) };
+
+ int weight[] = { 3, 4, 6, 8, 12, 7, 0, 5, 10, 3, 1, 2 };
+
+ for (int i = 0; i < 12; ++i)
+ add_edge(edges[i].first, edges[i].second, weight[i], G);
+
+ print(G, name);
+
+ adjacency_list< listS, vecS, directedS,
+ property< vertex_color_t, default_color_type > >
+ G_copy(N);
+
+ cout << "Starting graph:" << endl;
+
+ std::ostream_iterator< int > cout_int(std::cout, " ");
+ std::ostream_iterator< char > cout_char(std::cout, " ");
+
+ boost::queue< Vertex > Q;
+ boost::breadth_first_search(G, vertex(a, G), Q,
+ make_bfs_visitor(boost::make_list(
+ write_property(make_iterator_property_map(name, vertex_id, name[0]),
+ cout_char, on_examine_vertex()),
+ write_property(make_iterator_property_map(
+ distance.begin(), vertex_id, distance[0]),
+ cout_int, on_examine_vertex()),
+ print_edge(make_iterator_property_map(name, vertex_id, name[0]),
+ std::cout, on_examine_edge()),
+ print_endl(std::cout, on_finish_vertex()))),
+ get(vertex_color, G));
+
+ std::cout << "about to call dijkstra's" << std::endl;
+
+ parent[vertex(a, G)] = vertex(a, G);
+ boost::dijkstra_shortest_paths(G, vertex(a, G),
+ distance_map(make_iterator_property_map(
+ distance.begin(), vertex_id, distance[0]))
+ .predecessor_map(make_iterator_property_map(
+ parent.begin(), vertex_id, parent[0]))
+ .visitor(
+ make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
+
+ cout << endl;
+ cout << "Result:" << endl;
+ boost::breadth_first_search(G, vertex(a, G),
+ visitor(make_bfs_visitor(boost::make_list(
+ write_property(make_iterator_property_map(name, vertex_id, name[0]),
+ cout_char, on_examine_vertex()),
+ write_property(make_iterator_property_map(
+ distance.begin(), vertex_id, distance[0]),
+ cout_int, on_examine_vertex()),
+ print_edge(make_iterator_property_map(name, vertex_id, name[0]),
+ std::cout, on_examine_edge()),
+ print_endl(std::cout, on_finish_vertex())))));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/dave.expected b/src/boost/libs/graph/example/dave.expected
new file mode 100644
index 000000000..3ff1506b1
--- /dev/null
+++ b/src/boost/libs/graph/example/dave.expected
@@ -0,0 +1,24 @@
+a --> c d
+b --> a d
+c --> f
+d --> c e f
+e --> b g
+f --> e g
+g -->
+Starting graph:
+a 2147483647 (a,c) (a,d)
+c 2147483647 (c,f)
+d 2147483647 (d,c) (d,e) (d,f)
+f 2147483647 (f,e) (f,g)
+e 2147483647 (e,b) (e,g)
+g 2147483647
+b 2147483647 (b,a) (b,d)
+
+Result:
+a 0 (a,c) (a,d)
+c 3 (c,f)
+d 4 (d,c) (d,e) (d,f)
+f 9 (f,e) (f,g)
+e 4 (e,b) (e,g)
+g 7
+b 14 (b,a) (b,d)
diff --git a/src/boost/libs/graph/example/default-constructor.cpp b/src/boost/libs/graph/example/default-constructor.cpp
new file mode 100644
index 000000000..71d9b3ef7
--- /dev/null
+++ b/src/boost/libs/graph/example/default-constructor.cpp
@@ -0,0 +1,45 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph > void read_graph_file(std::istream& in, Graph& g)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i) // Add n vertices to the graph
+ add_vertex(g);
+ size_type u, v;
+ while (in >> u) // Read in pairs of integers as edges
+ if (in >> v)
+ add_edge(u, v, g);
+ else
+ break;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The graph is directed
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ read_graph_file(file_in, g);
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/default-constructor2.cpp b/src/boost/libs/graph/example/default-constructor2.cpp
new file mode 100644
index 000000000..18f886057
--- /dev/null
+++ b/src/boost/libs/graph/example/default-constructor2.cpp
@@ -0,0 +1,48 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph > void read_graph_file(std::istream& in, Graph& g)
+{
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ in >> n_vertices; // read in number of vertices
+ std::vector< Vertex > vertex_set(n_vertices);
+ for (size_type i = 0; i < n_vertices; ++i)
+ vertex_set[i] = add_vertex(g);
+
+ size_type u, v;
+ while (in >> u)
+ if (in >> v)
+ add_edge(vertex_set[u], vertex_set[v], g);
+ else
+ break;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The graph is directed
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ read_graph_file(file_in, g);
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/degree_centrality.cpp b/src/boost/libs/graph/example/degree_centrality.cpp
new file mode 100644
index 000000000..1dbee79b4
--- /dev/null
+++ b/src/boost/libs/graph/example/degree_centrality.cpp
@@ -0,0 +1,66 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[degree_centrality_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/degree_centrality.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a container type for degree centralities and its
+// corresponding property map.
+typedef exterior_vertex_property< Graph, unsigned > CentralityProperty;
+typedef CentralityProperty::container_type CentralityContainer;
+typedef CentralityProperty::map_type CentralityMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a property map that provides access
+ // to the actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the degree centrality for graph.
+ CentralityContainer cents(num_vertices(g));
+ CentralityMap cm(cents, g);
+ all_degree_centralities(g, cm);
+
+ // Print the degree centrality of each vertex.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setiosflags(ios::left) << setw(12) << g[*i].name << cm[*i]
+ << endl;
+ }
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/dfs-example.cpp b/src/boost/libs/graph/example/dfs-example.cpp
new file mode 100644
index 000000000..fff17bfdd
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs-example.cpp
@@ -0,0 +1,104 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/range/irange.hpp>
+#include <boost/pending/indirect_cmp.hpp>
+
+#include <iostream>
+
+using namespace boost;
+template < typename TimeMap >
+class dfs_time_visitor : public default_dfs_visitor
+{
+ typedef typename property_traits< TimeMap >::value_type T;
+
+public:
+ dfs_time_visitor(TimeMap dmap, TimeMap fmap, T& t)
+ : m_dtimemap(dmap), m_ftimemap(fmap), m_time(t)
+ {
+ }
+ template < typename Vertex, typename Graph >
+ void discover_vertex(Vertex u, const Graph& g) const
+ {
+ put(m_dtimemap, u, m_time++);
+ }
+ template < typename Vertex, typename Graph >
+ void finish_vertex(Vertex u, const Graph& g) const
+ {
+ put(m_ftimemap, u, m_time++);
+ }
+ TimeMap m_dtimemap;
+ TimeMap m_ftimemap;
+ T& m_time;
+};
+
+int main()
+{
+ // Select the graph type we wish to use
+ typedef adjacency_list< vecS, vecS, directedS > graph_t;
+ typedef graph_traits< graph_t >::vertices_size_type size_type;
+ // Set up the vertex names
+ enum
+ {
+ u,
+ v,
+ w,
+ x,
+ y,
+ z,
+ N
+ };
+ char name[] = { 'u', 'v', 'w', 'x', 'y', 'z' };
+ // Specify the edges in the graph
+ typedef std::pair< int, int > E;
+ E edge_array[] = { E(u, v), E(u, x), E(x, v), E(y, x), E(v, y), E(w, y),
+ E(w, z), E(z, z) };
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ graph_t g(N);
+ for (std::size_t j = 0; j < sizeof(edge_array) / sizeof(E); ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ graph_t g(edge_array, edge_array + sizeof(edge_array) / sizeof(E), N);
+#endif
+
+ // discover time and finish time properties
+ std::vector< size_type > dtime(num_vertices(g));
+ std::vector< size_type > ftime(num_vertices(g));
+ typedef iterator_property_map< std::vector< size_type >::iterator,
+ property_map< graph_t, vertex_index_t >::const_type >
+ time_pm_type;
+ time_pm_type dtime_pm(dtime.begin(), get(vertex_index, g));
+ time_pm_type ftime_pm(ftime.begin(), get(vertex_index, g));
+ size_type t = 0;
+ dfs_time_visitor< time_pm_type > vis(dtime_pm, ftime_pm, t);
+
+ depth_first_search(g, visitor(vis));
+
+ // use std::sort to order the vertices by their discover time
+ std::vector< size_type > discover_order(N);
+ integer_range< size_type > r(0, N);
+ std::copy(r.begin(), r.end(), discover_order.begin());
+ std::sort(discover_order.begin(), discover_order.end(),
+ indirect_cmp< time_pm_type, std::less< size_type > >(dtime_pm));
+ std::cout << "order of discovery: ";
+ int i;
+ for (i = 0; i < N; ++i)
+ std::cout << name[discover_order[i]] << " ";
+
+ std::vector< size_type > finish_order(N);
+ std::copy(r.begin(), r.end(), finish_order.begin());
+ std::sort(finish_order.begin(), finish_order.end(),
+ indirect_cmp< time_pm_type, std::less< size_type > >(ftime_pm));
+ std::cout << std::endl << "order of finish: ";
+ for (i = 0; i < N; ++i)
+ std::cout << name[finish_order[i]] << " ";
+ std::cout << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/dfs-parenthesis.cpp b/src/boost/libs/graph/example/dfs-parenthesis.cpp
new file mode 100644
index 000000000..a391a64d0
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs-parenthesis.cpp
@@ -0,0 +1,53 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/depth_first_search.hpp>
+
+char name[] = "abcdefghij";
+
+struct parenthesis_visitor : public boost::default_dfs_visitor
+{
+ template < class Vertex, class Graph >
+ void start_vertex(Vertex v, const Graph&)
+ {
+ std::cout << ' ';
+ }
+ template < class Vertex, class Graph >
+ void discover_vertex(Vertex v, const Graph&)
+ {
+ std::cout << "(" << name[v] << ' ';
+ }
+ template < class Vertex, class Graph >
+ void finish_vertex(Vertex v, const Graph&)
+ {
+ std::cout << ' ' << name[v] << ")";
+ }
+};
+
+int main()
+{
+ using namespace boost;
+ GraphvizGraph g;
+ read_graphviz("figs/dfs-example.dot", g);
+ graph_traits< GraphvizGraph >::edge_iterator e, e_end;
+ for (boost::tie(e, e_end) = edges(g); e != e_end; ++e)
+ std::cout << '(' << name[source(*e, g)] << ' ' << name[target(*e, g)]
+ << ')' << std::endl;
+ parenthesis_visitor paren_vis;
+ depth_first_search(g, visitor(paren_vis));
+ std::cout << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/dfs.cpp b/src/boost/libs/graph/example/dfs.cpp
new file mode 100644
index 000000000..b052a214f
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs.cpp
@@ -0,0 +1,124 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <assert.h>
+#include <iostream>
+
+#include <vector>
+#include <algorithm>
+#include <utility>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/visitors.hpp>
+
+/*
+ This calculates the discover finishing time.
+
+ Sample Output
+
+ Tree edge: 0 --> 2
+ Tree edge: 2 --> 1
+ Back edge: 1 --> 1
+ Finish edge: 1 --> 1
+ Tree edge: 1 --> 3
+ Back edge: 3 --> 1
+ Finish edge: 3 --> 1
+ Tree edge: 3 --> 4
+ Back edge: 4 --> 0
+ Finish edge: 4 --> 0
+ Back edge: 4 --> 1
+ Finish edge: 4 --> 1
+ Forward or cross edge: 2 --> 3
+ Finish edge: 2 --> 3
+ Finish edge: 0 --> 2
+ 1 10
+ 3 8
+ 2 9
+ 4 7
+ 5 6
+
+ */
+
+using namespace boost;
+using namespace std;
+
+template < class VisitorList >
+struct edge_categorizer : public dfs_visitor< VisitorList >
+{
+ typedef dfs_visitor< VisitorList > Base;
+
+ edge_categorizer(const VisitorList& v = null_visitor()) : Base(v) {}
+
+ template < class Edge, class Graph > void tree_edge(Edge e, Graph& G)
+ {
+ cout << "Tree edge: " << source(e, G) << " --> " << target(e, G)
+ << endl;
+ Base::tree_edge(e, G);
+ }
+ template < class Edge, class Graph > void back_edge(Edge e, Graph& G)
+ {
+ cout << "Back edge: " << source(e, G) << " --> " << target(e, G)
+ << endl;
+ Base::back_edge(e, G);
+ }
+ template < class Edge, class Graph >
+ void forward_or_cross_edge(Edge e, Graph& G)
+ {
+ cout << "Forward or cross edge: " << source(e, G) << " --> "
+ << target(e, G) << endl;
+ Base::forward_or_cross_edge(e, G);
+ }
+ template < class Edge, class Graph > void finish_edge(Edge e, Graph& G)
+ {
+ cout << "Finish edge: " << source(e, G) << " --> " << target(e, G)
+ << endl;
+ Base::finish_edge(e, G);
+ }
+};
+template < class VisitorList >
+edge_categorizer< VisitorList > categorize_edges(const VisitorList& v)
+{
+ return edge_categorizer< VisitorList >(v);
+}
+
+int main(int, char*[])
+{
+
+ using namespace boost;
+
+ typedef adjacency_list<> Graph;
+
+ Graph G(5);
+ add_edge(0, 2, G);
+ add_edge(1, 1, G);
+ add_edge(1, 3, G);
+ add_edge(2, 1, G);
+ add_edge(2, 3, G);
+ add_edge(3, 1, G);
+ add_edge(3, 4, G);
+ add_edge(4, 0, G);
+ add_edge(4, 1, G);
+
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+
+ std::vector< size_type > d(num_vertices(G));
+ std::vector< size_type > f(num_vertices(G));
+ int t = 0;
+ depth_first_search(G,
+ visitor(categorize_edges(
+ make_pair(stamp_times(&d[0], t, on_discover_vertex()),
+ stamp_times(&f[0], t, on_finish_vertex())))));
+
+ std::vector< size_type >::iterator i, j;
+ for (i = d.begin(), j = f.begin(); i != d.end(); ++i, ++j)
+ cout << *i << " " << *j << endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/dfs.expected b/src/boost/libs/graph/example/dfs.expected
new file mode 100644
index 000000000..b0da6de42
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs.expected
@@ -0,0 +1,20 @@
+Tree edge: 0 --> 2
+Tree edge: 2 --> 1
+Back edge: 1 --> 1
+Finish edge: 1 --> 1
+Tree edge: 1 --> 3
+Back edge: 3 --> 1
+Finish edge: 3 --> 1
+Tree edge: 3 --> 4
+Back edge: 4 --> 0
+Finish edge: 4 --> 0
+Back edge: 4 --> 1
+Finish edge: 4 --> 1
+Forward or cross edge: 2 --> 3
+Finish edge: 2 --> 3
+Finish edge: 0 --> 2
+1 10
+3 8
+2 9
+4 7
+5 6
diff --git a/src/boost/libs/graph/example/dfs_basics.expected b/src/boost/libs/graph/example/dfs_basics.expected
new file mode 100644
index 000000000..703f0c818
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs_basics.expected
@@ -0,0 +1,2 @@
+order of discovery: u v y x w z
+order of finish: x y v u z w
diff --git a/src/boost/libs/graph/example/dfs_parenthesis.cpp b/src/boost/libs/graph/example/dfs_parenthesis.cpp
new file mode 100644
index 000000000..6a4214451
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs_parenthesis.cpp
@@ -0,0 +1,69 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+// Sample output
+// DFS parenthesis:
+// (0(2(3(4(11)4)3)2)0)
+
+#include <boost/config.hpp>
+#include <assert.h>
+#include <iostream>
+
+#include <vector>
+#include <algorithm>
+#include <utility>
+
+#include "boost/graph/visitors.hpp"
+#include "boost/graph/adjacency_list.hpp"
+#include "boost/graph/breadth_first_search.hpp"
+#include "boost/graph/depth_first_search.hpp"
+
+using namespace boost;
+using namespace std;
+
+struct open_paren : public base_visitor< open_paren >
+{
+ typedef on_discover_vertex event_filter;
+ template < class Vertex, class Graph > void operator()(Vertex v, Graph&)
+ {
+ std::cout << "(" << v;
+ }
+};
+struct close_paren : public base_visitor< close_paren >
+{
+ typedef on_finish_vertex event_filter;
+ template < class Vertex, class Graph > void operator()(Vertex v, Graph&)
+ {
+ std::cout << v << ")";
+ }
+};
+
+int main(int, char*[])
+{
+
+ using namespace boost;
+
+ typedef adjacency_list<> Graph;
+ typedef std::pair< int, int > E;
+ E edge_array[] = { E(0, 2), E(1, 1), E(1, 3), E(2, 1), E(2, 3), E(3, 1),
+ E(3, 4), E(4, 0), E(4, 1) };
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph G(5);
+ for (std::size_t j = 0; j < sizeof(edge_array) / sizeof(E); ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, G);
+#else
+ Graph G(edge_array, edge_array + sizeof(edge_array) / sizeof(E), 5);
+#endif
+
+ std::cout << "DFS parenthesis:" << std::endl;
+ depth_first_search(G,
+ visitor(make_dfs_visitor(std::make_pair(open_paren(), close_paren()))));
+ std::cout << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/dfs_parenthesis.expected b/src/boost/libs/graph/example/dfs_parenthesis.expected
new file mode 100644
index 000000000..9d71af732
--- /dev/null
+++ b/src/boost/libs/graph/example/dfs_parenthesis.expected
@@ -0,0 +1,2 @@
+DFS parenthesis:
+(0(2(1(3(44)3)1)2)0)
diff --git a/src/boost/libs/graph/example/dijkstra-example-listS.cpp b/src/boost/libs/graph/example/dijkstra-example-listS.cpp
new file mode 100644
index 000000000..89bca7b00
--- /dev/null
+++ b/src/boost/libs/graph/example/dijkstra-example-listS.cpp
@@ -0,0 +1,103 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+
+using namespace boost;
+
+int main(int, char*[])
+{
+ typedef adjacency_list_traits< listS, listS, directedS >::vertex_descriptor
+ vertex_descriptor;
+ typedef adjacency_list< listS, listS, directedS,
+ property< vertex_index_t, int,
+ property< vertex_name_t, char,
+ property< vertex_distance_t, int,
+ property< vertex_predecessor_t, vertex_descriptor > > > >,
+ property< edge_weight_t, int > >
+ graph_t;
+ typedef std::pair< int, int > Edge;
+
+ const int num_nodes = 5;
+ enum nodes
+ {
+ A,
+ B,
+ C,
+ D,
+ E
+ };
+ Edge edge_array[] = { Edge(A, C), Edge(B, B), Edge(B, D), Edge(B, E),
+ Edge(C, B), Edge(C, D), Edge(D, E), Edge(E, A), Edge(E, B) };
+ int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1 };
+ int num_arcs = sizeof(edge_array) / sizeof(Edge);
+ graph_traits< graph_t >::vertex_iterator i, iend;
+
+ graph_t g(edge_array, edge_array + num_arcs, weights, num_nodes);
+ property_map< graph_t, edge_weight_t >::type weightmap
+ = get(edge_weight, g);
+
+ // Manually intialize the vertex index and name maps
+ property_map< graph_t, vertex_index_t >::type indexmap
+ = get(vertex_index, g);
+ property_map< graph_t, vertex_name_t >::type name = get(vertex_name, g);
+ int c = 0;
+ for (boost::tie(i, iend) = vertices(g); i != iend; ++i, ++c)
+ {
+ indexmap[*i] = c;
+ name[*i] = 'A' + c;
+ }
+
+ vertex_descriptor s = vertex(A, g);
+
+ property_map< graph_t, vertex_distance_t >::type d
+ = get(vertex_distance, g);
+ property_map< graph_t, vertex_predecessor_t >::type p
+ = get(vertex_predecessor, g);
+ dijkstra_shortest_paths(g, s, predecessor_map(p).distance_map(d));
+
+ std::cout << "distances and parents:" << std::endl;
+ graph_traits< graph_t >::vertex_iterator vi, vend;
+ for (boost::tie(vi, vend) = vertices(g); vi != vend; ++vi)
+ {
+ std::cout << "distance(" << name[*vi] << ") = " << d[*vi] << ", ";
+ std::cout << "parent(" << name[*vi] << ") = " << name[p[*vi]]
+ << std::endl;
+ }
+ std::cout << std::endl;
+
+ std::ofstream dot_file("figs/dijkstra-eg.dot");
+ dot_file << "digraph D {\n"
+ << " rankdir=LR\n"
+ << " size=\"4,3\"\n"
+ << " ratio=\"fill\"\n"
+ << " edge[style=\"bold\"]\n"
+ << " node[shape=\"circle\"]\n";
+
+ graph_traits< graph_t >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ graph_traits< graph_t >::edge_descriptor e = *ei;
+ graph_traits< graph_t >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ dot_file << name[u] << " -> " << name[v] << "[label=\""
+ << get(weightmap, e) << "\"";
+ if (p[v] == u)
+ dot_file << ", color=\"black\"";
+ else
+ dot_file << ", color=\"grey\"";
+ dot_file << "]";
+ }
+ dot_file << "}";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/dijkstra-example.cpp b/src/boost/libs/graph/example/dijkstra-example.cpp
new file mode 100644
index 000000000..62b55120a
--- /dev/null
+++ b/src/boost/libs/graph/example/dijkstra-example.cpp
@@ -0,0 +1,89 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/property_map/property_map.hpp>
+
+using namespace boost;
+
+int main(int, char*[])
+{
+ typedef adjacency_list< listS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_descriptor;
+ typedef std::pair< int, int > Edge;
+
+ const int num_nodes = 5;
+ enum nodes
+ {
+ A,
+ B,
+ C,
+ D,
+ E
+ };
+ char name[] = "ABCDE";
+ Edge edge_array[] = { Edge(A, C), Edge(B, B), Edge(B, D), Edge(B, E),
+ Edge(C, B), Edge(C, D), Edge(D, E), Edge(E, A), Edge(E, B) };
+ int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1 };
+ int num_arcs = sizeof(edge_array) / sizeof(Edge);
+ graph_t g(edge_array, edge_array + num_arcs, weights, num_nodes);
+ property_map< graph_t, edge_weight_t >::type weightmap
+ = get(edge_weight, g);
+ std::vector< vertex_descriptor > p(num_vertices(g));
+ std::vector< int > d(num_vertices(g));
+ vertex_descriptor s = vertex(A, g);
+
+ dijkstra_shortest_paths(g, s,
+ predecessor_map(boost::make_iterator_property_map(
+ p.begin(), get(boost::vertex_index, g)))
+ .distance_map(boost::make_iterator_property_map(
+ d.begin(), get(boost::vertex_index, g))));
+
+ std::cout << "distances and parents:" << std::endl;
+ graph_traits< graph_t >::vertex_iterator vi, vend;
+ for (boost::tie(vi, vend) = vertices(g); vi != vend; ++vi)
+ {
+ std::cout << "distance(" << name[*vi] << ") = " << d[*vi] << ", ";
+ std::cout << "parent(" << name[*vi] << ") = " << name[p[*vi]]
+ << std::endl;
+ }
+ std::cout << std::endl;
+
+ std::ofstream dot_file("figs/dijkstra-eg.dot");
+
+ dot_file << "digraph D {\n"
+ << " rankdir=LR\n"
+ << " size=\"4,3\"\n"
+ << " ratio=\"fill\"\n"
+ << " edge[style=\"bold\"]\n"
+ << " node[shape=\"circle\"]\n";
+
+ graph_traits< graph_t >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ graph_traits< graph_t >::edge_descriptor e = *ei;
+ graph_traits< graph_t >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ dot_file << name[u] << " -> " << name[v] << "[label=\""
+ << get(weightmap, e) << "\"";
+ if (p[v] == u)
+ dot_file << ", color=\"black\"";
+ else
+ dot_file << ", color=\"grey\"";
+ dot_file << "]";
+ }
+ dot_file << "}";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/dijkstra-no-color-map-example.cpp b/src/boost/libs/graph/example/dijkstra-no-color-map-example.cpp
new file mode 100644
index 000000000..b0f072d77
--- /dev/null
+++ b/src/boost/libs/graph/example/dijkstra-no-color-map-example.cpp
@@ -0,0 +1,93 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
+// Copyright 2009 Trustees of Indiana University.
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// NOTE: Based off of dijkstra-example.cpp
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths_no_color_map.hpp>
+#include <boost/property_map/property_map.hpp>
+
+using namespace boost;
+
+int main(int, char*[])
+{
+ typedef adjacency_list< listS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_descriptor;
+ typedef std::pair< int, int > Edge;
+
+ const int num_nodes = 5;
+ enum nodes
+ {
+ A,
+ B,
+ C,
+ D,
+ E
+ };
+ char name[] = "ABCDE";
+ Edge edge_array[] = { Edge(A, C), Edge(B, B), Edge(B, D), Edge(B, E),
+ Edge(C, B), Edge(C, D), Edge(D, E), Edge(E, A), Edge(E, B) };
+ int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1 };
+ int num_arcs = sizeof(edge_array) / sizeof(Edge);
+ graph_t g(edge_array, edge_array + num_arcs, weights, num_nodes);
+ property_map< graph_t, edge_weight_t >::type weightmap
+ = get(edge_weight, g);
+ std::vector< vertex_descriptor > p(num_vertices(g));
+ std::vector< int > d(num_vertices(g));
+ vertex_descriptor s = vertex(A, g);
+
+ dijkstra_shortest_paths_no_color_map(g, s,
+ predecessor_map(boost::make_iterator_property_map(
+ p.begin(), get(boost::vertex_index, g)))
+ .distance_map(boost::make_iterator_property_map(
+ d.begin(), get(boost::vertex_index, g))));
+
+ std::cout << "distances and parents:" << std::endl;
+ graph_traits< graph_t >::vertex_iterator vi, vend;
+ for (boost::tie(vi, vend) = vertices(g); vi != vend; ++vi)
+ {
+ std::cout << "distance(" << name[*vi] << ") = " << d[*vi] << ", ";
+ std::cout << "parent(" << name[*vi] << ") = " << name[p[*vi]]
+ << std::endl;
+ }
+ std::cout << std::endl;
+
+ std::ofstream dot_file("figs/dijkstra-no-color-map-eg.dot");
+
+ dot_file << "digraph D {\n"
+ << " rankdir=LR\n"
+ << " size=\"4,3\"\n"
+ << " ratio=\"fill\"\n"
+ << " edge[style=\"bold\"]\n"
+ << " node[shape=\"circle\"]\n";
+
+ graph_traits< graph_t >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ graph_traits< graph_t >::edge_descriptor e = *ei;
+ graph_traits< graph_t >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ dot_file << name[u] << " -> " << name[v] << "[label=\""
+ << get(weightmap, e) << "\"";
+ if (p[v] == u)
+ dot_file << ", color=\"black\"";
+ else
+ dot_file << ", color=\"grey\"";
+ dot_file << "]";
+ }
+ dot_file << "}";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/dijkstra.expected b/src/boost/libs/graph/example/dijkstra.expected
new file mode 100644
index 000000000..a2eb19ee9
--- /dev/null
+++ b/src/boost/libs/graph/example/dijkstra.expected
@@ -0,0 +1,13 @@
+distances from start vertex:
+distance(0) = 0
+distance(1) = 6
+distance(2) = 1
+distance(3) = 4
+distance(4) = 5
+
+shortest paths tree
+0 --> 2
+1 -->
+2 --> 3
+3 --> 4
+4 --> 1
diff --git a/src/boost/libs/graph/example/directed_graph.cpp b/src/boost/libs/graph/example/directed_graph.cpp
new file mode 100644
index 000000000..4eb55ff3f
--- /dev/null
+++ b/src/boost/libs/graph/example/directed_graph.cpp
@@ -0,0 +1,27 @@
+//=======================================================================
+// Copyright 2012
+// Authors: David Doria
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/directed_graph.hpp> // A subclass to provide reasonable arguments to adjacency_list for a typical directed graph
+
+int main(int, char*[])
+{
+ // directed_graph is a subclass of adjacency_list which gives you object
+ // oriented access to functions like add_vertex and add_edge, which makes
+ // the code easier to understand. However, it hard codes many of the
+ // template parameters, so it is much less flexible.
+
+ typedef boost::directed_graph<> Graph;
+ Graph g;
+ boost::graph_traits< Graph >::vertex_descriptor v0 = g.add_vertex();
+ boost::graph_traits< Graph >::vertex_descriptor v1 = g.add_vertex();
+
+ g.add_edge(v0, v1);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/eccentricity.cpp b/src/boost/libs/graph/example/eccentricity.cpp
new file mode 100644
index 000000000..58e43ace1
--- /dev/null
+++ b/src/boost/libs/graph/example/eccentricity.cpp
@@ -0,0 +1,88 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[eccentricity_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/floyd_warshall_shortest.hpp>
+#include <boost/graph/eccentricity.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a matrix type and its corresponding property map that
+// will contain the distances between each pair of vertices.
+typedef exterior_vertex_property< Graph, int > DistanceProperty;
+typedef DistanceProperty::matrix_type DistanceMatrix;
+typedef DistanceProperty::matrix_map_type DistanceMatrixMap;
+
+// Declare the weight map so that each edge returns the same value.
+typedef constant_property_map< Edge, int > WeightMap;
+
+// Declare a container and its corresponding property map that
+// will contain the resulting eccentricities of each vertex in
+// the graph.
+typedef boost::exterior_vertex_property< Graph, int > EccentricityProperty;
+typedef EccentricityProperty::container_type EccentricityContainer;
+typedef EccentricityProperty::map_type EccentricityMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a name map that provides access to
+ // then actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the distances between all pairs of vertices using
+ // the Floyd-Warshall algorithm. Note that the weight map is
+ // created so that every edge has a weight of 1.
+ DistanceMatrix distances(num_vertices(g));
+ DistanceMatrixMap dm(distances, g);
+ WeightMap wm(1);
+ floyd_warshall_all_pairs_shortest_paths(g, dm, weight_map(wm));
+
+ // Compute the eccentricities for graph - this computation returns
+ // both the radius and diameter as well.
+ int r, d;
+ EccentricityContainer eccs(num_vertices(g));
+ EccentricityMap em(eccs, g);
+ boost::tie(r, d) = all_eccentricities(g, dm, em);
+
+ // Print the closeness centrality of each vertex.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << get(em, *i)
+ << endl;
+ }
+ cout << "radius: " << r << endl;
+ cout << "diamter: " << d << endl;
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/edge-connectivity.cpp b/src/boost/libs/graph/example/edge-connectivity.cpp
new file mode 100644
index 000000000..54345ae0a
--- /dev/null
+++ b/src/boost/libs/graph/example/edge-connectivity.cpp
@@ -0,0 +1,186 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <algorithm>
+#include <utility>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
+#include <boost/graph/push_relabel_max_flow.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graphviz.hpp>
+
+namespace boost
+{
+template < typename Graph >
+std::pair< typename graph_traits< Graph >::vertex_descriptor,
+ typename graph_traits< Graph >::degree_size_type >
+min_degree_vertex(Graph& g)
+{
+ typename graph_traits< Graph >::vertex_descriptor p;
+ typedef typename graph_traits< Graph >::degree_size_type size_type;
+ size_type delta = (std::numeric_limits< size_type >::max)();
+ typename graph_traits< Graph >::vertex_iterator i, iend;
+ for (boost::tie(i, iend) = vertices(g); i != iend; ++i)
+ if (degree(*i, g) < delta)
+ {
+ delta = degree(*i, g);
+ p = *i;
+ }
+ return std::make_pair(p, delta);
+}
+
+template < typename Graph, typename OutputIterator >
+void neighbors(const Graph& g,
+ typename graph_traits< Graph >::vertex_descriptor u, OutputIterator result)
+{
+ typename graph_traits< Graph >::adjacency_iterator ai, aend;
+ for (boost::tie(ai, aend) = adjacent_vertices(u, g); ai != aend; ++ai)
+ *result++ = *ai;
+}
+template < typename Graph, typename VertexIterator, typename OutputIterator >
+void neighbors(const Graph& g, VertexIterator first, VertexIterator last,
+ OutputIterator result)
+{
+ for (; first != last; ++first)
+ neighbors(g, *first, result);
+}
+
+template < typename VertexListGraph, typename OutputIterator >
+typename graph_traits< VertexListGraph >::degree_size_type edge_connectivity(
+ VertexListGraph& g, OutputIterator disconnecting_set)
+{
+ typedef typename graph_traits< VertexListGraph >::vertex_descriptor
+ vertex_descriptor;
+ typedef typename graph_traits< VertexListGraph >::degree_size_type
+ degree_size_type;
+ typedef color_traits< default_color_type > Color;
+ typedef
+ typename adjacency_list_traits< vecS, vecS, directedS >::edge_descriptor
+ edge_descriptor;
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_capacity_t, degree_size_type,
+ property< edge_residual_capacity_t, degree_size_type,
+ property< edge_reverse_t, edge_descriptor > > > >
+ FlowGraph;
+
+ vertex_descriptor u, v, p, k;
+ edge_descriptor e1, e2;
+ bool inserted;
+ typename graph_traits< VertexListGraph >::vertex_iterator vi, vi_end;
+ degree_size_type delta, alpha_star, alpha_S_k;
+ std::set< vertex_descriptor > S, neighbor_S;
+ std::vector< vertex_descriptor > S_star, nonneighbor_S;
+ std::vector< default_color_type > color(num_vertices(g));
+ std::vector< edge_descriptor > pred(num_vertices(g));
+
+ FlowGraph flow_g(num_vertices(g));
+ typename property_map< FlowGraph, edge_capacity_t >::type cap
+ = get(edge_capacity, flow_g);
+ typename property_map< FlowGraph, edge_residual_capacity_t >::type res_cap
+ = get(edge_residual_capacity, flow_g);
+ typename property_map< FlowGraph, edge_reverse_t >::type rev_edge
+ = get(edge_reverse, flow_g);
+
+ typename graph_traits< VertexListGraph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ u = source(*ei, g), v = target(*ei, g);
+ boost::tie(e1, inserted) = add_edge(u, v, flow_g);
+ cap[e1] = 1;
+ boost::tie(e2, inserted) = add_edge(v, u, flow_g);
+ cap[e2] = 1;
+ rev_edge[e1] = e2;
+ rev_edge[e2] = e1;
+ }
+
+ boost::tie(p, delta) = min_degree_vertex(g);
+ S_star.push_back(p);
+ alpha_star = delta;
+ S.insert(p);
+ neighbor_S.insert(p);
+ neighbors(
+ g, S.begin(), S.end(), std::inserter(neighbor_S, neighbor_S.begin()));
+ std::set_difference(vertices(g).first, vertices(g).second,
+ neighbor_S.begin(), neighbor_S.end(),
+ std::back_inserter(nonneighbor_S));
+
+ while (!nonneighbor_S.empty())
+ {
+ k = nonneighbor_S.front();
+ alpha_S_k = edmonds_karp_max_flow(
+ flow_g, p, k, cap, res_cap, rev_edge, &color[0], &pred[0]);
+ if (alpha_S_k < alpha_star)
+ {
+ alpha_star = alpha_S_k;
+ S_star.clear();
+ for (boost::tie(vi, vi_end) = vertices(flow_g); vi != vi_end; ++vi)
+ if (color[*vi] != Color::white())
+ S_star.push_back(*vi);
+ }
+ S.insert(k);
+ neighbor_S.insert(k);
+ neighbors(g, k, std::inserter(neighbor_S, neighbor_S.begin()));
+ nonneighbor_S.clear();
+ std::set_difference(vertices(g).first, vertices(g).second,
+ neighbor_S.begin(), neighbor_S.end(),
+ std::back_inserter(nonneighbor_S));
+ }
+
+ std::vector< bool > in_S_star(num_vertices(g), false);
+ typename std::vector< vertex_descriptor >::iterator si;
+ for (si = S_star.begin(); si != S_star.end(); ++si)
+ in_S_star[*si] = true;
+ degree_size_type c = 0;
+ for (si = S_star.begin(); si != S_star.end(); ++si)
+ {
+ typename graph_traits< VertexListGraph >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(*si, g); ei != ei_end; ++ei)
+ if (!in_S_star[target(*ei, g)])
+ {
+ *disconnecting_set++ = *ei;
+ ++c;
+ }
+ }
+
+ return c;
+}
+
+}
+
+int main()
+{
+ using namespace boost;
+ GraphvizGraph g;
+ read_graphviz("figs/edge-connectivity.dot", g);
+
+ typedef graph_traits< GraphvizGraph >::edge_descriptor edge_descriptor;
+ typedef graph_traits< GraphvizGraph >::degree_size_type degree_size_type;
+ std::vector< edge_descriptor > disconnecting_set;
+ degree_size_type c
+ = edge_connectivity(g, std::back_inserter(disconnecting_set));
+
+ std::cout << "The edge connectivity is " << c << "." << std::endl;
+
+ property_map< GraphvizGraph, vertex_attribute_t >::type attr_map
+ = get(vertex_attribute, g);
+
+ std::cout << "The disconnecting set is {";
+ for (std::vector< edge_descriptor >::iterator i = disconnecting_set.begin();
+ i != disconnecting_set.end(); ++i)
+ std::cout << "(" << attr_map[source(*i, g)]["label"] << ","
+ << attr_map[target(*i, g)]["label"] << ") ";
+ std::cout << "}." << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/edge-function.cpp b/src/boost/libs/graph/example/edge-function.cpp
new file mode 100644
index 000000000..e3898afcf
--- /dev/null
+++ b/src/boost/libs/graph/example/edge-function.cpp
@@ -0,0 +1,146 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+template < typename Graph, typename VertexNameMap >
+void output_adjacent_vertices(std::ostream& out,
+ typename graph_traits< Graph >::vertex_descriptor u, const Graph& g,
+ VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::adjacency_iterator vi, vi_end;
+ out << get(name_map, u) << " -> { ";
+ for (boost::tie(vi, vi_end) = adjacent_vertices(u, g); vi != vi_end; ++vi)
+ out << get(name_map, *vi) << " ";
+ out << "}" << std::endl;
+}
+
+template < typename NameMap > class name_equals_t
+{
+public:
+ name_equals_t(const std::string& n, NameMap map)
+ : m_name(n), m_name_map(map)
+ {
+ }
+ template < typename Vertex > bool operator()(Vertex u) const
+ {
+ return get(m_name_map, u) == m_name;
+ }
+
+private:
+ std::string m_name;
+ NameMap m_name_map;
+};
+
+// object generator function
+template < typename NameMap >
+inline name_equals_t< NameMap > name_equals(
+ const std::string& str, NameMap name)
+{
+ return name_equals_t< NameMap >(str, name);
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ graph_traits< graph_type >::vertex_descriptor yow, zag, bar;
+ // Get vertex name property map from the graph
+ typedef property_map< graph_type, vertex_name_t >::type name_map_t;
+ name_map_t name = get(vertex_name, g);
+ // Get iterators for the vertex set
+ graph_traits< graph_type >::vertex_iterator i, end;
+ boost::tie(i, end) = vertices(g);
+ // Find yow.h
+ name_equals_t< name_map_t > predicate1("yow.h", name);
+ yow = *std::find_if(i, end, predicate1);
+ // Find zag.o
+ name_equals_t< name_map_t > predicate2("zag.o", name);
+ zag = *std::find_if(i, end, predicate2);
+ // Find bar.o
+ name_equals_t< name_map_t > predicate3("bar.o", name);
+ bar = *std::find_if(i, end, predicate3);
+
+ graph_traits< graph_type >::edge_descriptor e1, e2;
+ bool exists;
+
+ // Get the edge connecting yow.h to zag.o
+ boost::tie(e1, exists) = edge(yow, zag, g);
+ assert(exists == true);
+ assert(source(e1, g) == yow);
+ assert(target(e1, g) == zag);
+
+ // Discover that there is no edge connecting zag.o to bar.o
+ boost::tie(e2, exists) = edge(zag, bar, g);
+ assert(exists == false);
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/edge-iter-constructor.cpp b/src/boost/libs/graph/example/edge-iter-constructor.cpp
new file mode 100644
index 000000000..84eb6c2df
--- /dev/null
+++ b/src/boost/libs/graph/example/edge-iter-constructor.cpp
@@ -0,0 +1,49 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The graph is directed
+ >
+ graph_type;
+
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< graph_type >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+
+ graph_type g(n_vertices); // create graph with n vertices
+
+ // Read in edges
+ graph_traits< graph_type >::vertices_size_type u, v;
+ while (file_in >> u)
+ if (file_in >> v)
+ add_edge(u, v, g);
+ else
+ break;
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_basics.cpp b/src/boost/libs/graph/example/edge_basics.cpp
new file mode 100644
index 000000000..038ed691b
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_basics.cpp
@@ -0,0 +1,83 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace std;
+using namespace boost;
+
+/*
+ Edge Basics
+
+ This example demonstrates the GGCL Edge interface
+
+ There is not much to the Edge interface. Basically just two
+ functions to access the source and target vertex:
+
+ source(e)
+ target(e)
+
+ and one associated type for the vertex type:
+
+ edge_traits<Edge>::vertex_type
+
+ Sample output:
+
+ (0,1) (0,2) (0,3) (0,4) (2,0) (2,4) (3,0) (3,1)
+
+ */
+
+template < class Graph > struct exercise_edge
+{
+ exercise_edge(Graph& g) : G(g) {}
+
+ typedef typename boost::graph_traits< Graph >::edge_descriptor Edge;
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ void operator()(Edge e) const
+ {
+ // begin
+ // Get the associated vertex type out of the edge using the
+ // edge_traits class
+ // Use the source() and target() functions to access the vertices
+ // that belong to Edge e
+ Vertex src = source(e, G);
+ Vertex targ = target(e, G);
+
+ // print out the vertex id's just because
+ cout << "(" << src << "," << targ << ") ";
+ // end
+ }
+
+ Graph& G;
+};
+
+int main()
+{
+ typedef adjacency_list<> MyGraph;
+
+ typedef pair< int, int > Pair;
+ Pair edge_array[8] = { Pair(0, 1), Pair(0, 2), Pair(0, 3), Pair(0, 4),
+ Pair(2, 0), Pair(3, 0), Pair(2, 4), Pair(3, 1) };
+
+ // Construct a graph using the edge_array (passing in pointers
+ // (iterators) to the beginning and end of the array), and
+ // specifying the number of vertices as 5
+ MyGraph G(5);
+ for (int i = 0; i < 8; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, G);
+
+ // Use the STL for_each algorithm to "exercise" all of the edges in
+ // the graph
+ for_each(edges(G).first, edges(G).second, exercise_edge< MyGraph >(G));
+ cout << endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_basics.expected b/src/boost/libs/graph/example/edge_basics.expected
new file mode 100644
index 000000000..ea33f6a4c
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_basics.expected
@@ -0,0 +1 @@
+(0,1) (0,2) (0,3) (0,4) (2,0) (2,4) (3,0) (3,1)
diff --git a/src/boost/libs/graph/example/edge_coloring.cpp b/src/boost/libs/graph/example/edge_coloring.cpp
new file mode 100644
index 000000000..402337df9
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_coloring.cpp
@@ -0,0 +1,75 @@
+//=======================================================================
+// Copyright 2013 Maciej Piechotka
+// Authors: Maciej Piechotka
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <iostream>
+#include <boost/config.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/edge_coloring.hpp>
+#include <boost/graph/properties.hpp>
+
+/*
+ Sample output
+ Colored using 5 colors
+ a-d: 4
+ a-f: 0
+ b-c: 2
+ b-e: 3
+ b-g: 1
+ b-j: 0
+ c-d: 0
+ c-e: 1
+ d-f: 2
+ d-i: 1
+ e-g: 4
+ f-g: 3
+ f-h: 1
+ g-h: 0
+*/
+
+int main(int, char*[])
+{
+ using namespace boost;
+ using namespace std;
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property, size_t,
+ no_property >
+ Graph;
+
+ typedef std::pair< std::size_t, std::size_t > Pair;
+ Pair edges[14] = { Pair(0, 3), // a-d
+ Pair(0, 5), // a-f
+ Pair(1, 2), // b-c
+ Pair(1, 4), // b-e
+ Pair(1, 6), // b-g
+ Pair(1, 9), // b-j
+ Pair(2, 3), // c-d
+ Pair(2, 4), // c-e
+ Pair(3, 5), // d-f
+ Pair(3, 8), // d-i
+ Pair(4, 6), // e-g
+ Pair(5, 6), // f-g
+ Pair(5, 7), // f-h
+ Pair(6, 7) }; // g-h
+
+ Graph G(10);
+
+ for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); i++)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ size_t colors = edge_coloring(G, get(edge_bundle, G));
+
+ cout << "Colored using " << colors << " colors" << endl;
+ for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); i++)
+ {
+ cout << " " << (char)('a' + edges[i].first) << "-"
+ << (char)('a' + edges[i].second) << ": "
+ << G[edge(edges[i].first, edges[i].second, G).first] << endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_connectivity.cpp b/src/boost/libs/graph/example/edge_connectivity.cpp
new file mode 100644
index 000000000..2e05a8b4c
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_connectivity.cpp
@@ -0,0 +1,63 @@
+//=======================================================================
+// Copyright 2000 University of Notre Dame.
+// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <set>
+#include <iostream>
+#include <iterator>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/edge_connectivity.hpp>
+
+using namespace boost;
+
+int main()
+{
+ const int N = 8;
+ typedef adjacency_list< vecS, vecS, undirectedS > UndirectedGraph;
+ UndirectedGraph g(N);
+
+ add_edge(0, 1, g);
+ add_edge(0, 2, g);
+ add_edge(0, 3, g);
+ add_edge(1, 2, g);
+ add_edge(1, 3, g);
+ add_edge(2, 3, g);
+ add_edge(3, 4, g);
+ add_edge(3, 7, g);
+ add_edge(4, 5, g);
+ add_edge(4, 6, g);
+ add_edge(4, 7, g);
+ add_edge(5, 6, g);
+ add_edge(5, 7, g);
+ add_edge(6, 7, g);
+
+ typedef graph_traits< UndirectedGraph >::edge_descriptor edge_descriptor;
+ typedef graph_traits< UndirectedGraph >::degree_size_type degree_size_type;
+ std::vector< edge_descriptor > disconnecting_set;
+
+ degree_size_type c
+ = edge_connectivity(g, std::back_inserter(disconnecting_set));
+
+ std::cout << "The edge connectivity is " << c << "." << std::endl;
+ std::cout << "The disconnecting set is {";
+
+ std::copy(disconnecting_set.begin(), disconnecting_set.end(),
+ std::ostream_iterator< edge_descriptor >(std::cout, " "));
+ std::cout << "}." << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_iterator_constructor.cpp b/src/boost/libs/graph/example/edge_iterator_constructor.cpp
new file mode 100644
index 000000000..837a2c810
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_iterator_constructor.cpp
@@ -0,0 +1,120 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Sample data (edge_iterator_constructor.dat):
+ 5
+ 10
+ 0 1
+ 1 2
+ 1 3
+ 2 4
+ 3 4
+ 1 0
+ 2 1
+ 3 1
+ 4 2
+ 4 3
+
+ Sample output:
+
+ 0 --> 1
+ 1 --> 2 3 0
+ 2 --> 4 1
+ 3 --> 4 1
+ 4 --> 2 3
+
+ */
+
+#include <boost/config.hpp>
+#include <utility>
+#include <iostream>
+#include <fstream>
+
+#include <iterator>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+class edge_stream_iterator
+{
+public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef std::pair< int, int > value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+
+ edge_stream_iterator() : m_stream(0), m_end_marker(false) {}
+ edge_stream_iterator(std::istream& s) : m_stream(&s) { m_read(); }
+ reference operator*() const { return m_edge; }
+ edge_stream_iterator& operator++()
+ {
+ m_read();
+ return *this;
+ }
+ edge_stream_iterator operator++(int)
+ {
+ edge_stream_iterator tmp = *this;
+ m_read();
+ return tmp;
+ }
+
+protected:
+ std::istream* m_stream;
+ value_type m_edge;
+ bool m_end_marker;
+ void m_read()
+ {
+ m_end_marker = (*m_stream) ? true : false;
+ if (m_end_marker)
+ {
+ *m_stream >> m_edge.first >> m_edge.second;
+ }
+ m_end_marker = (*m_stream) ? true : false;
+ }
+ friend bool operator==(
+ const edge_stream_iterator& x, const edge_stream_iterator& y);
+};
+bool operator==(const edge_stream_iterator& x, const edge_stream_iterator& y)
+{
+ return (x.m_stream == y.m_stream && x.m_end_marker == y.m_end_marker)
+ || (x.m_end_marker == false && y.m_end_marker == false);
+}
+bool operator!=(const edge_stream_iterator& x, const edge_stream_iterator& y)
+{
+ return !(x == y);
+}
+
+int main(int argc, const char** argv)
+{
+ typedef boost::adjacency_list<> IteratorConstructibleGraph;
+ typedef boost::graph_traits< IteratorConstructibleGraph > Traits;
+ Traits::vertices_size_type size_V;
+ Traits::edges_size_type size_E;
+
+ std::ifstream f(argc >= 2 ? argv[1] : "edge_iterator_constructor.dat");
+ f >> size_V >> size_E;
+
+ edge_stream_iterator edge_iter(f), end;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ IteratorConstructibleGraph G(size_V);
+ while (edge_iter != end)
+ {
+ int i, j;
+ boost::tie(i, j) = *edge_iter++;
+ boost::add_edge(i, j, G);
+ }
+#else
+ IteratorConstructibleGraph G(edge_iter, end, size_V);
+#endif
+ boost::print_graph(G);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_iterator_constructor.dat b/src/boost/libs/graph/example/edge_iterator_constructor.dat
new file mode 100644
index 000000000..4218e3f18
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_iterator_constructor.dat
@@ -0,0 +1,12 @@
+5
+10
+0 1
+1 2
+1 3
+2 4
+3 4
+1 0
+2 1
+3 1
+4 2
+4 3
diff --git a/src/boost/libs/graph/example/edge_property.cpp b/src/boost/libs/graph/example/edge_property.cpp
new file mode 100644
index 000000000..7da442fd8
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_property.cpp
@@ -0,0 +1,165 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+// Sample output:
+//
+// 0 --(8, 10)--> 1
+//
+// 1 --(12, 20)--> 4 --(12, 40)--> 3
+// <--(8,10)-- 0 <--(16,20)-- 2
+// 2 --(16, 20)--> 1
+// <--(16,20)-- 5
+// 3 --(12, 40)--> 6
+// <--(12,40)-- 1
+// 4 --(12, 20)--> 7
+// <--(12,20)-- 1
+// 5 --(16, 20)--> 2
+// <--(16,20)-- 6
+// 6 --(16, 20)--> 5 --(8, 10)--> 8
+// <--(12,20)-- 7 <--(12,40)-- 3
+// 7 --(12, 20)--> 6
+// <--(12,20)-- 4
+// 8
+// <--(8,10)-- 6
+//
+//
+// 0 --(8, 1)--> 1
+//
+// 1 --(12, 2)--> 4 --(12, 3)--> 3
+// <--(8,1)-- 0 <--(16,4)-- 2
+// 2 --(16, 4)--> 1
+// <--(16,7)-- 5
+// 3 --(12, 5)--> 6
+// <--(12,3)-- 1
+// 4 --(12, 6)--> 7
+// <--(12,2)-- 1
+// 5 --(16, 7)--> 2
+// <--(16,8)-- 6
+// 6 --(16, 8)--> 5
+// <--(12,10)-- 7 <--(12,5)-- 3
+// 7 --(12, 10)--> 6
+// <--(12,6)-- 4
+// 8
+//
+
+#include <boost/config.hpp>
+#include <iostream>
+
+#include <boost/utility.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+using namespace std;
+
+enum edge_myflow_t
+{
+ edge_myflow
+};
+enum edge_mycapacity_t
+{
+ edge_mycapacity
+};
+
+namespace boost
+{
+BOOST_INSTALL_PROPERTY(edge, myflow);
+BOOST_INSTALL_PROPERTY(edge, mycapacity);
+}
+
+template < class Graph > void print_network(const Graph& G)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_iterator Viter;
+ typedef
+ typename boost::graph_traits< Graph >::out_edge_iterator OutEdgeIter;
+ typedef typename boost::graph_traits< Graph >::in_edge_iterator InEdgeIter;
+
+ typename property_map< Graph, edge_mycapacity_t >::const_type capacity
+ = get(edge_mycapacity, G);
+ typename property_map< Graph, edge_myflow_t >::const_type flow
+ = get(edge_myflow, G);
+
+ Viter ui, uiend;
+ boost::tie(ui, uiend) = vertices(G);
+
+ for (; ui != uiend; ++ui)
+ {
+ OutEdgeIter out, out_end;
+ cout << *ui << "\t";
+
+ boost::tie(out, out_end) = out_edges(*ui, G);
+ for (; out != out_end; ++out)
+ cout << "--(" << capacity[*out] << ", " << flow[*out] << ")--> "
+ << target(*out, G) << "\t";
+
+ InEdgeIter in, in_end;
+ cout << endl << "\t";
+ boost::tie(in, in_end) = in_edges(*ui, G);
+ for (; in != in_end; ++in)
+ cout << "<--(" << capacity[*in] << "," << flow[*in] << ")-- "
+ << source(*in, G) << "\t";
+
+ cout << endl;
+ }
+}
+
+int main(int, char*[])
+{
+ typedef property< edge_mycapacity_t, int > Cap;
+ typedef property< edge_myflow_t, int, Cap > Flow;
+ typedef adjacency_list< vecS, vecS, bidirectionalS, no_property, Flow >
+ Graph;
+
+ const int num_vertices = 9;
+ Graph G(num_vertices);
+
+ /* 2<----5
+ / ^
+ / \
+ V \
+ 0 ---->1---->3----->6--->8
+ \ ^
+ \ /
+ V /
+ 4----->7
+ */
+
+ add_edge(0, 1, Flow(10, Cap(8)), G);
+
+ add_edge(1, 4, Flow(20, Cap(12)), G);
+ add_edge(4, 7, Flow(20, Cap(12)), G);
+ add_edge(7, 6, Flow(20, Cap(12)), G);
+
+ add_edge(1, 3, Flow(40, Cap(12)), G);
+ add_edge(3, 6, Flow(40, Cap(12)), G);
+
+ add_edge(6, 5, Flow(20, Cap(16)), G);
+ add_edge(5, 2, Flow(20, Cap(16)), G);
+ add_edge(2, 1, Flow(20, Cap(16)), G);
+
+ add_edge(6, 8, Flow(10, Cap(8)), G);
+
+ print_network(G);
+
+ property_map< Graph, edge_myflow_t >::type flow = get(edge_myflow, G);
+
+ boost::graph_traits< Graph >::vertex_iterator v, v_end;
+ boost::graph_traits< Graph >::out_edge_iterator e, e_end;
+ int f = 0;
+ for (boost::tie(v, v_end) = vertices(G); v != v_end; ++v)
+ for (boost::tie(e, e_end) = out_edges(*v, G); e != e_end; ++e)
+ flow[*e] = ++f;
+ cout << endl << endl;
+
+ remove_edge(6, 8, G);
+
+ print_network(G);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/edge_property.expected b/src/boost/libs/graph/example/edge_property.expected
new file mode 100644
index 000000000..d0d6693a1
--- /dev/null
+++ b/src/boost/libs/graph/example/edge_property.expected
@@ -0,0 +1,38 @@
+0 --(8, 10)--> 1
+
+1 --(12, 20)--> 4 --(12, 40)--> 3
+ <--(8,10)-- 0 <--(16,20)-- 2
+2 --(16, 20)--> 1
+ <--(16,20)-- 5
+3 --(12, 40)--> 6
+ <--(12,40)-- 1
+4 --(12, 20)--> 7
+ <--(12,20)-- 1
+5 --(16, 20)--> 2
+ <--(16,20)-- 6
+6 --(16, 20)--> 5 --(8, 10)--> 8
+ <--(12,20)-- 7 <--(12,40)-- 3
+7 --(12, 20)--> 6
+ <--(12,20)-- 4
+8
+ <--(8,10)-- 6
+
+
+0 --(8, 1)--> 1
+
+1 --(12, 2)--> 4 --(12, 3)--> 3
+ <--(8,1)-- 0 <--(16,4)-- 2
+2 --(16, 4)--> 1
+ <--(16,7)-- 5
+3 --(12, 5)--> 6
+ <--(12,3)-- 1
+4 --(12, 6)--> 7
+ <--(12,2)-- 1
+5 --(16, 7)--> 2
+ <--(16,8)-- 6
+6 --(16, 8)--> 5
+ <--(12,10)-- 7 <--(12,5)-- 3
+7 --(12, 10)--> 6
+ <--(12,6)-- 4
+8
+
diff --git a/src/boost/libs/graph/example/edmonds-karp-eg.cpp b/src/boost/libs/graph/example/edmonds-karp-eg.cpp
new file mode 100644
index 000000000..a27718b72
--- /dev/null
+++ b/src/boost/libs/graph/example/edmonds-karp-eg.cpp
@@ -0,0 +1,96 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/read_dimacs.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+// Use a DIMACS network flow file as stdin.
+// edmonds-karp-eg < max_flow.dat
+//
+// Sample output:
+// c The total flow:
+// s 13
+//
+// c flow values:
+// f 0 6 3
+// f 0 1 6
+// f 0 2 4
+// f 1 5 1
+// f 1 0 0
+// f 1 3 5
+// f 2 4 4
+// f 2 3 0
+// f 2 0 0
+// f 3 7 5
+// f 3 2 0
+// f 3 1 0
+// f 4 5 4
+// f 4 6 0
+// f 5 4 0
+// f 5 7 5
+// f 6 7 3
+// f 6 4 0
+// f 7 6 0
+// f 7 5 0
+
+int main()
+{
+ using namespace boost;
+
+ typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
+ typedef adjacency_list< listS, vecS, directedS,
+ property< vertex_name_t, std::string >,
+ property< edge_capacity_t, long,
+ property< edge_residual_capacity_t, long,
+ property< edge_reverse_t, Traits::edge_descriptor > > > >
+ Graph;
+
+ Graph g;
+
+ property_map< Graph, edge_capacity_t >::type capacity
+ = get(edge_capacity, g);
+ property_map< Graph, edge_reverse_t >::type rev = get(edge_reverse, g);
+ property_map< Graph, edge_residual_capacity_t >::type residual_capacity
+ = get(edge_residual_capacity, g);
+
+ Traits::vertex_descriptor s, t;
+ read_dimacs_max_flow(g, capacity, rev, s, t);
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ std::vector< default_color_type > color(num_vertices(g));
+ std::vector< Traits::edge_descriptor > pred(num_vertices(g));
+ long flow = edmonds_karp_max_flow(
+ g, s, t, capacity, residual_capacity, rev, &color[0], &pred[0]);
+#else
+ long flow = edmonds_karp_max_flow(g, s, t);
+#endif
+
+ std::cout << "c The total flow:" << std::endl;
+ std::cout << "s " << flow << std::endl << std::endl;
+
+ std::cout << "c flow values:" << std::endl;
+ graph_traits< Graph >::vertex_iterator u_iter, u_end;
+ graph_traits< Graph >::out_edge_iterator ei, e_end;
+ for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
+ for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
+ if (capacity[*ei] > 0)
+ std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
+ << (capacity[*ei] - residual_capacity[*ei])
+ << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/exterior_properties.cpp b/src/boost/libs/graph/example/exterior_properties.cpp
new file mode 100644
index 000000000..4c2e892f7
--- /dev/null
+++ b/src/boost/libs/graph/example/exterior_properties.cpp
@@ -0,0 +1,123 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+// This example is similar to the one in edge_property.cpp.
+// The only difference is that this example uses exterior
+// property storage instead of interior (properties).
+//
+// Sample output:
+//
+// 0 --(10, 8)--> 1
+//
+// 1 --(20, 12)--> 4 --(40, 12)--> 3
+// <--(10,8)-- 0 <--(20,16)-- 2
+// 2 --(20, 16)--> 1
+// <--(20,16)-- 5
+// 3 --(40, 12)--> 6
+// <--(40,12)-- 1
+// 4 --(20, 12)--> 7
+// <--(20,12)-- 1
+// 5 --(20, 16)--> 2
+// <--(20,16)-- 6
+// 6 --(20, 16)--> 5 --(10, 8)--> 8
+// <--(20,12)-- 7 <--(40,12)-- 3
+// 7 --(20, 12)--> 6
+// <--(20,12)-- 4
+// 8
+// <--(10,8)-- 6
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/property_map/property_map.hpp>
+
+template < class Graph, class Capacity, class Flow >
+void print_network(Graph& G, Capacity capacity, Flow flow)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_iterator Viter;
+ typedef
+ typename boost::graph_traits< Graph >::out_edge_iterator OutEdgeIter;
+ typedef typename boost::graph_traits< Graph >::in_edge_iterator InEdgeIter;
+
+ Viter ui, uiend;
+ for (boost::tie(ui, uiend) = boost::vertices(G); ui != uiend; ++ui)
+ {
+ OutEdgeIter out, out_end;
+ std::cout << *ui << "\t";
+
+ for (boost::tie(out, out_end) = boost::out_edges(*ui, G);
+ out != out_end; ++out)
+ std::cout << "--(" << boost::get(capacity, *out) << ", "
+ << boost::get(flow, *out) << ")--> "
+ << boost::target(*out, G) << "\t";
+ std::cout << std::endl << "\t";
+
+ InEdgeIter in, in_end;
+ for (boost::tie(in, in_end) = boost::in_edges(*ui, G); in != in_end;
+ ++in)
+ std::cout << "<--(" << boost::get(capacity, *in) << ","
+ << boost::get(flow, *in) << ")-- "
+ << boost::source(*in, G) << "\t";
+ std::cout << std::endl;
+ }
+}
+
+int main(int, char*[])
+{
+
+ typedef boost::adjacency_list< boost::vecS, boost::vecS,
+ boost::bidirectionalS, boost::no_property,
+ boost::property< boost::edge_index_t, std::size_t > >
+ Graph;
+
+ const int num_vertices = 9;
+ Graph G(num_vertices);
+
+ /* 2<----5
+ / ^
+ / \
+ V \
+ 0 ---->1---->3----->6--->8
+ \ ^
+ \ /
+ V /
+ 4----->7
+ */
+
+ int capacity[] = { 10, 20, 20, 20, 40, 40, 20, 20, 20, 10 };
+ int flow[] = { 8, 12, 12, 12, 12, 12, 16, 16, 16, 8 };
+
+ // insert edges into the graph, and assign each edge an ID number
+ // to index into the property arrays
+ boost::add_edge(0, 1, 0, G);
+
+ boost::add_edge(1, 4, 1, G);
+ boost::add_edge(4, 7, 2, G);
+ boost::add_edge(7, 6, 3, G);
+
+ boost::add_edge(1, 3, 4, G);
+ boost::add_edge(3, 6, 5, G);
+
+ boost::add_edge(6, 5, 6, G);
+ boost::add_edge(5, 2, 7, G);
+ boost::add_edge(2, 1, 8, G);
+
+ boost::add_edge(6, 8, 9, G);
+
+ typedef boost::property_map< Graph, boost::edge_index_t >::type
+ EdgeIndexMap;
+ EdgeIndexMap edge_id = boost::get(boost::edge_index, G);
+
+ typedef boost::iterator_property_map< int*, EdgeIndexMap, int, int& >
+ IterMap;
+
+ print_network(G, IterMap(capacity, edge_id), IterMap(flow, edge_id));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/exterior_properties.expected b/src/boost/libs/graph/example/exterior_properties.expected
new file mode 100644
index 000000000..70ff90ddc
--- /dev/null
+++ b/src/boost/libs/graph/example/exterior_properties.expected
@@ -0,0 +1,18 @@
+0 --(10, 8)--> 1
+
+1 --(20, 12)--> 4 --(40, 12)--> 3
+ <--(10,8)-- 0 <--(20,16)-- 2
+2 --(20, 16)--> 1
+ <--(20,16)-- 5
+3 --(40, 12)--> 6
+ <--(40,12)-- 1
+4 --(20, 12)--> 7
+ <--(20,12)-- 1
+5 --(20, 16)--> 2
+ <--(20,16)-- 6
+6 --(20, 16)--> 5 --(10, 8)--> 8
+ <--(20,12)-- 7 <--(40,12)-- 3
+7 --(20, 12)--> 6
+ <--(20,12)-- 4
+8
+ <--(10,8)-- 6
diff --git a/src/boost/libs/graph/example/exterior_property_map.cpp b/src/boost/libs/graph/example/exterior_property_map.cpp
new file mode 100644
index 000000000..8aa404757
--- /dev/null
+++ b/src/boost/libs/graph/example/exterior_property_map.cpp
@@ -0,0 +1,93 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <algorithm>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/property_map/property_map.hpp>
+
+using namespace std;
+using namespace boost;
+
+/*
+ Exterior Decorator Basics
+
+ An exterior decorator is a way of associating properties with the
+ vertices or edges of a graph. The "exterior" part means that the
+ properties are not stored inside the graph object (see
+ internal_decorator_basics.cc). Instead they are stored
+ separately, and passed as an extra argument to any
+ algorithm they are needed in. There are several standard
+ decorator types such a color and weight that are used
+ in the GGCL algorithms.
+
+ The main responsibility of a decorator is to provide an operator[]
+ that maps a vertex (or vertex ID) to the property value for that
+ vertex. It just so happens that a normal array provides this. In
+ addition, a decorator must provide access to the property type
+ through the decorator_traits class. For convenience, GGCL
+ already defines a decorator_triats class for pointer and
+ array types.
+
+ Sample Output
+
+ Jeremy owes Rich some money
+ Jeremy owes Andrew some money
+ Jeremy owes Jeff some money
+ Jeremy owes Kinis some money
+ Andrew owes Jeremy some money
+ Andrew owes Kinis some money
+ Jeff owes Jeremy some money
+ Jeff owes Rich some money
+ Jeff owes Kinis some money
+ Kinis owes Jeremy some money
+ Kinis owes Rich some money
+
+ */
+
+template < class EdgeIter, class Graph, class Name >
+void who_owes_who(EdgeIter first, EdgeIter last, const Graph& G, Name name)
+{
+ while (first != last)
+ {
+
+ cout << name[source(*first, G)] << " owes " << name[target(*first, G)]
+ << " some money" << endl;
+ ++first;
+ }
+}
+
+int main(int, char*[])
+{
+ /* The property will be "names" attached to the vertices */
+
+ string* names = new string[5];
+ names[0] = "Jeremy";
+ names[1] = "Rich";
+ names[2] = "Andrew";
+ names[3] = "Jeff";
+ names[4] = "Kinis";
+
+ typedef adjacency_list<> MyGraphType;
+
+ typedef pair< int, int > Pair;
+ Pair edge_array[11] = { Pair(0, 1), Pair(0, 2), Pair(0, 3), Pair(0, 4),
+ Pair(2, 0), Pair(3, 0), Pair(2, 4), Pair(3, 1), Pair(3, 4), Pair(4, 0),
+ Pair(4, 1) };
+
+ MyGraphType G(5);
+ for (int i = 0; i < 11; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, G);
+
+ who_owes_who(edges(G).first, edges(G).second, G, names);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/exterior_property_map.expected b/src/boost/libs/graph/example/exterior_property_map.expected
new file mode 100644
index 000000000..6fb19310f
--- /dev/null
+++ b/src/boost/libs/graph/example/exterior_property_map.expected
@@ -0,0 +1,11 @@
+Jeremy owes Rich some money
+Jeremy owes Andrew some money
+Jeremy owes Jeff some money
+Jeremy owes Kinis some money
+Andrew owes Jeremy some money
+Andrew owes Kinis some money
+Jeff owes Jeremy some money
+Jeff owes Rich some money
+Jeff owes Kinis some money
+Kinis owes Jeremy some money
+Kinis owes Rich some money
diff --git a/src/boost/libs/graph/example/family_tree.cpp b/src/boost/libs/graph/example/family_tree.cpp
new file mode 100644
index 000000000..a3db9da9a
--- /dev/null
+++ b/src/boost/libs/graph/example/family_tree.cpp
@@ -0,0 +1,61 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/tuple/tuple.hpp>
+enum family
+{
+ Jeanie,
+ Debbie,
+ Rick,
+ John,
+ Amanda,
+ Margaret,
+ Benjamin,
+ N
+};
+int main()
+{
+ using namespace boost;
+ const char* name[] = { "Jeanie", "Debbie", "Rick", "John", "Amanda",
+ "Margaret", "Benjamin" };
+
+ adjacency_list<> g(N);
+ add_edge(Jeanie, Debbie, g);
+ add_edge(Jeanie, Rick, g);
+ add_edge(Jeanie, John, g);
+ add_edge(Debbie, Amanda, g);
+ add_edge(Rick, Margaret, g);
+ add_edge(John, Benjamin, g);
+
+ graph_traits< adjacency_list<> >::vertex_iterator i, end;
+ graph_traits< adjacency_list<> >::adjacency_iterator ai, a_end;
+ property_map< adjacency_list<>, vertex_index_t >::type index_map
+ = get(vertex_index, g);
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ std::cout << name[get(index_map, *i)];
+ boost::tie(ai, a_end) = adjacent_vertices(*i, g);
+ if (ai == a_end)
+ std::cout << " has no children";
+ else
+ std::cout << " is the parent of ";
+ for (; ai != a_end; ++ai)
+ {
+ std::cout << name[get(index_map, *ai)];
+ if (boost::next(ai) != a_end)
+ std::cout << ", ";
+ }
+ std::cout << std::endl;
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/family_tree.expected b/src/boost/libs/graph/example/family_tree.expected
new file mode 100644
index 000000000..b9afc3f43
--- /dev/null
+++ b/src/boost/libs/graph/example/family_tree.expected
@@ -0,0 +1,7 @@
+Jeanie is the parent of Debbie Rick John
+Debbie is the parent of Amanda
+Rick is the parent of Margaret
+John is the parent of Benjamin
+Amanda has no children
+Margaret has no children
+Benjamin has no children
diff --git a/src/boost/libs/graph/example/fibonacci_heap.cpp b/src/boost/libs/graph/example/fibonacci_heap.cpp
new file mode 100644
index 000000000..ffa42ab51
--- /dev/null
+++ b/src/boost/libs/graph/example/fibonacci_heap.cpp
@@ -0,0 +1,86 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <boost/graph/random.hpp>
+#ifndef BOOST_NO_CXX11_HDR_RANDOM
+#include <random>
+namespace random_ns = std;
+#else
+#include <boost/random/mersenne_twister.hpp>
+namespace random_ns = boost;
+#endif
+#include <algorithm>
+#include <boost/pending/fibonacci_heap.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/pending/indirect_cmp.hpp>
+
+using namespace boost;
+
+int main()
+{
+ typedef indirect_cmp< float*, std::less< float > > ICmp;
+ int i;
+ random_ns::mt19937 gen;
+ for (int N = 2; N < 200; ++N)
+ {
+ uniform_int<> distrib(0, N - 1);
+ boost::variate_generator< random_ns::mt19937&, uniform_int<> > rand_gen(
+ gen, distrib);
+ for (int t = 0; t < 10; ++t)
+ {
+ std::vector< float > v, w(N);
+
+ ICmp cmp(&w[0], std::less< float >());
+ fibonacci_heap< int, ICmp > Q(N, cmp);
+
+ for (int c = 0; c < w.size(); ++c)
+ w[c] = c;
+#ifndef BOOST_NO_CXX98_RANDOM_SHUFFLE
+ std::random_shuffle(w.begin(), w.end());
+#else
+ std::shuffle(w.begin(), w.end(), gen);
+#endif
+
+ for (i = 0; i < N; ++i)
+ Q.push(i);
+
+ for (i = 0; i < N; ++i)
+ {
+ int u = rand_gen();
+ float r = rand_gen();
+ r /= 2.0;
+ w[u] = w[u] - r;
+ Q.update(u);
+ }
+
+ for (i = 0; i < N; ++i)
+ {
+ v.push_back(w[Q.top()]);
+ Q.pop();
+ }
+ std::sort(w.begin(), w.end());
+
+ if (!std::equal(v.begin(), v.end(), w.begin()))
+ {
+ std::cout << std::endl << "heap sorted: ";
+ std::copy(v.begin(), v.end(),
+ std::ostream_iterator< float >(std::cout, " "));
+ std::cout << std::endl << "correct: ";
+ std::copy(w.begin(), w.end(),
+ std::ostream_iterator< float >(std::cout, " "));
+ std::cout << std::endl;
+ return -1;
+ }
+ }
+ }
+ std::cout << "fibonacci heap passed test" << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/fibonacci_heap.expected b/src/boost/libs/graph/example/fibonacci_heap.expected
new file mode 100644
index 000000000..a11d7ad1d
--- /dev/null
+++ b/src/boost/libs/graph/example/fibonacci_heap.expected
@@ -0,0 +1 @@
+fibonacci heap passed test
diff --git a/src/boost/libs/graph/example/figs/cc-internet.dot b/src/boost/libs/graph/example/figs/cc-internet.dot
new file mode 100644
index 000000000..a49fda738
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/cc-internet.dot
@@ -0,0 +1,67 @@
+graph G {
+rankdir="LR";
+size="5.625,7.75";
+ratio="fill";
+subgraph cluster0 {
+color="white"
+"engr-fe21.gw.nd.edu"
+"radole.lcs.mit.edu"
+"shub-e27.gw.nd.edu"
+"ihtfp.mit.edu"
+"core1-ord1-oc48.ord2.above.net"
+"albnxg1.ip.tele.dk"
+}
+subgraph cluster1 {
+color="white"
+"nycmny1-cr1.bbnplanet.net"
+"ccn-nerif35.Berkeley.EDU"
+"rip.Berkeley.EDU"
+"chicago1-nbr1.bbnplanet.net"
+"ccngw-ner-cc.Berkeley.EDU"
+"above-bbn-45Mbps.ord.above.net"
+}
+subgraph cluster2 {
+color="white"
+"gw-dkuug.oeb.tdk.ne"
+"vabi1-gige-1-1.google.com"
+}
+subgraph cluster3 {
+color="white"
+"boston1-br1.bbnplanet.net"
+"cambridge1-nbr2.bbnplanet.net"
+"helios.ee.lbl.gov"
+"lilac-dmc.Berkeley.EDU"
+"teledk.bbnplanet.net"
+"albnxg1.ip.tele.dk"
+}
+
+edge[style="bold"];
+
+"engr-fe21.gw.nd.edu" -- "shub-e27.gw.nd.edu"
+"shub-e27.gw.nd.edu" -- "chicago1-nbr1.bbnplanet.net"
+"shub-e27.gw.nd.edu" -- "core1-ord1-oc48.ord2.above.net"
+"chicago1-nbr1.bbnplanet.net" -- "above-bbn-45Mbps.ord.above.net"
+"above-bbn-45Mbps.ord.above.net" -- "engr-fe21.gw.nd.edu"
+"above-bbn-45Mbps.ord.above.net" -- "core1-ord1-oc48.ord2.above.net"
+"core1-ord1-oc48.ord2.above.net" -- "vabi1-gige-1-1.google.com"
+"vabi1-gige-1-1.google.com" -- "chicago1-nbr1.bbnplanet.net"
+
+"cambridge1-nbr2.bbnplanet.net" -- "boston1-br1.bbnplanet.net"
+"ihtfp.mit.edu" -- "boston1-br1.bbnplanet.net"
+"cambridge1-nbr2.bbnplanet.net" -- "radole.lcs.mit.edu"
+"ihtfp.mit.edu" -- "radole.lcs.mit.edu"
+
+"helios.ee.lbl.gov" -- "lilac-dmc.Berkeley.EDU"
+"lilac-dmc.Berkeley.EDU" -- "ccngw-ner-cc.Berkeley.EDU"
+"ccngw-ner-cc.Berkeley.EDU" -- "ccn-nerif35.Berkeley.EDU"
+"ccn-nerif35.Berkeley.EDU" -- "rip.Berkeley.EDU"
+"helios.ee.lbl.gov" -- "ccn-nerif35.Berkeley.EDU"
+"lilac-dmc.Berkeley.EDU" -- "rip.Berkeley.EDU"
+
+"nycmny1-cr1.bbnplanet.net" -- "teledk.bbnplanet.net"
+"teledk.bbnplanet.net" -- "albnxg1.ip.tele.dk"
+"albnxg1.ip.tele.dk" -- "gw-dkuug.oeb.tdk.ne"
+"nycmny1-cr1.bbnplanet.net" -- "gw-dkuug.oeb.tdk.ne"
+"nycmny1-cr1.bbnplanet.net" -- "albnxg1.ip.tele.dk"
+
+}
diff --git a/src/boost/libs/graph/example/figs/dfs-example.dot b/src/boost/libs/graph/example/figs/dfs-example.dot
new file mode 100644
index 000000000..06e266395
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/dfs-example.dot
@@ -0,0 +1,28 @@
+graph G {
+ size="3,3"
+ ratio="fill"
+ node[shape="circle"]
+ edge[style="bold"]
+ a;
+ b;
+ c;
+ d;
+ e;
+ f;
+ g;
+ h;
+ i;
+ j;
+
+ c -- a[label="1"]
+ a -- b[color="gray",style="bold",weight=0]
+ f -- c[label="2"]
+ g -- f[label="3"]
+ f -- h[label="7"]
+ g -- d[label="4"]
+ b -- e[label="6"]
+ b -- d[label="5"]
+ e -- d[color="gray",style="bold",weight=0]
+
+ i -- j[label="8"]
+}
diff --git a/src/boost/libs/graph/example/figs/edge-connectivity.dot b/src/boost/libs/graph/example/figs/edge-connectivity.dot
new file mode 100644
index 000000000..f9dbadabe
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/edge-connectivity.dot
@@ -0,0 +1,21 @@
+graph G {
+ rankdir="LR"
+ size="5,3"
+ ratio="fill"
+ node[shape="circle"]
+ A B C D E F G H
+ A -- B
+ A -- C
+ A -- D
+ B -- C
+ B -- D
+ C -- D
+ D -- E
+ D -- H
+ E -- F
+ E -- G
+ E -- H
+ F -- G
+ F -- H
+ G -- H
+}
diff --git a/src/boost/libs/graph/example/figs/ospf-graph.dot b/src/boost/libs/graph/example/figs/ospf-graph.dot
new file mode 100644
index 000000000..c29637bae
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/ospf-graph.dot
@@ -0,0 +1,96 @@
+digraph G {
+ ratio="fill"
+ size="4,6"
+ edge[style="bold"]
+
+ RT1
+ RT2
+ RT3
+ RT4
+ RT5
+ RT6
+ RT7
+ RT8
+ RT9
+ RT10
+ RT11
+ RT12
+
+ N1
+ N2
+ N3
+ N4
+ N6
+ N7
+ N8
+ N9
+ N10
+ N11
+ N12
+ N13
+ N14
+ N15
+ H1
+
+ RT1 -> N1[label="3"]
+ RT1 -> N3[label="1"]
+
+ RT2 -> N2[label="3"]
+ RT2 -> N3[label="1"]
+
+ RT3 -> RT6[label="8"]
+ RT3 -> N3[label="1"]
+ RT3 -> N4[label="2"]
+
+ RT4 -> N3[label="1"]
+ RT4 -> RT5[label="8"]
+
+ RT5 -> RT4[label="8"]
+ RT5 -> RT6[label="7"]
+ RT5 -> RT7[label="6"]
+ RT5 -> N12[label="8"]
+ RT5 -> N13[label="8"]
+ RT5 -> N14[label="8"]
+
+ RT6 -> RT3[label="6"]
+ RT6 -> RT5[label="6"]
+ RT6 -> RT10[label="7"]
+
+ RT7 -> RT5[label="6"]
+ RT7 -> N6[label="1"]
+ RT7 -> N12[label="2"]
+ RT7 -> N15[label="9"]
+
+ RT8 -> N6[label="1"]
+ RT8 -> N7[label="4"]
+
+ RT9 -> N9[label="1"]
+ RT9 -> N11[label="3"]
+
+ RT10 -> RT6[label="5"]
+ RT10 -> N6[label="1"]
+ RT10 -> N8[label="3"]
+
+ RT11 -> N8[label="2"]
+ RT11 -> N9[label="1"]
+
+ RT12 -> N9[label="1"]
+ RT12 -> N10[label="2"]
+ RT12 -> H1[label="10"]
+
+ N3 -> RT1[label="0"]
+ N3 -> RT2[label="0"]
+ N3 -> RT3[label="0"]
+ N3 -> RT4[label="0"]
+
+ N6 -> RT7[label="0"]
+ N6 -> RT8[label="0"]
+ N6 -> RT10[label="0"]
+
+ N8 -> RT10[label="0"]
+ N8 -> RT11[label="0"]
+
+ N9 -> RT9[label="0"]
+ N9 -> RT11[label="0"]
+ N9 -> RT12[label="0"]
+}
diff --git a/src/boost/libs/graph/example/figs/scc.dot b/src/boost/libs/graph/example/figs/scc.dot
new file mode 100644
index 000000000..7cf6736bf
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/scc.dot
@@ -0,0 +1,33 @@
+digraph SCC {
+ size="3,4"
+ ratio="fill"
+ edge[style="bold"]
+ "www.boost.org"
+ "www.yahoogroups.com"
+ "weather.yahoo.com"
+ "nytimes.com"
+ "www.boston.com"
+ "sourceforge.net"
+ "www.hp.com"
+ "anubis.dkuug.dk"
+ "www.lsc.nd.edu"
+ "www.lam-mpi.org"
+
+ "www.boost.org" -> "www.yahoogroups.com"
+ "www.boost.org" -> "sourceforge.net"
+ "www.boost.org" -> "anubis.dkuug.dk"
+ "www.yahoogroups.com" -> "weather.yahoo.com"
+ "www.yahoogroups.com" -> "www.boost.org"
+ "weather.yahoo.com" -> "nytimes.com"
+ "weather.yahoo.com" -> "www.yahoogroups.com"
+ "nytimes.com" -> "www.boston.com"
+ "www.boston.com" -> "nytimes.com"
+ "sourceforge.net" -> "www.hp.com"
+ "www.hp.com" -> "sourceforge.net"
+ "www.hp.com" -> "nytimes.com"
+ "anubis.dkuug.dk" -> "www.lsc.nd.edu"
+ "www.lsc.nd.edu" -> "anubis.dkuug.dk"
+ "www.lsc.nd.edu" -> "www.lam-mpi.org"
+ "www.lsc.nd.edu" -> "www.boston.com"
+ "www.lsc.nd.edu" -> "weather.yahoo.com"
+}
diff --git a/src/boost/libs/graph/example/figs/telephone-network.dot b/src/boost/libs/graph/example/figs/telephone-network.dot
new file mode 100644
index 000000000..382ac7fa4
--- /dev/null
+++ b/src/boost/libs/graph/example/figs/telephone-network.dot
@@ -0,0 +1,42 @@
+graph G {
+ size="5,5.3"
+ ratio="fill"
+ edge[style="bold"]
+ Nobel
+ McKellar
+ "Parry Sound"
+ "Horseshoe Lake"
+ Rosseau
+ Mactier
+ "Bent River"
+ Dunchurch
+ Magnetawan
+ Kearny
+ "Glen Orchard"
+ Sprucedale
+ Novar
+ Huntsville
+ Bracebridge
+
+ Nobel -- McKellar[label="9", weight="9"]
+ Nobel -- "Parry Sound"[label="3", weight="3"]
+ McKellar -- Dunchurch[label="11", weight="11"]
+ Dunchurch -- Magnetawan[label="12", weight="12"]
+ McKellar -- Magnetawan[label="30", weight="30"]
+ Magnetawan -- Kearny[label="20", weight="20"]
+ Magnetawan -- Sprucedale[label="20", weight="20"]
+ Kearny -- Sprucedale[label="13", weight="13"]
+ Sprucedale -- Novar[label="18", weight="18"]
+ Sprucedale -- Huntsville[label="15", weight="15"]
+ Kearny -- Novar[label="8", weight="11"]
+ Novar -- Huntsville[label="5", weight="5"]
+ Huntsville -- Bracebridge[label="30", weight="30"]
+ Huntsville -- "Bent River"[label="30", weight="30"]
+ Rosseau -- "Bent River"[label="8", weight="8"]
+ Rosseau -- "Horseshoe Lake"[label="8", weight="8"]
+ Mactier -- "Horseshoe Lake"[label="14", weight="14"]
+ "Parry Sound" -- "Horseshoe Lake"[label="10", weight="10"]
+ "Parry Sound" -- Dunchurch[label="20", weight="20"]
+ Mactier -- "Glen Orchard"[label="9", weight="9"]
+ "Glen Orchard" -- Bracebridge[label="15", weight="15"]
+}
diff --git a/src/boost/libs/graph/example/file_dependencies.cpp b/src/boost/libs/graph/example/file_dependencies.cpp
new file mode 100644
index 000000000..d4344b98f
--- /dev/null
+++ b/src/boost/libs/graph/example/file_dependencies.cpp
@@ -0,0 +1,198 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+// Some small modifications are done by Alexander Holler
+
+/*
+
+ Paul Moore's request:
+
+ As an example of a practical problem which is not restricted to graph
+ "experts", consider file dependencies. It's basically graph construction,
+ plus topological sort, but it might make a nice "tutorial" example. Build a
+ dependency graph of files, then use the algorithms to do things like
+
+ 1. Produce a full recompilation order (topological sort, by modified date)
+ 2. Produce a "parallel" recompilation order (same as above, but group files
+ which can be built in parallel)
+ 3. Change analysis (if I change file x, which others need recompiling)
+ 4. Dependency changes (if I add a dependency between file x and file y, what
+ are the effects)
+
+*/
+
+#include <boost/config.hpp> // put this first to suppress some VC++ warnings
+
+#include <iostream>
+#include <iterator>
+#include <algorithm>
+#include <time.h>
+
+#include <boost/utility.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/topological_sort.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/graph/visitors.hpp>
+
+using namespace std;
+using namespace boost;
+
+enum files_e
+{
+ dax_h,
+ yow_h,
+ boz_h,
+ zow_h,
+ foo_cpp,
+ foo_o,
+ bar_cpp,
+ bar_o,
+ libfoobar_a,
+ zig_cpp,
+ zig_o,
+ zag_cpp,
+ zag_o,
+ libzigzag_a,
+ killerapp,
+ N
+};
+const char* name[] = { "dax.h", "yow.h", "boz.h", "zow.h", "foo.cpp", "foo.o",
+ "bar.cpp", "bar.o", "libfoobar.a", "zig.cpp", "zig.o", "zag.cpp", "zag.o",
+ "libzigzag.a", "killerapp" };
+
+struct print_visitor : public bfs_visitor<>
+{
+ template < class Vertex, class Graph >
+ void discover_vertex(Vertex v, Graph&)
+ {
+ cout << name[v] << " ";
+ }
+};
+
+struct cycle_detector : public dfs_visitor<>
+{
+ cycle_detector(bool& has_cycle) : m_has_cycle(has_cycle) {}
+
+ template < class Edge, class Graph > void back_edge(Edge, Graph&)
+ {
+ m_has_cycle = true;
+ }
+
+protected:
+ bool& m_has_cycle;
+};
+
+int main(int, char*[])
+{
+
+ typedef pair< int, int > Edge;
+ Edge used_by[] = { Edge(dax_h, foo_cpp), Edge(dax_h, bar_cpp),
+ Edge(dax_h, yow_h), Edge(yow_h, bar_cpp), Edge(yow_h, zag_cpp),
+ Edge(boz_h, bar_cpp), Edge(boz_h, zig_cpp), Edge(boz_h, zag_cpp),
+ Edge(zow_h, foo_cpp), Edge(foo_cpp, foo_o), Edge(foo_o, libfoobar_a),
+ Edge(bar_cpp, bar_o), Edge(bar_o, libfoobar_a),
+ Edge(libfoobar_a, libzigzag_a), Edge(zig_cpp, zig_o),
+ Edge(zig_o, libzigzag_a), Edge(zag_cpp, zag_o),
+ Edge(zag_o, libzigzag_a), Edge(libzigzag_a, killerapp) };
+ const std::size_t nedges = sizeof(used_by) / sizeof(Edge);
+
+ typedef adjacency_list< vecS, vecS, bidirectionalS > Graph;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ Graph g(N);
+ for (std::size_t j = 0; j < nedges; ++j)
+ {
+ graph_traits< Graph >::edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted)
+ = add_edge(used_by[j].first, used_by[j].second, g);
+ }
+#else
+ Graph g(used_by, used_by + nedges, N);
+#endif
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+
+ // Determine ordering for a full recompilation
+ // and the order with files that can be compiled in parallel
+ {
+ typedef list< Vertex > MakeOrder;
+ MakeOrder::iterator i;
+ MakeOrder make_order;
+
+ topological_sort(g, std::front_inserter(make_order));
+ cout << "make ordering: ";
+ for (i = make_order.begin(); i != make_order.end(); ++i)
+ cout << name[*i] << " ";
+
+ cout << endl << endl;
+
+ // Parallel compilation ordering
+ std::vector< int > time(N, 0);
+ for (i = make_order.begin(); i != make_order.end(); ++i)
+ {
+ // Walk through the in_edges an calculate the maximum time.
+ if (in_degree(*i, g) > 0)
+ {
+ Graph::in_edge_iterator j, j_end;
+ int maxdist = 0;
+ // Through the order from topological sort, we are sure that
+ // every time we are using here is already initialized.
+ for (boost::tie(j, j_end) = in_edges(*i, g); j != j_end; ++j)
+ maxdist = (std::max)(time[source(*j, g)], maxdist);
+ time[*i] = maxdist + 1;
+ }
+ }
+
+ cout << "parallel make ordering, " << endl
+ << "vertices with same group number can be made in parallel"
+ << endl;
+ {
+ graph_traits< Graph >::vertex_iterator i, iend;
+ for (boost::tie(i, iend) = vertices(g); i != iend; ++i)
+ cout << "time_slot[" << name[*i] << "] = " << time[*i] << endl;
+ }
+ }
+ cout << endl;
+
+ // if I change yow.h what files need to be re-made?
+ {
+ cout << "A change to yow.h will cause what to be re-made?" << endl;
+ print_visitor vis;
+ breadth_first_search(g, vertex(yow_h, g), visitor(vis));
+ cout << endl;
+ }
+ cout << endl;
+
+ // are there any cycles in the graph?
+ {
+ bool has_cycle = false;
+ cycle_detector vis(has_cycle);
+ depth_first_search(g, visitor(vis));
+ cout << "The graph has a cycle? " << has_cycle << endl;
+ }
+ cout << endl;
+
+ // add a dependency going from bar.cpp to dax.h
+ {
+ cout << "adding edge bar_cpp -> dax_h" << endl;
+ add_edge(bar_cpp, dax_h, g);
+ }
+ cout << endl;
+
+ // are there any cycles in the graph?
+ {
+ bool has_cycle = false;
+ cycle_detector vis(has_cycle);
+ depth_first_search(g, visitor(vis));
+ cout << "The graph has a cycle now? " << has_cycle << endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/file_dependencies.expected b/src/boost/libs/graph/example/file_dependencies.expected
new file mode 100644
index 000000000..ddc9c0be7
--- /dev/null
+++ b/src/boost/libs/graph/example/file_dependencies.expected
@@ -0,0 +1,28 @@
+make ordering: zow.h boz.h zig.cpp zig.o dax.h yow.h zag.cpp zag.o bar.cpp bar.o foo.cpp foo.o libfoobar.a libzigzag.a killerapp
+
+parallel make ordering,
+vertices with same group number can be made in parallel
+time_slot[dax.h] = 0
+time_slot[yow.h] = 1
+time_slot[boz.h] = 0
+time_slot[zow.h] = 0
+time_slot[foo.cpp] = 1
+time_slot[foo.o] = 2
+time_slot[bar.cpp] = 2
+time_slot[bar.o] = 3
+time_slot[libfoobar.a] = 4
+time_slot[zig.cpp] = 1
+time_slot[zig.o] = 2
+time_slot[zag.cpp] = 2
+time_slot[zag.o] = 3
+time_slot[libzigzag.a] = 5
+time_slot[killerapp] = 6
+
+A change to yow.h will cause what to be re-made?
+yow.h bar.cpp zag.cpp bar.o zag.o libfoobar.a libzigzag.a killerapp
+
+The graph has a cycle? 0
+
+adding edge bar_cpp -> dax_h
+
+The graph has a cycle now? 1
diff --git a/src/boost/libs/graph/example/filtered-copy-example.cpp b/src/boost/libs/graph/example/filtered-copy-example.cpp
new file mode 100644
index 000000000..7cd7002c9
--- /dev/null
+++ b/src/boost/libs/graph/example/filtered-copy-example.cpp
@@ -0,0 +1,74 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/copy.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+template < typename Graph > struct non_zero_degree
+{
+ non_zero_degree() {} // has to have a default constructor!
+
+ non_zero_degree(const Graph& g) : g(&g) {}
+
+ bool operator()(
+ typename boost::graph_traits< Graph >::vertex_descriptor v) const
+ {
+ return degree(v, *g) != 0;
+ }
+ const Graph* g;
+};
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, bidirectionalS,
+ property< vertex_name_t, char > >
+ graph_t;
+
+ enum
+ {
+ a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ N
+ };
+ graph_t G(N);
+ property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, G);
+ char name = 'a';
+ graph_traits< graph_t >::vertex_iterator v, v_end;
+ for (boost::tie(v, v_end) = vertices(G); v != v_end; ++v, ++name)
+ name_map[*v] = name;
+
+ typedef std::pair< int, int > E;
+ E edges[] = { E(a, c), E(a, d), E(b, a), E(b, d), E(c, f), E(d, c), E(d, e),
+ E(d, f), E(e, b), E(e, g), E(f, e), E(f, g) };
+ for (int i = 0; i < 12; ++i)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ print_graph(G, name_map);
+ std::cout << std::endl;
+
+ clear_vertex(b, G);
+ clear_vertex(d, G);
+
+ graph_t G_copy;
+ copy_graph(
+ make_filtered_graph(G, keep_all(), non_zero_degree< graph_t >(G)),
+ G_copy);
+
+ print_graph(G_copy, get(vertex_name, G_copy));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/filtered_graph.cpp b/src/boost/libs/graph/example/filtered_graph.cpp
new file mode 100644
index 000000000..9a89718c9
--- /dev/null
+++ b/src/boost/libs/graph/example/filtered_graph.cpp
@@ -0,0 +1,77 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Sample output:
+
+ filtered edge set: (A,B) (C,D) (D,B)
+ filtered out-edges:
+ A --> B
+ B -->
+ C --> D
+ D --> B
+ E -->
+ */
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+template < typename EdgeWeightMap > struct positive_edge_weight
+{
+ positive_edge_weight() {}
+ positive_edge_weight(EdgeWeightMap weight) : m_weight(weight) {}
+ template < typename Edge > bool operator()(const Edge& e) const
+ {
+ return 0 < boost::get(m_weight, e);
+ }
+ EdgeWeightMap m_weight;
+};
+
+int main()
+{
+ using namespace boost;
+
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ typedef property_map< Graph, edge_weight_t >::type EdgeWeightMap;
+
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ N
+ };
+ const char* name = "ABCDE";
+ Graph g(N);
+ add_edge(A, B, 2, g);
+ add_edge(A, C, 0, g);
+ add_edge(C, D, 1, g);
+ add_edge(C, E, 0, g);
+ add_edge(D, B, 3, g);
+ add_edge(E, C, 0, g);
+
+ positive_edge_weight< EdgeWeightMap > filter(get(edge_weight, g));
+ filtered_graph< Graph, positive_edge_weight< EdgeWeightMap > > fg(
+ g, filter);
+
+ std::cout << "filtered edge set: ";
+ print_edges(fg, name);
+
+ std::cout << "filtered out-edges:" << std::endl;
+ print_graph(fg, name);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/filtered_graph.expected b/src/boost/libs/graph/example/filtered_graph.expected
new file mode 100644
index 000000000..9960b96a3
--- /dev/null
+++ b/src/boost/libs/graph/example/filtered_graph.expected
@@ -0,0 +1,7 @@
+filtered edge set: (A,B) (C,D) (D,B)
+filtered out-edges:
+A --> B
+B -->
+C --> D
+D --> B
+E -->
diff --git a/src/boost/libs/graph/example/filtered_graph_edge_range.cpp b/src/boost/libs/graph/example/filtered_graph_edge_range.cpp
new file mode 100644
index 000000000..ed6b653d7
--- /dev/null
+++ b/src/boost/libs/graph/example/filtered_graph_edge_range.cpp
@@ -0,0 +1,88 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Sample output:
+
+ filtered edge set: (A,B) (C,D) (D,B)
+ filtered out-edges:
+ A --> B
+ B -->
+ C --> D
+ D --> B
+ E -->
+ */
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+template < typename EdgeWeightMap > struct positive_edge_weight
+{
+ positive_edge_weight() {}
+ positive_edge_weight(EdgeWeightMap weight) : m_weight(weight) {}
+ template < typename Edge > bool operator()(const Edge& e) const
+ {
+ return 0 < boost::get(m_weight, e);
+ }
+ EdgeWeightMap m_weight;
+};
+
+int main()
+{
+ using namespace boost;
+
+ typedef adjacency_list< multisetS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ typedef property_map< Graph, edge_weight_t >::type EdgeWeightMap;
+
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ N
+ };
+ const char* name = "ABCDE";
+ Graph g(N);
+ add_edge(A, B, 2, g);
+ add_edge(A, C, 0, g);
+ add_edge(C, D, 1, g);
+ add_edge(C, D, 0, g);
+ add_edge(C, D, 3, g);
+ add_edge(C, E, 0, g);
+ add_edge(D, B, 3, g);
+ add_edge(E, C, 0, g);
+
+ EdgeWeightMap weight = get(edge_weight, g);
+
+ std::cout << "unfiltered edge_range(C,D)\n";
+ graph_traits< Graph >::out_edge_iterator f, l;
+ for (boost::tie(f, l) = edge_range(C, D, g); f != l; ++f)
+ std::cout << name[source(*f, g)] << " --" << weight[*f] << "-> "
+ << name[target(*f, g)] << "\n";
+
+ positive_edge_weight< EdgeWeightMap > filter(weight);
+ typedef filtered_graph< Graph, positive_edge_weight< EdgeWeightMap > >
+ FGraph;
+ FGraph fg(g, filter);
+
+ std::cout << "filtered edge_range(C,D)\n";
+ graph_traits< FGraph >::out_edge_iterator first, last;
+ for (boost::tie(first, last) = edge_range(C, D, fg); first != last; ++first)
+ std::cout << name[source(*first, fg)] << " --" << weight[*first]
+ << "-> " << name[target(*first, fg)] << "\n";
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/filtered_vec_as_graph.cpp b/src/boost/libs/graph/example/filtered_vec_as_graph.cpp
new file mode 100644
index 000000000..2ec53a226
--- /dev/null
+++ b/src/boost/libs/graph/example/filtered_vec_as_graph.cpp
@@ -0,0 +1,68 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Sample output:
+
+ filtered out-edges:
+ A -->
+ B -->
+ C --> E
+ D --> E
+ E -->
+ */
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/vector_as_graph.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+struct constant_target
+{
+ constant_target() {}
+ constant_target(int t) : target(t) {}
+ bool operator()(const std::pair< int, int >& e) const
+ {
+ return e.second == target;
+ }
+ int target;
+};
+
+int main()
+{
+ using namespace boost;
+
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ N
+ };
+ const char* name = "ABCDE";
+ typedef std::vector< std::list< int > > Graph;
+ Graph g(N);
+ g[A].push_back(B);
+ g[A].push_back(C);
+ g[C].push_back(D);
+ g[C].push_back(E);
+ g[D].push_back(E);
+ g[E].push_back(C);
+
+ constant_target filter(E);
+ filtered_graph< Graph, constant_target > fg(g, filter);
+
+ std::cout << "filtered out-edges:" << std::endl;
+ print_graph(fg, name);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/fr_layout.cpp b/src/boost/libs/graph/example/fr_layout.cpp
new file mode 100644
index 000000000..bc545719d
--- /dev/null
+++ b/src/boost/libs/graph/example/fr_layout.cpp
@@ -0,0 +1,158 @@
+// Copyright 2004 The Trustees of Indiana University.
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Authors: Douglas Gregor
+// Andrew Lumsdaine
+#include <boost/graph/fruchterman_reingold.hpp>
+#include <boost/graph/random_layout.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/topology.hpp>
+#include <boost/lexical_cast.hpp>
+#include <string>
+#include <iostream>
+#include <map>
+#include <vector>
+#include <boost/random/linear_congruential.hpp>
+#include <boost/progress.hpp>
+#include <boost/shared_ptr.hpp>
+
+using namespace boost;
+
+void usage()
+{
+ std::cerr << "Usage: fr_layout [options] <width> <height>\n"
+ << "Arguments:\n"
+ << "\t<width>\tWidth of the display area (floating point)\n"
+ << "\t<Height>\tHeight of the display area (floating point)\n\n"
+ << "Options:\n"
+ << "\t--iterations n\tNumber of iterations to execute.\n"
+ << "\t\t\tThe default value is 100.\n"
+ << "Input:\n"
+ << " Input is read from standard input as a list of edges, one "
+ "per line.\n"
+ << " Each edge contains two string labels (the endpoints) "
+ "separated by a space.\n\n"
+ << "Output:\n"
+ << " Vertices and their positions are written to standard "
+ "output with the label,\n x-position, and y-position of a "
+ "vertex on each line, separated by spaces.\n";
+}
+
+typedef boost::rectangle_topology<> topology_type;
+typedef topology_type::point_type point_type;
+
+typedef adjacency_list< listS, vecS, undirectedS,
+ property< vertex_name_t, std::string > >
+ Graph;
+
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+
+typedef std::map< std::string, Vertex > NameToVertex;
+
+Vertex get_vertex(const std::string& name, Graph& g, NameToVertex& names)
+{
+ NameToVertex::iterator i = names.find(name);
+ if (i == names.end())
+ i = names.insert(std::make_pair(name, add_vertex(name, g))).first;
+ return i->second;
+}
+
+class progress_cooling : public linear_cooling< double >
+{
+ typedef linear_cooling< double > inherited;
+
+public:
+ explicit progress_cooling(std::size_t iterations) : inherited(iterations)
+ {
+ display.reset(new progress_display(iterations + 1, std::cerr));
+ }
+
+ double operator()()
+ {
+ ++(*display);
+ return inherited::operator()();
+ }
+
+private:
+ shared_ptr< boost::progress_display > display;
+};
+
+int main(int argc, char* argv[])
+{
+ int iterations = 100;
+
+ if (argc < 3)
+ {
+ usage();
+ return -1;
+ }
+
+ double width = 0;
+ double height = 0;
+
+ for (int arg_idx = 1; arg_idx < argc; ++arg_idx)
+ {
+ std::string arg = argv[arg_idx];
+ if (arg == "--iterations")
+ {
+ ++arg_idx;
+ if (arg_idx >= argc)
+ {
+ usage();
+ return -1;
+ }
+ iterations = lexical_cast< int >(argv[arg_idx]);
+ }
+ else
+ {
+ if (width == 0.0)
+ width = lexical_cast< double >(arg);
+ else if (height == 0.0)
+ height = lexical_cast< double >(arg);
+ else
+ {
+ usage();
+ return -1;
+ }
+ }
+ }
+
+ if (width == 0.0 || height == 0.0)
+ {
+ usage();
+ return -1;
+ }
+
+ Graph g;
+ NameToVertex names;
+
+ std::string source, target;
+ while (std::cin >> source >> target)
+ {
+ add_edge(get_vertex(source, g, names), get_vertex(target, g, names), g);
+ }
+
+ typedef std::vector< point_type > PositionVec;
+ PositionVec position_vec(num_vertices(g));
+ typedef iterator_property_map< PositionVec::iterator,
+ property_map< Graph, vertex_index_t >::type >
+ PositionMap;
+ PositionMap position(position_vec.begin(), get(vertex_index, g));
+
+ minstd_rand gen;
+ topology_type topo(gen, -width / 2, -height / 2, width / 2, height / 2);
+ random_graph_layout(g, position, topo);
+ fruchterman_reingold_force_directed_layout(
+ g, position, topo, cooling(progress_cooling(iterations)));
+
+ graph_traits< Graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ std::cout << get(vertex_name, g, *vi) << '\t' << position[*vi][0]
+ << '\t' << position[*vi][1] << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/gerdemann.cpp b/src/boost/libs/graph/example/gerdemann.cpp
new file mode 100644
index 000000000..09804f7c5
--- /dev/null
+++ b/src/boost/libs/graph/example/gerdemann.cpp
@@ -0,0 +1,164 @@
+// -*- c++ -*-
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+
+#include <boost/graph/adjacency_list.hpp>
+
+/*
+ Thanks to Dale Gerdemann for this example, which inspired some
+ changes to adjacency_list to make this work properly.
+ */
+
+/*
+ Sample output:
+
+ 0 --c--> 1 --j--> 1 --c--> 2 --x--> 2
+ 1 --c--> 2 --d--> 3
+ 2 --t--> 4
+ 3 --h--> 4
+ 4
+
+ merging vertex 1 into vertex 0
+
+ 0 --c--> 0 --j--> 0 --c--> 1 --x--> 1 --d--> 2
+ 1 --t--> 3
+ 2 --h--> 3
+ 3
+ */
+
+// merge_vertex(u,v,g):
+// incoming/outgoing edges for v become incoming/outgoing edges for u
+// v is deleted
+template < class Graph, class GetEdgeProperties >
+void merge_vertex(typename boost::graph_traits< Graph >::vertex_descriptor u,
+ typename boost::graph_traits< Graph >::vertex_descriptor v, Graph& g,
+ GetEdgeProperties getp)
+{
+ typedef boost::graph_traits< Graph > Traits;
+ typename Traits::edge_descriptor e;
+ typename Traits::out_edge_iterator out_i, out_end;
+ for (boost::tie(out_i, out_end) = out_edges(v, g); out_i != out_end;
+ ++out_i)
+ {
+ e = *out_i;
+ typename Traits::vertex_descriptor targ = target(e, g);
+ add_edge(u, targ, getp(e), g);
+ }
+ typename Traits::in_edge_iterator in_i, in_end;
+ for (boost::tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i)
+ {
+ e = *in_i;
+ typename Traits::vertex_descriptor src = source(e, g);
+ add_edge(src, u, getp(e), g);
+ }
+ clear_vertex(v, g);
+ remove_vertex(v, g);
+}
+
+template < class StoredEdge > struct order_by_name
+{
+ typedef StoredEdge first_argument_type;
+ typedef StoredEdge second_argument_type;
+ typedef bool result_type;
+ bool operator()(const StoredEdge& e1, const StoredEdge& e2) const
+ {
+ // Using std::pair operator< as an easy way to get lexicographical
+ // compare over tuples.
+ return std::make_pair(e1.get_target(), boost::get(boost::edge_name, e1))
+ < std::make_pair(e2.get_target(), boost::get(boost::edge_name, e2));
+ }
+};
+struct ordered_set_by_nameS
+{
+};
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+namespace boost
+{
+template < class ValueType >
+struct container_gen< ordered_set_by_nameS, ValueType >
+{
+ typedef std::set< ValueType, order_by_name< ValueType > > type;
+};
+template <> struct parallel_edge_traits< ordered_set_by_nameS >
+{
+ typedef allow_parallel_edge_tag type;
+};
+}
+#endif
+
+template < class Graph > struct get_edge_name
+{
+ get_edge_name(const Graph& g_) : g(g_) {}
+
+ template < class Edge >
+ boost::property< boost::edge_name_t, char > operator()(Edge e) const
+ {
+ return boost::property< boost::edge_name_t, char >(
+ boost::get(boost::edge_name, g, e));
+ }
+ const Graph& g;
+};
+
+int main()
+{
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ std::cout << "This program requires partial specialization." << std::endl;
+#else
+ using namespace boost;
+ typedef property< edge_name_t, char > EdgeProperty;
+ typedef adjacency_list< ordered_set_by_nameS, vecS, bidirectionalS,
+ no_property, EdgeProperty >
+ graph_type;
+
+ graph_type g;
+
+ add_edge(0, 1, EdgeProperty('j'), g);
+ add_edge(0, 2, EdgeProperty('c'), g);
+ add_edge(0, 2, EdgeProperty('x'), g);
+ add_edge(1, 3, EdgeProperty('d'), g);
+ add_edge(1, 2, EdgeProperty('c'), g);
+ add_edge(1, 3, EdgeProperty('d'), g);
+ add_edge(2, 4, EdgeProperty('t'), g);
+ add_edge(3, 4, EdgeProperty('h'), g);
+ add_edge(0, 1, EdgeProperty('c'), g);
+
+ property_map< graph_type, vertex_index_t >::type id = get(vertex_index, g);
+ property_map< graph_type, edge_name_t >::type name = get(edge_name, g);
+
+ graph_traits< graph_type >::vertex_iterator i, end;
+ graph_traits< graph_type >::out_edge_iterator ei, edge_end;
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ std::cout << id[*i] << " ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ std::cout << " --" << name[*ei] << "--> " << id[target(*ei, g)]
+ << " ";
+ std::cout << std::endl;
+ }
+ std::cout << std::endl;
+
+ std::cout << "merging vertex 1 into vertex 0" << std::endl << std::endl;
+ merge_vertex(0, 1, g, get_edge_name< graph_type >(g));
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ std::cout << id[*i] << " ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ std::cout << " --" << name[*ei] << "--> " << id[target(*ei, g)]
+ << " ";
+ std::cout << std::endl;
+ }
+ std::cout << std::endl;
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/gerdemann.expected b/src/boost/libs/graph/example/gerdemann.expected
new file mode 100644
index 000000000..bb63e9f25
--- /dev/null
+++ b/src/boost/libs/graph/example/gerdemann.expected
@@ -0,0 +1,13 @@
+0 --c--> 1 --j--> 1 --c--> 2 --x--> 2
+1 --c--> 2 --d--> 3
+2 --t--> 4
+3 --h--> 4
+4
+
+merging vertex 1 into vertex 0
+
+0 --c--> 0 --j--> 0 --c--> 1 --x--> 1 --d--> 2
+1 --t--> 3
+2 --h--> 3
+3
+
diff --git a/src/boost/libs/graph/example/girth.cpp b/src/boost/libs/graph/example/girth.cpp
new file mode 100644
index 000000000..3df89b01b
--- /dev/null
+++ b/src/boost/libs/graph/example/girth.cpp
@@ -0,0 +1,162 @@
+//=======================================================================
+// Copyright 2002 Indiana University.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Adapted from the GIRTH program of the Stanford GraphBase.
+
+ Sample output:
+
+ This program explores the girth and diameter of Ramanujan graphs.
+ The bipartite graphs have q^3-q vertices, and the non-bipartite
+ graphs have half that number. Each vertex has degree p+1.
+ Both p and q should be odd prime numbers;
+ or you can try p = 2 with q = 17 or 43.
+
+ Choose a branching factor, p: 2
+ Ok, now choose the cube root of graph size, q: 17
+ Starting at any given vertex, there are
+ 3 vertices at distance 1,
+ 6 vertices at distance 2,
+ 12 vertices at distance 3,
+ 24 vertices at distance 4,
+ 46 vertices at distance 5,
+ 90 vertices at distance 6,
+ 169 vertices at distance 7,
+ 290 vertices at distance 8,
+ 497 vertices at distance 9,
+ 634 vertices at distance 10,
+ 521 vertices at distance 11,
+ 138 vertices at distance 12,
+ 13 vertices at distance 13,
+ 3 vertices at distance 14,
+ 1 vertices at distance 15.
+ So the diameter is 15, and the girth is 9.
+
+ */
+
+#include <boost/config.hpp>
+#include <vector>
+#include <list>
+#include <iostream>
+#include <boost/limits.hpp>
+#include <boost/graph/stanford_graph.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+typedef boost::graph_traits< Graph* > Traits;
+typedef Traits::vertex_descriptor vertex_descriptor;
+typedef Traits::edge_descriptor edge_descriptor;
+typedef Traits::vertex_iterator vertex_iterator;
+
+std::vector< std::size_t > distance_list;
+
+typedef boost::v_property< long > dist_t;
+boost::property_map< Graph*, dist_t >::type d_map;
+
+typedef boost::u_property< vertex_descriptor > pred_t;
+boost::property_map< Graph*, pred_t >::type p_map;
+
+typedef boost::w_property< long > color_t;
+boost::property_map< Graph*, color_t >::type c_map;
+
+class diameter_and_girth_visitor : public boost::bfs_visitor<>
+{
+public:
+ diameter_and_girth_visitor(std::size_t& k_, std::size_t& girth_)
+ : k(k_), girth(girth_)
+ {
+ }
+
+ void tree_edge(edge_descriptor e, Graph* g)
+ {
+ vertex_descriptor u = source(e, g), v = target(e, g);
+ k = d_map[u] + 1;
+ d_map[v] = k;
+ ++distance_list[k];
+ p_map[v] = u;
+ }
+ void non_tree_edge(edge_descriptor e, Graph* g)
+ {
+ vertex_descriptor u = source(e, g), v = target(e, g);
+ k = d_map[u] + 1;
+ if (d_map[v] + k < girth && v != p_map[u])
+ girth = d_map[v] + k;
+ }
+
+private:
+ std::size_t& k;
+ std::size_t& girth;
+};
+
+int main()
+{
+ std::cout
+ << "This program explores the girth and diameter of Ramanujan graphs."
+ << std::endl;
+ std::cout
+ << "The bipartite graphs have q^3-q vertices, and the non-bipartite"
+ << std::endl;
+ std::cout << "graphs have half that number. Each vertex has degree p+1."
+ << std::endl;
+ std::cout << "Both p and q should be odd prime numbers;" << std::endl;
+ std::cout << " or you can try p = 2 with q = 17 or 43." << std::endl;
+
+ while (1)
+ {
+
+ std::cout << std::endl << "Choose a branching factor, p: ";
+ long p = 0, q = 0;
+ std::cin >> p;
+ if (p == 0)
+ break;
+ std::cout << "Ok, now choose the cube root of graph size, q: ";
+ std::cin >> q;
+ if (q == 0)
+ break;
+
+ Graph* g;
+ g = raman(p, q, 0L, 0L);
+ if (g == 0)
+ {
+ std::cerr << " Sorry, I couldn't make that graph (error code "
+ << panic_code << ")" << std::endl;
+ continue;
+ }
+ distance_list.clear();
+ distance_list.resize(boost::num_vertices(g), 0);
+
+ // obtain property maps
+ d_map = get(dist_t(), g);
+ p_map = get(pred_t(), g);
+ c_map = get(color_t(), g);
+
+ vertex_iterator i, end;
+ for (boost::tie(i, end) = boost::vertices(g); i != end; ++i)
+ d_map[*i] = 0;
+
+ std::size_t k = 0;
+ std::size_t girth = (std::numeric_limits< std::size_t >::max)();
+ diameter_and_girth_visitor vis(k, girth);
+
+ vertex_descriptor s = *boost::vertices(g).first;
+
+ boost::breadth_first_search(g, s, visitor(vis).color_map(c_map));
+
+ std::cout << "Starting at any given vertex, there are" << std::endl;
+
+ for (long d = 1; distance_list[d] != 0; ++d)
+ std::cout << distance_list[d] << " vertices at distance " << d
+ << (distance_list[d + 1] != 0 ? "," : ".") << std::endl;
+
+ std::cout << "So the diameter is " << k - 1 << ", and the girth is "
+ << girth << "." << std::endl;
+ } // end while
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graph-assoc-types.cpp b/src/boost/libs/graph/example/graph-assoc-types.cpp
new file mode 100644
index 000000000..5af9a8cc4
--- /dev/null
+++ b/src/boost/libs/graph/example/graph-assoc-types.cpp
@@ -0,0 +1,98 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph > void generic_foo(Graph& g)
+{
+ // Access descriptor types
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef typename graph_traits< Graph >::edge_descriptor Edge;
+ // Access category types
+ typedef typename graph_traits< Graph >::directed_category Dir;
+ typedef typename graph_traits< Graph >::edge_parallel_category Par;
+ // Access iterator types...
+ // Access size types...
+ // Now do something useful...
+}
+
+template < typename Graph > void generic_bar(Graph& g)
+{
+ // Declare some vertex and edge descriptor variables
+ typename graph_traits< Graph >::vertex_descriptor u = vertex(0, g),
+ v = vertex(1, g);
+ typename graph_traits< Graph >::edge_descriptor e1, e2;
+ // Set u and e1 to valid descriptors...
+ v = u; // Make v a handle to the same vertex as u.
+ e2 = e1; // Make e2 a handle to the same edge as e1.
+ assert(u == v); // Do u and v identify the same vertex? Yes
+ assert(!(u != v)); // Do u and v identify different vertices? No
+ assert(e1 == e2); // Do e1 and e2 identify the same edge? Yes
+ assert(!(e1 != e2)); // Do e1 and e2 identify different edges? No
+}
+
+// This version of foo gets called when g is directed
+template < typename Graph > void foo_dispatch(Graph& g, boost::directed_tag)
+{
+ //...
+}
+
+// This version of foo gets called when g is undirected
+template < typename Graph > void foo_dispatch(Graph& g, boost::undirected_tag)
+{
+ //...
+}
+
+template < typename Graph > void foo(Graph& g)
+{
+ typedef typename boost::graph_traits< Graph >::directed_category Cat;
+ foo_dispatch(g, Cat());
+}
+
+template < typename Digraph >
+void foo(Digraph& digraph,
+ typename graph_traits< Digraph >::vertex_descriptor u,
+ typename graph_traits< Digraph >::vertex_descriptor v)
+{
+ typedef typename graph_traits< Digraph >::edge_descriptor edge_t;
+ std::pair< edge_t, bool > e1, e2;
+ e1 = edge(u, v, digraph);
+ e2 = edge(v, u, digraph);
+ assert(e1.first != e2.first);
+}
+template < typename Undigraph >
+void bar(Undigraph& undigraph,
+ typename graph_traits< Undigraph >::vertex_descriptor u,
+ typename graph_traits< Undigraph >::vertex_descriptor v)
+{
+ typedef typename graph_traits< Undigraph >::edge_descriptor edge_t;
+ std::pair< edge_t, bool > e1, e2;
+ e1 = edge(u, v, undigraph);
+ e2 = edge(v, u, undigraph);
+ assert(e1.first == e2.first);
+}
+
+int main()
+{
+
+ boost::adjacency_list< vecS, vecS, directedS > g(2);
+ add_edge(0, 1, g);
+ add_edge(1, 0, g);
+ generic_foo(g);
+ generic_bar(g);
+ foo(g);
+ foo(g, vertex(0, g), vertex(1, g));
+
+ boost::adjacency_list< vecS, vecS, undirectedS > ug(2);
+ add_edge(0, 1, g);
+ bar(ug, vertex(0, g), vertex(1, g));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graph-property-iter-eg.cpp b/src/boost/libs/graph/example/graph-property-iter-eg.cpp
new file mode 100644
index 000000000..27ac96d45
--- /dev/null
+++ b/src/boost/libs/graph/example/graph-property-iter-eg.cpp
@@ -0,0 +1,34 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <string>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/property_iter_range.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< listS, vecS, directedS,
+ property< vertex_name_t, std::string > >
+ graph_t;
+ graph_t g(3);
+
+ const char* vertex_names[] = { "Kubrick", "Clark", "Hal" };
+ int i = 0;
+ graph_property_iter_range< graph_t, vertex_name_t >::iterator v, v_end;
+ for (boost::tie(v, v_end) = get_property_iter_range(g, vertex_name);
+ v != v_end; ++v, ++i)
+ *v = vertex_names[i];
+
+ boost::tie(v, v_end) = get_property_iter_range(g, vertex_name);
+ std::copy(v, v_end, std::ostream_iterator< std::string >(std::cout, " "));
+ std::cout << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graph-thingie.cpp b/src/boost/libs/graph/example/graph-thingie.cpp
new file mode 100644
index 000000000..bf0d02fcf
--- /dev/null
+++ b/src/boost/libs/graph/example/graph-thingie.cpp
@@ -0,0 +1,108 @@
+// Copyright 2008 Trustees of Indiana University
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// An example of using read_graphviz to load a GraphViz Dot textual
+// graph into a BGL adjacency_list graph that has custom properties.
+
+// Author: Ronald Garcia
+
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/foreach.hpp>
+#include <string>
+#include <sstream>
+
+using namespace boost;
+using namespace std;
+
+//
+// Create a custom graph properties
+// (see the documentation for adjacency list)
+struct graph_identifier_t
+{
+ typedef graph_property_tag kind;
+};
+struct vertex_label_t
+{
+ typedef vertex_property_tag kind;
+};
+
+int main()
+{
+
+ // Vertex properties
+ typedef property< vertex_name_t, string,
+ property< vertex_label_t, string, property< vertex_root_t, int > > >
+ vertex_p;
+ // Edge properties
+ typedef property< edge_name_t, string > edge_p;
+ // Graph properties
+ typedef property< graph_name_t, string,
+ property< graph_identifier_t, string > >
+ graph_p;
+ // adjacency_list-based type
+ typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
+ graph_t;
+
+ // Construct an empty graph and prepare the dynamic_property_maps.
+ graph_t graph(0);
+ dynamic_properties dp;
+
+ property_map< graph_t, vertex_name_t >::type vname
+ = get(vertex_name, graph);
+ dp.property("node_id", vname);
+
+ property_map< graph_t, vertex_label_t >::type vlabel
+ = get(vertex_label_t(), graph);
+ dp.property("label", vlabel);
+
+ property_map< graph_t, vertex_root_t >::type root = get(vertex_root, graph);
+ dp.property("root", root);
+
+ property_map< graph_t, edge_name_t >::type elabel = get(edge_name, graph);
+ dp.property("label", elabel);
+
+ // Use ref_property_map to turn a graph property into a property map
+ ref_property_map< graph_t*, string > gname(get_property(graph, graph_name));
+ dp.property("name", gname);
+
+ // Use ref_property_map to turn a graph property into a property map
+ ref_property_map< graph_t*, string > gid(
+ get_property(graph, graph_identifier_t()));
+ dp.property("identifier", gid);
+ // Sample graph as an istream;
+
+ const char* dot = "digraph \
+{ \
+ graph [name=\"GRAPH\", identifier=\"CX2A1Z\"] \
+ \
+ a [label=\"NODE_A\", root=\"1\"] \
+ b [label=\"NODE_B\", root=\"0\"] \
+ \
+ a -> b [label=\"EDGE_1\"] \
+ b -> c [label=\"EDGE_2\"] \
+}";
+
+ istringstream gvgraph(dot);
+
+ bool status = read_graphviz(gvgraph, graph, dp, "node_id");
+ if (!status)
+ {
+ cerr << "read_graphviz() failed." << endl;
+ return -1;
+ }
+
+ cout << "graph " << get("name", dp, &graph) << " ("
+ << get("identifier", dp, &graph) << ")\n\n";
+
+ BOOST_FOREACH (graph_t::vertex_descriptor v, vertices(graph))
+ {
+ cout << "vertex " << get("node_id", dp, v) << " ("
+ << get("label", dp, v) << ")\n";
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graph.cpp b/src/boost/libs/graph/example/graph.cpp
new file mode 100644
index 000000000..ee2de06c6
--- /dev/null
+++ b/src/boost/libs/graph/example/graph.cpp
@@ -0,0 +1,165 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <utility>
+#include <algorithm>
+
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+using namespace std;
+
+typedef property< vertex_color_t, default_color_type,
+ property< vertex_distance_t, int,
+ property< vertex_degree_t, int,
+ property< vertex_in_degree_t, int,
+ property< vertex_out_degree_t, int > > > > >
+ VertexProperty;
+typedef property< edge_weight_t, int > EdgeProperty;
+typedef adjacency_list< vecS, vecS, bidirectionalS, VertexProperty,
+ EdgeProperty >
+ Graph;
+
+template < class Graph > void print(Graph& g)
+{
+ typename Graph::vertex_iterator i, end;
+ typename Graph::out_edge_iterator ei, edge_end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << *i << " --> ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ cout << target(*ei, g) << " ";
+ cout << endl;
+ }
+}
+
+std::size_t myrand(std::size_t N)
+{
+ std::size_t ret = rand() % N;
+ // cout << "N = " << N << " rand = " << ret << endl;
+ return ret;
+}
+
+template < class Graph > bool check_edge(Graph& g, std::size_t a, std::size_t b)
+{
+ typename Graph::adjacency_iterator vi, viend, found;
+ boost::tie(vi, viend) = adjacent_vertices(vertex(a, g), g);
+
+ found = find(vi, viend, vertex(b, g));
+ if (found == viend)
+ return false;
+
+ return true;
+}
+
+int main(int, char*[])
+{
+ std::size_t N = 5;
+
+ Graph g(N);
+ int i;
+
+ bool is_failed = false;
+
+ for (i = 0; i < 6; ++i)
+ {
+ std::size_t a = myrand(N), b = myrand(N);
+ while (a == b)
+ b = myrand(N);
+ cout << "edge edge (" << a << "," << b << ")" << endl;
+ // add edges
+ add_edge(a, b, g);
+ is_failed = is_failed || (!check_edge(g, a, b));
+ }
+
+ if (is_failed)
+ cerr << " Failed." << endl;
+ else
+ cerr << " Passed." << endl;
+
+ print(g);
+
+ // remove_edge
+ for (i = 0; i < 2; ++i)
+ {
+ std::size_t a = myrand(N), b = myrand(N);
+ while (a == b)
+ b = myrand(N);
+ cout << "remove edge (" << a << "," << b << ")" << endl;
+ remove_edge(a, b, g);
+ is_failed = is_failed || check_edge(g, a, b);
+ }
+ if (is_failed)
+ cerr << " Failed." << endl;
+ else
+ cerr << " Passed." << endl;
+
+ print(g);
+
+ // add_vertex
+ is_failed = false;
+ std::size_t old_N = N;
+ std::size_t vid = add_vertex(g);
+ std::size_t vidp1 = add_vertex(g);
+
+ N = num_vertices(g);
+ if ((N - 2) != old_N)
+ cerr << " Failed." << endl;
+ else
+ cerr << " Passed." << endl;
+
+ is_failed = false;
+ for (i = 0; i < 2; ++i)
+ {
+ std::size_t a = myrand(N), b = myrand(N);
+ while (a == vid)
+ a = myrand(N);
+ while (b == vidp1)
+ b = myrand(N);
+ cout << "add edge (" << vid << "," << a << ")" << endl;
+ cout << "add edge (" << vid << "," << vidp1 << ")" << endl;
+ add_edge(vid, a, g);
+ add_edge(b, vidp1, g);
+ is_failed = is_failed || !check_edge(g, vid, a);
+ is_failed = is_failed || !check_edge(g, b, vidp1);
+ }
+ if (is_failed)
+ cerr << " Failed." << endl;
+ else
+ cerr << " Passed." << endl;
+ print(g);
+
+ // clear_vertex
+ std::size_t c = myrand(N);
+ is_failed = false;
+ clear_vertex(c, g);
+
+ if (out_degree(c, g) != 0)
+ is_failed = true;
+
+ cout << "Removing vertex " << c << endl;
+ remove_vertex(c, g);
+
+ old_N = N;
+ N = num_vertices(g);
+
+ if ((N + 1) != old_N)
+ is_failed = true;
+
+ if (is_failed)
+ cerr << " Failed." << endl;
+ else
+ cerr << " Passed." << endl;
+
+ print(g);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graph_as_tree.cpp b/src/boost/libs/graph/example/graph_as_tree.cpp
new file mode 100644
index 000000000..29058a384
--- /dev/null
+++ b/src/boost/libs/graph/example/graph_as_tree.cpp
@@ -0,0 +1,65 @@
+//=======================================================================
+// Copyright 2002 Indiana University.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/graph_as_tree.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/cstdlib.hpp>
+#include <iostream>
+
+class tree_printer
+{
+public:
+ template < typename Node, typename Tree > void preorder(Node, Tree&)
+ {
+ std::cout << "(";
+ }
+ template < typename Node, typename Tree > void inorder(Node n, Tree& t)
+ {
+ std::cout << get(boost::vertex_name, t)[n];
+ }
+ template < typename Node, typename Tree > void postorder(Node, Tree&)
+ {
+ std::cout << ")";
+ }
+};
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string > >
+ graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_t;
+
+ graph_t g;
+
+ vertex_t a = add_vertex(g), b = add_vertex(g), c = add_vertex(g);
+
+ add_edge(a, b, g);
+ add_edge(a, c, g);
+
+ typedef property_map< graph_t, vertex_name_t >::type vertex_name_map_t;
+ vertex_name_map_t name = get(vertex_name, g);
+ name[a] = "A";
+ name[b] = "B";
+ name[c] = "C";
+
+ typedef iterator_property_map< std::vector< vertex_t >::iterator,
+ property_map< graph_t, vertex_index_t >::type >
+ parent_map_t;
+ std::vector< vertex_t > parent(num_vertices(g));
+ typedef graph_as_tree< graph_t, parent_map_t > tree_t;
+ tree_t t(
+ g, a, make_iterator_property_map(parent.begin(), get(vertex_index, g)));
+
+ tree_printer vis;
+ traverse_tree(a, t, vis);
+
+ return exit_success;
+}
diff --git a/src/boost/libs/graph/example/graph_property.cpp b/src/boost/libs/graph/example/graph_property.cpp
new file mode 100644
index 000000000..eec0ed2f1
--- /dev/null
+++ b/src/boost/libs/graph/example/graph_property.cpp
@@ -0,0 +1,34 @@
+// (C) Copyright Jeremy Siek 2004
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <string>
+#include <iostream>
+#include <boost/cstdlib.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/subgraph.hpp>
+
+int main()
+{
+ using namespace boost;
+ using std::string;
+
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_index_t, int >, property< graph_name_t, string > >
+ graph_t;
+
+ graph_t g;
+ get_property(g, graph_name) = "graph";
+
+ std::cout << "name: " << get_property(g, graph_name) << std::endl;
+
+ typedef subgraph< graph_t > subgraph_t;
+
+ subgraph_t sg;
+ get_property(sg, graph_name) = "subgraph";
+
+ std::cout << "name: " << get_property(sg, graph_name) << std::endl;
+
+ return exit_success;
+}
diff --git a/src/boost/libs/graph/example/graphviz.cpp b/src/boost/libs/graph/example/graphviz.cpp
new file mode 100644
index 000000000..1d7fabac8
--- /dev/null
+++ b/src/boost/libs/graph/example/graphviz.cpp
@@ -0,0 +1,79 @@
+// Copyright 2005 Trustees of Indiana University
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Author: Douglas Gregor
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/test/minimal.hpp>
+#include <string>
+#include <fstream>
+#include <boost/graph/iteration_macros.hpp>
+
+using namespace boost;
+
+typedef boost::adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string >, property< edge_weight_t, double > >
+ Digraph;
+
+typedef boost::adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_name_t, std::string >, property< edge_weight_t, double > >
+ Graph;
+
+void test_graph_read_write(const std::string& filename)
+{
+ std::ifstream in(filename.c_str());
+ BOOST_REQUIRE(in);
+
+ Graph g;
+ dynamic_properties dp;
+ dp.property("id", get(vertex_name, g));
+ dp.property("weight", get(edge_weight, g));
+ BOOST_CHECK(read_graphviz(in, g, dp, "id"));
+
+ BOOST_CHECK(num_vertices(g) == 4);
+ BOOST_CHECK(num_edges(g) == 4);
+
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+
+ std::map< std::string, Vertex > name_to_vertex;
+ BGL_FORALL_VERTICES(v, g, Graph)
+ name_to_vertex[get(vertex_name, g, v)] = v;
+
+ // Check vertices
+ BOOST_CHECK(name_to_vertex.find("0") != name_to_vertex.end());
+ BOOST_CHECK(name_to_vertex.find("1") != name_to_vertex.end());
+ BOOST_CHECK(name_to_vertex.find("foo") != name_to_vertex.end());
+ BOOST_CHECK(name_to_vertex.find("bar") != name_to_vertex.end());
+
+ // Check edges
+ BOOST_CHECK(edge(name_to_vertex["0"], name_to_vertex["1"], g).second);
+ BOOST_CHECK(edge(name_to_vertex["1"], name_to_vertex["foo"], g).second);
+ BOOST_CHECK(edge(name_to_vertex["foo"], name_to_vertex["bar"], g).second);
+ BOOST_CHECK(edge(name_to_vertex["1"], name_to_vertex["bar"], g).second);
+
+ BOOST_CHECK(get(edge_weight, g,
+ edge(name_to_vertex["0"], name_to_vertex["1"], g).first)
+ == 3.14159);
+ BOOST_CHECK(get(edge_weight, g,
+ edge(name_to_vertex["1"], name_to_vertex["foo"], g).first)
+ == 2.71828);
+ BOOST_CHECK(get(edge_weight, g,
+ edge(name_to_vertex["foo"], name_to_vertex["bar"], g).first)
+ == 10.0);
+ BOOST_CHECK(get(edge_weight, g,
+ edge(name_to_vertex["1"], name_to_vertex["bar"], g).first)
+ == 10.0);
+
+ // Write out the graph
+ write_graphviz_dp(std::cout, g, dp, std::string("id"));
+}
+
+int test_main(int argc, char* argv[])
+{
+ test_graph_read_write(argc >= 2 ? argv[1] : "graphviz_example.dot");
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/graphviz_example.dot b/src/boost/libs/graph/example/graphviz_example.dot
new file mode 100644
index 000000000..775824795
--- /dev/null
+++ b/src/boost/libs/graph/example/graphviz_example.dot
@@ -0,0 +1,7 @@
+graph foo {
+ edge [weight="10"];
+ 0 -- 1 [weight="3.14159"];
+ 1 -- foo [weight="2.71828"];
+ foo -- bar;
+ bar -- 1;
+}
diff --git a/src/boost/libs/graph/example/graphviz_test.dot b/src/boost/libs/graph/example/graphviz_test.dot
new file mode 100644
index 000000000..dc59b7627
--- /dev/null
+++ b/src/boost/libs/graph/example/graphviz_test.dot
@@ -0,0 +1,39 @@
+digraph G {
+
+ subgraph cluster0 { //subgraph<Graph>
+ node [style=filled color=white];
+ style = filled;
+ bgcolor = lightgrey;
+
+ subgraph inner { //subgraph<Graph> or subgraph of subgraph
+ node [color = green];
+ a1 -> a2 -> a3
+
+ };
+
+ a0 -> subgraph inner;
+
+ label = "process #1";
+ }
+
+ subgraph cluster1 {
+ node [style=filled color=white];
+ b0 -> b1 -> b2 -> b3;
+ label = "process #2";
+ bgcolor = lightgrey
+ }
+
+ subgraph cluster1 -> subgraph cluster0 [style=dashed color=red]
+
+ start -> subgraph inner[style=dotted];
+
+ start -> a0;
+ start -> b0;
+ a1 -> b3;
+ b2 -> a3;
+ a3 -> end;
+ b3 -> end;
+
+ start [shape=Mdiamond];
+ end [shape=Msquare];
+}
diff --git a/src/boost/libs/graph/example/grid_graph_example.cpp b/src/boost/libs/graph/example/grid_graph_example.cpp
new file mode 100644
index 000000000..c49a3b16d
--- /dev/null
+++ b/src/boost/libs/graph/example/grid_graph_example.cpp
@@ -0,0 +1,91 @@
+//=======================================================================
+// Copyright 2009 Trustees of Indiana University.
+// Authors: Michael Hansen, Andrew Lumsdaine
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <iostream>
+#include <boost/array.hpp>
+#include <boost/graph/grid_graph.hpp>
+
+#define DIMENSIONS 3
+using namespace boost;
+
+typedef grid_graph< DIMENSIONS > Graph;
+typedef graph_traits< Graph > Traits;
+
+// Define a simple function to print vertices
+void print_vertex(Traits::vertex_descriptor vertex_to_print)
+{
+ std::cout << "(" << vertex_to_print[0] << ", " << vertex_to_print[1] << ", "
+ << vertex_to_print[2] << ")" << std::endl;
+}
+
+int main(int argc, char* argv[])
+{
+
+ // Define a 3x5x7 grid_graph where the second dimension doesn't wrap
+ boost::array< std::size_t, 3 > lengths = { { 3, 5, 7 } };
+ boost::array< bool, 3 > wrapped = { { true, false, true } };
+ Graph graph(lengths, wrapped);
+
+ // Do a round-trip test of the vertex index functions
+ for (Traits::vertices_size_type v_index = 0; v_index < num_vertices(graph);
+ ++v_index)
+ {
+
+ // The two indicies should always be equal
+ std::cout << "Index of vertex " << v_index << " is "
+ << get(boost::vertex_index, graph, vertex(v_index, graph))
+ << std::endl;
+ }
+
+ // Do a round-trip test of the edge index functions
+ for (Traits::edges_size_type e_index = 0; e_index < num_edges(graph);
+ ++e_index)
+ {
+
+ // The two indicies should always be equal
+ std::cout << "Index of edge " << e_index << " is "
+ << get(boost::edge_index, graph, edge_at(e_index, graph))
+ << std::endl;
+ }
+
+ // Print number of dimensions
+ std::cout << graph.dimensions() << std::endl; // prints "3"
+
+ // Print dimension lengths (same order as in the lengths array)
+ std::cout << graph.length(0) << "x" << graph.length(1) << "x"
+ << graph.length(2) << std::endl; // prints "3x5x7"
+
+ // Print dimension wrapping (W = wrapped, U = unwrapped)
+ std::cout << (graph.wrapped(0) ? "W" : "U") << ", "
+ << (graph.wrapped(1) ? "W" : "U") << ", "
+ << (graph.wrapped(2) ? "W" : "U")
+ << std::endl; // prints "W, U, W"
+
+ // Start with the first vertex in the graph
+ Traits::vertex_descriptor first_vertex = vertex(0, graph);
+ print_vertex(first_vertex); // prints "(0, 0, 0)"
+
+ // Print the next vertex in dimension 0
+ print_vertex(graph.next(first_vertex, 0)); // prints "(1, 0, 0)"
+
+ // Print the next vertex in dimension 1
+ print_vertex(graph.next(first_vertex, 1)); // prints "(0, 1, 0)"
+
+ // Print the 5th next vertex in dimension 2
+ print_vertex(graph.next(first_vertex, 2, 5)); // prints "(0, 0, 4)"
+
+ // Print the previous vertex in dimension 0 (wraps)
+ print_vertex(graph.previous(first_vertex, 0)); // prints "(2, 0, 0)"
+
+ // Print the previous vertex in dimension 1 (doesn't wrap, so it's the same)
+ print_vertex(graph.previous(first_vertex, 1)); // prints "(0, 0, 0)"
+
+ // Print the 20th previous vertex in dimension 2 (wraps around twice)
+ print_vertex(graph.previous(first_vertex, 2, 20)); // prints "(0, 0, ?)"
+}
diff --git a/src/boost/libs/graph/example/grid_graph_properties.cpp b/src/boost/libs/graph/example/grid_graph_properties.cpp
new file mode 100644
index 000000000..83ca9f2eb
--- /dev/null
+++ b/src/boost/libs/graph/example/grid_graph_properties.cpp
@@ -0,0 +1,42 @@
+//=======================================================================
+// Copyright 2012 David Doria
+// Authors: David Doria
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <iostream>
+#include <boost/array.hpp>
+#include <boost/graph/grid_graph.hpp>
+
+int main(int argc, char* argv[])
+{
+ // A 2D grid graph
+ typedef boost::grid_graph< 2 > GraphType;
+
+ // Create a 5x5 graph
+ const unsigned int dimension = 5;
+ boost::array< std::size_t, 2 > lengths = { { dimension, dimension } };
+ GraphType graph(lengths);
+
+ // Get the index map of the grid graph
+ typedef boost::property_map< GraphType, boost::vertex_index_t >::const_type
+ indexMapType;
+ indexMapType indexMap(get(boost::vertex_index, graph));
+
+ // Create a float for every node in the graph
+ boost::vector_property_map< float, indexMapType > dataMap(
+ num_vertices(graph), indexMap);
+
+ // Associate the value 2.0 with the node at position (0,1) in the grid
+ boost::graph_traits< GraphType >::vertex_descriptor v = { { 0, 1 } };
+ put(dataMap, v, 2.0f);
+
+ // Get the data at the node at position (0,1) in the grid
+ float retrieved = get(dataMap, v);
+ std::cout << "Retrieved value: " << retrieved << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/hawick_circuits.cpp b/src/boost/libs/graph/example/hawick_circuits.cpp
new file mode 100644
index 000000000..682656035
--- /dev/null
+++ b/src/boost/libs/graph/example/hawick_circuits.cpp
@@ -0,0 +1,94 @@
+// Copyright Louis Dionne 2013
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
+// at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/assert.hpp>
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/hawick_circuits.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <cstdlib>
+#include <iostream>
+#include <iterator>
+#include <map>
+
+template < typename OutputStream > struct cycle_printer
+{
+ cycle_printer(OutputStream& stream) : os(stream) {}
+
+ template < typename Path, typename Graph >
+ void cycle(Path const& p, Graph const& g)
+ {
+ if (p.empty())
+ return;
+
+ // Get the property map containing the vertex indices
+ // so we can print them.
+ typedef typename boost::property_map< Graph,
+ boost::vertex_index_t >::const_type IndexMap;
+
+ IndexMap indices = get(boost::vertex_index, g);
+
+ // Iterate over path printing each vertex that forms the cycle.
+ typename Path::const_iterator i, before_end = boost::prior(p.end());
+ for (i = p.begin(); i != before_end; ++i)
+ {
+ os << get(indices, *i) << " ";
+ }
+ os << get(indices, *i) << '\n';
+ }
+ OutputStream& os;
+};
+
+// VertexPairIterator is an iterator over pairs of whitespace separated
+// vertices `u` and `v` representing a directed edge from `u` to `v`.
+template < typename Graph, typename VertexPairIterator >
+void build_graph(Graph& graph, unsigned int const nvertices,
+ VertexPairIterator first, VertexPairIterator last)
+{
+ typedef boost::graph_traits< Graph > Traits;
+ typedef typename Traits::vertex_descriptor vertex_descriptor;
+ std::map< unsigned int, vertex_descriptor > vertices;
+
+ for (unsigned int i = 0; i < nvertices; ++i)
+ vertices[i] = add_vertex(graph);
+
+ for (; first != last; ++first)
+ {
+ unsigned int u = *first++;
+
+ BOOST_ASSERT_MSG(first != last,
+ "there is a lonely vertex at the end of the edge list");
+
+ unsigned int v = *first;
+
+ BOOST_ASSERT_MSG(vertices.count(u) == 1 && vertices.count(v) == 1,
+ "specified a vertex over the number of vertices in the graph");
+
+ add_edge(vertices[u], vertices[v], graph);
+ }
+ BOOST_ASSERT(num_vertices(graph) == nvertices);
+}
+
+int main(int argc, char const* argv[])
+{
+ if (argc < 2)
+ {
+ std::cout << "usage: " << argv[0] << " num_vertices < input\n";
+ return EXIT_FAILURE;
+ }
+
+ unsigned int num_vertices = boost::lexical_cast< unsigned int >(argv[1]);
+ std::istream_iterator< unsigned int > first_vertex(std::cin), last_vertex;
+ boost::directed_graph<> graph;
+ build_graph(graph, num_vertices, first_vertex, last_vertex);
+
+ cycle_printer< std::ostream > visitor(std::cout);
+ boost::hawick_circuits(graph, visitor);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/helper.hpp b/src/boost/libs/graph/example/helper.hpp
new file mode 100644
index 000000000..571fb724e
--- /dev/null
+++ b/src/boost/libs/graph/example/helper.hpp
@@ -0,0 +1,122 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_GRAPH_EXAMPLE_HELPER_HPP
+#define BOOST_GRAPH_EXAMPLE_HELPER_HPP
+
+#include <string>
+#include <sstream>
+#include <map>
+#include <algorithm>
+
+#include <boost/graph/properties.hpp>
+
+template < typename Graph, typename NameMap, typename VertexMap >
+typename boost::graph_traits< Graph >::vertex_descriptor add_named_vertex(
+ Graph& g, NameMap nm, const std::string& name, VertexMap& vm)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef typename VertexMap::iterator Iterator;
+
+ Vertex v;
+ Iterator iter;
+ bool inserted;
+ boost::tie(iter, inserted) = vm.insert(make_pair(name, Vertex()));
+ if (inserted)
+ {
+ // The name was unique so we need to add a vertex to the graph
+ v = add_vertex(g);
+ iter->second = v;
+ put(nm, v, name); // store the name in the name map
+ }
+ else
+ {
+ // We had alread inserted this name so we can return the
+ // associated vertex.
+ v = iter->second;
+ }
+ return v;
+}
+
+template < typename Graph, typename NameMap, typename InputStream >
+inline std::map< std::string,
+ typename boost::graph_traits< Graph >::vertex_descriptor >
+read_graph(Graph& g, NameMap nm, InputStream& is)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ std::map< std::string, Vertex > verts;
+ for (std::string line; std::getline(is, line);)
+ {
+ if (line.empty())
+ continue;
+ std::size_t index = line.find_first_of(',');
+ std::string first(line, 0, index);
+ std::string second(line, index + 1);
+
+ Vertex u = add_named_vertex(g, nm, first, verts);
+ Vertex v = add_named_vertex(g, nm, second, verts);
+ add_edge(u, v, g);
+ }
+ return verts;
+}
+
+template < typename Graph, typename InputStream >
+inline std::map< std::string,
+ typename boost::graph_traits< Graph >::vertex_descriptor >
+read_graph(Graph& g, InputStream& is)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef boost::null_property_map< Vertex, std::string > NameMap;
+ return read_graph(g, NameMap(), is);
+}
+
+template < typename Graph, typename NameMap, typename WeightMap,
+ typename InputStream >
+inline std::map< std::string,
+ typename boost::graph_traits< Graph >::vertex_descriptor >
+read_weighted_graph(Graph& g, NameMap nm, WeightMap wm, InputStream& is)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef typename boost::graph_traits< Graph >::edge_descriptor Edge;
+ std::map< std::string, Vertex > verts;
+ for (std::string line; std::getline(is, line);)
+ {
+ if (line.empty())
+ continue;
+ std::size_t i = line.find_first_of(',');
+ std::size_t j = line.find_first_of(',', i + 1);
+ std::string first(line, 0, i);
+ std::string second(line, i + 1, j - i - 1);
+ std::string prob(line, j + 1);
+
+ // convert the probability to a float
+ std::stringstream ss(prob);
+ float p;
+ ss >> p;
+
+ // add the vertices to the graph
+ Vertex u = add_named_vertex(g, nm, first, verts);
+ Vertex v = add_named_vertex(g, nm, second, verts);
+
+ // add the edge and set the weight
+ Edge e = add_edge(u, v, g).first;
+ put(wm, e, p);
+ }
+ return verts;
+}
+
+template < typename Graph, typename WeightMap, typename InputStream >
+inline std::map< std::string,
+ typename boost::graph_traits< Graph >::vertex_descriptor >
+read_weighted_graph(Graph& g, WeightMap wm, InputStream& is)
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef boost::null_property_map< Vertex, std::string > NameMap;
+
+ return read_weighted_graph(g, NameMap(), wm, is);
+}
+
+#endif
diff --git a/src/boost/libs/graph/example/implicit_graph.cpp b/src/boost/libs/graph/example/implicit_graph.cpp
new file mode 100644
index 000000000..de462ad69
--- /dev/null
+++ b/src/boost/libs/graph/example/implicit_graph.cpp
@@ -0,0 +1,564 @@
+
+// Copyright W.P. McNeill 2010.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/concept/assert.hpp>
+#include <boost/graph/adjacency_iterator.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/lexical_cast.hpp>
+#include <iostream>
+#include <utility>
+
+/*
+This file defines a simple example of a read-only implicit weighted graph
+built using the Boost Graph Library. It can be used as a starting point for
+developers creating their own implicit graphs.
+
+The graph models the following concepts:
+ Graph
+ IncidenceGraph
+ BidirectionalGraph
+ AdjacencyGraph
+ VertexListGraph
+ EdgeListGraph
+ AdjacencyMatrix
+ ReadablePropertyGraph
+
+The graph defined here is a ring graph, a graph whose vertices are arranged in
+a ring so that each vertex has exactly two neighbors. For example, here is a
+ring graph with five nodes.
+
+ 0
+ / \
+ 4 1
+ | |
+ 3 ---- 2
+
+The edges of this graph are undirected and each has a weight that is a
+function of its position in the graph.
+
+The vertices indexed are by integer and arranged sequentially so that each
+vertex i is adjacent to i-1 for i>0 and i+1 for i<n-1. Vertex 0 is also
+adjacent to vertex n-1. Edges are indexed by pairs of vertex indices.
+
+Various aspects of the graph are modeled by the following classes:
+
+ ring_graph
+ The graph class instantiated by a client. This defines types for the
+ concepts that this graph models and keeps track of the number of vertices
+ in the graph.
+
+ ring_incident_edge_iterator
+ This is an iterator that ranges over edges incident on a given vertex. The
+ behavior of this iterator defines the ring topology. Other iterators that
+ make reference to the graph structure are defined in terms of this one.
+
+ edge_weight_map
+ This defines a property map between edges and weights. Here edges have a
+ weight equal to the average of their endpoint vertex indices, i.e. edge
+ (2,3) has weight 2.5, edge (0,4) has weight 2, etc.
+
+ boost::property_map<graph, boost::edge_weight_t>
+ This tells Boost to associate the edges of the ring graph with the edge
+ weight map.
+
+Along with these classes, the graph concepts are modeled by various valid
+expression functions defined below. This example also defines a
+get(boost::vertex_index_t, const ring_graph&) function which isn't part of a
+graph concept, but is used for Dijkstra search.
+
+Apart from graph, client code should not instantiate the model classes
+directly. Instead it should access them and their properties via
+graph_traits<...> and property_traits<...> lookups. For convenience,
+this example defines short names for all these properties that client code can
+use.
+*/
+
+// Forward declarations
+class ring_graph;
+class ring_incident_edge_iterator;
+class ring_adjacency_iterator;
+class ring_edge_iterator;
+struct edge_weight_map;
+
+// ReadablePropertyGraph associated types
+namespace boost
+{
+template <> struct property_map< ring_graph, edge_weight_t >
+{
+ typedef edge_weight_map type;
+ typedef edge_weight_map const_type;
+};
+
+template <> struct property_map< const ring_graph, edge_weight_t >
+{
+ typedef edge_weight_map type;
+ typedef edge_weight_map const_type;
+};
+}
+
+// Tag values that specify the traversal type in graph::traversal_category.
+struct ring_traversal_catetory : virtual public boost::bidirectional_graph_tag,
+ virtual public boost::adjacency_graph_tag,
+ virtual public boost::vertex_list_graph_tag,
+ virtual public boost::edge_list_graph_tag
+{
+};
+
+/*
+Undirected graph of vertices arranged in a ring shape.
+
+Vertices are indexed by integer, and edges connect vertices with consecutive
+indices. Vertex 0 is also adjacent to the vertex n-1.
+*/
+class ring_graph
+{
+public:
+ // Graph associated types
+ typedef std::size_t vertex_descriptor;
+ typedef boost::undirected_tag directed_category;
+ typedef boost::disallow_parallel_edge_tag edge_parallel_category;
+ typedef ring_traversal_catetory traversal_category;
+
+ // IncidenceGraph associated types
+ typedef std::pair< vertex_descriptor, vertex_descriptor > edge_descriptor;
+ typedef ring_incident_edge_iterator out_edge_iterator;
+ typedef std::size_t degree_size_type;
+
+ // BidirectionalGraph associated types
+ // Note that undirected graphs make no distinction between in- and out-
+ // edges.
+ typedef ring_incident_edge_iterator in_edge_iterator;
+
+ // AdjacencyGraph associated types
+ typedef ring_adjacency_iterator adjacency_iterator;
+
+ // VertexListGraph associated types
+ typedef boost::counting_iterator< vertex_descriptor > vertex_iterator;
+ typedef std::size_t vertices_size_type;
+
+ // EdgeListGraph associated types
+ typedef ring_edge_iterator edge_iterator;
+ typedef std::size_t edges_size_type;
+
+ // This type is not part of a graph concept, but is used to return the
+ // default vertex index map used by the Dijkstra search algorithm.
+ typedef vertex_descriptor vertex_property_type;
+
+ ring_graph(std::size_t n) : m_n(n) {};
+ std::size_t n() const { return m_n; }
+
+private:
+ // The number of vertices in the graph.
+ std::size_t m_n;
+};
+
+// Use these graph_traits parameterizations to refer to the associated
+// graph types.
+typedef boost::graph_traits< ring_graph >::vertex_descriptor vertex_descriptor;
+typedef boost::graph_traits< ring_graph >::edge_descriptor edge_descriptor;
+typedef boost::graph_traits< ring_graph >::out_edge_iterator out_edge_iterator;
+typedef boost::graph_traits< ring_graph >::in_edge_iterator in_edge_iterator;
+typedef boost::graph_traits< ring_graph >::adjacency_iterator
+ adjacency_iterator;
+typedef boost::graph_traits< ring_graph >::degree_size_type degree_size_type;
+typedef boost::graph_traits< ring_graph >::vertex_iterator vertex_iterator;
+typedef boost::graph_traits< ring_graph >::vertices_size_type
+ vertices_size_type;
+typedef boost::graph_traits< ring_graph >::edge_iterator edge_iterator;
+typedef boost::graph_traits< ring_graph >::edges_size_type edges_size_type;
+
+// Tag values passed to an iterator constructor to specify whether it should
+// be created at the start or the end of its range.
+struct iterator_position
+{
+};
+struct iterator_start : virtual public iterator_position
+{
+};
+struct iterator_end : virtual public iterator_position
+{
+};
+
+/*
+Iterator over edges incident on a vertex in a ring graph.
+
+For vertex i, this returns edge (i, i+1) and then edge (i, i-1), wrapping
+around the end of the ring as needed.
+
+It is implemented with the boost::iterator_adaptor class, adapting an
+offset into the dereference::ring_offset array.
+*/
+class ring_incident_edge_iterator
+: public boost::iterator_adaptor< ring_incident_edge_iterator,
+ boost::counting_iterator< std::size_t >, edge_descriptor,
+ boost::use_default, edge_descriptor >
+{
+public:
+ ring_incident_edge_iterator()
+ : ring_incident_edge_iterator::iterator_adaptor_(0), m_n(0), m_u(0) {};
+ explicit ring_incident_edge_iterator(
+ const ring_graph& g, vertex_descriptor u, iterator_start)
+ : ring_incident_edge_iterator::iterator_adaptor_(0), m_n(g.n()), m_u(u) {};
+ explicit ring_incident_edge_iterator(
+ const ring_graph& g, vertex_descriptor u, iterator_end)
+ : // A graph with one vertex only has a single self-loop. A graph with
+ // two vertices has a single edge between them. All other graphs have
+ // two edges per vertex.
+ ring_incident_edge_iterator::iterator_adaptor_(g.n() > 2 ? 2 : 1)
+ , m_n(g.n())
+ , m_u(u) {};
+
+private:
+ friend class boost::iterator_core_access;
+
+ edge_descriptor dereference() const
+ {
+ static const int ring_offset[] = { 1, -1 };
+ vertex_descriptor v;
+
+ std::size_t p = *this->base_reference();
+ if (m_u == 0 && p == 1)
+ v = m_n - 1; // Vertex n-1 precedes vertex 0.
+ else
+ v = (m_u + ring_offset[p]) % m_n;
+ return edge_descriptor(m_u, v);
+ }
+
+ std::size_t m_n; // Size of the graph
+ vertex_descriptor m_u; // Vertex whose out edges are iterated
+};
+
+// IncidenceGraph valid expressions
+vertex_descriptor source(edge_descriptor e, const ring_graph&)
+{
+ // The first vertex in the edge pair is the source.
+ return e.first;
+}
+
+vertex_descriptor target(edge_descriptor e, const ring_graph&)
+{
+ // The second vertex in the edge pair is the target.
+ return e.second;
+}
+
+std::pair< out_edge_iterator, out_edge_iterator > out_edges(
+ vertex_descriptor u, const ring_graph& g)
+{
+ return std::pair< out_edge_iterator, out_edge_iterator >(
+ out_edge_iterator(g, u, iterator_start()),
+ out_edge_iterator(g, u, iterator_end()));
+}
+
+degree_size_type out_degree(vertex_descriptor, const ring_graph&)
+{
+ // All vertices in a ring graph have two neighbors.
+ return 2;
+}
+
+// BidirectionalGraph valid expressions
+std::pair< in_edge_iterator, in_edge_iterator > in_edges(
+ vertex_descriptor u, const ring_graph& g)
+{
+ // The in-edges and out-edges are the same in an undirected graph.
+ return out_edges(u, g);
+}
+
+degree_size_type in_degree(vertex_descriptor u, const ring_graph& g)
+{
+ // The in-degree and out-degree are both equal to the number of incident
+ // edges in an undirected graph.
+ return out_degree(u, g);
+}
+
+degree_size_type degree(vertex_descriptor u, const ring_graph& g)
+{
+ // The in-degree and out-degree are both equal to the number of incident
+ // edges in an undirected graph.
+ return out_degree(u, g);
+}
+
+/*
+Iterator over vertices adjacent to a given vertex.
+
+This iterates over the target vertices of all the incident edges.
+*/
+class ring_adjacency_iterator
+: public boost::adjacency_iterator_generator< ring_graph, vertex_descriptor,
+ out_edge_iterator >::type
+{
+ // The parent class is an iterator_adpator that turns an iterator over
+ // out edges into an iterator over adjacent vertices.
+ typedef boost::adjacency_iterator_generator< ring_graph, vertex_descriptor,
+ out_edge_iterator >::type parent_class;
+
+public:
+ ring_adjacency_iterator() {};
+ ring_adjacency_iterator(
+ vertex_descriptor u, const ring_graph& g, iterator_start)
+ : parent_class(out_edge_iterator(g, u, iterator_start()), &g) {};
+ ring_adjacency_iterator(
+ vertex_descriptor u, const ring_graph& g, iterator_end)
+ : parent_class(out_edge_iterator(g, u, iterator_end()), &g) {};
+};
+
+// AdjacencyGraph valid expressions
+std::pair< adjacency_iterator, adjacency_iterator > adjacent_vertices(
+ vertex_descriptor u, const ring_graph& g)
+{
+ return std::pair< adjacency_iterator, adjacency_iterator >(
+ adjacency_iterator(u, g, iterator_start()),
+ adjacency_iterator(u, g, iterator_end()));
+}
+
+// VertexListGraph valid expressions
+vertices_size_type num_vertices(const ring_graph& g) { return g.n(); };
+
+std::pair< vertex_iterator, vertex_iterator > vertices(const ring_graph& g)
+{
+ return std::pair< vertex_iterator, vertex_iterator >(
+ vertex_iterator(0), // The first iterator position
+ vertex_iterator(num_vertices(g))); // The last iterator position
+}
+
+/*
+Iterator over edges in a ring graph.
+
+This object iterates over all the vertices in the graph, then for each
+vertex returns its first outgoing edge.
+
+It is implemented with the boost::iterator_adaptor class, because it is
+essentially a vertex_iterator with a customized deference operation.
+*/
+class ring_edge_iterator
+: public boost::iterator_adaptor< ring_edge_iterator, vertex_iterator,
+ edge_descriptor, boost::use_default, edge_descriptor >
+{
+public:
+ ring_edge_iterator()
+ : ring_edge_iterator::iterator_adaptor_(0), m_g(NULL) {};
+ explicit ring_edge_iterator(const ring_graph& g, iterator_start)
+ : ring_edge_iterator::iterator_adaptor_(vertices(g).first), m_g(&g) {};
+ explicit ring_edge_iterator(const ring_graph& g, iterator_end)
+ : ring_edge_iterator::iterator_adaptor_(
+ // Size 2 graphs have a single edge connecting the two vertices.
+ g.n() == 2 ? ++(vertices(g).first) : vertices(g).second)
+ , m_g(&g) {};
+
+private:
+ friend class boost::iterator_core_access;
+
+ edge_descriptor dereference() const
+ {
+ // The first element in the incident edge list of the current vertex.
+ return *(out_edges(*this->base_reference(), *m_g).first);
+ }
+
+ // The graph being iterated over
+ const ring_graph* m_g;
+};
+
+// EdgeListGraph valid expressions
+std::pair< edge_iterator, edge_iterator > edges(const ring_graph& g)
+{
+ return std::pair< edge_iterator, edge_iterator >(
+ ring_edge_iterator(g, iterator_start()),
+ ring_edge_iterator(g, iterator_end()));
+}
+
+edges_size_type num_edges(const ring_graph& g)
+{
+ // There are as many edges as there are vertices, except for size 2
+ // graphs, which have a single edge connecting the two vertices.
+ return g.n() == 2 ? 1 : g.n();
+}
+
+// AdjacencyMatrix valid expressions
+std::pair< edge_descriptor, bool > edge(
+ vertex_descriptor u, vertex_descriptor v, const ring_graph& g)
+{
+ if ((u == v + 1 || v == u + 1) && u > 0 && u < num_vertices(g) && v > 0
+ && v < num_vertices(g))
+ return std::pair< edge_descriptor, bool >(edge_descriptor(u, v), true);
+ else
+ return std::pair< edge_descriptor, bool >(edge_descriptor(), false);
+}
+
+/*
+Map from edges to weight values
+*/
+struct edge_weight_map
+{
+ typedef double value_type;
+ typedef value_type reference;
+ typedef edge_descriptor key_type;
+ typedef boost::readable_property_map_tag category;
+
+ // Edges have a weight equal to the average of their endpoint indexes.
+ reference operator[](key_type e) const
+ {
+ return (e.first + e.second) / 2.0;
+ }
+};
+
+// Use these propety_map and property_traits parameterizations to refer to
+// the associated property map types.
+typedef boost::property_map< ring_graph, boost::edge_weight_t >::const_type
+ const_edge_weight_map;
+typedef boost::property_traits< const_edge_weight_map >::reference
+ edge_weight_map_value_type;
+typedef boost::property_traits< const_edge_weight_map >::key_type
+ edge_weight_map_key;
+
+// PropertyMap valid expressions
+edge_weight_map_value_type get(
+ const_edge_weight_map pmap, edge_weight_map_key e)
+{
+ return pmap[e];
+}
+
+// ReadablePropertyGraph valid expressions
+const_edge_weight_map get(boost::edge_weight_t, const ring_graph&)
+{
+ return const_edge_weight_map();
+}
+
+edge_weight_map_value_type get(
+ boost::edge_weight_t tag, const ring_graph& g, edge_weight_map_key e)
+{
+ return get(tag, g)[e];
+}
+
+// This expression is not part of a graph concept, but is used to return the
+// default vertex index map used by the Dijkstra search algorithm.
+boost::identity_property_map get(boost::vertex_index_t, const ring_graph&)
+{
+ // The vertex descriptors are already unsigned integer indices, so just
+ // return an identity map.
+ return boost::identity_property_map();
+}
+
+// Print edges as (x, y)
+std::ostream& operator<<(std::ostream& output, const edge_descriptor& e)
+{
+ return output << "(" << e.first << ", " << e.second << ")";
+}
+
+int main(int argc, char const* argv[])
+{
+ using namespace boost;
+ // Check the concepts that graph models. This is included to demonstrate
+ // how concept checking works, but is not required for a working program
+ // since Boost algorithms do their own concept checking.
+ BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< ring_graph >));
+ BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< ring_graph >));
+ BOOST_CONCEPT_ASSERT((VertexListGraphConcept< ring_graph >));
+ BOOST_CONCEPT_ASSERT((EdgeListGraphConcept< ring_graph >));
+ BOOST_CONCEPT_ASSERT((AdjacencyMatrixConcept< ring_graph >));
+ BOOST_CONCEPT_ASSERT(
+ (ReadablePropertyMapConcept< const_edge_weight_map, edge_descriptor >));
+ BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept< ring_graph,
+ edge_descriptor, edge_weight_t >));
+
+ // Specify the size of the graph on the command line, or use a default size
+ // of 5.
+ std::size_t n = argc == 2 ? boost::lexical_cast< std::size_t >(argv[1]) : 5;
+
+ // Create a small ring graph.
+ ring_graph g(n);
+
+ // Print the outgoing edges of all the vertices. For n=5 this will print:
+ //
+ // Vertices, outgoing edges, and adjacent vertices
+ // Vertex 0: (0, 1) (0, 4) Adjacent vertices 1 4
+ // Vertex 1: (1, 2) (1, 0) Adjacent vertices 2 0
+ // Vertex 2: (2, 3) (2, 1) Adjacent vertices 3 1
+ // Vertex 3: (3, 4) (3, 2) Adjacent vertices 4 2
+ // Vertex 4: (4, 0) (4, 3) Adjacent vertices 0 3
+ // 5 vertices
+ std::cout << "Vertices, outgoing edges, and adjacent vertices" << std::endl;
+ vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; vi++)
+ {
+ vertex_descriptor u = *vi;
+ std::cout << "Vertex " << u << ": ";
+ // Adjacenct edges
+ out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ei++)
+ std::cout << *ei << " ";
+ std::cout << " Adjacent vertices ";
+ // Adjacent vertices
+ // Here we want our adjacency_iterator and not
+ // boost::adjacency_iterator.
+ ::adjacency_iterator ai, ai_end;
+ for (boost::tie(ai, ai_end) = adjacent_vertices(u, g); ai != ai_end;
+ ai++)
+ {
+ std::cout << *ai << " ";
+ }
+ std::cout << std::endl;
+ }
+ std::cout << num_vertices(g) << " vertices" << std::endl << std::endl;
+
+ // Print all the edges in the graph along with their weights. For n=5 this
+ // will print:
+ //
+ // Edges and weights
+ // (0, 1) weight 0.5
+ // (1, 2) weight 1.5
+ // (2, 3) weight 2.5
+ // (3, 4) weight 3.5
+ // (4, 0) weight 2
+ // 5 edges
+ std::cout << "Edges and weights" << std::endl;
+ edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ei++)
+ {
+ edge_descriptor e = *ei;
+ std::cout << e << " weight " << get(edge_weight, g, e) << std::endl;
+ }
+ std::cout << num_edges(g) << " edges" << std::endl;
+
+ if (n > 0)
+ {
+ std::cout << std::endl;
+ // Do a Dijkstra search from vertex 0. For n=5 this will print:
+ //
+ // Dijkstra search from vertex 0
+ // Vertex 0: parent 0, distance 0
+ // Vertex 1: parent 0, distance 0.5
+ // Vertex 2: parent 1, distance 2
+ // Vertex 3: parent 2, distance 4.5
+ // Vertex 4: parent 0, distance 2
+ vertex_descriptor source = 0;
+ std::vector< vertex_descriptor > pred(num_vertices(g));
+ std::vector< edge_weight_map_value_type > dist(num_vertices(g));
+ iterator_property_map< std::vector< vertex_descriptor >::iterator,
+ property_map< ring_graph, vertex_index_t >::const_type >
+ pred_pm(pred.begin(), get(vertex_index, g));
+ iterator_property_map<
+ std::vector< edge_weight_map_value_type >::iterator,
+ property_map< ring_graph, vertex_index_t >::const_type >
+ dist_pm(dist.begin(), get(vertex_index, g));
+
+ dijkstra_shortest_paths(
+ g, source, predecessor_map(pred_pm).distance_map(dist_pm));
+
+ std::cout << "Dijkstra search from vertex " << source << std::endl;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ vertex_descriptor u = *vi;
+ std::cout << "Vertex " << u << ": "
+ << "parent " << pred[*vi] << ", "
+ << "distance " << dist[u] << std::endl;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/in_edges.cpp b/src/boost/libs/graph/example/in_edges.cpp
new file mode 100644
index 000000000..1c27aa454
--- /dev/null
+++ b/src/boost/libs/graph/example/in_edges.cpp
@@ -0,0 +1,54 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <utility>
+
+#include <boost/graph/adjacency_list.hpp>
+
+/*
+ Sample Output
+
+ 0 <--
+ 1 <-- 0
+ 2 <-- 1
+ 3 <-- 1
+ 4 <-- 2 3
+
+ */
+
+int main(int, char*[])
+{
+ using namespace boost;
+ using namespace std;
+ using namespace boost;
+
+ typedef adjacency_list< listS, vecS, bidirectionalS > Graph;
+ const int num_vertices = 5;
+ Graph g(num_vertices);
+
+ add_edge(0, 1, g);
+ add_edge(1, 2, g);
+ add_edge(1, 3, g);
+ add_edge(2, 4, g);
+ add_edge(3, 4, g);
+
+ boost::graph_traits< Graph >::vertex_iterator i, end;
+ boost::graph_traits< Graph >::in_edge_iterator ei, edge_end;
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << *i << " <-- ";
+ for (boost::tie(ei, edge_end) = in_edges(*i, g); ei != edge_end; ++ei)
+ cout << source(*ei, g) << " ";
+ cout << endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/in_edges.expected b/src/boost/libs/graph/example/in_edges.expected
new file mode 100644
index 000000000..7bb2a725e
--- /dev/null
+++ b/src/boost/libs/graph/example/in_edges.expected
@@ -0,0 +1,5 @@
+0 <--
+1 <-- 0
+2 <-- 1
+3 <-- 1
+4 <-- 2 3
diff --git a/src/boost/libs/graph/example/inclusive_mean_geodesic.cpp b/src/boost/libs/graph/example/inclusive_mean_geodesic.cpp
new file mode 100644
index 000000000..ef88a720a
--- /dev/null
+++ b/src/boost/libs/graph/example/inclusive_mean_geodesic.cpp
@@ -0,0 +1,153 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[inclusive_mean_geodesic_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/floyd_warshall_shortest.hpp>
+#include <boost/graph/geodesic_distance.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// This template structure defines the function that we will apply
+// to compute both the per-vertex mean geodesic distances and the
+// graph's mean geodesic distance.
+template < typename Graph, typename DistanceType, typename ResultType,
+ typename Divides = divides< ResultType > >
+struct inclusive_average
+{
+ typedef DistanceType distance_type;
+ typedef ResultType result_type;
+
+ result_type operator()(distance_type d, const Graph& g)
+ {
+ if (d == numeric_values< distance_type >::infinity())
+ {
+ return numeric_values< result_type >::infinity();
+ }
+ else
+ {
+ return div(result_type(d), result_type(num_vertices(g)));
+ }
+ }
+ Divides div;
+};
+
+// The Page type stores the name of each vertex in the graph and
+// represents web pages that can be navigated to.
+struct WebPage
+{
+ string name;
+};
+
+// The Link type stores an associated probability of traveling
+// from one page to another.
+struct Link
+{
+ float probability;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef directed_graph< WebPage, Link > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string WebPage::* >::type NameMap;
+
+// Declare a matrix type and its corresponding property map that
+// will contain the distances between each pair of vertices.
+typedef exterior_vertex_property< Graph, float > DistanceProperty;
+typedef DistanceProperty::matrix_type DistanceMatrix;
+typedef DistanceProperty::matrix_map_type DistanceMatrixMap;
+
+// Declare the weight map as an accessor into the bundled
+// edge property.
+typedef property_map< Graph, float Link::* >::type WeightMap;
+
+// Declare a container and its corresponding property map that
+// will contain the resulting mean geodesic distances of each
+// vertex in the graph.
+typedef exterior_vertex_property< Graph, float > GeodesicProperty;
+typedef GeodesicProperty::container_type GeodesicContainer;
+typedef GeodesicProperty::map_type GeodesicMap;
+
+static float exclusive_geodesics(const Graph&, DistanceMatrixMap, GeodesicMap);
+static float inclusive_geodesics(const Graph&, DistanceMatrixMap, GeodesicMap);
+
+int main(int argc, char* argv[])
+{
+ // Create the graph, a name map that providse abstract access
+ // to the web page names, and the weight map as an accessor to
+ // the edge weights (or probabilities).
+ Graph g;
+ NameMap nm(get(&WebPage::name, g));
+ WeightMap wm(get(&Link::probability, g));
+
+ // Read the weighted graph from standard input.
+ read_weighted_graph(g, nm, wm, cin);
+
+ // Compute the distances between all pairs of vertices using
+ // the Floyd-Warshall algorithm. The weight map was created
+ // above so it could be populated when the graph was read in.
+ DistanceMatrix distances(num_vertices(g));
+ DistanceMatrixMap dm(distances, g);
+ floyd_warshall_all_pairs_shortest_paths(g, dm, weight_map(wm));
+
+ // Create the containers and the respective property maps that
+ // will contain the mean geodesics averaged both including
+ // self-loop distances and excluding them.
+ GeodesicContainer exclude(num_vertices(g));
+ GeodesicContainer include(num_vertices(g));
+ GeodesicMap exmap(exclude, g);
+ GeodesicMap inmap(include, g);
+
+ float ex = exclusive_geodesics(g, dm, exmap);
+ float in = inclusive_geodesics(g, dm, inmap);
+
+ // Print the mean geodesic distance of each vertex and finally,
+ // the graph itself.
+ cout << setw(12) << setiosflags(ios::left) << "vertex";
+ cout << setw(12) << setiosflags(ios::left) << "excluding";
+ cout << setw(12) << setiosflags(ios::left) << "including" << endl;
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << setw(12)
+ << get(exmap, *i) << setw(12) << get(inmap, *i) << endl;
+ }
+ cout << "small world (excluding self-loops): " << ex << endl;
+ cout << "small world (including self-loops): " << in << endl;
+
+ return 0;
+}
+
+float exclusive_geodesics(const Graph& g, DistanceMatrixMap dm, GeodesicMap gm)
+{
+ // Compute the mean geodesic distances, which excludes distances
+ // of self-loops by default. Return the measure for the entire graph.
+ return all_mean_geodesics(g, dm, gm);
+}
+
+float inclusive_geodesics(const Graph& g, DistanceMatrixMap dm, GeodesicMap gm)
+{
+ // Create a new measure object for computing the mean geodesic
+ // distance of all vertices. This measure will actually be used
+ // for both averages.
+ inclusive_average< Graph, float, float > m;
+
+ // Compute the mean geodesic distance using the inclusive average
+ // to account for self-loop distances. Return the measure for the
+ // entire graph.
+ return all_mean_geodesics(g, dm, gm, m);
+}
+//]
diff --git a/src/boost/libs/graph/example/incremental-components-eg.cpp b/src/boost/libs/graph/example/incremental-components-eg.cpp
new file mode 100644
index 000000000..7fead1d95
--- /dev/null
+++ b/src/boost/libs/graph/example/incremental-components-eg.cpp
@@ -0,0 +1,86 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+// Copyright 2009 Trustees of Indiana University.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Michael Hansen
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <iostream>
+#include <vector>
+
+#include <boost/foreach.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/incremental_components.hpp>
+#include <boost/pending/disjoint_sets.hpp>
+
+using namespace boost;
+
+int main(int argc, char* argv[])
+{
+ typedef adjacency_list< vecS, vecS, undirectedS > Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ // typedef graph_traits<Graph>::edge_descriptor Edge;
+ typedef graph_traits< Graph >::vertices_size_type VertexIndex;
+
+ // Create a graph
+ const int VERTEX_COUNT = 6;
+ Graph graph(VERTEX_COUNT);
+
+ add_edge(0, 1, graph);
+ add_edge(1, 4, graph);
+
+ // reate the disjoint-sets object, which requires rank and parent
+ // vertex properties.
+ std::vector< Vertex > rank(num_vertices(graph));
+ std::vector< Vertex > parent(num_vertices(graph));
+
+ typedef VertexIndex* Rank;
+ typedef Vertex* Parent;
+ disjoint_sets< Rank, Parent > ds(&rank[0], &parent[0]);
+
+ // Determine the connected components, storing the results in the
+ // disjoint-sets object.
+ initialize_incremental_components(graph, ds);
+ incremental_components(graph, ds);
+
+ // Add a couple more edges and update the disjoint-sets
+ add_edge(4, 0, graph);
+ add_edge(2, 5, graph);
+
+ ds.union_set(4, 0);
+ ds.union_set(2, 5);
+
+ BOOST_FOREACH (Vertex current_vertex, vertices(graph))
+ {
+ std::cout << "representative[" << current_vertex
+ << "] = " << ds.find_set(current_vertex) << std::endl;
+ }
+
+ std::cout << std::endl;
+
+ // Generate component index. NOTE: We would need to pass in a vertex
+ // index map into the component_index constructor if our graph type
+ // used listS instead of vecS (identity_property_map is used by
+ // default).
+ typedef component_index< VertexIndex > Components;
+ Components components(parent.begin(), parent.end());
+
+ // Iterate through the component indices
+ BOOST_FOREACH (VertexIndex component_index, components)
+ {
+ std::cout << "component " << component_index << " contains: ";
+
+ // Iterate through the child vertex indices for [component_index]
+ BOOST_FOREACH (VertexIndex child_index, components[component_index])
+ {
+ std::cout << child_index << " ";
+ }
+
+ std::cout << std::endl;
+ }
+
+ return (0);
+}
diff --git a/src/boost/libs/graph/example/incremental_components.cpp b/src/boost/libs/graph/example/incremental_components.cpp
new file mode 100644
index 000000000..249e16bde
--- /dev/null
+++ b/src/boost/libs/graph/example/incremental_components.cpp
@@ -0,0 +1,120 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2009 Trustees of Indiana University.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Michael Hansen
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <vector>
+
+#include <boost/foreach.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/incremental_components.hpp>
+#include <boost/pending/disjoint_sets.hpp>
+
+/*
+
+ This example shows how to use the disjoint set data structure
+ to compute the connected components of an undirected, changing
+ graph.
+
+ Sample output:
+
+ An undirected graph:
+ 0 <--> 1 4
+ 1 <--> 0 4
+ 2 <--> 5
+ 3 <-->
+ 4 <--> 1 0
+ 5 <--> 2
+
+ representative[0] = 1
+ representative[1] = 1
+ representative[2] = 5
+ representative[3] = 3
+ representative[4] = 1
+ representative[5] = 5
+
+ component 0 contains: 4 1 0
+ component 1 contains: 3
+ component 2 contains: 5 2
+
+ */
+
+using namespace boost;
+
+int main(int argc, char* argv[])
+{
+ typedef adjacency_list< vecS, vecS, undirectedS > Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef graph_traits< Graph >::vertices_size_type VertexIndex;
+
+ const int VERTEX_COUNT = 6;
+ Graph graph(VERTEX_COUNT);
+
+ std::vector< VertexIndex > rank(num_vertices(graph));
+ std::vector< Vertex > parent(num_vertices(graph));
+
+ typedef VertexIndex* Rank;
+ typedef Vertex* Parent;
+
+ disjoint_sets< Rank, Parent > ds(&rank[0], &parent[0]);
+
+ initialize_incremental_components(graph, ds);
+ incremental_components(graph, ds);
+
+ graph_traits< Graph >::edge_descriptor edge;
+ bool flag;
+
+ boost::tie(edge, flag) = add_edge(0, 1, graph);
+ ds.union_set(0, 1);
+
+ boost::tie(edge, flag) = add_edge(1, 4, graph);
+ ds.union_set(1, 4);
+
+ boost::tie(edge, flag) = add_edge(4, 0, graph);
+ ds.union_set(4, 0);
+
+ boost::tie(edge, flag) = add_edge(2, 5, graph);
+ ds.union_set(2, 5);
+
+ std::cout << "An undirected graph:" << std::endl;
+ print_graph(graph, get(boost::vertex_index, graph));
+ std::cout << std::endl;
+
+ BOOST_FOREACH (Vertex current_vertex, vertices(graph))
+ {
+ std::cout << "representative[" << current_vertex
+ << "] = " << ds.find_set(current_vertex) << std::endl;
+ }
+
+ std::cout << std::endl;
+
+ typedef component_index< VertexIndex > Components;
+
+ // NOTE: Because we're using vecS for the graph type, we're
+ // effectively using identity_property_map for a vertex index map.
+ // If we were to use listS instead, the index map would need to be
+ // explicitly passed to the component_index constructor.
+ Components components(parent.begin(), parent.end());
+
+ // Iterate through the component indices
+ BOOST_FOREACH (VertexIndex current_index, components)
+ {
+ std::cout << "component " << current_index << " contains: ";
+
+ // Iterate through the child vertex indices for [current_index]
+ BOOST_FOREACH (VertexIndex child_index, components[current_index])
+ {
+ std::cout << child_index << " ";
+ }
+
+ std::cout << std::endl;
+ }
+
+ return (0);
+}
diff --git a/src/boost/libs/graph/example/incremental_components.expected b/src/boost/libs/graph/example/incremental_components.expected
new file mode 100644
index 000000000..be2e0bf7b
--- /dev/null
+++ b/src/boost/libs/graph/example/incremental_components.expected
@@ -0,0 +1,18 @@
+An undirected graph:
+0 <--> 1 4
+1 <--> 0 4
+2 <--> 5
+3 <-->
+4 <--> 1 0
+5 <--> 2
+
+representative[0] = 1
+representative[1] = 1
+representative[2] = 5
+representative[3] = 3
+representative[4] = 1
+representative[5] = 5
+
+component 0 contains: 1 4 0
+component 1 contains: 3
+component 2 contains: 5 2
diff --git a/src/boost/libs/graph/example/influence_prestige.cpp b/src/boost/libs/graph/example/influence_prestige.cpp
new file mode 100644
index 000000000..65abac3bf
--- /dev/null
+++ b/src/boost/libs/graph/example/influence_prestige.cpp
@@ -0,0 +1,73 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[influence_prestige_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/degree_centrality.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef directed_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a container type for influence and prestige (both
+// of which are degree centralities) and its corresponding
+// property map.
+typedef exterior_vertex_property< Graph, unsigned > CentralityProperty;
+typedef CentralityProperty::container_type CentralityContainer;
+typedef CentralityProperty::map_type CentralityMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a property map that provides
+ // access to the actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the influence for the graph.
+ CentralityContainer influence(num_vertices(g));
+ CentralityMap im(influence, g);
+ all_influence_values(g, im);
+
+ // Compute the influence for the graph.
+ CentralityContainer prestige(num_vertices(g));
+ CentralityMap pm(prestige, g);
+ all_prestige_values(g, pm);
+
+ // Print the degree centrality of each vertex
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ Vertex v = *i;
+ cout << setiosflags(ios::left) << setw(12) << g[v].name << "\t" << im[v]
+ << "\t" << pm[v] << endl;
+ }
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/info_network.graph b/src/boost/libs/graph/example/info_network.graph
new file mode 100644
index 000000000..8cc8b4d52
--- /dev/null
+++ b/src/boost/libs/graph/example/info_network.graph
@@ -0,0 +1,11 @@
+myspace,digg
+blogger,digg
+blogger,slahsdot
+blogger,wikipedia
+digg,slashdot
+digg,wikipedia
+blogspot,slashdot
+blogspot,wikipedia
+slashdot,bbc
+slashdot,wikipedia
+bbc,wikipedia \ No newline at end of file
diff --git a/src/boost/libs/graph/example/interior_pmap_bundled.cpp b/src/boost/libs/graph/example/interior_pmap_bundled.cpp
new file mode 100644
index 000000000..6121e8e24
--- /dev/null
+++ b/src/boost/libs/graph/example/interior_pmap_bundled.cpp
@@ -0,0 +1,92 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2004 Trustees of Indiana University
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Douglas Gregor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <string>
+
+using namespace std;
+using namespace boost;
+
+/*
+ Interior Property Map Basics
+
+ An interior property map is a way of associating properties
+ with the vertices or edges of a graph. The "interior" part means
+ that the properties are stored inside the graph object. This can be
+ convenient when the need for the properties is somewhat permanent,
+ and when the properties will be with a graph for the duration of its
+ lifetime. A "distance from source vertex" property is often of this
+ kind.
+
+ Sample Output
+
+ Jeremy owes Rich some money
+ Jeremy owes Andrew some money
+ Jeremy owes Jeff some money
+ Jeremy owes Kinis some money
+ Andrew owes Jeremy some money
+ Andrew owes Kinis some money
+ Jeff owes Jeremy some money
+ Jeff owes Rich some money
+ Jeff owes Kinis some money
+ Kinis owes Jeremy some money
+ Kinis owes Rich some money
+
+ */
+
+template < class EdgeIter, class Graph >
+void who_owes_who(EdgeIter first, EdgeIter last, const Graph& G)
+{
+ while (first != last)
+ {
+ cout << G[source(*first, G)].first_name << " owes "
+ << G[target(*first, G)].first_name << " some money" << endl;
+ ++first;
+ }
+}
+
+struct VertexData
+{
+ string first_name;
+};
+
+int main()
+{
+ {
+ // Create the graph, and specify that we will use std::string to
+ // store the first name's.
+ typedef adjacency_list< vecS, vecS, directedS, VertexData > MyGraphType;
+
+ typedef pair< int, int > Pair;
+ Pair edge_array[11] = { Pair(0, 1), Pair(0, 2), Pair(0, 3), Pair(0, 4),
+ Pair(2, 0), Pair(3, 0), Pair(2, 4), Pair(3, 1), Pair(3, 4),
+ Pair(4, 0), Pair(4, 1) };
+
+ MyGraphType G(5);
+ for (int i = 0; i < 11; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, G);
+
+ G[0].first_name = "Jeremy";
+ G[1].first_name = "Rich";
+ G[2].first_name = "Andrew";
+ G[3].first_name = "Jeff";
+ G[4].first_name = "Doug";
+
+ who_owes_who(edges(G).first, edges(G).second, G);
+ }
+
+ cout << endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/interior_property_map.cpp b/src/boost/libs/graph/example/interior_property_map.cpp
new file mode 100644
index 000000000..9a9b7e2d6
--- /dev/null
+++ b/src/boost/libs/graph/example/interior_property_map.cpp
@@ -0,0 +1,112 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <string>
+
+using namespace std;
+using namespace boost;
+
+/*
+ Interior Property Map Basics
+
+ An interior property map is a way of associating properties
+ with the vertices or edges of a graph. The "interior" part means
+ that the properties are stored inside the graph object. This can be
+ convenient when the need for the properties is somewhat permanent,
+ and when the properties will be with a graph for the duration of its
+ lifetime. A "distance from source vertex" property is often of this
+ kind.
+
+ Sample Output
+
+ Jeremy owes Rich some money
+ Jeremy owes Andrew some money
+ Jeremy owes Jeff some money
+ Jeremy owes Kinis some money
+ Andrew owes Jeremy some money
+ Andrew owes Kinis some money
+ Jeff owes Jeremy some money
+ Jeff owes Rich some money
+ Jeff owes Kinis some money
+ Kinis owes Jeremy some money
+ Kinis owes Rich some money
+
+ */
+
+// create a tag for our new property
+
+enum vertex_first_name_t
+{
+ vertex_first_name
+};
+namespace boost
+{
+BOOST_INSTALL_PROPERTY(vertex, first_name);
+}
+
+template < class EdgeIter, class Graph >
+void who_owes_who(EdgeIter first, EdgeIter last, const Graph& G)
+{
+ // Access the propety acessor type for this graph
+ typedef
+ typename property_map< Graph, vertex_first_name_t >::const_type NamePA;
+ NamePA name = get(vertex_first_name, G);
+
+ typedef typename boost::property_traits< NamePA >::value_type NameType;
+
+ NameType src_name, targ_name;
+
+ while (first != last)
+ {
+ src_name = boost::get(name, source(*first, G));
+ targ_name = boost::get(name, target(*first, G));
+ cout << src_name << " owes " << targ_name << " some money" << endl;
+ ++first;
+ }
+}
+
+int main()
+{
+ {
+ // Create the graph, and specify that we will use std::string to
+ // store the first name's.
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_first_name_t, std::string > >
+ MyGraphType;
+
+ typedef pair< int, int > Pair;
+ Pair edge_array[11] = { Pair(0, 1), Pair(0, 2), Pair(0, 3), Pair(0, 4),
+ Pair(2, 0), Pair(3, 0), Pair(2, 4), Pair(3, 1), Pair(3, 4),
+ Pair(4, 0), Pair(4, 1) };
+
+ MyGraphType G(5);
+ for (int i = 0; i < 11; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, G);
+
+ property_map< MyGraphType, vertex_first_name_t >::type name
+ = get(vertex_first_name, G);
+
+ boost::put(name, 0, "Jeremy");
+ boost::put(name, 1, "Rich");
+ boost::put(name, 2, "Andrew");
+ boost::put(name, 3, "Jeff");
+ name[4] = "Kinis"; // you can use operator[] too
+
+ who_owes_who(edges(G).first, edges(G).second, G);
+ }
+
+ cout << endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/interior_property_map.expected b/src/boost/libs/graph/example/interior_property_map.expected
new file mode 100644
index 000000000..5148599f0
--- /dev/null
+++ b/src/boost/libs/graph/example/interior_property_map.expected
@@ -0,0 +1,12 @@
+Jeremy owes Rich some money
+Jeremy owes Andrew some money
+Jeremy owes Jeff some money
+Jeremy owes Kinis some money
+Andrew owes Jeremy some money
+Andrew owes Kinis some money
+Jeff owes Jeremy some money
+Jeff owes Rich some money
+Jeff owes Kinis some money
+Kinis owes Jeremy some money
+Kinis owes Rich some money
+
diff --git a/src/boost/libs/graph/example/iohb.c b/src/boost/libs/graph/example/iohb.c
new file mode 100644
index 000000000..8a216358d
--- /dev/null
+++ b/src/boost/libs/graph/example/iohb.c
@@ -0,0 +1,1610 @@
+// (C) Copyright Jeremy Siek 2004
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+Fri Aug 15 16:29:47 EDT 1997
+
+ Harwell-Boeing File I/O in C
+ V. 1.0
+
+ National Institute of Standards and Technology, MD.
+ K.A. Remington
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ NOTICE
+
+ Permission to use, copy, modify, and distribute this software and
+ its documentation for any purpose and without fee is hereby granted
+ provided that the above copyright notice appear in all copies and
+ that both the copyright notice and this permission notice appear in
+ supporting documentation.
+
+ Neither the Author nor the Institution (National Institute of Standards
+ and Technology) make any representations about the suitability of this
+ software for any purpose. This software is provided "as is" without
+ expressed or implied warranty.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ ---------------------
+ INTERFACE DESCRIPTION
+ ---------------------
+ ---------------
+ QUERY FUNCTIONS
+ ---------------
+
+ FUNCTION:
+
+ int readHB_info(const char *filename, int *M, int *N, int *nz,
+ char **Type, int *Nrhs)
+
+ DESCRIPTION:
+
+ The readHB_info function opens and reads the header information from
+ the specified Harwell-Boeing file, and reports back the number of rows
+ and columns in the stored matrix (M and N), the number of nonzeros in
+ the matrix (nz), the 3-character matrix type(Type), and the number of
+ right-hand-sides stored along with the matrix (Nrhs). This function
+ is designed to retrieve basic size information which can be used to
+ allocate arrays.
+
+ FUNCTION:
+
+ int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
+ int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
+ char *Rhstype)
+
+ DESCRIPTION:
+
+ More detailed than the readHB_info function, readHB_header() reads from
+ the specified Harwell-Boeing file all of the header information.
+
+
+ ------------------------------
+ DOUBLE PRECISION I/O FUNCTIONS
+ ------------------------------
+ FUNCTION:
+
+ int readHB_newmat_double(const char *filename, int *M, int *N, *int nz,
+ int **colptr, int **rowind, double**val)
+
+ int readHB_mat_double(const char *filename, int *colptr, int *rowind,
+ double*val)
+
+
+ DESCRIPTION:
+
+ This function opens and reads the specified file, interpreting its
+ contents as a sparse matrix stored in the Harwell/Boeing standard
+ format. (See readHB_aux_double to read auxillary vectors.)
+ -- Values are interpreted as double precision numbers. --
+
+ The "mat" function uses _pre-allocated_ vectors to hold the index and
+ nonzero value information.
+
+ The "newmat" function allocates vectors to hold the index and nonzero
+ value information, and returns pointers to these vectors along with
+ matrix dimension and number of nonzeros.
+
+ FUNCTION:
+
+ int readHB_aux_double(const char* filename, const char AuxType, double b[])
+
+ int readHB_newaux_double(const char* filename, const char AuxType, double** b)
+
+ DESCRIPTION:
+
+ This function opens and reads from the specified file auxillary vector(s).
+ The char argument Auxtype determines which type of auxillary vector(s)
+ will be read (if present in the file).
+
+ AuxType = 'F' right-hand-side
+ AuxType = 'G' initial estimate (Guess)
+ AuxType = 'X' eXact solution
+
+ If Nrhs > 1, all of the Nrhs vectors of the given type are read and
+ stored in column-major order in the vector b.
+
+ The "newaux" function allocates a vector to hold the values retrieved.
+ The "mat" function uses a _pre-allocated_ vector to hold the values.
+
+ FUNCTION:
+
+ int writeHB_mat_double(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const double val[], int Nrhs, const double rhs[],
+ const double guess[], const double exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype)
+
+ DESCRIPTION:
+
+ The writeHB_mat_double function opens the named file and writes the specified
+ matrix and optional auxillary vector(s) to that file in Harwell-Boeing
+ format. The format arguments (Ptrfmt,Indfmt,Valfmt, and Rhsfmt) are
+ character strings specifying "Fortran-style" output formats -- as they
+ would appear in a Harwell-Boeing file. They are used to produce output
+ which is as close as possible to what would be produced by Fortran code,
+ but note that "D" and "P" edit descriptors are not supported.
+ If NULL, the following defaults will be used:
+ Ptrfmt = Indfmt = "(8I10)"
+ Valfmt = Rhsfmt = "(4E20.13)"
+
+ -----------------------
+ CHARACTER I/O FUNCTIONS
+ -----------------------
+ FUNCTION:
+
+ int readHB_mat_char(const char* filename, int colptr[], int rowind[],
+ char val[], char* Valfmt)
+ int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros,
+ int** colptr, int** rowind, char** val, char** Valfmt)
+
+ DESCRIPTION:
+
+ This function opens and reads the specified file, interpreting its
+ contents as a sparse matrix stored in the Harwell/Boeing standard
+ format. (See readHB_aux_char to read auxillary vectors.)
+ -- Values are interpreted as char strings. --
+ (Used to translate exact values from the file into a new storage format.)
+
+ The "mat" function uses _pre-allocated_ arrays to hold the index and
+ nonzero value information.
+
+ The "newmat" function allocates char arrays to hold the index
+ and nonzero value information, and returns pointers to these arrays
+ along with matrix dimension and number of nonzeros.
+
+ FUNCTION:
+
+ int readHB_aux_char(const char* filename, const char AuxType, char b[])
+ int readHB_newaux_char(const char* filename, const char AuxType, char** b,
+ char** Rhsfmt)
+
+ DESCRIPTION:
+
+ This function opens and reads from the specified file auxillary vector(s).
+ The char argument Auxtype determines which type of auxillary vector(s)
+ will be read (if present in the file).
+
+ AuxType = 'F' right-hand-side
+ AuxType = 'G' initial estimate (Guess)
+ AuxType = 'X' eXact solution
+
+ If Nrhs > 1, all of the Nrhs vectors of the given type are read and
+ stored in column-major order in the vector b.
+
+ The "newaux" function allocates a character array to hold the values
+ retrieved.
+ The "mat" function uses a _pre-allocated_ array to hold the values.
+
+ FUNCTION:
+
+ int writeHB_mat_char(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const char val[], int Nrhs, const char rhs[],
+ const char guess[], const char exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype)
+
+ DESCRIPTION:
+
+ The writeHB_mat_char function opens the named file and writes the specified
+ matrix and optional auxillary vector(s) to that file in Harwell-Boeing
+ format. The format arguments (Ptrfmt,Indfmt,Valfmt, and Rhsfmt) are
+ character strings specifying "Fortran-style" output formats -- as they
+ would appear in a Harwell-Boeing file. Valfmt and Rhsfmt must accurately
+ represent the character representation of the values stored in val[]
+ and rhs[].
+
+ If NULL, the following defaults will be used for the integer vectors:
+ Ptrfmt = Indfmt = "(8I10)"
+ Valfmt = Rhsfmt = "(4E20.13)"
+
+
+*/
+
+/*---------------------------------------------------------------------*/
+/* If zero-based indexing is desired, _SP_base should be set to 0 */
+/* This will cause indices read from H-B files to be decremented by 1 */
+/* and indices written to H-B files to be incremented by 1 */
+/* <<< Standard usage is _SP_base = 1 >>> */
+#ifndef _SP_base
+#define _SP_base 1
+#endif
+/*---------------------------------------------------------------------*/
+
+#include "iohb.h"
+#include<stdio.h>
+#include<stdlib.h>
+#include<string.h>
+#include<math.h>
+
+char* substr(const char* S, const int pos, const int len);
+void upcase(char* S);
+void IOHBTerminate(const char* message);
+
+int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type,
+ int* Nrhs)
+{
+/****************************************************************************/
+/* The readHB_info function opens and reads the header information from */
+/* the specified Harwell-Boeing file, and reports back the number of rows */
+/* and columns in the stored matrix (M and N), the number of nonzeros in */
+/* the matrix (nz), and the number of right-hand-sides stored along with */
+/* the matrix (Nrhs). */
+/* */
+/* For a description of the Harwell Boeing standard, see: */
+/* Duff, et al., ACM TOMS Vol.15, No.1, March 1989 */
+/* */
+/* ---------- */
+/* **CAVEAT** */
+/* ---------- */
+/* ** If the input file does not adhere to the H/B format, the ** */
+/* ** results will be unpredictable. ** */
+/* */
+/****************************************************************************/
+ FILE *in_file;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Nrow, Ncol, Nnzero;
+ char* mat_type;
+ char Title[73], Key[9], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Valfmt[21], Rhsfmt[21];
+
+ mat_type = *Type;
+ if ( mat_type == NULL ) IOHBTerminate("Insufficient memory for mat_typen");
+
+ if ( (in_file = fopen( filename, "r")) == NULL ) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ readHB_header(in_file, Title, Key, mat_type, &Nrow, &Ncol, &Nnzero, Nrhs,
+ Ptrfmt, Indfmt, Valfmt, Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+ fclose(in_file);
+ *Type = mat_type;
+ *(*Type+3) = (char) NULL;
+ *M = Nrow;
+ *N = Ncol;
+ *nz = Nnzero;
+ if (Rhscrd == 0) {*Nrhs = 0;}
+
+/* In verbose mode, print some of the header information: */
+/*
+ if (verbose == 1)
+ {
+ printf("Reading from Harwell-Boeing file %s (verbose on)...\n",filename);
+ printf(" Title: %s\n",Title);
+ printf(" Key: %s\n",Key);
+ printf(" The stored matrix is %i by %i with %i nonzeros.\n",
+ *M, *N, *nz );
+ printf(" %i right-hand--side(s) stored.\n",*Nrhs);
+ }
+*/
+
+ return 1;
+
+}
+
+
+
+int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
+ int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
+ char *Rhstype)
+{
+/*************************************************************************/
+/* Read header information from the named H/B file... */
+/*************************************************************************/
+ int Totcrd,Neltvl,Nrhsix;
+ char line[BUFSIZ];
+
+/* First line: */
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) first line of HB file.\n");
+ (void) sscanf(line, "%72c%8[^\n]", Title, Key);
+ *(Key+8) = (char) NULL;
+ *(Title+72) = (char) NULL;
+
+/* Second line: */
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) second line of HB file.\n");
+ if ( sscanf(line,"%i",&Totcrd) != 1) Totcrd = 0;
+ if ( sscanf(line,"%*i%i",Ptrcrd) != 1) *Ptrcrd = 0;
+ if ( sscanf(line,"%*i%*i%i",Indcrd) != 1) *Indcrd = 0;
+ if ( sscanf(line,"%*i%*i%*i%i",Valcrd) != 1) *Valcrd = 0;
+ if ( sscanf(line,"%*i%*i%*i%*i%i",Rhscrd) != 1) *Rhscrd = 0;
+
+/* Third line: */
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) third line of HB file.\n");
+ if ( sscanf(line, "%3c", Type) != 1)
+ IOHBTerminate("iohb.c: Invalid Type info, line 3 of Harwell-Boeing file.\n");
+ upcase(Type);
+ if ( sscanf(line,"%*3c%i",Nrow) != 1) *Nrow = 0 ;
+ if ( sscanf(line,"%*3c%*i%i",Ncol) != 1) *Ncol = 0 ;
+ if ( sscanf(line,"%*3c%*i%*i%i",Nnzero) != 1) *Nnzero = 0 ;
+ if ( sscanf(line,"%*3c%*i%*i%*i%i",&Neltvl) != 1) Neltvl = 0 ;
+
+/* Fourth line: */
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) fourth line of HB file.\n");
+ if ( sscanf(line, "%16c",Ptrfmt) != 1)
+ IOHBTerminate("iohb.c: Invalid format info, line 4 of Harwell-Boeing file.\n");
+ if ( sscanf(line, "%*16c%16c",Indfmt) != 1)
+ IOHBTerminate("iohb.c: Invalid format info, line 4 of Harwell-Boeing file.\n");
+ if ( sscanf(line, "%*16c%*16c%20c",Valfmt) != 1)
+ IOHBTerminate("iohb.c: Invalid format info, line 4 of Harwell-Boeing file.\n");
+ sscanf(line, "%*16c%*16c%*20c%20c",Rhsfmt);
+ *(Ptrfmt+16) = (char) NULL;
+ *(Indfmt+16) = (char) NULL;
+ *(Valfmt+20) = (char) NULL;
+ *(Rhsfmt+20) = (char) NULL;
+
+/* (Optional) Fifth line: */
+ if (*Rhscrd != 0 )
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) fifth line of HB file.\n");
+ if ( sscanf(line, "%3c", Rhstype) != 1)
+ IOHBTerminate("iohb.c: Invalid RHS type information, line 5 of Harwell-Boeing file.\n");
+ if ( sscanf(line, "%*3c%i", Nrhs) != 1) *Nrhs = 0;
+ if ( sscanf(line, "%*3c%*i%i", &Nrhsix) != 1) Nrhsix = 0;
+ }
+ return 1;
+}
+
+
+int readHB_mat_double(const char* filename, int colptr[], int rowind[],
+ double val[])
+{
+/****************************************************************************/
+/* This function opens and reads the specified file, interpreting its */
+/* contents as a sparse matrix stored in the Harwell/Boeing standard */
+/* format and creating compressed column storage scheme vectors to hold */
+/* the index and nonzero value information. */
+/* */
+/* ---------- */
+/* **CAVEAT** */
+/* ---------- */
+/* Parsing real formats from Fortran is tricky, and this file reader */
+/* does not claim to be foolproof. It has been tested for cases when */
+/* the real values are printed consistently and evenly spaced on each */
+/* line, with Fixed (F), and Exponential (E or D) formats. */
+/* */
+/* ** If the input file does not adhere to the H/B format, the ** */
+/* ** results will be unpredictable. ** */
+/* */
+/****************************************************************************/
+ FILE *in_file;
+ int i,j,ind,col,offset,count,last,Nrhs;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Nrow, Ncol, Nnzero, Nentries;
+ int Ptrperline, Ptrwidth, Indperline, Indwidth;
+ int Valperline, Valwidth, Valprec;
+ int Valflag; /* Indicates 'E','D', or 'F' float format */
+ char* ThisElement;
+ char Title[73], Key[8], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Valfmt[21], Rhsfmt[21];
+ char line[BUFSIZ];
+
+ if ( (in_file = fopen( filename, "r")) == NULL ) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ readHB_header(in_file, Title, Key, Type, &Nrow, &Ncol, &Nnzero, &Nrhs,
+ Ptrfmt, Indfmt, Valfmt, Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+
+/* Parse the array input formats from Line 3 of HB file */
+ ParseIfmt(Ptrfmt,&Ptrperline,&Ptrwidth);
+ ParseIfmt(Indfmt,&Indperline,&Indwidth);
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+ ParseRfmt(Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
+ }
+
+/* Read column pointer array: */
+
+ offset = 1-_SP_base; /* if base 0 storage is declared (via macro definition), */
+ /* then storage entries are offset by 1 */
+
+ ThisElement = (char *) malloc(Ptrwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Ptrwidth) = (char) NULL;
+ count=0;
+ for (i=0;i<Ptrcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in pointer data region of HB file.\n");
+ col = 0;
+ for (ind = 0;ind<Ptrperline;ind++)
+ {
+ if (count > Ncol) break;
+ strncpy(ThisElement,line+col,Ptrwidth);
+ /* ThisElement = substr(line,col,Ptrwidth); */
+ colptr[count] = atoi(ThisElement)-offset;
+ count++; col += Ptrwidth;
+ }
+ }
+ free(ThisElement);
+
+/* Read row index array: */
+
+ ThisElement = (char *) malloc(Indwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Indwidth) = (char) NULL;
+ count = 0;
+ for (i=0;i<Indcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in index data region of HB file.\n");
+ col = 0;
+ for (ind = 0;ind<Indperline;ind++)
+ {
+ if (count == Nnzero) break;
+ strncpy(ThisElement,line+col,Indwidth);
+/* ThisElement = substr(line,col,Indwidth); */
+ rowind[count] = atoi(ThisElement)-offset;
+ count++; col += Indwidth;
+ }
+ }
+ free(ThisElement);
+
+/* Read array of values: */
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+
+ if ( Type[0] == 'C' ) Nentries = 2*Nnzero;
+ else Nentries = Nnzero;
+
+ ThisElement = (char *) malloc(Valwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Valwidth) = (char) NULL;
+ count = 0;
+ for (i=0;i<Valcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in value data region of HB file.\n");
+ if (Valflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+/* *strchr(Valfmt,'D') = 'E'; */
+ }
+ col = 0;
+ for (ind = 0;ind<Valperline;ind++)
+ {
+ if (count == Nentries) break;
+ strncpy(ThisElement,line+col,Valwidth);
+ /*ThisElement = substr(line,col,Valwidth);*/
+ if ( Valflag != 'F' && strchr(ThisElement,'E') == NULL ) {
+ /* insert a char prefix for exp */
+ last = strlen(ThisElement);
+ for (j=last+1;j>=0;j--) {
+ ThisElement[j] = ThisElement[j-1];
+ if ( ThisElement[j] == '+' || ThisElement[j] == '-' ) {
+ ThisElement[j-1] = Valflag;
+ break;
+ }
+ }
+ }
+ val[count] = atof(ThisElement);
+ count++; col += Valwidth;
+ }
+ }
+ free(ThisElement);
+ }
+
+ fclose(in_file);
+ return 1;
+}
+
+int readHB_newmat_double(const char* filename, int* M, int* N, int* nonzeros,
+ int** colptr, int** rowind, double** val)
+{
+ int Nrhs;
+ char *Type;
+
+ readHB_info(filename, M, N, nonzeros, &Type, &Nrhs);
+
+ *colptr = (int *)malloc((*N+1)*sizeof(int));
+ if ( *colptr == NULL ) IOHBTerminate("Insufficient memory for colptr.\n");
+ *rowind = (int *)malloc(*nonzeros*sizeof(int));
+ if ( *rowind == NULL ) IOHBTerminate("Insufficient memory for rowind.\n");
+ if ( Type[0] == 'C' ) {
+/*
+ fprintf(stderr, "Warning: Reading complex data from HB file %s.\n",filename);
+ fprintf(stderr, " Real and imaginary parts will be interlaced in val[].\n");
+*/
+ /* Malloc enough space for real AND imaginary parts of val[] */
+ *val = (double *)malloc(*nonzeros*sizeof(double)*2);
+ if ( *val == NULL ) IOHBTerminate("Insufficient memory for val.\n");
+ } else {
+ if ( Type[0] != 'P' ) {
+ /* Malloc enough space for real array val[] */
+ *val = (double *)malloc(*nonzeros*sizeof(double));
+ if ( *val == NULL ) IOHBTerminate("Insufficient memory for val.\n");
+ }
+ } /* No val[] space needed if pattern only */
+ return readHB_mat_double(filename, *colptr, *rowind, *val);
+
+}
+
+int readHB_aux_double(const char* filename, const char AuxType, double b[])
+{
+/****************************************************************************/
+/* This function opens and reads the specified file, placing auxillary */
+/* vector(s) of the given type (if available) in b. */
+/* Return value is the number of vectors successfully read. */
+/* */
+/* AuxType = 'F' full right-hand-side vector(s) */
+/* AuxType = 'G' initial Guess vector(s) */
+/* AuxType = 'X' eXact solution vector(s) */
+/* */
+/* ---------- */
+/* **CAVEAT** */
+/* ---------- */
+/* Parsing real formats from Fortran is tricky, and this file reader */
+/* does not claim to be foolproof. It has been tested for cases when */
+/* the real values are printed consistently and evenly spaced on each */
+/* line, with Fixed (F), and Exponential (E or D) formats. */
+/* */
+/* ** If the input file does not adhere to the H/B format, the ** */
+/* ** results will be unpredictable. ** */
+/* */
+/****************************************************************************/
+ FILE *in_file;
+ int i,j,n,maxcol,start,stride,col,last,linel;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Nrow, Ncol, Nnzero, Nentries;
+ int Nrhs, nvecs, rhsi;
+ int Rhsperline, Rhswidth, Rhsprec;
+ int Rhsflag;
+ char *ThisElement;
+ char Title[73], Key[9], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Valfmt[21], Rhsfmt[21];
+ char line[BUFSIZ];
+
+ if ((in_file = fopen( filename, "r")) == NULL) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ readHB_header(in_file, Title, Key, Type, &Nrow, &Ncol, &Nnzero, &Nrhs,
+ Ptrfmt, Indfmt, Valfmt, Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+
+ if (Nrhs <= 0)
+ {
+ fprintf(stderr, "Warn: Attempt to read auxillary vector(s) when none are present.\n");
+ return 0;
+ }
+ if (Rhstype[0] != 'F' )
+ {
+ fprintf(stderr,"Warn: Attempt to read auxillary vector(s) which are not stored in Full form.\n");
+ fprintf(stderr," Rhs must be specified as full. \n");
+ return 0;
+ }
+
+/* If reading complex data, allow for interleaved real and imaginary values. */
+ if ( Type[0] == 'C' ) {
+ Nentries = 2*Nrow;
+ } else {
+ Nentries = Nrow;
+ }
+
+ nvecs = 1;
+
+ if ( Rhstype[1] == 'G' ) nvecs++;
+ if ( Rhstype[2] == 'X' ) nvecs++;
+
+ if ( AuxType == 'G' && Rhstype[1] != 'G' ) {
+ fprintf(stderr, "Warn: Attempt to read auxillary Guess vector(s) when none are present.\n");
+ return 0;
+ }
+ if ( AuxType == 'X' && Rhstype[2] != 'X' ) {
+ fprintf(stderr, "Warn: Attempt to read auxillary eXact solution vector(s) when none are present.\n");
+ return 0;
+ }
+
+ ParseRfmt(Rhsfmt, &Rhsperline, &Rhswidth, &Rhsprec,&Rhsflag);
+ maxcol = Rhsperline*Rhswidth;
+
+/* Lines to skip before starting to read RHS values... */
+ n = Ptrcrd + Indcrd + Valcrd;
+
+ for (i = 0; i < n; i++)
+ fgets(line, BUFSIZ, in_file);
+
+/* start - number of initial aux vector entries to skip */
+/* to reach first vector requested */
+/* stride - number of aux vector entries to skip between */
+/* requested vectors */
+ if ( AuxType == 'F' ) start = 0;
+ else if ( AuxType == 'G' ) start = Nentries;
+ else start = (nvecs-1)*Nentries;
+ stride = (nvecs-1)*Nentries;
+
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ col = 0;
+/* Skip to initial offset */
+
+ for (i=0;i<start;i++) {
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ col = 0;
+ }
+ col += Rhswidth;
+ }
+ if (Rhsflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+ }
+
+/* Read a vector of desired type, then skip to next */
+/* repeating to fill Nrhs vectors */
+
+ ThisElement = (char *) malloc(Rhswidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Rhswidth) = (char) NULL;
+ for (rhsi=0;rhsi<Nrhs;rhsi++) {
+
+ for (i=0;i<Nentries;i++) {
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ if (Rhsflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+ }
+ col = 0;
+ }
+ strncpy(ThisElement,line+col,Rhswidth);
+ /*ThisElement = substr(line, col, Rhswidth);*/
+ if ( Rhsflag != 'F' && strchr(ThisElement,'E') == NULL ) {
+ /* insert a char prefix for exp */
+ last = strlen(ThisElement);
+ for (j=last+1;j>=0;j--) {
+ ThisElement[j] = ThisElement[j-1];
+ if ( ThisElement[j] == '+' || ThisElement[j] == '-' ) {
+ ThisElement[j-1] = Rhsflag;
+ break;
+ }
+ }
+ }
+ b[i] = atof(ThisElement);
+ col += Rhswidth;
+ }
+
+/* Skip any interleaved Guess/eXact vectors */
+
+ for (i=0;i<stride;i++) {
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ col = 0;
+ }
+ col += Rhswidth;
+ }
+
+ }
+ free(ThisElement);
+
+
+ fclose(in_file);
+ return Nrhs;
+}
+
+int readHB_newaux_double(const char* filename, const char AuxType, double** b)
+{
+ int Nrhs,M,N,nonzeros;
+ char *Type;
+
+ readHB_info(filename, &M, &N, &nonzeros, &Type, &Nrhs);
+ if ( Nrhs <= 0 ) {
+ fprintf(stderr,"Warn: Requested read of aux vector(s) when none are present.\n");
+ return 0;
+ } else {
+ if ( Type[0] == 'C' ) {
+ fprintf(stderr, "Warning: Reading complex aux vector(s) from HB file %s.",filename);
+ fprintf(stderr, " Real and imaginary parts will be interlaced in b[].");
+ *b = (double *)malloc(M*Nrhs*sizeof(double)*2);
+ if ( *b == NULL ) IOHBTerminate("Insufficient memory for rhs.\n");
+ return readHB_aux_double(filename, AuxType, *b);
+ } else {
+ *b = (double *)malloc(M*Nrhs*sizeof(double));
+ if ( *b == NULL ) IOHBTerminate("Insufficient memory for rhs.\n");
+ return readHB_aux_double(filename, AuxType, *b);
+ }
+ }
+}
+
+int writeHB_mat_double(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const double val[], int Nrhs, const double rhs[],
+ const double guess[], const double exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype)
+{
+/****************************************************************************/
+/* The writeHB function opens the named file and writes the specified */
+/* matrix and optional right-hand-side(s) to that file in Harwell-Boeing */
+/* format. */
+/* */
+/* For a description of the Harwell Boeing standard, see: */
+/* Duff, et al., ACM TOMS Vol.15, No.1, March 1989 */
+/* */
+/****************************************************************************/
+ FILE *out_file;
+ int i,j,entry,offset,acount,linemod;
+ int totcrd, ptrcrd, indcrd, valcrd, rhscrd;
+ int nvalentries, nrhsentries;
+ int Ptrperline, Ptrwidth, Indperline, Indwidth;
+ int Rhsperline, Rhswidth, Rhsprec;
+ int Rhsflag;
+ int Valperline, Valwidth, Valprec;
+ int Valflag; /* Indicates 'E','D', or 'F' float format */
+ char pformat[16],iformat[16],vformat[19],rformat[19];
+
+ if ( Type[0] == 'C' ) {
+ nvalentries = 2*nz;
+ nrhsentries = 2*M;
+ } else {
+ nvalentries = nz;
+ nrhsentries = M;
+ }
+
+ if ( filename != NULL ) {
+ if ( (out_file = fopen( filename, "w")) == NULL ) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+ } else out_file = stdout;
+
+ if ( Ptrfmt == NULL ) Ptrfmt = "(8I10)";
+ ParseIfmt(Ptrfmt,&Ptrperline,&Ptrwidth);
+ sprintf(pformat,"%%%dd",Ptrwidth);
+ ptrcrd = (N+1)/Ptrperline;
+ if ( (N+1)%Ptrperline != 0) ptrcrd++;
+
+ if ( Indfmt == NULL ) Indfmt = Ptrfmt;
+ ParseIfmt(Indfmt,&Indperline,&Indwidth);
+ sprintf(iformat,"%%%dd",Indwidth);
+ indcrd = nz/Indperline;
+ if ( nz%Indperline != 0) indcrd++;
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+ if ( Valfmt == NULL ) Valfmt = "(4E20.13)";
+ ParseRfmt(Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
+ if (Valflag == 'D') *strchr(Valfmt,'D') = 'E';
+ if (Valflag == 'F')
+ sprintf(vformat,"%% %d.%df",Valwidth,Valprec);
+ else
+ sprintf(vformat,"%% %d.%dE",Valwidth,Valprec);
+ valcrd = nvalentries/Valperline;
+ if ( nvalentries%Valperline != 0) valcrd++;
+ } else valcrd = 0;
+
+ if ( Nrhs > 0 ) {
+ if ( Rhsfmt == NULL ) Rhsfmt = Valfmt;
+ ParseRfmt(Rhsfmt,&Rhsperline,&Rhswidth,&Rhsprec, &Rhsflag);
+ if (Rhsflag == 'F')
+ sprintf(rformat,"%% %d.%df",Rhswidth,Rhsprec);
+ else
+ sprintf(rformat,"%% %d.%dE",Rhswidth,Rhsprec);
+ if (Rhsflag == 'D') *strchr(Rhsfmt,'D') = 'E';
+ rhscrd = nrhsentries/Rhsperline;
+ if ( nrhsentries%Rhsperline != 0) rhscrd++;
+ if ( Rhstype[1] == 'G' ) rhscrd+=rhscrd;
+ if ( Rhstype[2] == 'X' ) rhscrd+=rhscrd;
+ rhscrd*=Nrhs;
+ } else rhscrd = 0;
+
+ totcrd = 4+ptrcrd+indcrd+valcrd+rhscrd;
+
+
+/* Print header information: */
+
+ fprintf(out_file,"%-72s%-8s\n%14d%14d%14d%14d%14d\n",Title, Key, totcrd,
+ ptrcrd, indcrd, valcrd, rhscrd);
+ fprintf(out_file,"%3s%11s%14d%14d%14d\n",Type," ", M, N, nz);
+ fprintf(out_file,"%-16s%-16s%-20s", Ptrfmt, Indfmt, Valfmt);
+ if ( Nrhs != 0 ) {
+/* Print Rhsfmt on fourth line and */
+/* optional fifth header line for auxillary vector information: */
+ fprintf(out_file,"%-20s\n%-14s%d\n",Rhsfmt,Rhstype,Nrhs);
+ } else fprintf(out_file,"\n");
+
+ offset = 1-_SP_base; /* if base 0 storage is declared (via macro definition), */
+ /* then storage entries are offset by 1 */
+
+/* Print column pointers: */
+ for (i=0;i<N+1;i++)
+ {
+ entry = colptr[i]+offset;
+ fprintf(out_file,pformat,entry);
+ if ( (i+1)%Ptrperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( (N+1) % Ptrperline != 0 ) fprintf(out_file,"\n");
+
+/* Print row indices: */
+ for (i=0;i<nz;i++)
+ {
+ entry = rowind[i]+offset;
+ fprintf(out_file,iformat,entry);
+ if ( (i+1)%Indperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( nz % Indperline != 0 ) fprintf(out_file,"\n");
+
+/* Print values: */
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+
+ for (i=0;i<nvalentries;i++)
+ {
+ fprintf(out_file,vformat,val[i]);
+ if ( (i+1)%Valperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( nvalentries % Valperline != 0 ) fprintf(out_file,"\n");
+
+/* If available, print right hand sides,
+ guess vectors and exact solution vectors: */
+ acount = 1;
+ linemod = 0;
+ if ( Nrhs > 0 ) {
+ for (i=0;i<Nrhs;i++)
+ {
+ for ( j=0;j<nrhsentries;j++ ) {
+ fprintf(out_file,rformat,rhs[j]);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ rhs += nrhsentries;
+ if ( Rhstype[1] == 'G' ) {
+ for ( j=0;j<nrhsentries;j++ ) {
+ fprintf(out_file,rformat,guess[j]);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ guess += nrhsentries;
+ }
+ if ( Rhstype[2] == 'X' ) {
+ for ( j=0;j<nrhsentries;j++ ) {
+ fprintf(out_file,rformat,exact[j]);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ exact += nrhsentries;
+ }
+ }
+ }
+
+ }
+
+ if ( fclose(out_file) != 0){
+ fprintf(stderr,"Error closing file in writeHB_mat_double().\n");
+ return 0;
+ } else return 1;
+
+}
+
+int readHB_mat_char(const char* filename, int colptr[], int rowind[],
+ char val[], char* Valfmt)
+{
+/****************************************************************************/
+/* This function opens and reads the specified file, interpreting its */
+/* contents as a sparse matrix stored in the Harwell/Boeing standard */
+/* format and creating compressed column storage scheme vectors to hold */
+/* the index and nonzero value information. */
+/* */
+/* ---------- */
+/* **CAVEAT** */
+/* ---------- */
+/* Parsing real formats from Fortran is tricky, and this file reader */
+/* does not claim to be foolproof. It has been tested for cases when */
+/* the real values are printed consistently and evenly spaced on each */
+/* line, with Fixed (F), and Exponential (E or D) formats. */
+/* */
+/* ** If the input file does not adhere to the H/B format, the ** */
+/* ** results will be unpredictable. ** */
+/* */
+/****************************************************************************/
+ FILE *in_file;
+ int i,j,ind,col,offset,count,last;
+ int Nrow,Ncol,Nnzero,Nentries,Nrhs;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Ptrperline, Ptrwidth, Indperline, Indwidth;
+ int Valperline, Valwidth, Valprec;
+ int Valflag; /* Indicates 'E','D', or 'F' float format */
+ char* ThisElement;
+ char line[BUFSIZ];
+ char Title[73], Key[8], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Rhsfmt[21];
+
+ if ( (in_file = fopen( filename, "r")) == NULL ) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ readHB_header(in_file, Title, Key, Type, &Nrow, &Ncol, &Nnzero, &Nrhs,
+ Ptrfmt, Indfmt, Valfmt, Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+
+/* Parse the array input formats from Line 3 of HB file */
+ ParseIfmt(Ptrfmt,&Ptrperline,&Ptrwidth);
+ ParseIfmt(Indfmt,&Indperline,&Indwidth);
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+ ParseRfmt(Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
+ if (Valflag == 'D') {
+ *strchr(Valfmt,'D') = 'E';
+ }
+ }
+
+/* Read column pointer array: */
+
+ offset = 1-_SP_base; /* if base 0 storage is declared (via macro definition), */
+ /* then storage entries are offset by 1 */
+
+ ThisElement = (char *) malloc(Ptrwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Ptrwidth) = (char) NULL;
+ count=0;
+ for (i=0;i<Ptrcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in pointer data region of HB file.\n");
+ col = 0;
+ for (ind = 0;ind<Ptrperline;ind++)
+ {
+ if (count > Ncol) break;
+ strncpy(ThisElement,line+col,Ptrwidth);
+ /*ThisElement = substr(line,col,Ptrwidth);*/
+ colptr[count] = atoi(ThisElement)-offset;
+ count++; col += Ptrwidth;
+ }
+ }
+ free(ThisElement);
+
+/* Read row index array: */
+
+ ThisElement = (char *) malloc(Indwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Indwidth) = (char) NULL;
+ count = 0;
+ for (i=0;i<Indcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in index data region of HB file.\n");
+ col = 0;
+ for (ind = 0;ind<Indperline;ind++)
+ {
+ if (count == Nnzero) break;
+ strncpy(ThisElement,line+col,Indwidth);
+ /*ThisElement = substr(line,col,Indwidth);*/
+ rowind[count] = atoi(ThisElement)-offset;
+ count++; col += Indwidth;
+ }
+ }
+ free(ThisElement);
+
+/* Read array of values: AS CHARACTERS*/
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+
+ if ( Type[0] == 'C' ) Nentries = 2*Nnzero;
+ else Nentries = Nnzero;
+
+ ThisElement = (char *) malloc(Valwidth+1);
+ if ( ThisElement == NULL ) IOHBTerminate("Insufficient memory for ThisElement.");
+ *(ThisElement+Valwidth) = (char) NULL;
+ count = 0;
+ for (i=0;i<Valcrd;i++)
+ {
+ fgets(line, BUFSIZ, in_file);
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in value data region of HB file.\n");
+ if (Valflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+ }
+ col = 0;
+ for (ind = 0;ind<Valperline;ind++)
+ {
+ if (count == Nentries) break;
+ ThisElement = &val[count*Valwidth];
+ strncpy(ThisElement,line+col,Valwidth);
+ /*strncpy(ThisElement,substr(line,col,Valwidth),Valwidth);*/
+ if ( Valflag != 'F' && strchr(ThisElement,'E') == NULL ) {
+ /* insert a char prefix for exp */
+ last = strlen(ThisElement);
+ for (j=last+1;j>=0;j--) {
+ ThisElement[j] = ThisElement[j-1];
+ if ( ThisElement[j] == '+' || ThisElement[j] == '-' ) {
+ ThisElement[j-1] = Valflag;
+ break;
+ }
+ }
+ }
+ count++; col += Valwidth;
+ }
+ }
+ }
+
+ return 1;
+}
+
+int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros, int** colptr,
+ int** rowind, char** val, char** Valfmt)
+{
+ FILE *in_file;
+ int Nrhs;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Valperline, Valwidth, Valprec;
+ int Valflag; /* Indicates 'E','D', or 'F' float format */
+ char Title[73], Key[9], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Rhsfmt[21];
+
+ if ((in_file = fopen( filename, "r")) == NULL) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ *Valfmt = (char *)malloc(21*sizeof(char));
+ if ( *Valfmt == NULL ) IOHBTerminate("Insufficient memory for Valfmt.");
+ readHB_header(in_file, Title, Key, Type, M, N, nonzeros, &Nrhs,
+ Ptrfmt, Indfmt, (*Valfmt), Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+ fclose(in_file);
+ ParseRfmt(*Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
+
+ *colptr = (int *)malloc((*N+1)*sizeof(int));
+ if ( *colptr == NULL ) IOHBTerminate("Insufficient memory for colptr.\n");
+ *rowind = (int *)malloc(*nonzeros*sizeof(int));
+ if ( *rowind == NULL ) IOHBTerminate("Insufficient memory for rowind.\n");
+ if ( Type[0] == 'C' ) {
+/*
+ fprintf(stderr, "Warning: Reading complex data from HB file %s.\n",filename);
+ fprintf(stderr, " Real and imaginary parts will be interlaced in val[].\n");
+*/
+ /* Malloc enough space for real AND imaginary parts of val[] */
+ *val = (char *)malloc(*nonzeros*Valwidth*sizeof(char)*2);
+ if ( *val == NULL ) IOHBTerminate("Insufficient memory for val.\n");
+ } else {
+ if ( Type[0] != 'P' ) {
+ /* Malloc enough space for real array val[] */
+ *val = (char *)malloc(*nonzeros*Valwidth*sizeof(char));
+ if ( *val == NULL ) IOHBTerminate("Insufficient memory for val.\n");
+ }
+ } /* No val[] space needed if pattern only */
+ return readHB_mat_char(filename, *colptr, *rowind, *val, *Valfmt);
+
+}
+
+int readHB_aux_char(const char* filename, const char AuxType, char b[])
+{
+/****************************************************************************/
+/* This function opens and reads the specified file, placing auxilary */
+/* vector(s) of the given type (if available) in b : */
+/* Return value is the number of vectors successfully read. */
+/* */
+/* AuxType = 'F' full right-hand-side vector(s) */
+/* AuxType = 'G' initial Guess vector(s) */
+/* AuxType = 'X' eXact solution vector(s) */
+/* */
+/* ---------- */
+/* **CAVEAT** */
+/* ---------- */
+/* Parsing real formats from Fortran is tricky, and this file reader */
+/* does not claim to be foolproof. It has been tested for cases when */
+/* the real values are printed consistently and evenly spaced on each */
+/* line, with Fixed (F), and Exponential (E or D) formats. */
+/* */
+/* ** If the input file does not adhere to the H/B format, the ** */
+/* ** results will be unpredictable. ** */
+/* */
+/****************************************************************************/
+ FILE *in_file;
+ int i,j,n,maxcol,start,stride,col,last,linel,nvecs,rhsi;
+ int Nrow, Ncol, Nnzero, Nentries,Nrhs;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Rhsperline, Rhswidth, Rhsprec;
+ int Rhsflag;
+ char Title[73], Key[9], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Valfmt[21], Rhsfmt[21];
+ char line[BUFSIZ];
+ char *ThisElement;
+
+ if ((in_file = fopen( filename, "r")) == NULL) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ readHB_header(in_file, Title, Key, Type, &Nrow, &Ncol, &Nnzero, &Nrhs,
+ Ptrfmt, Indfmt, Valfmt, Rhsfmt,
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+
+ if (Nrhs <= 0)
+ {
+ fprintf(stderr, "Warn: Attempt to read auxillary vector(s) when none are present.\n");
+ return 0;
+ }
+ if (Rhstype[0] != 'F' )
+ {
+ fprintf(stderr,"Warn: Attempt to read auxillary vector(s) which are not stored in Full form.\n");
+ fprintf(stderr," Rhs must be specified as full. \n");
+ return 0;
+ }
+
+/* If reading complex data, allow for interleaved real and imaginary values. */
+ if ( Type[0] == 'C' ) {
+ Nentries = 2*Nrow;
+ } else {
+ Nentries = Nrow;
+ }
+
+ nvecs = 1;
+
+ if ( Rhstype[1] == 'G' ) nvecs++;
+ if ( Rhstype[2] == 'X' ) nvecs++;
+
+ if ( AuxType == 'G' && Rhstype[1] != 'G' ) {
+ fprintf(stderr, "Warn: Attempt to read auxillary Guess vector(s) when none are present.\n");
+ return 0;
+ }
+ if ( AuxType == 'X' && Rhstype[2] != 'X' ) {
+ fprintf(stderr, "Warn: Attempt to read auxillary eXact solution vector(s) when none are present.\n");
+ return 0;
+ }
+
+ ParseRfmt(Rhsfmt, &Rhsperline, &Rhswidth, &Rhsprec,&Rhsflag);
+ maxcol = Rhsperline*Rhswidth;
+
+/* Lines to skip before starting to read RHS values... */
+ n = Ptrcrd + Indcrd + Valcrd;
+
+ for (i = 0; i < n; i++)
+ fgets(line, BUFSIZ, in_file);
+
+/* start - number of initial aux vector entries to skip */
+/* to reach first vector requested */
+/* stride - number of aux vector entries to skip between */
+/* requested vectors */
+ if ( AuxType == 'F' ) start = 0;
+ else if ( AuxType == 'G' ) start = Nentries;
+ else start = (nvecs-1)*Nentries;
+ stride = (nvecs-1)*Nentries;
+
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in auxillary vector data region of HB file.\n");
+ col = 0;
+/* Skip to initial offset */
+
+ for (i=0;i<start;i++) {
+ col += Rhswidth;
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in auxillary vector data region of HB file.\n");
+ col = 0;
+ }
+ }
+
+ if (Rhsflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+ }
+/* Read a vector of desired type, then skip to next */
+/* repeating to fill Nrhs vectors */
+
+ for (rhsi=0;rhsi<Nrhs;rhsi++) {
+
+ for (i=0;i<Nentries;i++) {
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in auxillary vector data region of HB file.\n");
+ if (Rhsflag == 'D') {
+ while( strchr(line,'D') ) *strchr(line,'D') = 'E';
+ }
+ col = 0;
+ }
+ ThisElement = &b[i*Rhswidth];
+ strncpy(ThisElement,line+col,Rhswidth);
+ if ( Rhsflag != 'F' && strchr(ThisElement,'E') == NULL ) {
+ /* insert a char prefix for exp */
+ last = strlen(ThisElement);
+ for (j=last+1;j>=0;j--) {
+ ThisElement[j] = ThisElement[j-1];
+ if ( ThisElement[j] == '+' || ThisElement[j] == '-' ) {
+ ThisElement[j-1] = Rhsflag;
+ break;
+ }
+ }
+ }
+ col += Rhswidth;
+ }
+ b+=Nentries*Rhswidth;
+
+/* Skip any interleaved Guess/eXact vectors */
+
+ for (i=0;i<stride;i++) {
+ col += Rhswidth;
+ if ( col >= ( maxcol<linel?maxcol:linel ) ) {
+ fgets(line, BUFSIZ, in_file);
+ linel= strchr(line,'\n')-line;
+ if ( sscanf(line,"%*s") < 0 )
+ IOHBTerminate("iohb.c: Null (or blank) line in auxillary vector data region of HB file.\n");
+ col = 0;
+ }
+ }
+
+ }
+
+
+ fclose(in_file);
+ return Nrhs;
+}
+
+int readHB_newaux_char(const char* filename, const char AuxType, char** b, char** Rhsfmt)
+{
+ FILE *in_file;
+ int Ptrcrd, Indcrd, Valcrd, Rhscrd;
+ int Nrow,Ncol,Nnzero,Nrhs;
+ int Rhsperline, Rhswidth, Rhsprec;
+ int Rhsflag;
+ char Title[73], Key[9], Type[4], Rhstype[4];
+ char Ptrfmt[17], Indfmt[17], Valfmt[21];
+
+ if ((in_file = fopen( filename, "r")) == NULL) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+
+ *Rhsfmt = (char *)malloc(21*sizeof(char));
+ if ( *Rhsfmt == NULL ) IOHBTerminate("Insufficient memory for Rhsfmt.");
+ readHB_header(in_file, Title, Key, Type, &Nrow, &Ncol, &Nnzero, &Nrhs,
+ Ptrfmt, Indfmt, Valfmt, (*Rhsfmt),
+ &Ptrcrd, &Indcrd, &Valcrd, &Rhscrd, Rhstype);
+ fclose(in_file);
+ if ( Nrhs == 0 ) {
+ fprintf(stderr,"Warn: Requested read of aux vector(s) when none are present.\n");
+ return 0;
+ } else {
+ ParseRfmt(*Rhsfmt,&Rhsperline,&Rhswidth,&Rhsprec,&Rhsflag);
+ if ( Type[0] == 'C' ) {
+ fprintf(stderr, "Warning: Reading complex aux vector(s) from HB file %s.",filename);
+ fprintf(stderr, " Real and imaginary parts will be interlaced in b[].");
+ *b = (char *)malloc(Nrow*Nrhs*Rhswidth*sizeof(char)*2);
+ if ( *b == NULL ) IOHBTerminate("Insufficient memory for rhs.\n");
+ return readHB_aux_char(filename, AuxType, *b);
+ } else {
+ *b = (char *)malloc(Nrow*Nrhs*Rhswidth*sizeof(char));
+ if ( *b == NULL ) IOHBTerminate("Insufficient memory for rhs.\n");
+ return readHB_aux_char(filename, AuxType, *b);
+ }
+ }
+}
+
+int writeHB_mat_char(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const char val[], int Nrhs, const char rhs[],
+ const char guess[], const char exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype)
+{
+/****************************************************************************/
+/* The writeHB function opens the named file and writes the specified */
+/* matrix and optional right-hand-side(s) to that file in Harwell-Boeing */
+/* format. */
+/* */
+/* For a description of the Harwell Boeing standard, see: */
+/* Duff, et al., ACM TOMS Vol.15, No.1, March 1989 */
+/* */
+/****************************************************************************/
+ FILE *out_file;
+ int i,j,acount,linemod,entry,offset;
+ int totcrd, ptrcrd, indcrd, valcrd, rhscrd;
+ int nvalentries, nrhsentries;
+ int Ptrperline, Ptrwidth, Indperline, Indwidth;
+ int Rhsperline, Rhswidth, Rhsprec;
+ int Rhsflag;
+ int Valperline = 1, Valwidth, Valprec;
+ int Valflag; /* Indicates 'E','D', or 'F' float format */
+ char pformat[16],iformat[16],vformat[19],rformat[19];
+
+ if ( Type[0] == 'C' ) {
+ nvalentries = 2*nz;
+ nrhsentries = 2*M;
+ } else {
+ nvalentries = nz;
+ nrhsentries = M;
+ }
+
+ if ( filename != NULL ) {
+ if ( (out_file = fopen( filename, "w")) == NULL ) {
+ fprintf(stderr,"Error: Cannot open file: %s\n",filename);
+ return 0;
+ }
+ } else out_file = stdout;
+
+ if ( Ptrfmt == NULL ) Ptrfmt = "(8I10)";
+ ParseIfmt(Ptrfmt,&Ptrperline,&Ptrwidth);
+ sprintf(pformat,"%%%dd",Ptrwidth);
+
+ if ( Indfmt == NULL ) Indfmt = Ptrfmt;
+ ParseIfmt(Indfmt,&Indperline,&Indwidth);
+ sprintf(iformat,"%%%dd",Indwidth);
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+ if ( Valfmt == NULL ) Valfmt = "(4E20.13)";
+ ParseRfmt(Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
+ sprintf(vformat,"%%%ds",Valwidth);
+ }
+
+ ptrcrd = (N+1)/Ptrperline;
+ if ( (N+1)%Ptrperline != 0) ptrcrd++;
+
+ indcrd = nz/Indperline;
+ if ( nz%Indperline != 0) indcrd++;
+
+ valcrd = nvalentries/Valperline;
+ if ( nvalentries%Valperline != 0) valcrd++;
+
+ if ( Nrhs > 0 ) {
+ if ( Rhsfmt == NULL ) Rhsfmt = Valfmt;
+ ParseRfmt(Rhsfmt,&Rhsperline,&Rhswidth,&Rhsprec, &Rhsflag);
+ sprintf(rformat,"%%%ds",Rhswidth);
+ rhscrd = nrhsentries/Rhsperline;
+ if ( nrhsentries%Rhsperline != 0) rhscrd++;
+ if ( Rhstype[1] == 'G' ) rhscrd+=rhscrd;
+ if ( Rhstype[2] == 'X' ) rhscrd+=rhscrd;
+ rhscrd*=Nrhs;
+ } else rhscrd = 0;
+
+ totcrd = 4+ptrcrd+indcrd+valcrd+rhscrd;
+
+
+/* Print header information: */
+
+ fprintf(out_file,"%-72s%-8s\n%14d%14d%14d%14d%14d\n",Title, Key, totcrd,
+ ptrcrd, indcrd, valcrd, rhscrd);
+ fprintf(out_file,"%3s%11s%14d%14d%14d\n",Type," ", M, N, nz);
+ fprintf(out_file,"%-16s%-16s%-20s", Ptrfmt, Indfmt, Valfmt);
+ if ( Nrhs != 0 ) {
+/* Print Rhsfmt on fourth line and */
+/* optional fifth header line for auxillary vector information: */
+ fprintf(out_file,"%-20s\n%-14s%d\n",Rhsfmt,Rhstype,Nrhs);
+ } else fprintf(out_file,"\n");
+
+ offset = 1-_SP_base; /* if base 0 storage is declared (via macro definition), */
+ /* then storage entries are offset by 1 */
+
+/* Print column pointers: */
+ for (i=0;i<N+1;i++)
+ {
+ entry = colptr[i]+offset;
+ fprintf(out_file,pformat,entry);
+ if ( (i+1)%Ptrperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( (N+1) % Ptrperline != 0 ) fprintf(out_file,"\n");
+
+/* Print row indices: */
+ for (i=0;i<nz;i++)
+ {
+ entry = rowind[i]+offset;
+ fprintf(out_file,iformat,entry);
+ if ( (i+1)%Indperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( nz % Indperline != 0 ) fprintf(out_file,"\n");
+
+/* Print values: */
+
+ if ( Type[0] != 'P' ) { /* Skip if pattern only */
+ for (i=0;i<nvalentries;i++)
+ {
+ fprintf(out_file,vformat,val+i*Valwidth);
+ if ( (i+1)%Valperline == 0 ) fprintf(out_file,"\n");
+ }
+
+ if ( nvalentries % Valperline != 0 ) fprintf(out_file,"\n");
+
+/* Print right hand sides: */
+ acount = 1;
+ linemod=0;
+ if ( Nrhs > 0 ) {
+ for (j=0;j<Nrhs;j++) {
+ for (i=0;i<nrhsentries;i++)
+ {
+ fprintf(out_file,rformat,rhs+i*Rhswidth);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ if ( Rhstype[1] == 'G' ) {
+ for (i=0;i<nrhsentries;i++)
+ {
+ fprintf(out_file,rformat,guess+i*Rhswidth);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ }
+ if ( Rhstype[2] == 'X' ) {
+ for (i=0;i<nrhsentries;i++)
+ {
+ fprintf(out_file,rformat,exact+i*Rhswidth);
+ if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
+ }
+ if ( acount%Rhsperline != linemod ) {
+ fprintf(out_file,"\n");
+ linemod = (acount-1)%Rhsperline;
+ }
+ }
+ }
+ }
+
+ }
+
+ if ( fclose(out_file) != 0){
+ fprintf(stderr,"Error closing file in writeHB_mat_char().\n");
+ return 0;
+ } else return 1;
+
+}
+
+int ParseIfmt(char* fmt, int* perline, int* width)
+{
+/*************************************************/
+/* Parse an *integer* format field to determine */
+/* width and number of elements per line. */
+/*************************************************/
+ char *tmp;
+ if (fmt == NULL ) {
+ *perline = 0; *width = 0; return 0;
+ }
+ upcase(fmt);
+ tmp = strchr(fmt,'(');
+ tmp = substr(fmt,tmp - fmt + 1, strchr(fmt,'I') - tmp - 1);
+ *perline = atoi(tmp);
+ tmp = strchr(fmt,'I');
+ tmp = substr(fmt,tmp - fmt + 1, strchr(fmt,')') - tmp - 1);
+ return *width = atoi(tmp);
+}
+
+int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag)
+{
+/*************************************************/
+/* Parse a *real* format field to determine */
+/* width and number of elements per line. */
+/* Also sets flag indicating 'E' 'F' 'P' or 'D' */
+/* format. */
+/*************************************************/
+ char* tmp;
+ char* tmp2;
+ char* tmp3;
+ int len;
+
+ if (fmt == NULL ) {
+ *perline = 0;
+ *width = 0;
+ flag = NULL;
+ return 0;
+ }
+
+ upcase(fmt);
+ if (strchr(fmt,'(') != NULL) fmt = strchr(fmt,'(');
+ if (strchr(fmt,')') != NULL) {
+ tmp2 = strchr(fmt,')');
+ while ( strchr(tmp2+1,')') != NULL ) {
+ tmp2 = strchr(tmp2+1,')');
+ }
+ *(tmp2+1) = (int) NULL;
+ }
+ if (strchr(fmt,'P') != NULL) /* Remove any scaling factor, which */
+ { /* affects output only, not input */
+ if (strchr(fmt,'(') != NULL) {
+ tmp = strchr(fmt,'P');
+ if ( *(++tmp) == ',' ) tmp++;
+ tmp3 = strchr(fmt,'(')+1;
+ len = tmp-tmp3;
+ tmp2 = tmp3;
+ while ( *(tmp2+len) != (int) NULL ) {
+ *tmp2=*(tmp2+len);
+ tmp2++;
+ }
+ *(strchr(fmt,')')+1) = (int) NULL;
+ }
+ }
+ if (strchr(fmt,'E') != NULL) {
+ *flag = 'E';
+ } else if (strchr(fmt,'D') != NULL) {
+ *flag = 'D';
+ } else if (strchr(fmt,'F') != NULL) {
+ *flag = 'F';
+ } else {
+ fprintf(stderr,"Real format %s in H/B file not supported.\n",fmt);
+ return 0;
+ }
+ tmp = strchr(fmt,'(');
+ tmp = substr(fmt,tmp - fmt + 1, strchr(fmt,*flag) - tmp - 1);
+ *perline = atoi(tmp);
+ tmp = strchr(fmt,*flag);
+ if ( strchr(fmt,'.') ) {
+ *prec = atoi( substr( fmt, strchr(fmt,'.') - fmt + 1, strchr(fmt,')') - strchr(fmt,'.')-1) );
+ tmp = substr(fmt,tmp - fmt + 1, strchr(fmt,'.') - tmp - 1);
+ } else {
+ tmp = substr(fmt,tmp - fmt + 1, strchr(fmt,')') - tmp - 1);
+ }
+ return *width = atoi(tmp);
+}
+
+char* substr(const char* S, const int pos, const int len)
+{
+ int i;
+ char *SubS;
+ if ( pos+len <= strlen(S)) {
+ SubS = (char *)malloc(len+1);
+ if ( SubS == NULL ) IOHBTerminate("Insufficient memory for SubS.");
+ for (i=0;i<len;i++) SubS[i] = S[pos+i];
+ SubS[len] = (char) NULL;
+ } else {
+ SubS = NULL;
+ }
+ return SubS;
+}
+
+#include<ctype.h>
+void upcase(char* S)
+{
+/* Convert S to uppercase */
+ int i,len;
+ if ( S == NULL ) return;
+ len = strlen(S);
+ for (i=0;i< len;i++)
+ S[i] = toupper(S[i]);
+}
+
+void IOHBTerminate(const char* message)
+{
+ fprintf(stderr,"%s",message);
+ exit(1);
+}
+
diff --git a/src/boost/libs/graph/example/iohb.h b/src/boost/libs/graph/example/iohb.h
new file mode 100644
index 000000000..bf1bd60f6
--- /dev/null
+++ b/src/boost/libs/graph/example/iohb.h
@@ -0,0 +1,70 @@
+// (C) Copyright Jeremy Siek 2004
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef IOHB_H
+#define IOHB_H
+
+#include<stdio.h>
+#include<stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type,
+ int* Nrhs);
+
+int readHB_header(FILE* in_file, char* Title, char* Key, char* Type,
+ int* Nrow, int* Ncol, int* Nnzero, int* Nrhs,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ int* Ptrcrd, int* Indcrd, int* Valcrd, int* Rhscrd,
+ char *Rhstype);
+
+int readHB_mat_double(const char* filename, int colptr[], int rowind[],
+ double val[]);
+
+int readHB_newmat_double(const char* filename, int* M, int* N, int* nonzeros,
+ int** colptr, int** rowind, double** val);
+
+int readHB_aux_double(const char* filename, const char AuxType, double b[]);
+
+int readHB_newaux_double(const char* filename, const char AuxType, double** b);
+
+int writeHB_mat_double(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const double val[], int Nrhs, const double rhs[],
+ const double guess[], const double exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype);
+
+int readHB_mat_char(const char* filename, int colptr[], int rowind[],
+ char val[], char* Valfmt);
+
+int readHB_newmat_char(const char* filename, int* M, int* N, int* nonzeros, int** colptr,
+ int** rowind, char** val, char** Valfmt);
+
+int readHB_aux_char(const char* filename, const char AuxType, char b[]);
+
+int readHB_newaux_char(const char* filename, const char AuxType, char** b, char** Rhsfmt);
+
+int writeHB_mat_char(const char* filename, int M, int N,
+ int nz, const int colptr[], const int rowind[],
+ const char val[], int Nrhs, const char rhs[],
+ const char guess[], const char exact[],
+ const char* Title, const char* Key, const char* Type,
+ char* Ptrfmt, char* Indfmt, char* Valfmt, char* Rhsfmt,
+ const char* Rhstype);
+
+int ParseIfmt(char* fmt, int* perline, int* width);
+
+int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag);
+
+void IOHBTerminate(const char* message);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/boost/libs/graph/example/isomorphism.cpp b/src/boost/libs/graph/example/isomorphism.cpp
new file mode 100644
index 000000000..6a21520b4
--- /dev/null
+++ b/src/boost/libs/graph/example/isomorphism.cpp
@@ -0,0 +1,95 @@
+// (C) Copyright Jeremy Siek 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/isomorphism.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+#include <boost/graph/graph_utility.hpp>
+
+/*
+ Sample output:
+ isomorphic? 1
+ f: 9 10 11 0 1 3 2 4 6 8 7 5
+ */
+
+int main()
+{
+ using namespace boost;
+
+ const int n = 12;
+
+ typedef adjacency_list< vecS, listS, undirectedS,
+ property< vertex_index_t, int > >
+ graph_t;
+ graph_t g1(n), g2(n);
+
+ std::vector< graph_traits< graph_t >::vertex_descriptor > v1(n), v2(n);
+
+ property_map< graph_t, vertex_index_t >::type v1_index_map
+ = get(vertex_index, g1),
+ v2_index_map = get(vertex_index, g2);
+
+ graph_traits< graph_t >::vertex_iterator i, end;
+ int id = 0;
+ for (boost::tie(i, end) = vertices(g1); i != end; ++i, ++id)
+ {
+ put(v1_index_map, *i, id);
+ v1[id] = *i;
+ }
+ id = 0;
+ for (boost::tie(i, end) = vertices(g2); i != end; ++i, ++id)
+ {
+ put(v2_index_map, *i, id);
+ v2[id] = *i;
+ }
+ add_edge(v1[0], v1[1], g1);
+ add_edge(v1[1], v1[2], g1);
+ add_edge(v1[0], v1[2], g1);
+ add_edge(v1[3], v1[4], g1);
+ add_edge(v1[4], v1[5], g1);
+ add_edge(v1[5], v1[6], g1);
+ add_edge(v1[6], v1[3], g1);
+ add_edge(v1[7], v1[8], g1);
+ add_edge(v1[8], v1[9], g1);
+ add_edge(v1[9], v1[10], g1);
+ add_edge(v1[10], v1[11], g1);
+ add_edge(v1[11], v1[7], g1);
+
+ add_edge(v2[9], v2[10], g2);
+ add_edge(v2[10], v2[11], g2);
+ add_edge(v2[11], v2[9], g2);
+ add_edge(v2[0], v2[1], g2);
+ add_edge(v2[1], v2[3], g2);
+ add_edge(v2[3], v2[2], g2);
+ add_edge(v2[2], v2[0], g2);
+ add_edge(v2[4], v2[5], g2);
+ add_edge(v2[5], v2[7], g2);
+ add_edge(v2[7], v2[8], g2);
+ add_edge(v2[8], v2[6], g2);
+ add_edge(v2[6], v2[4], g2);
+
+ std::vector< graph_traits< graph_t >::vertex_descriptor > f(n);
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ bool ret = isomorphism(g1, g2,
+ make_iterator_property_map(f.begin(), v1_index_map, f[0]),
+ degree_vertex_invariant(), get(vertex_index, g1),
+ get(vertex_index, g2));
+#else
+ bool ret = isomorphism(g1, g2,
+ isomorphism_map(
+ make_iterator_property_map(f.begin(), v1_index_map, f[0])));
+#endif
+ std::cout << "isomorphic? " << ret << std::endl;
+
+ std::cout << "f: ";
+ for (std::size_t v = 0; v != f.size(); ++v)
+ std::cout << get(get(vertex_index, g2), f[v]) << " ";
+ std::cout << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/iteration_macros.cpp b/src/boost/libs/graph/example/iteration_macros.cpp
new file mode 100644
index 000000000..ef2b08b27
--- /dev/null
+++ b/src/boost/libs/graph/example/iteration_macros.cpp
@@ -0,0 +1,65 @@
+//=======================================================================
+// Copyright 2001 Indiana University.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+// Without this we get hard errors, not warnings:
+#pragma warning(disable : 4703)
+#endif
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/iteration_macros.hpp>
+#include <iostream>
+
+enum family
+{
+ Jeanie,
+ Debbie,
+ Rick,
+ John,
+ Amanda,
+ Margaret,
+ Benjamin,
+ N
+};
+
+int main()
+{
+ using namespace boost;
+ const char* name[] = { "Jeanie", "Debbie", "Rick", "John", "Amanda",
+ "Margaret", "Benjamin" };
+
+ adjacency_list<> g(N);
+ add_edge(Jeanie, Debbie, g);
+ add_edge(Jeanie, Rick, g);
+ add_edge(Jeanie, John, g);
+ add_edge(Debbie, Amanda, g);
+ add_edge(Rick, Margaret, g);
+ add_edge(John, Benjamin, g);
+
+ graph_traits< adjacency_list<> >::vertex_iterator i, end;
+ graph_traits< adjacency_list<> >::adjacency_iterator ai, a_end;
+ property_map< adjacency_list<>, vertex_index_t >::type index_map
+ = get(vertex_index, g);
+
+ BGL_FORALL_VERTICES(i, g, adjacency_list<>)
+ {
+ std::cout << name[get(index_map, i)];
+
+ if (out_degree(i, g) == 0)
+ std::cout << " has no children";
+ else
+ std::cout << " is the parent of ";
+
+ BGL_FORALL_ADJ(i, j, g, adjacency_list<>)
+ std::cout << name[get(index_map, j)] << ", ";
+ std::cout << std::endl;
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/iterator-property-map-eg.cpp b/src/boost/libs/graph/example/iterator-property-map-eg.cpp
new file mode 100644
index 000000000..a14923667
--- /dev/null
+++ b/src/boost/libs/graph/example/iterator-property-map-eg.cpp
@@ -0,0 +1,21 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/property_map/property_map.hpp>
+
+int main()
+{
+ using namespace boost;
+ double x[] = { 0.2, 4.5, 3.2 };
+ iterator_property_map< double*, identity_property_map, double, double& >
+ pmap(x);
+ std::cout << "x[1] = " << get(pmap, 1) << std::endl;
+ put(pmap, 0, 1.7);
+ std::cout << "x[0] = " << pmap[0] << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/johnson-eg.cpp b/src/boost/libs/graph/example/johnson-eg.cpp
new file mode 100644
index 000000000..90d22b280
--- /dev/null
+++ b/src/boost/libs/graph/example/johnson-eg.cpp
@@ -0,0 +1,83 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <vector>
+#include <iomanip>
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/johnson_all_pairs_shortest.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_weight_t, int, property< edge_weight2_t, int > > >
+ Graph;
+ const int V = 6;
+ typedef std::pair< int, int > Edge;
+ Edge edge_array[] = { Edge(0, 1), Edge(0, 2), Edge(0, 3), Edge(0, 4),
+ Edge(0, 5), Edge(1, 2), Edge(1, 5), Edge(1, 3), Edge(2, 4), Edge(2, 5),
+ Edge(3, 2), Edge(4, 3), Edge(4, 1), Edge(5, 4) };
+ const std::size_t E = sizeof(edge_array) / sizeof(Edge);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ Graph g(V);
+ for (std::size_t j = 0; j < E; ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ Graph g(edge_array, edge_array + E, V);
+#endif
+
+ property_map< Graph, edge_weight_t >::type w = get(edge_weight, g);
+ int weights[] = { 0, 0, 0, 0, 0, 3, -4, 8, 1, 7, 4, -5, 2, 6 };
+ int* wp = weights;
+
+ graph_traits< Graph >::edge_iterator e, e_end;
+ for (boost::tie(e, e_end) = edges(g); e != e_end; ++e)
+ w[*e] = *wp++;
+
+ std::vector< int > d(V, (std::numeric_limits< int >::max)());
+ int D[V][V];
+ johnson_all_pairs_shortest_paths(g, D, distance_map(&d[0]));
+
+ std::cout << " ";
+ for (int k = 0; k < V; ++k)
+ std::cout << std::setw(5) << k;
+ std::cout << std::endl;
+ for (int i = 0; i < V; ++i)
+ {
+ std::cout << std::setw(3) << i << " -> ";
+ for (int j = 0; j < V; ++j)
+ {
+ if (D[i][j] == (std::numeric_limits< int >::max)())
+ std::cout << std::setw(5) << "inf";
+ else
+ std::cout << std::setw(5) << D[i][j];
+ }
+ std::cout << std::endl;
+ }
+
+ std::ofstream fout("figs/johnson-eg.dot");
+ fout << "digraph A {\n"
+ << " rankdir=LR\n"
+ << "size=\"5,3\"\n"
+ << "ratio=\"fill\"\n"
+ << "edge[style=\"bold\"]\n"
+ << "node[shape=\"circle\"]\n";
+
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ fout << source(*ei, g) << " -> " << target(*ei, g)
+ << "[label=" << get(edge_weight, g)[*ei] << "]\n";
+
+ fout << "}\n";
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/johnson.expected b/src/boost/libs/graph/example/johnson.expected
new file mode 100644
index 000000000..c97e53e1a
--- /dev/null
+++ b/src/boost/libs/graph/example/johnson.expected
@@ -0,0 +1,7 @@
+ 0 1 2 3 4 5
+0 -> 0 0 -1 -5 0 -4
+1 -> inf 0 1 -3 2 -4
+2 -> inf 3 0 -4 1 -1
+3 -> inf 7 4 0 5 3
+4 -> inf 2 -1 -5 0 -2
+5 -> inf 8 5 1 6 0
diff --git a/src/boost/libs/graph/example/kevin-bacon.cpp b/src/boost/libs/graph/example/kevin-bacon.cpp
new file mode 100644
index 000000000..1ee274db0
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin-bacon.cpp
@@ -0,0 +1,124 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/tokenizer.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <map>
+
+using namespace boost;
+
+template < typename DistanceMap >
+class bacon_number_recorder : public default_bfs_visitor
+{
+public:
+ bacon_number_recorder(DistanceMap dist) : d(dist) {}
+
+ template < typename Edge, typename Graph >
+ void tree_edge(Edge e, const Graph& g) const
+ {
+ typename graph_traits< Graph >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ d[v] = d[u] + 1;
+ }
+
+private:
+ DistanceMap d;
+};
+
+// Convenience function
+template < typename DistanceMap >
+bacon_number_recorder< DistanceMap > record_bacon_number(DistanceMap d)
+{
+ return bacon_number_recorder< DistanceMap >(d);
+}
+
+int main(int argc, const char** argv)
+{
+ std::ifstream datafile(argc >= 2 ? argv[1] : "./kevin-bacon.dat");
+ if (!datafile)
+ {
+ std::cerr << "No ./kevin-bacon.dat file" << std::endl;
+ return EXIT_FAILURE;
+ }
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_name_t, std::string >,
+ property< edge_name_t, std::string > >
+ Graph;
+ Graph g;
+
+ typedef property_map< Graph, vertex_name_t >::type actor_name_map_t;
+ actor_name_map_t actor_name = get(vertex_name, g);
+ typedef property_map< Graph, edge_name_t >::type movie_name_map_t;
+ movie_name_map_t connecting_movie = get(edge_name, g);
+
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef std::map< std::string, Vertex > NameVertexMap;
+ NameVertexMap actors;
+
+ for (std::string line; std::getline(datafile, line);)
+ {
+ char_delimiters_separator< char > sep(false, "", ";");
+ tokenizer<> line_toks(line, sep);
+ tokenizer<>::iterator i = line_toks.begin();
+ std::string actors_name = *i++;
+ NameVertexMap::iterator pos;
+ bool inserted;
+ Vertex u, v;
+ boost::tie(pos, inserted)
+ = actors.insert(std::make_pair(actors_name, Vertex()));
+ if (inserted)
+ {
+ u = add_vertex(g);
+ actor_name[u] = actors_name;
+ pos->second = u;
+ }
+ else
+ u = pos->second;
+
+ std::string movie_name = *i++;
+
+ boost::tie(pos, inserted) = actors.insert(std::make_pair(*i, Vertex()));
+ if (inserted)
+ {
+ v = add_vertex(g);
+ actor_name[v] = *i;
+ pos->second = v;
+ }
+ else
+ v = pos->second;
+
+ graph_traits< Graph >::edge_descriptor e;
+ boost::tie(e, inserted) = add_edge(u, v, g);
+ if (inserted)
+ connecting_movie[e] = movie_name;
+ }
+
+ std::vector< int > bacon_number(num_vertices(g));
+
+ Vertex src = actors["Kevin Bacon"];
+ bacon_number[src] = 0;
+
+ breadth_first_search(
+ g, src, visitor(record_bacon_number(&bacon_number[0])));
+
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ std::cout << actor_name[*i] << " has a Bacon number of "
+ << bacon_number[*i] << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/kevin-bacon.dat b/src/boost/libs/graph/example/kevin-bacon.dat
new file mode 100644
index 000000000..de17569d1
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin-bacon.dat
@@ -0,0 +1,50 @@
+William Shatner;Loaded Weapon 1 (1993);Denise Richards
+Denise Richards;Wild Things (1998);Kevin Bacon
+Patrick Stewart;Prince of Egypt, The (1998);Steve Martin
+Steve Martin;Novocaine (2000);Kevin Bacon
+Gerard Depardieu;Unhook the Stars (1996);Clint Howard
+Clint Howard;My Dog Skip (2000);Kevin Bacon
+Sean Astin;White Water Summer (1987);Kevin Bacon
+Theodore Hesburgh;Rudy (1993);Gerry Becker
+Gerry Becker;Sleepers (1996);Kevin Bacon
+Henry Fonda;Midway (1976);Robert Wagner
+Robert Wagner;Wild Things (1998);Kevin Bacon
+Mark Hamill;Slipstream (1989);Bill Paxton
+Bill Paxton;Apollo 13 (1995);Kevin Bacon
+Harrison Ford;Random Hearts (1999);Steve Altes
+Steve Altes;Hollow Man (2000);Kevin Bacon
+Alec Guinness;Kafka (1991);Theresa Russell
+Theresa Russell;Wild Things (1998);Kevin Bacon
+Carrie Fisher;Soapdish (1991);Elisabeth Shue
+Elisabeth Shue;Hollow Man (2000);Kevin Bacon
+Sean Connery;Rising Sun (1993);Peter Crombie
+Peter Crombie;My Dog Skip (2000);Kevin Bacon
+Dana Young;Bersaglio mobile (1967);Bebe Drake
+Bebe Drake;Report to the Commissioner (1975);William Devane
+A. Paliakov;Kutuzov (1944);Nikolai Brilling
+Nikolai Brilling;Otello (1955);Kathleen Byron
+Kathleen Byron;Saving Private Ryan (1998);Tom Hanks
+Tom Hanks;Apollo 13 (1995);Kevin Bacon
+Zoya Barantsevich;Slesar i kantzler (1923);Nikolai Panov
+Nikolai Panov;Zhenshchina s kinzhalom (1916);Zoia Karabanova
+Zoia Karabanova;Song to Remember, A (1945);William Challee
+William Challee;Irish Whiskey Rebellion (1972);William Devane
+William Devane;Hollow Man (2000);Kevin Bacon
+P. Biryukov;Pikovaya dama (1910);Aleksandr Gromov
+Aleksandr Gromov;Tikhij Don (1930);Yelena Maksimova
+Yelena Maksimova;Bezottsovshchina (1976);Lev Prygunov
+Lev Prygunov;Saint, The (1997);Elisabeth Shue
+Yelena Chaika;Ostrov zabenya (1917);Viktor Tourjansky
+Viktor Tourjansky;Zagrobnaya skitalitsa (1915);Olga Baclanova
+Olga Baclanova;Freaks (1932);Angelo Rossitto
+Angelo Rossitto;Dark, The (1979);William Devane
+Christel Holch;Hvide Slavehandel, Den (1910/I);Aage Schmidt
+Aage Schmidt;Begyndte ombord, Det (1937);Valso Holm
+Valso Holm;Spion 503 (1958);Max von Sydow
+Max von Sydow;Judge Dredd (1995);Diane Lane
+Diane Lane;My Dog Skip (2000);Kevin Bacon
+Val Kilmer;Saint, The (1997);Elisabeth Shue
+Marilyn Monroe;Niagara (1953);George Ives
+George Ives;Stir of Echoes (1999);Kevin Bacon
+Jacques Perrin;Deserto dei tartari, Il (1976);Vittorio Gassman
+Vittorio Gassman;Sleepers (1996);Kevin Bacon
diff --git a/src/boost/libs/graph/example/kevin-bacon2.cpp b/src/boost/libs/graph/example/kevin-bacon2.cpp
new file mode 100644
index 000000000..b52d4462c
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin-bacon2.cpp
@@ -0,0 +1,109 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT:
+ ~~~~~~~~~~
+
+ This example appears to be broken and crashes at runtime, see
+ https://github.com/boostorg/graph/issues/148
+
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/tuple/tuple.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <map>
+#include <boost/graph/adj_list_serialize.hpp>
+#include <boost/archive/text_iarchive.hpp>
+#include <boost/serialization/string.hpp>
+
+struct vertex_properties
+{
+ std::string name;
+
+ template < class Archive >
+ void serialize(Archive& ar, const unsigned int version)
+ {
+ ar& name;
+ }
+};
+
+struct edge_properties
+{
+ std::string name;
+
+ template < class Archive >
+ void serialize(Archive& ar, const unsigned int version)
+ {
+ ar& name;
+ }
+};
+
+using namespace boost;
+
+typedef adjacency_list< vecS, vecS, undirectedS, vertex_properties,
+ edge_properties >
+ Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+class bacon_number_recorder : public default_bfs_visitor
+{
+public:
+ bacon_number_recorder(int* dist) : d(dist) {}
+
+ void tree_edge(Edge e, const Graph& g) const
+ {
+ Vertex u = source(e, g), v = target(e, g);
+ d[v] = d[u] + 1;
+ }
+
+private:
+ int* d;
+};
+
+int main(int argc, const char** argv)
+{
+ std::ifstream ifs(argc >= 2 ? argv[1] : "./kevin-bacon2.dat");
+ if (!ifs)
+ {
+ std::cerr << "No ./kevin-bacon2.dat file" << std::endl;
+ return EXIT_FAILURE;
+ }
+ archive::text_iarchive ia(ifs);
+ Graph g;
+ ia >> g;
+
+ std::vector< int > bacon_number(num_vertices(g));
+
+ // Get the vertex for Kevin Bacon
+ Vertex src;
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ if (g[*i].name == "Kevin Bacon")
+ src = *i;
+
+ // Set Kevin's number to zero
+ bacon_number[src] = 0;
+
+ // Perform a breadth first search to compute everyone' Bacon number.
+ breadth_first_search(
+ g, src, visitor(bacon_number_recorder(&bacon_number[0])));
+
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ std::cout << g[*i].name << " has a Bacon number of " << bacon_number[*i]
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/kevin-bacon2.dat b/src/boost/libs/graph/example/kevin-bacon2.dat
new file mode 100644
index 000000000..61eb61735
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin-bacon2.dat
@@ -0,0 +1 @@
+22 serialization::archive 3 0 0 51 50 0 0 15 William Shatner 15 Denise Richards 11 Kevin Bacon 15 Patrick Stewart 12 Steve Martin 16 Gerard Depardieu 12 Clint Howard 10 Sean Astin 17 Theodore Hesburgh 12 Gerry Becker 11 Henry Fonda 13 Robert Wagner 11 Mark Hamill 11 Bill Paxton 13 Harrison Ford 11 Steve Altes 13 Alec Guinness 15 Theresa Russell 13 Carrie Fisher 14 Elisabeth Shue 12 Sean Connery 13 Peter Crombie 10 Dana Young 10 Bebe Drake 14 William Devane 11 A. Paliakov 16 Nikolai Brilling 14 Kathleen Byron 9 Tom Hanks 17 Zoya Barantsevich 13 Nikolai Panov 15 Zoia Karabanova 15 William Challee 11 P. Biryukov 16 Aleksandr Gromov 16 Yelena Maksimova 12 Lev Prygunov 13 Yelena Chaika 17 Viktor Tourjansky 14 Olga Baclanova 15 Angelo Rossitto 14 Christel Holch 12 Aage Schmidt 10 Valso Holm 13 Max von Sydow 10 Diane Lane 10 Val Kilmer 14 Marilyn Monroe 11 George Ives 14 Jacques Perrin 16 Vittorio Gassman 0 1 0 0 22 Loaded Weapon 1 (1993) 1 2 18 Wild Things (1998) 3 4 27 Prince of Egypt, The (1998) 4 2 16 Novocaine (2000) 5 6 23 Unhook the Stars (1996) 6 2 18 My Dog Skip (2000) 7 2 25 White Water Summer (1987) 8 9 11 Rudy (1993) 9 2 15 Sleepers (1996) 10 11 13 Midway (1976) 11 2 18 Wild Things (1998) 12 13 17 Slipstream (1989) 13 2 16 Apollo 13 (1995) 14 15 20 Random Hearts (1999) 15 2 17 Hollow Man (2000) 16 17 12 Kafka (1991) 17 2 18 Wild Things (1998) 18 19 15 Soapdish (1991) 19 2 17 Hollow Man (2000) 20 21 17 Rising Sun (1993) 21 2 18 My Dog Skip (2000) 22 23 23 Bersaglio mobile (1967) 23 24 33 Report to the Commissioner (1975) 25 26 14 Kutuzov (1944) 26 27 13 Otello (1955) 27 28 26 Saving Private Ryan (1998) 28 2 16 Apollo 13 (1995) 29 30 24 Slesar i kantzler (1923) 30 31 30 Zhenshchina s kinzhalom (1916) 31 32 26 Song to Remember, A (1945) 32 24 30 Irish Whiskey Rebellion (1972) 24 2 17 Hollow Man (2000) 33 34 20 Pikovaya dama (1910) 34 35 17 Tikhij Don (1930) 35 36 23 Bezottsovshchina (1976) 36 19 17 Saint, The (1997) 37 38 21 Ostrov zabenya (1917) 38 39 28 Zagrobnaya skitalitsa (1915) 39 40 13 Freaks (1932) 40 24 16 Dark, The (1979) 41 42 31 Hvide Slavehandel, Den (1910/I) 42 43 27 Begyndte ombord, Det (1937) 43 44 16 Spion 503 (1958) 44 45 18 Judge Dredd (1995) 45 2 18 My Dog Skip (2000) 46 19 17 Saint, The (1997) 47 48 14 Niagara (1953) 48 2 21 Stir of Echoes (1999) 49 50 30 Deserto dei tartari, Il (1976) 50 2 15 Sleepers (1996) \ No newline at end of file
diff --git a/src/boost/libs/graph/example/kevin-bacon2.expected b/src/boost/libs/graph/example/kevin-bacon2.expected
new file mode 100644
index 000000000..2e6c471cb
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin-bacon2.expected
@@ -0,0 +1,51 @@
+William Shatner has a Bacon number of 2
+Denise Richards has a Bacon number of 1
+Kevin Bacon has a Bacon number of 0
+Patrick Stewart has a Bacon number of 2
+Steve Martin has a Bacon number of 1
+Gerard Depardieu has a Bacon number of 2
+Clint Howard has a Bacon number of 1
+Sean Astin has a Bacon number of 1
+Theodore Hesburgh has a Bacon number of 2
+Gerry Becker has a Bacon number of 1
+Henry Fonda has a Bacon number of 2
+Robert Wagner has a Bacon number of 1
+Mark Hamill has a Bacon number of 2
+Bill Paxton has a Bacon number of 1
+Harrison Ford has a Bacon number of 2
+Steve Altes has a Bacon number of 1
+Alec Guinness has a Bacon number of 2
+Theresa Russell has a Bacon number of 1
+Carrie Fisher has a Bacon number of 2
+Elisabeth Shue has a Bacon number of 1
+Sean Connery has a Bacon number of 2
+Peter Crombie has a Bacon number of 1
+Dana Young has a Bacon number of 3
+Bebe Drake has a Bacon number of 2
+William Devane has a Bacon number of 1
+A. Paliakov has a Bacon number of 4
+Nikolai Brilling has a Bacon number of 3
+Kathleen Byron has a Bacon number of 2
+Tom Hanks has a Bacon number of 1
+Zoya Barantsevich has a Bacon number of 5
+Nikolai Panov has a Bacon number of 4
+Zoia Karabanova has a Bacon number of 3
+William Challee has a Bacon number of 2
+P. Biryukov has a Bacon number of 5
+Aleksandr Gromov has a Bacon number of 4
+Yelena Maksimova has a Bacon number of 3
+Lev Prygunov has a Bacon number of 2
+Yelena Chaika has a Bacon number of 5
+Viktor Tourjansky has a Bacon number of 4
+Olga Baclanova has a Bacon number of 3
+Angelo Rossitto has a Bacon number of 2
+Christel Holch has a Bacon number of 5
+Aage Schmidt has a Bacon number of 4
+Valso Holm has a Bacon number of 3
+Max von Sydow has a Bacon number of 2
+Diane Lane has a Bacon number of 1
+Val Kilmer has a Bacon number of 2
+Marilyn Monroe has a Bacon number of 2
+George Ives has a Bacon number of 1
+Jacques Perrin has a Bacon number of 2
+Vittorio Gassman has a Bacon number of 1
diff --git a/src/boost/libs/graph/example/kevin_bacon.expected b/src/boost/libs/graph/example/kevin_bacon.expected
new file mode 100644
index 000000000..c49f55c63
--- /dev/null
+++ b/src/boost/libs/graph/example/kevin_bacon.expected
@@ -0,0 +1,101 @@
+William Shatner was in Loaded Weapon 1 (1993) with Denise Richards
+Denise Richards was in Wild Things (1998) with Kevin Bacon
+Patrick Stewart was in Prince of Egypt, The (1998) with Steve Martin
+Steve Martin was in Novocaine (2000) with Kevin Bacon
+Gerard Depardieu was in Unhook the Stars (1996) with Clint Howard
+Clint Howard was in My Dog Skip (2000) with Kevin Bacon
+Sean Astin was in White Water Summer (1987) with Kevin Bacon
+Theodore Hesburgh was in Rudy (1993) with Gerry Becker
+Gerry Becker was in Sleepers (1996) with Kevin Bacon
+Henry Fonda was in Midway (1976) with Robert Wagner
+Robert Wagner was in Wild Things (1998) with Kevin Bacon
+Mark Hamill was in Slipstream (1989) with Bill Paxton
+Bill Paxton was in Apollo 13 (1995) with Kevin Bacon
+Harrison Ford was in Random Hearts (1999) with Steve Altes
+Steve Altes was in Hollow Man (2000) with Kevin Bacon
+Alec Guinness was in Kafka (1991) with Theresa Russell
+Theresa Russell was in Wild Things (1998) with Kevin Bacon
+Carrie Fisher was in Soapdish (1991) with Elisabeth Shue
+Elisabeth Shue was in Hollow Man (2000) with Kevin Bacon
+Sean Connery was in Rising Sun (1993) with Peter Crombie
+Peter Crombie was in My Dog Skip (2000) with Kevin Bacon
+Dana Young was in Bersaglio mobile (1967) with Bebe Drake
+Bebe Drake was in Report to the Commissioner (1975) with William Devane
+A. Paliakov was in Kutuzov (1944) with Nikolai Brilling
+Nikolai Brilling was in Otello (1955) with Kathleen Byron
+Kathleen Byron was in Saving Private Ryan (1998) with Tom Hanks
+Tom Hanks was in Apollo 13 (1995) with Kevin Bacon
+Zoya Barantsevich was in Slesar i kantzler (1923) with Nikolai Panov
+Nikolai Panov was in Zhenshchina s kinzhalom (1916) with Zoia Karabanova
+Zoia Karabanova was in Song to Remember, A (1945) with William Challee
+William Challee was in Irish Whiskey Rebellion (1972) with William Devane
+William Devane was in Hollow Man (2000) with Kevin Bacon
+P. Biryukov was in Pikovaya dama (1910) with Aleksandr Gromov
+Aleksandr Gromov was in Tikhij Don (1930) with Yelena Maksimova
+Yelena Maksimova was in Bezottsovshchina (1976) with Lev Prygunov
+Lev Prygunov was in Saint, The (1997) with Elisabeth Shue
+Yelena Chaika was in Ostrov zabenya (1917) with Viktor Tourjansky
+Viktor Tourjansky was in Zagrobnaya skitalitsa (1915) with Olga Baclanova
+Olga Baclanova was in Freaks (1932) with Angelo Rossitto
+Angelo Rossitto was in Dark, The (1979) with William Devane
+Christel Holch was in Hvide Slavehandel, Den (1910/I) with Aage Schmidt
+Aage Schmidt was in Begyndte ombord, Det (1937) with Valso Holm
+Valso Holm was in Spion 503 (1958) with Max von Sydow
+Max von Sydow was in Judge Dredd (1995) with Diane Lane
+Diane Lane was in My Dog Skip (2000) with Kevin Bacon
+Val Kilmer was in Saint, The (1997) with Elisabeth Shue
+Marilyn Monroe was in Niagara (1953) with George Ives
+George Ives was in Stir of Echoes (1999) with Kevin Bacon
+Jacques Perrin was in Deserto dei tartari, Il (1976) with Vittorio Gassman
+Vittorio Gassman was in Sleepers (1996) with Kevin Bacon
+William Shatner's bacon number is 2
+Denise Richards's bacon number is 1
+Kevin Bacon's bacon number is 0
+Patrick Stewart's bacon number is 2
+Steve Martin's bacon number is 1
+Gerard Depardieu's bacon number is 2
+Clint Howard's bacon number is 1
+Sean Astin's bacon number is 1
+Theodore Hesburgh's bacon number is 2
+Gerry Becker's bacon number is 1
+Henry Fonda's bacon number is 2
+Robert Wagner's bacon number is 1
+Mark Hamill's bacon number is 2
+Bill Paxton's bacon number is 1
+Harrison Ford's bacon number is 2
+Steve Altes's bacon number is 1
+Alec Guinness's bacon number is 2
+Theresa Russell's bacon number is 1
+Carrie Fisher's bacon number is 2
+Elisabeth Shue's bacon number is 1
+Sean Connery's bacon number is 2
+Peter Crombie's bacon number is 1
+Dana Young's bacon number is 3
+Bebe Drake's bacon number is 2
+William Devane's bacon number is 1
+A. Paliakov's bacon number is 4
+Nikolai Brilling's bacon number is 3
+Kathleen Byron's bacon number is 2
+Tom Hanks's bacon number is 1
+Zoya Barantsevich's bacon number is 5
+Nikolai Panov's bacon number is 4
+Zoia Karabanova's bacon number is 3
+William Challee's bacon number is 2
+P. Biryukov's bacon number is 5
+Aleksandr Gromov's bacon number is 4
+Yelena Maksimova's bacon number is 3
+Lev Prygunov's bacon number is 2
+Yelena Chaika's bacon number is 5
+Viktor Tourjansky's bacon number is 4
+Olga Baclanova's bacon number is 3
+Angelo Rossitto's bacon number is 2
+Christel Holch's bacon number is 5
+Aage Schmidt's bacon number is 4
+Valso Holm's bacon number is 3
+Max von Sydow's bacon number is 2
+Diane Lane's bacon number is 1
+Val Kilmer's bacon number is 2
+Marilyn Monroe's bacon number is 2
+George Ives's bacon number is 1
+Jacques Perrin's bacon number is 2
+Vittorio Gassman's bacon number is 1
diff --git a/src/boost/libs/graph/example/king_ordering.cpp b/src/boost/libs/graph/example/king_ordering.cpp
new file mode 100644
index 000000000..9ef613009
--- /dev/null
+++ b/src/boost/libs/graph/example/king_ordering.cpp
@@ -0,0 +1,138 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+// Doug Gregor, D. Kevin McGrath
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/king_ordering.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/bandwidth.hpp>
+
+/*
+ Sample Output
+ original bandwidth: 8
+ Reverse Cuthill-McKee ordering starting at: 6
+ 8 3 0 9 2 5 1 4 7 6
+ bandwidth: 4
+ Reverse Cuthill-McKee ordering starting at: 0
+ 9 1 4 6 7 2 8 5 3 0
+ bandwidth: 4
+ Reverse Cuthill-McKee ordering:
+ 0 8 5 7 3 6 4 2 1 9
+ bandwidth: 4
+ */
+int main(int, char*[])
+{
+ using namespace boost;
+ using namespace std;
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_color_t, default_color_type,
+ property< vertex_degree_t, int > > >
+ Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+
+ typedef std::pair< std::size_t, std::size_t > Pair;
+ Pair edges[14] = { Pair(0, 3), // a-d
+ Pair(0, 5), // a-f
+ Pair(1, 2), // b-c
+ Pair(1, 4), // b-e
+ Pair(1, 6), // b-g
+ Pair(1, 9), // b-j
+ Pair(2, 3), // c-d
+ Pair(2, 4), // c-e
+ Pair(3, 5), // d-f
+ Pair(3, 8), // d-i
+ Pair(4, 6), // e-g
+ Pair(5, 6), // f-g
+ Pair(5, 7), // f-h
+ Pair(6, 7) }; // g-h
+
+ Graph G(10);
+ for (int i = 0; i < 14; ++i)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ graph_traits< Graph >::vertex_iterator ui, ui_end;
+
+ property_map< Graph, vertex_degree_t >::type deg = get(vertex_degree, G);
+ for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
+ deg[*ui] = degree(*ui, G);
+
+ property_map< Graph, vertex_index_t >::type index_map
+ = get(vertex_index, G);
+
+ std::cout << "original bandwidth: " << bandwidth(G) << std::endl;
+
+ std::vector< Vertex > inv_perm(num_vertices(G));
+ std::vector< size_type > perm(num_vertices(G));
+ {
+ Vertex s = vertex(6, G);
+ // king_ordering
+ king_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
+ get(vertex_degree, G), get(vertex_index, G));
+ cout << "King ordering starting at: " << s << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+ {
+ Vertex s = vertex(0, G);
+ // king_ordering
+ king_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
+ get(vertex_degree, G), get(vertex_index, G));
+ cout << "King ordering starting at: " << s << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+
+ {
+ // king_ordering
+ king_ordering(G, inv_perm.rbegin(), get(vertex_color, G),
+ make_degree_map(G), get(vertex_index, G));
+
+ cout << "King ordering:" << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = inv_perm.begin();
+ i != inv_perm.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != inv_perm.size(); ++c)
+ perm[index_map[inv_perm[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/knights_tour.cpp b/src/boost/libs/graph/example/knights_tour.cpp
new file mode 100644
index 000000000..31b8945e7
--- /dev/null
+++ b/src/boost/libs/graph/example/knights_tour.cpp
@@ -0,0 +1,286 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <stdlib.h>
+#include <iostream>
+#include <stack>
+#include <queue>
+#include <ctime>
+#include <boost/operators.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/property_map/property_map.hpp>
+
+using namespace boost;
+
+typedef std::pair< int, int > Position;
+Position knight_jumps[8]
+ = { Position(2, -1), Position(1, -2), Position(-1, -2), Position(-2, -1),
+ Position(-2, 1), Position(-1, 2), Position(1, 2), Position(2, 1) };
+
+Position operator+(const Position& p1, const Position& p2)
+{
+ return Position(p1.first + p2.first, p1.second + p2.second);
+}
+
+struct knights_tour_graph;
+struct knight_adjacency_iterator
+: public boost::forward_iterator_helper< knight_adjacency_iterator, Position,
+ std::ptrdiff_t, Position*, Position >
+{
+ knight_adjacency_iterator() {}
+ knight_adjacency_iterator(int ii, Position p, const knights_tour_graph& g)
+ : m_pos(p), m_g(&g), m_i(ii)
+ {
+ valid_position();
+ }
+ Position operator*() const { return m_pos + knight_jumps[m_i]; }
+ void operator++()
+ {
+ ++m_i;
+ valid_position();
+ }
+ bool operator==(const knight_adjacency_iterator& x) const
+ {
+ return m_i == x.m_i;
+ }
+
+protected:
+ void valid_position();
+ Position m_pos;
+ const knights_tour_graph* m_g;
+ int m_i;
+};
+
+struct knights_tour_graph
+{
+ typedef Position vertex_descriptor;
+ typedef std::pair< vertex_descriptor, vertex_descriptor > edge_descriptor;
+ typedef knight_adjacency_iterator adjacency_iterator;
+ typedef void out_edge_iterator;
+ typedef void in_edge_iterator;
+ typedef void edge_iterator;
+ typedef void vertex_iterator;
+ typedef int degree_size_type;
+ typedef int vertices_size_type;
+ typedef int edges_size_type;
+ typedef directed_tag directed_category;
+ typedef disallow_parallel_edge_tag edge_parallel_category;
+ typedef adjacency_graph_tag traversal_category;
+ knights_tour_graph(int n) : m_board_size(n) {}
+ int m_board_size;
+};
+int num_vertices(const knights_tour_graph& g)
+{
+ return g.m_board_size * g.m_board_size;
+}
+
+void knight_adjacency_iterator::valid_position()
+{
+ Position new_pos = m_pos + knight_jumps[m_i];
+ while (m_i < 8
+ && (new_pos.first < 0 || new_pos.second < 0
+ || new_pos.first >= m_g->m_board_size
+ || new_pos.second >= m_g->m_board_size))
+ {
+ ++m_i;
+ new_pos = m_pos + knight_jumps[m_i];
+ }
+}
+
+std::pair< knights_tour_graph::adjacency_iterator,
+ knights_tour_graph::adjacency_iterator >
+adjacent_vertices(
+ knights_tour_graph::vertex_descriptor v, const knights_tour_graph& g)
+{
+ typedef knights_tour_graph::adjacency_iterator Iter;
+ return std::make_pair(Iter(0, v, g), Iter(8, v, g));
+}
+
+struct compare_first
+{
+ template < typename P > bool operator()(const P& x, const P& y)
+ {
+ return x.first < y.first;
+ }
+};
+
+template < typename Graph, typename TimePropertyMap >
+bool backtracking_search(Graph& g,
+ typename graph_traits< Graph >::vertex_descriptor src,
+ TimePropertyMap time_map)
+{
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef std::pair< int, Vertex > P;
+ std::stack< P > S;
+ int time_stamp = 0;
+
+ S.push(std::make_pair(time_stamp, src));
+ while (!S.empty())
+ {
+ Vertex x;
+ boost::tie(time_stamp, x) = S.top();
+ put(time_map, x, time_stamp);
+ // all vertices have been visited, success!
+ if (time_stamp == num_vertices(g) - 1)
+ return true;
+
+ bool deadend = true;
+ typename graph_traits< Graph >::adjacency_iterator i, end;
+ for (boost::tie(i, end) = adjacent_vertices(x, g); i != end; ++i)
+ if (get(time_map, *i) == -1)
+ {
+ S.push(std::make_pair(time_stamp + 1, *i));
+ deadend = false;
+ }
+
+ if (deadend)
+ {
+ put(time_map, x, -1);
+ S.pop();
+ boost::tie(time_stamp, x) = S.top();
+ while (get(time_map, x) != -1)
+ { // unwind stack to last unexplored vertex
+ put(time_map, x, -1);
+ S.pop();
+ boost::tie(time_stamp, x) = S.top();
+ }
+ }
+
+ } // while (!S.empty())
+ return false;
+}
+
+template < typename Vertex, typename Graph, typename TimePropertyMap >
+int number_of_successors(Vertex x, Graph& g, TimePropertyMap time_map)
+{
+ int s_x = 0;
+ typename graph_traits< Graph >::adjacency_iterator i, end;
+ for (boost::tie(i, end) = adjacent_vertices(x, g); i != end; ++i)
+ if (get(time_map, *i) == -1)
+ ++s_x;
+ return s_x;
+}
+
+template < typename Graph, typename TimePropertyMap >
+bool warnsdorff(Graph& g, typename graph_traits< Graph >::vertex_descriptor src,
+ TimePropertyMap time_map)
+{
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef std::pair< int, Vertex > P;
+ std::stack< P > S;
+ int time_stamp = 0;
+
+ S.push(std::make_pair(time_stamp, src));
+ while (!S.empty())
+ {
+ Vertex x;
+ boost::tie(time_stamp, x) = S.top();
+ put(time_map, x, time_stamp);
+ // all vertices have been visited, success!
+ if (time_stamp == num_vertices(g) - 1)
+ return true;
+
+ // Put adjacent vertices into a local priority queue
+ std::priority_queue< P, std::vector< P >, compare_first > Q;
+ typename graph_traits< Graph >::adjacency_iterator i, end;
+ int num_succ;
+ for (boost::tie(i, end) = adjacent_vertices(x, g); i != end; ++i)
+ if (get(time_map, *i) == -1)
+ {
+ num_succ = number_of_successors(*i, g, time_map);
+ Q.push(std::make_pair(num_succ, *i));
+ }
+ bool deadend = Q.empty();
+ // move vertices from local priority queue to the stack
+ for (; !Q.empty(); Q.pop())
+ {
+ boost::tie(num_succ, x) = Q.top();
+ S.push(std::make_pair(time_stamp + 1, x));
+ }
+ if (deadend)
+ {
+ put(time_map, x, -1);
+ S.pop();
+ boost::tie(time_stamp, x) = S.top();
+ while (get(time_map, x) != -1)
+ { // unwind stack to last unexplored vertex
+ put(time_map, x, -1);
+ S.pop();
+ boost::tie(time_stamp, x) = S.top();
+ }
+ }
+
+ } // while (!S.empty())
+ return false;
+}
+
+struct board_map
+{
+ typedef int value_type;
+ typedef Position key_type;
+ typedef read_write_property_map_tag category;
+ board_map(int* b, int n) : m_board(b), m_size(n) {}
+ friend int get(const board_map& ba, Position p);
+ friend void put(const board_map& ba, Position p, int v);
+ friend std::ostream& operator<<(std::ostream& os, const board_map& ba);
+
+private:
+ int* m_board;
+ int m_size;
+};
+
+int get(const board_map& ba, Position p)
+{
+ return ba.m_board[p.first * ba.m_size + p.second];
+}
+
+void put(const board_map& ba, Position p, int v)
+{
+ ba.m_board[p.first * ba.m_size + p.second] = v;
+}
+
+std::ostream& operator<<(std::ostream& os, const board_map& ba)
+{
+ for (int i = 0; i < ba.m_size; ++i)
+ {
+ for (int j = 0; j < ba.m_size; ++j)
+ os << get(ba, Position(i, j)) << "\t";
+ os << std::endl;
+ }
+ return os;
+}
+
+int main(int argc, char* argv[])
+{
+ int N;
+ if (argc == 2)
+ N = atoi(argv[1]);
+ else
+ N = 8;
+
+ knights_tour_graph g(N);
+ int* board = new int[num_vertices(g)];
+ board_map chessboard(board, N);
+ for (int i = 0; i < N; ++i)
+ for (int j = 0; j < N; ++j)
+ put(chessboard, Position(i, j), -1);
+
+ bool ret = warnsdorff(g, Position(0, 0), chessboard);
+
+ if (ret)
+ for (int i = 0; i < N; ++i)
+ {
+ for (int j = 0; j < N; ++j)
+ std::cout << get(chessboard, Position(i, j)) << "\t";
+ std::cout << std::endl;
+ }
+ else
+ std::cout << "method failed" << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/knights_tour.expected b/src/boost/libs/graph/example/knights_tour.expected
new file mode 100644
index 000000000..3a0e9519e
--- /dev/null
+++ b/src/boost/libs/graph/example/knights_tour.expected
@@ -0,0 +1,8 @@
+0 13 28 61 10 15 18 47
+29 36 11 14 27 46 9 16
+12 1 62 37 60 17 48 19
+35 30 59 54 49 26 45 8
+2 55 34 63 38 53 20 25
+31 58 39 52 23 50 7 44
+40 3 56 33 42 5 24 21
+57 32 41 4 51 22 43 6
diff --git a/src/boost/libs/graph/example/kruskal-example.cpp b/src/boost/libs/graph/example/kruskal-example.cpp
new file mode 100644
index 000000000..4d8c41b7e
--- /dev/null
+++ b/src/boost/libs/graph/example/kruskal-example.cpp
@@ -0,0 +1,75 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/kruskal_min_spanning_tree.hpp>
+#include <iostream>
+#include <fstream>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ typedef graph_traits< Graph >::edge_descriptor Edge;
+ typedef std::pair< int, int > E;
+
+ const int num_nodes = 5;
+ E edge_array[] = { E(0, 2), E(1, 3), E(1, 4), E(2, 1), E(2, 3), E(3, 4),
+ E(4, 0), E(4, 1) };
+ int weights[] = { 1, 1, 2, 7, 3, 1, 1, 1 };
+ std::size_t num_edges = sizeof(edge_array) / sizeof(E);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph g(num_nodes);
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, g);
+ for (std::size_t j = 0; j < num_edges; ++j)
+ {
+ Edge e;
+ bool inserted;
+ boost::tie(e, inserted)
+ = add_edge(edge_array[j].first, edge_array[j].second, g);
+ weightmap[e] = weights[j];
+ }
+#else
+ Graph g(edge_array, edge_array + num_edges, weights, num_nodes);
+#endif
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+ std::vector< Edge > spanning_tree;
+
+ kruskal_minimum_spanning_tree(g, std::back_inserter(spanning_tree));
+
+ std::cout << "Print the edges in the MST:" << std::endl;
+ for (std::vector< Edge >::iterator ei = spanning_tree.begin();
+ ei != spanning_tree.end(); ++ei)
+ {
+ std::cout << source(*ei, g) << " <--> " << target(*ei, g)
+ << " with weight of " << weight[*ei] << std::endl;
+ }
+
+ std::ofstream fout("figs/kruskal-eg.dot");
+ fout << "graph A {\n"
+ << " rankdir=LR\n"
+ << " size=\"3,3\"\n"
+ << " ratio=\"filled\"\n"
+ << " edge[style=\"bold\"]\n"
+ << " node[shape=\"circle\"]\n";
+ graph_traits< Graph >::edge_iterator eiter, eiter_end;
+ for (boost::tie(eiter, eiter_end) = edges(g); eiter != eiter_end; ++eiter)
+ {
+ fout << source(*eiter, g) << " -- " << target(*eiter, g);
+ if (std::find(spanning_tree.begin(), spanning_tree.end(), *eiter)
+ != spanning_tree.end())
+ fout << "[color=\"black\", label=\"" << get(edge_weight, g, *eiter)
+ << "\"];\n";
+ else
+ fout << "[color=\"gray\", label=\"" << get(edge_weight, g, *eiter)
+ << "\"];\n";
+ }
+ fout << "}\n";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/kruskal-telephone.cpp b/src/boost/libs/graph/example/kruskal-telephone.cpp
new file mode 100644
index 000000000..c88337c55
--- /dev/null
+++ b/src/boost/libs/graph/example/kruskal-telephone.cpp
@@ -0,0 +1,69 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/lexical_cast.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/kruskal_min_spanning_tree.hpp>
+
+int main()
+{
+ using namespace boost;
+ GraphvizGraph g_dot;
+ read_graphviz("figs/telephone-network.dot", g_dot);
+
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ Graph g(num_vertices(g_dot));
+ property_map< GraphvizGraph, edge_attribute_t >::type edge_attr_map
+ = get(edge_attribute, g_dot);
+ graph_traits< GraphvizGraph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g_dot); ei != ei_end; ++ei)
+ {
+ int weight = lexical_cast< int >(edge_attr_map[*ei]["label"]);
+ property< edge_weight_t, int > edge_property(weight);
+ add_edge(source(*ei, g_dot), target(*ei, g_dot), edge_property, g);
+ }
+
+ std::vector< graph_traits< Graph >::edge_descriptor > mst;
+ typedef std::vector< graph_traits< Graph >::edge_descriptor >::size_type
+ size_type;
+ kruskal_minimum_spanning_tree(g, std::back_inserter(mst));
+
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+ int total_weight = 0;
+ for (size_type e = 0; e < mst.size(); ++e)
+ total_weight += get(weight, mst[e]);
+ std::cout << "total weight: " << total_weight << std::endl;
+
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ for (size_type i = 0; i < mst.size(); ++i)
+ {
+ Vertex u = source(mst[i], g), v = target(mst[i], g);
+ edge_attr_map[edge(u, v, g_dot).first]["color"] = "black";
+ }
+ std::ofstream out("figs/telephone-mst-kruskal.dot");
+ graph_property< GraphvizGraph, graph_edge_attribute_t >::type&
+ graph_edge_attr_map
+ = get_property(g_dot, graph_edge_attribute);
+ graph_edge_attr_map["color"] = "gray";
+ graph_edge_attr_map["style"] = "bold";
+ write_graphviz(out, g_dot);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/kruskal.expected b/src/boost/libs/graph/example/kruskal.expected
new file mode 100644
index 000000000..7fa4320ff
--- /dev/null
+++ b/src/boost/libs/graph/example/kruskal.expected
@@ -0,0 +1,5 @@
+Print the edge in MST:
+0 <--> 2 with weight of 1
+3 <--> 4 with weight of 1
+4 <--> 0 with weight of 1
+1 <--> 3 with weight of 1
diff --git a/src/boost/libs/graph/example/kuratowski_subgraph.cpp b/src/boost/libs/graph/example/kuratowski_subgraph.cpp
new file mode 100644
index 000000000..e9779e633
--- /dev/null
+++ b/src/boost/libs/graph/example/kuratowski_subgraph.cpp
@@ -0,0 +1,85 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/ref.hpp>
+#include <vector>
+
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+#include <boost/graph/is_kuratowski_subgraph.hpp>
+
+using namespace boost;
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int >, property< edge_index_t, int > >
+ graph;
+
+ // Create a K_6 (complete graph on 6 vertices), which
+ // contains both Kuratowski subgraphs as minors.
+ graph g(6);
+ add_edge(0, 1, g);
+ add_edge(0, 2, g);
+ add_edge(0, 3, g);
+ add_edge(0, 4, g);
+ add_edge(0, 5, g);
+ add_edge(1, 2, g);
+ add_edge(1, 3, g);
+ add_edge(1, 4, g);
+ add_edge(1, 5, g);
+ add_edge(2, 3, g);
+ add_edge(2, 4, g);
+ add_edge(2, 5, g);
+ add_edge(3, 4, g);
+ add_edge(3, 5, g);
+ add_edge(4, 5, g);
+
+ // Initialize the interior edge index
+ property_map< graph, edge_index_t >::type e_index = get(edge_index, g);
+ graph_traits< graph >::edges_size_type edge_count = 0;
+ graph_traits< graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity - we know it is not planar, we just want to
+ // compute the kuratowski subgraph as a side-effect
+ typedef std::vector< graph_traits< graph >::edge_descriptor >
+ kuratowski_edges_t;
+ kuratowski_edges_t kuratowski_edges;
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::kuratowski_subgraph
+ = std::back_inserter(kuratowski_edges)))
+ std::cout << "Input graph is planar" << std::endl;
+ else
+ {
+ std::cout << "Input graph is not planar" << std::endl;
+
+ std::cout << "Edges in the Kuratowski subgraph: ";
+ kuratowski_edges_t::iterator ki, ki_end;
+ ki_end = kuratowski_edges.end();
+ for (ki = kuratowski_edges.begin(); ki != ki_end; ++ki)
+ {
+ std::cout << *ki << " ";
+ }
+ std::cout << std::endl;
+
+ std::cout << "Is a kuratowski subgraph? ";
+ if (is_kuratowski_subgraph(
+ g, kuratowski_edges.begin(), kuratowski_edges.end()))
+ std::cout << "Yes." << std::endl;
+ else
+ std::cout << "No." << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/labeled_graph.cpp b/src/boost/libs/graph/example/labeled_graph.cpp
new file mode 100644
index 000000000..6224d768e
--- /dev/null
+++ b/src/boost/libs/graph/example/labeled_graph.cpp
@@ -0,0 +1,74 @@
+// (C) Copyright 2009 Andrew Sutton
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+
+ This example does not compile, see
+ https://github.com/boostorg/graph/issues/147
+
+*/
+
+#include <iostream>
+#include <string>
+
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/labeled_graph.hpp>
+
+using namespace boost;
+using namespace std;
+
+int main()
+{
+
+ using namespace boost::graph_detail;
+
+ typedef directed_graph<> Digraph;
+
+ {
+ typedef labeled_graph< Digraph, unsigned > Graph;
+ Graph g;
+ add_vertex(1, g);
+ add_vertex(2, g);
+
+ Graph h(12);
+ }
+
+ {
+ typedef labeled_graph< Digraph, string > Graph;
+ Graph g;
+ add_vertex("foo", g);
+ add_vertex("bar", g);
+ }
+
+ {
+ typedef labeled_graph< Digraph, string, mapS > Graph;
+ Graph g;
+ add_vertex("foo", g);
+ add_vertex("bar", g);
+ add_vertex("foo", g);
+ }
+
+ {
+ typedef labeled_graph< Digraph*, int > TempGraph;
+ Digraph g;
+ TempGraph h(&g);
+ add_vertex(12, h);
+ }
+
+ {
+ // This is actually a fairly complicated specialization.
+ typedef adjacency_list< vecS, vecS, bidirectionalS > G;
+ typedef labeled_graph< G, size_t > Graph;
+ Graph g;
+ add_vertex(0, g);
+ add_vertex(1, g);
+ g.add_edge(0, 1);
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/last-mod-time.cpp b/src/boost/libs/graph/example/last-mod-time.cpp
new file mode 100644
index 000000000..7d8676ebd
--- /dev/null
+++ b/src/boost/libs/graph/example/last-mod-time.cpp
@@ -0,0 +1,113 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT:
+ ~~~~~~~~~~
+
+ This example appears to be broken and crashes at runtime, see
+ https://github.com/boostorg/graph/issues/148
+
+*/
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <ctime>
+#ifdef BOOST_HAS_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/stat.h>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat"),
+ name_in(argc >= 2 ? argv[1] : "makefile-target-names.dat");
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file makefile-target-names.dat"
+ << std::endl;
+ exit(-1);
+ }
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ // Create storage for last modified times
+ std::vector< time_t > last_mod_vec(num_vertices(g));
+ // Create nickname for the property map type
+ typedef iterator_property_map< std::vector< time_t >::iterator,
+ property_map< graph_type, vertex_index_t >::type, time_t, time_t& >
+ iter_map_t;
+ // Create last modified time property map
+ iter_map_t mod_time_map(last_mod_vec.begin(), get(vertex_index, g));
+
+ property_map< graph_type, vertex_name_t >::type name = get(vertex_name, g);
+ struct stat stat_buf;
+ graph_traits< graph_type >::vertex_descriptor u;
+ typedef graph_traits< graph_type >::vertex_iterator vertex_iter_t;
+ std::pair< vertex_iter_t, vertex_iter_t > p;
+ for (p = vertices(g); p.first != p.second; ++p.first)
+ {
+ u = *p.first;
+ if (stat(name[u].c_str(), &stat_buf) != 0)
+ std::cerr << "error in stat() for file " << name[u] << std::endl;
+ put(mod_time_map, u, stat_buf.st_mtime);
+ }
+
+ for (p = vertices(g); p.first != p.second; ++p.first)
+ {
+ std::cout << name[*p.first] << " was last modified at "
+ << ctime(&mod_time_map[*p.first]);
+ }
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/leda-concept-check.cpp b/src/boost/libs/graph/example/leda-concept-check.cpp
new file mode 100644
index 000000000..490d2d68b
--- /dev/null
+++ b/src/boost/libs/graph/example/leda-concept-check.cpp
@@ -0,0 +1,21 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/graph_concepts.hpp>
+#include <boost/graph/leda_graph.hpp>
+#include <boost/concept/assert.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef leda::GRAPH< int, int > Graph;
+ BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
+ BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< Graph >));
+ BOOST_CONCEPT_ASSERT((VertexMutableGraphConcept< Graph >));
+ BOOST_CONCEPT_ASSERT((EdgeMutableGraphConcept< Graph >));
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/leda-graph-eg.cpp b/src/boost/libs/graph/example/leda-graph-eg.cpp
new file mode 100644
index 000000000..507498ecd
--- /dev/null
+++ b/src/boost/libs/graph/example/leda-graph-eg.cpp
@@ -0,0 +1,27 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/graph/leda_graph.hpp>
+#include <iostream>
+#undef string // LEDA macro!
+int main()
+{
+ using namespace boost;
+ typedef leda::GRAPH< std::string, int > graph_t;
+ graph_t g;
+ g.new_node("Philoctetes");
+ g.new_node("Heracles");
+ g.new_node("Alcmena");
+ g.new_node("Eurystheus");
+ g.new_node("Amphitryon");
+ typedef property_map< graph_t, vertex_all_t >::type NodeMap;
+ NodeMap node_name_map = get(vertex_all, g);
+ graph_traits< graph_t >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ std::cout << node_name_map[*vi] << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/leda-regression.cfg b/src/boost/libs/graph/example/leda-regression.cfg
new file mode 100644
index 000000000..5009fc4dd
--- /dev/null
+++ b/src/boost/libs/graph/example/leda-regression.cfg
@@ -0,0 +1,10 @@
+// Boost Graph Library LEDA examples regression test configuration file
+//
+// From the boost/status directory, run
+// ./regression --tests ../libs/graph/example/leda-regression.cfg -o graph-leda-eg.html
+//
+// Please keep the entries ordered alphabetically by the test's file name.
+
+compile libs/graph/example/leda-concept-check.cpp
+compile libs/graph/example/leda-graph-eg.cpp
+compile libs/graph/example/topo-sort-with-leda.cpp
diff --git a/src/boost/libs/graph/example/loops_dfs.cpp b/src/boost/libs/graph/example/loops_dfs.cpp
new file mode 100644
index 000000000..b56dd83a3
--- /dev/null
+++ b/src/boost/libs/graph/example/loops_dfs.cpp
@@ -0,0 +1,205 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <boost/concept/assert.hpp>
+#include <iostream>
+#include <fstream>
+#include <stack>
+#include <map>
+#include <boost/lexical_cast.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/copy.hpp>
+#include <boost/graph/reverse_graph.hpp>
+
+using namespace boost;
+
+template < typename OutputIterator >
+class back_edge_recorder : public default_dfs_visitor
+{
+public:
+ back_edge_recorder(OutputIterator out) : m_out(out) {}
+
+ template < typename Edge, typename Graph >
+ void back_edge(Edge e, const Graph&)
+ {
+ *m_out++ = e;
+ }
+
+private:
+ OutputIterator m_out;
+};
+
+// object generator function
+template < typename OutputIterator >
+back_edge_recorder< OutputIterator > make_back_edge_recorder(OutputIterator out)
+{
+ return back_edge_recorder< OutputIterator >(out);
+}
+
+template < typename Graph, typename Loops >
+void find_loops(typename graph_traits< Graph >::vertex_descriptor entry,
+ const Graph& g,
+ Loops& loops) // A container of sets of vertices
+{
+ BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< Graph >));
+ typedef typename graph_traits< Graph >::edge_descriptor Edge;
+ std::vector< Edge > back_edges;
+ std::vector< default_color_type > color_map(num_vertices(g));
+ depth_first_visit(g, entry,
+ make_back_edge_recorder(std::back_inserter(back_edges)),
+ make_iterator_property_map(
+ color_map.begin(), get(vertex_index, g), color_map[0]));
+
+ for (typename std::vector< Edge >::size_type i = 0; i < back_edges.size();
+ ++i)
+ {
+ typename Loops::value_type x;
+ loops.push_back(x);
+ compute_loop_extent(back_edges[i], g, loops.back());
+ }
+}
+
+template < typename Graph, typename Set >
+void compute_loop_extent(
+ typename graph_traits< Graph >::edge_descriptor back_edge, const Graph& g,
+ Set& loop_set)
+{
+ BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< Graph >));
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef color_traits< default_color_type > Color;
+
+ Vertex loop_head, loop_tail;
+ loop_tail = source(back_edge, g);
+ loop_head = target(back_edge, g);
+
+ std::vector< default_color_type > reachable_from_head(
+ num_vertices(g), Color::white());
+ default_color_type c;
+ depth_first_visit(g, loop_head, default_dfs_visitor(),
+ make_iterator_property_map(
+ reachable_from_head.begin(), get(vertex_index, g), c));
+
+ std::vector< default_color_type > reachable_to_tail(num_vertices(g));
+ reverse_graph< Graph > reverse_g(g);
+ depth_first_visit(reverse_g, loop_tail, default_dfs_visitor(),
+ make_iterator_property_map(
+ reachable_to_tail.begin(), get(vertex_index, g), c));
+
+ typename graph_traits< Graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (reachable_from_head[*vi] != Color::white()
+ && reachable_to_tail[*vi] != Color::white())
+ loop_set.insert(*vi);
+}
+
+int main(int argc, char* argv[])
+{
+ if (argc < 3)
+ {
+ std::cerr << "usage: loops_dfs <in-file> <out-file>" << std::endl;
+ return -1;
+ }
+ GraphvizDigraph g_in;
+ read_graphviz(argv[1], g_in);
+
+ typedef adjacency_list< vecS, vecS, bidirectionalS, GraphvizVertexProperty,
+ GraphvizEdgeProperty, GraphvizGraphProperty >
+ Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+
+ Graph g;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the get_property() function
+ get_property(g, graph_name) = "loops";
+#endif
+
+ copy_graph(g_in, g);
+
+ typedef std::set< Vertex > set_t;
+ typedef std::list< set_t > list_of_sets_t;
+ list_of_sets_t loops;
+ Vertex entry = *vertices(g).first;
+
+ find_loops(entry, g, loops);
+
+ property_map< Graph, vertex_attribute_t >::type vattr_map
+ = get(vertex_attribute, g);
+ property_map< Graph, edge_attribute_t >::type eattr_map
+ = get(edge_attribute, g);
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+
+ for (list_of_sets_t::iterator i = loops.begin(); i != loops.end(); ++i)
+ {
+ std::vector< bool > in_loop(num_vertices(g), false);
+ for (set_t::iterator j = (*i).begin(); j != (*i).end(); ++j)
+ {
+ vattr_map[*j]["color"] = "gray";
+ in_loop[*j] = true;
+ }
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ if (in_loop[source(*ei, g)] && in_loop[target(*ei, g)])
+ eattr_map[*ei]["color"] = "gray";
+ }
+
+ std::ofstream loops_out(argv[2]);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the get_property() functions
+ loops_out << "digraph loops {\n"
+ << "size=\"3,3\"\n"
+ << "ratio=\"fill\"\n"
+ << "shape=\"box\"\n";
+ graph_traits< Graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ loops_out << *vi << "[";
+ for (std::map< std::string, std::string >::iterator ai
+ = vattr_map[*vi].begin();
+ ai != vattr_map[*vi].end(); ++ai)
+ {
+ loops_out << ai->first << "=" << ai->second;
+ if (next(ai) != vattr_map[*vi].end())
+ loops_out << ", ";
+ }
+ loops_out << "]";
+ }
+
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ loops_out << source(*ei, g) << " -> " << target(*ei, g) << "[";
+ std::map< std::string, std::string >& attr_map = eattr_map[*ei];
+ for (std::map< std::string, std::string >::iterator eai
+ = attr_map.begin();
+ eai != attr_map.end(); ++eai)
+ {
+ loops_out << eai->first << "=" << eai->second;
+ if (next(eai) != attr_map.end())
+ loops_out << ", ";
+ }
+ loops_out << "]";
+ }
+ loops_out << "}\n";
+#else
+ get_property(g, graph_graph_attribute)["size"] = "3,3";
+ get_property(g, graph_graph_attribute)["ratio"] = "fill";
+ get_property(g, graph_vertex_attribute)["shape"] = "box";
+
+ write_graphviz(loops_out, g, make_vertex_attributes_writer(g),
+ make_edge_attributes_writer(g), make_graph_attributes_writer(g));
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/make_biconnected_planar.cpp b/src/boost/libs/graph/example/make_biconnected_planar.cpp
new file mode 100644
index 000000000..f9c101a7d
--- /dev/null
+++ b/src/boost/libs/graph/example/make_biconnected_planar.cpp
@@ -0,0 +1,95 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/ref.hpp>
+#include <vector>
+
+#include <boost/graph/biconnected_components.hpp>
+#include <boost/graph/make_biconnected_planar.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+using namespace boost;
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int >, property< edge_index_t, int > >
+ graph;
+
+ graph g(11);
+ add_edge(0, 1, g);
+ add_edge(2, 3, g);
+ add_edge(3, 0, g);
+ add_edge(3, 4, g);
+ add_edge(4, 5, g);
+ add_edge(5, 3, g);
+ add_edge(5, 6, g);
+ add_edge(6, 7, g);
+ add_edge(7, 8, g);
+ add_edge(8, 5, g);
+ add_edge(8, 9, g);
+ add_edge(0, 10, g);
+
+ // Initialize the interior edge index
+ property_map< graph, edge_index_t >::type e_index = get(edge_index, g);
+ graph_traits< graph >::edges_size_type edge_count = 0;
+ graph_traits< graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity; compute the planar embedding as a side-effect
+ typedef std::vector< graph_traits< graph >::edge_descriptor > vec_t;
+ std::vector< vec_t > embedding(num_vertices(g));
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = &embedding[0]))
+ std::cout << "Input graph is planar" << std::endl;
+ else
+ std::cout << "Input graph is not planar" << std::endl;
+
+ typedef std::vector< graph_traits< graph >::edges_size_type >
+ component_storage_t;
+ typedef iterator_property_map< component_storage_t::iterator,
+ property_map< graph, edge_index_t >::type >
+ component_map_t;
+
+ component_storage_t component_storage(num_edges(g));
+ component_map_t component(component_storage.begin(), get(edge_index, g));
+
+ std::cout << "Before calling make_biconnected_planar, the graph has "
+ << biconnected_components(g, component)
+ << " biconnected components" << std::endl;
+
+ make_biconnected_planar(g, &embedding[0]);
+
+ // Re-initialize the edge index, since we just added a few edges
+ edge_count = 0;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Re-size the storage for the biconnected components, since we
+ // just added a few edges
+
+ component_storage.resize(num_edges(g));
+ component = component_map_t(component_storage.begin(), get(edge_index, g));
+
+ std::cout << "After calling make_biconnected_planar, the graph has "
+ << biconnected_components(g, component)
+ << " biconnected components" << std::endl;
+
+ if (boyer_myrvold_planarity_test(g))
+ std::cout << "Also, the graph is still planar." << std::endl;
+ else
+ std::cout << "But the graph is not still planar." << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/make_connected.cpp b/src/boost/libs/graph/example/make_connected.cpp
new file mode 100644
index 000000000..84491b5e2
--- /dev/null
+++ b/src/boost/libs/graph/example/make_connected.cpp
@@ -0,0 +1,51 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <vector>
+
+#include <boost/graph/connected_components.hpp>
+#include <boost/graph/make_connected.hpp>
+
+using namespace boost;
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int > >
+ graph;
+
+ graph g(11);
+ add_edge(0, 1, g);
+ add_edge(2, 3, g);
+ add_edge(3, 4, g);
+ add_edge(5, 6, g);
+ add_edge(6, 7, g);
+ add_edge(8, 9, g);
+ add_edge(9, 10, g);
+ add_edge(10, 8, g);
+
+ std::vector< graph_traits< graph >::vertices_size_type > component(
+ num_vertices(g));
+
+ std::cout << "Before calling make_connected, the graph has "
+ << connected_components(g, &component[0])
+ << " connected components" << std::endl;
+
+ make_connected(g);
+
+ std::cout << "After calling make_connected, the graph has "
+ << connected_components(g, &component[0])
+ << " connected components" << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/make_maximal_planar.cpp b/src/boost/libs/graph/example/make_maximal_planar.cpp
new file mode 100644
index 000000000..4647f1c09
--- /dev/null
+++ b/src/boost/libs/graph/example/make_maximal_planar.cpp
@@ -0,0 +1,119 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/ref.hpp>
+#include <vector>
+
+#include <boost/graph/make_biconnected_planar.hpp>
+#include <boost/graph/make_maximal_planar.hpp>
+#include <boost/graph/planar_face_traversal.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+// This example shows how to start with a connected planar graph
+// and add edges to make the graph maximal planar (triangulated.)
+// Any maximal planar simple graph on n vertices has 3n - 6 edges and
+// 2n - 4 faces, a consequence of Euler's formula.
+
+using namespace boost;
+
+// This visitor is passed to planar_face_traversal to count the
+// number of faces.
+struct face_counter : public planar_face_traversal_visitor
+{
+ face_counter() : count(0) {}
+ void begin_face() { ++count; }
+ int count;
+};
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int >, property< edge_index_t, int > >
+ graph;
+
+ // Create the graph - a straight line
+ graph g(10);
+ add_edge(0, 1, g);
+ add_edge(1, 2, g);
+ add_edge(2, 3, g);
+ add_edge(3, 4, g);
+ add_edge(4, 5, g);
+ add_edge(5, 6, g);
+ add_edge(6, 7, g);
+ add_edge(7, 8, g);
+ add_edge(8, 9, g);
+
+ std::cout << "Since the input graph is planar with " << num_vertices(g)
+ << " vertices," << std::endl
+ << "The output graph should be planar with "
+ << 3 * num_vertices(g) - 6 << " edges and "
+ << 2 * num_vertices(g) - 4 << " faces." << std::endl;
+
+ // Initialize the interior edge index
+ property_map< graph, edge_index_t >::type e_index = get(edge_index, g);
+ graph_traits< graph >::edges_size_type edge_count = 0;
+ graph_traits< graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity; compute the planar embedding as a side-effect
+ typedef std::vector< graph_traits< graph >::edge_descriptor > vec_t;
+ std::vector< vec_t > embedding(num_vertices(g));
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = &embedding[0]))
+ std::cout << "Input graph is planar" << std::endl;
+ else
+ std::cout << "Input graph is not planar" << std::endl;
+
+ make_biconnected_planar(g, &embedding[0]);
+
+ // Re-initialize the edge index, since we just added a few edges
+ edge_count = 0;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity again; compute the planar embedding as a side-effect
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = &embedding[0]))
+ std::cout << "After calling make_biconnected, the graph is still planar"
+ << std::endl;
+ else
+ std::cout << "After calling make_biconnected, the graph is not planar"
+ << std::endl;
+
+ make_maximal_planar(g, &embedding[0]);
+
+ // Re-initialize the edge index, since we just added a few edges
+ edge_count = 0;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity one final time; compute the planar embedding as a
+ // side-effect
+ std::cout << "After calling make_maximal_planar, the final graph ";
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = &embedding[0]))
+ std::cout << "is planar." << std::endl;
+ else
+ std::cout << "is not planar." << std::endl;
+
+ std::cout << "The final graph has " << num_edges(g) << " edges."
+ << std::endl;
+
+ face_counter count_visitor;
+ planar_face_traversal(g, &embedding[0], count_visitor);
+ std::cout << "The final graph has " << count_visitor.count << " faces."
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/makefile-dependencies.dat b/src/boost/libs/graph/example/makefile-dependencies.dat
new file mode 100644
index 000000000..c185d492c
--- /dev/null
+++ b/src/boost/libs/graph/example/makefile-dependencies.dat
@@ -0,0 +1,20 @@
+15
+0 5
+0 7
+0 11
+1 5
+1 11
+2 5
+2 9
+2 11
+3 7
+4 5
+5 13
+6 7
+7 13
+8 9
+9 12
+10 11
+11 12
+12 14
+13 12
diff --git a/src/boost/libs/graph/example/makefile-target-names.dat b/src/boost/libs/graph/example/makefile-target-names.dat
new file mode 100644
index 000000000..166cbb0e2
--- /dev/null
+++ b/src/boost/libs/graph/example/makefile-target-names.dat
@@ -0,0 +1,15 @@
+dax.h
+yow.h
+boz.h
+zow.h
+bar.cpp
+bar.o
+foo.cpp
+foo.o
+zig.cpp
+zig.o
+zag.cpp
+zag.o
+libzigzag.a
+libfoobar.a
+killerapp
diff --git a/src/boost/libs/graph/example/matching_example.cpp b/src/boost/libs/graph/example/matching_example.cpp
new file mode 100644
index 000000000..3c8a4fbb9
--- /dev/null
+++ b/src/boost/libs/graph/example/matching_example.cpp
@@ -0,0 +1,125 @@
+//=======================================================================
+// Copyright (c) 2005 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//=======================================================================
+#include <string>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <cassert>
+
+#include <boost/graph/max_cardinality_matching.hpp>
+
+using namespace boost;
+
+typedef adjacency_list< vecS, vecS, undirectedS > my_graph;
+
+int main()
+{
+
+ // Create the following graph: (it'll look better when output
+ // to the terminal in a fixed width font...)
+
+ const int n_vertices = 18;
+
+ std::vector< std::string > ascii_graph;
+
+ ascii_graph.push_back(" 0 1---2 3 ");
+ ascii_graph.push_back(" \\ / \\ / ");
+ ascii_graph.push_back(" 4---5 6---7 ");
+ ascii_graph.push_back(" | | | | ");
+ ascii_graph.push_back(" 8---9 10---11 ");
+ ascii_graph.push_back(" / \\ / \\ ");
+ ascii_graph.push_back(" 12 13 14---15 16 17 ");
+
+ // It has a perfect matching of size 8. There are two isolated
+ // vertices that we'll use later...
+
+ my_graph g(n_vertices);
+
+ // our vertices are stored in a vector, so we can refer to vertices
+ // by integers in the range 0..15
+
+ add_edge(1, 2, g);
+ add_edge(0, 4, g);
+ add_edge(1, 5, g);
+ add_edge(2, 6, g);
+ add_edge(3, 7, g);
+ add_edge(4, 5, g);
+ add_edge(6, 7, g);
+ add_edge(4, 8, g);
+ add_edge(5, 9, g);
+ add_edge(6, 10, g);
+ add_edge(7, 11, g);
+ add_edge(8, 9, g);
+ add_edge(10, 11, g);
+ add_edge(8, 13, g);
+ add_edge(9, 14, g);
+ add_edge(10, 15, g);
+ add_edge(11, 16, g);
+ add_edge(14, 15, g);
+
+ std::vector< graph_traits< my_graph >::vertex_descriptor > mate(n_vertices);
+
+ // find the maximum cardinality matching. we'll use a checked version
+ // of the algorithm, which takes a little longer than the unchecked
+ // version, but has the advantage that it will return "false" if the
+ // matching returned is not actually a maximum cardinality matching
+ // in the graph.
+
+ bool success = checked_edmonds_maximum_cardinality_matching(g, &mate[0]);
+ assert(success);
+
+ std::cout << "In the following graph:" << std::endl << std::endl;
+
+ for (std::vector< std::string >::iterator itr = ascii_graph.begin();
+ itr != ascii_graph.end(); ++itr)
+ std::cout << *itr << std::endl;
+
+ std::cout << std::endl
+ << "Found a matching of size " << matching_size(g, &mate[0])
+ << std::endl;
+
+ std::cout << "The matching is:" << std::endl;
+
+ graph_traits< my_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (mate[*vi] != graph_traits< my_graph >::null_vertex()
+ && *vi < mate[*vi])
+ std::cout << "{" << *vi << ", " << mate[*vi] << "}" << std::endl;
+
+ std::cout << std::endl;
+
+ // now we'll add two edges, and the perfect matching has size 9
+
+ ascii_graph.pop_back();
+ ascii_graph.push_back(" 12---13 14---15 16---17 ");
+
+ add_edge(12, 13, g);
+ add_edge(16, 17, g);
+
+ success = checked_edmonds_maximum_cardinality_matching(g, &mate[0]);
+ assert(success);
+
+ std::cout << "In the following graph:" << std::endl << std::endl;
+
+ for (std::vector< std::string >::iterator itr = ascii_graph.begin();
+ itr != ascii_graph.end(); ++itr)
+ std::cout << *itr << std::endl;
+
+ std::cout << std::endl
+ << "Found a matching of size " << matching_size(g, &mate[0])
+ << std::endl;
+
+ std::cout << "The matching is:" << std::endl;
+
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (mate[*vi] != graph_traits< my_graph >::null_vertex()
+ && *vi < mate[*vi])
+ std::cout << "{" << *vi << ", " << mate[*vi] << "}" << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/max_flow.cpp b/src/boost/libs/graph/example/max_flow.cpp
new file mode 100644
index 000000000..170356888
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow.cpp
@@ -0,0 +1,98 @@
+//=======================================================================
+// Copyright 2000 University of Notre Dame.
+// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/push_relabel_max_flow.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/read_dimacs.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+// Use a DIMACS network flow file as stdin.
+// max_flow < max_flow.dat
+//
+// Sample output:
+// c The total flow:
+// s 13
+//
+// c flow values:
+// f 0 6 3
+// f 0 1 6
+// f 0 2 4
+// f 1 5 1
+// f 1 0 0
+// f 1 3 5
+// f 2 4 4
+// f 2 3 0
+// f 2 0 0
+// f 3 7 5
+// f 3 2 0
+// f 3 1 0
+// f 4 5 4
+// f 4 6 0
+// f 5 4 0
+// f 5 7 5
+// f 6 7 3
+// f 6 4 0
+// f 7 6 0
+// f 7 5 0
+
+int main()
+{
+ using namespace boost;
+
+ typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
+ typedef adjacency_list< listS, vecS, directedS,
+ property< vertex_name_t, std::string >,
+ property< edge_capacity_t, long,
+ property< edge_residual_capacity_t, long,
+ property< edge_reverse_t, Traits::edge_descriptor > > > >
+ Graph;
+
+ Graph g;
+
+ property_map< Graph, edge_capacity_t >::type capacity
+ = get(edge_capacity, g);
+ property_map< Graph, edge_reverse_t >::type rev = get(edge_reverse, g);
+ property_map< Graph, edge_residual_capacity_t >::type residual_capacity
+ = get(edge_residual_capacity, g);
+
+ Traits::vertex_descriptor s, t;
+ read_dimacs_max_flow(g, capacity, rev, s, t);
+
+ long flow;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // Use non-named parameter version
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+ flow = push_relabel_max_flow(
+ g, s, t, capacity, residual_capacity, rev, indexmap);
+#else
+ flow = push_relabel_max_flow(g, s, t);
+#endif
+
+ std::cout << "c The total flow:" << std::endl;
+ std::cout << "s " << flow << std::endl << std::endl;
+
+ std::cout << "c flow values:" << std::endl;
+ graph_traits< Graph >::vertex_iterator u_iter, u_end;
+ graph_traits< Graph >::out_edge_iterator ei, e_end;
+ for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
+ for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
+ if (capacity[*ei] > 0)
+ std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
+ << (capacity[*ei] - residual_capacity[*ei])
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/max_flow.dat b/src/boost/libs/graph/example/max_flow.dat
new file mode 100644
index 000000000..bb979a5b8
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow.dat
@@ -0,0 +1,25 @@
+c This file was generated by genrmf.
+c The parameters are: a: 2 b: 2 c1: 1 c2: 5
+p max 8 20
+n 1 s
+n 8 t
+a 1 7 3
+a 1 2 20
+a 1 3 20
+a 2 6 1
+a 2 1 20
+a 2 4 20
+a 3 5 4
+a 3 4 20
+a 3 1 20
+a 4 8 5
+a 4 3 20
+a 4 2 20
+a 5 6 20
+a 5 7 20
+a 6 5 20
+a 6 8 20
+a 7 8 20
+a 7 5 20
+a 8 7 20
+a 8 6 20
diff --git a/src/boost/libs/graph/example/max_flow.expected b/src/boost/libs/graph/example/max_flow.expected
new file mode 100644
index 000000000..f2bb85607
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow.expected
@@ -0,0 +1,24 @@
+c The total flow:
+s 13
+
+c flow values:
+f 0 6 3
+f 0 1 0
+f 0 2 10
+f 1 5 1
+f 1 0 0
+f 1 3 0
+f 2 4 4
+f 2 3 6
+f 2 0 0
+f 3 7 5
+f 3 2 0
+f 3 1 1
+f 4 5 4
+f 4 6 0
+f 5 4 0
+f 5 7 5
+f 6 7 3
+f 6 4 0
+f 7 6 0
+f 7 5 0
diff --git a/src/boost/libs/graph/example/max_flow2.dat b/src/boost/libs/graph/example/max_flow2.dat
new file mode 100644
index 000000000..d607777d3
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow2.dat
@@ -0,0 +1,4 @@
+p max 2 1
+n 1 s
+n 2 t
+a 1 2 5
diff --git a/src/boost/libs/graph/example/max_flow3.dat b/src/boost/libs/graph/example/max_flow3.dat
new file mode 100644
index 000000000..1340a4e82
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow3.dat
@@ -0,0 +1,46 @@
+p max 12 43
+n 10 s
+n 11 t
+a 1 6 43
+a 1 3 18
+a 1 2 66
+a 1 8 115
+a 2 6 22
+a 2 5 41
+a 2 4 42
+a 2 3 84
+a 2 1 66
+a 2 9 163
+a 3 4 41
+a 3 7 60
+a 3 9 79
+a 3 2 84
+a 3 1 18
+a 4 5 84
+a 4 2 42
+a 4 9 121
+a 4 3 41
+a 4 7 102
+a 5 6 64
+a 5 2 41
+a 5 4 84
+a 6 8 158
+a 6 1 43
+a 6 2 22
+a 6 5 64
+a 6 11 701
+a 7 4 102
+a 7 3 60
+a 8 6 158
+a 8 1 115
+a 9 4 121
+a 9 3 79
+a 9 2 163
+a 10 12 701
+a 12 1 100
+a 12 3 100
+a 12 4 100
+a 12 5 100
+a 12 6 100
+a 12 7 100
+a 12 8 100
diff --git a/src/boost/libs/graph/example/max_flow4.dat b/src/boost/libs/graph/example/max_flow4.dat
new file mode 100644
index 000000000..16643f49a
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow4.dat
@@ -0,0 +1,104 @@
+c Random Network
+p max 100 100
+n 1 s
+n 100 t
+a 27 24 37
+a 39 72 27
+a 2 5 35
+a 69 66 40
+a 56 32 33
+a 68 46 30
+a 4 5 46
+a 9 79 17
+a 14 16 23
+a 48 19 27
+a 21 24 39
+a 29 38 18
+a 15 70 7
+a 26 46 23
+a 50 14 31
+a 72 75 20
+a 66 26 38
+a 75 5 33
+a 77 6 6
+a 70 9 29
+a 14 79 4
+a 10 88 37
+a 48 61 8
+a 70 34 21
+a 6 46 4
+a 31 96 22
+a 16 98 45
+a 31 1 49
+a 6 61 38
+a 8 20 19
+a 76 81 26
+a 32 71 16
+a 37 36 10
+a 84 22 30
+a 2 3 48
+a 36 51 28
+a 15 2 19
+a 33 3 32
+a 54 66 14
+a 19 25 18
+a 93 68 12
+a 11 23 17
+a 18 58 23
+a 6 18 32
+a 1 4 30
+a 11 13 36
+a 53 6 44
+a 88 66 4
+a 48 78 9
+a 80 72 42
+a 5 44 11
+a 9 27 46
+a 38 1 2
+a 87 67 25
+a 95 6 48
+a 93 72 23
+a 97 85 49
+a 36 32 47
+a 28 4 41
+a 63 24 4
+a 29 56 9
+a 3 7 27
+a 8 1 21
+a 4 8 32
+a 3 2 6
+a 5 4 25
+a 48 10 7
+a 85 41 21
+a 4 28 44
+a 70 97 13
+a 5 56 37
+a 8 15 6
+a 80 26 24
+a 18 13 34
+a 23 80 8
+a 9 55 33
+a 31 52 50
+a 20 10 7
+a 84 62 34
+a 29 43 6
+a 6 20 25
+a 80 58 15
+a 46 26 43
+a 74 51 42
+a 100 60 43
+a 39 88 35
+a 45 41 1
+a 25 65 31
+a 6 8 33
+a 100 51 40
+a 11 75 21
+a 1 14 46
+a 16 41 6
+a 53 45 50
+a 4 22 23
+a 14 83 6
+a 17 83 32
+a 100 83 1
+a 16 8 41
+a 57 17 44
diff --git a/src/boost/libs/graph/example/max_flow5.dat b/src/boost/libs/graph/example/max_flow5.dat
new file mode 100644
index 000000000..01bac96bb
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow5.dat
@@ -0,0 +1,6004 @@
+c Random Network
+p max 10000 6000
+n 1 s
+n 10000 t
+a 1326 3929 4
+a 149 3615 2
+a 6404 102 6
+a 639 3784 8
+a 7735 4142 10
+a 8139 9379 5
+a 5596 7730 3
+a 1411 1032 4
+a 34 187 4
+a 125 1304 9
+a 3543 5877 9
+a 2922 5284 4
+a 438 790 7
+a 1720 3520 10
+a 8735 4443 5
+a 7962 4588 1
+a 8154 6640 5
+a 6055 1086 2
+a 4278 706 6
+a 1235 1740 5
+a 1925 2238 6
+a 829 7368 9
+a 4348 8068 2
+a 44 273 7
+a 175 362 1
+a 402 2349 8
+a 1235 8765 3
+a 8883 4177 10
+a 6602 9548 6
+a 2090 6104 5
+a 5591 2730 1
+a 654 764 5
+a 7418 1092 1
+a 610 1060 4
+a 5843 1083 1
+a 138 144 7
+a 1731 583 3
+a 6051 4044 8
+a 4794 9176 5
+a 673 2951 7
+a 31 195 2
+a 357 585 2
+a 15 17 1
+a 167 312 4
+a 1646 7439 8
+a 8665 8090 8
+a 1674 2455 10
+a 14 6058 6
+a 198 6738 10
+a 4979 6947 2
+a 8921 5553 10
+a 9685 312 4
+a 164 203 10
+a 4676 141 3
+a 2057 4194 2
+a 8557 2611 7
+a 4148 5401 1
+a 9441 9169 1
+a 934 6713 2
+a 2891 1150 6
+a 4216 3934 9
+a 8333 3843 9
+a 1555 7907 4
+a 379 1130 5
+a 1003 1406 7
+a 794 897 5
+a 2996 2435 10
+a 3995 2824 1
+a 9957 889 9
+a 3825 6312 7
+a 1066 9265 3
+a 451 698 4
+a 484 3610 8
+a 2777 7825 7
+a 6381 4386 2
+a 65 146 1
+a 1668 4621 4
+a 597 2222 10
+a 3913 98 9
+a 5550 6339 10
+a 7188 1887 10
+a 5833 8023 7
+a 5728 645 2
+a 5139 422 1
+a 7413 5694 2
+a 772 2829 8
+a 76 342 2
+a 4389 355 8
+a 4145 11 2
+a 1920 5709 5
+a 3882 7878 9
+a 3626 2500 10
+a 512 1325 9
+a 5199 8403 5
+a 1469 4118 2
+a 4187 7235 6
+a 6444 9155 10
+a 7521 7900 7
+a 770 1001 5
+a 5276 6886 6
+a 1174 1224 5
+a 2169 8656 2
+a 5330 8729 10
+a 4510 436 4
+a 4360 6056 9
+a 9594 3489 10
+a 4973 1064 8
+a 1981 8074 5
+a 156 669 6
+a 1707 2712 4
+a 2771 172 6
+a 3071 400 10
+a 104 2086 1
+a 3142 5797 10
+a 793 5820 6
+a 4524 3412 5
+a 2 56 9
+a 9813 8299 8
+a 4273 2745 2
+a 2606 9253 5
+a 21 87 4
+a 1210 1271 1
+a 1864 1428 4
+a 244 4314 5
+a 33 586 5
+a 1139 2027 4
+a 8895 8627 10
+a 4187 224 4
+a 12 16 10
+a 2862 6971 1
+a 4074 1456 5
+a 7406 7799 9
+a 7848 2104 10
+a 4148 6388 10
+a 9112 6618 4
+a 9043 7323 6
+a 9485 9070 7
+a 7539 1767 9
+a 1465 1630 6
+a 7085 3474 4
+a 8475 4311 9
+a 8312 2891 10
+a 17 28 1
+a 110 3616 6
+a 219 8509 2
+a 5454 9622 6
+a 2073 6763 6
+a 996 637 8
+a 9452 2326 3
+a 31 97 7
+a 176 256 7
+a 334 181 6
+a 1311 5812 3
+a 90 1631 4
+a 2130 95 2
+a 4309 347 5
+a 6801 920 9
+a 3384 8413 7
+a 4907 4744 5
+a 9702 5061 2
+a 620 2485 2
+a 3509 14 8
+a 3266 5888 4
+a 4314 8155 1
+a 310 5195 6
+a 1247 1429 4
+a 4880 926 8
+a 9181 8900 9
+a 1635 1753 10
+a 1432 2227 2
+a 1797 4427 8
+a 1507 651 5
+a 393 460 8
+a 1072 391 7
+a 231 2698 3
+a 1113 3357 4
+a 684 2439 9
+a 5675 2255 6
+a 7634 3478 2
+a 1500 8893 1
+a 3336 7220 10
+a 2610 3141 1
+a 19 78 8
+a 148 410 8
+a 630 324 3
+a 2566 7575 5
+a 5322 6861 3
+a 6248 9946 1
+a 9495 5048 4
+a 1533 1700 9
+a 2417 141 10
+a 518 6131 8
+a 563 6321 2
+a 2821 1753 10
+a 6880 910 6
+a 2067 497 9
+a 232 341 10
+a 662 829 2
+a 3925 322 7
+a 6889 5374 9
+a 1303 2174 10
+a 5015 1317 2
+a 6022 7062 3
+a 7879 8267 2
+a 5682 3790 9
+a 2938 2004 10
+a 8337 4429 1
+a 1424 1611 9
+a 6734 6017 9
+a 464 4177 4
+a 754 8074 10
+a 197 1909 8
+a 763 827 9
+a 1549 7906 1
+a 3105 8578 3
+a 6485 4470 8
+a 5315 7761 9
+a 9416 5433 6
+a 672 1769 8
+a 2625 3661 8
+a 3738 1610 5
+a 1197 7313 4
+a 8108 9059 5
+a 85 336 2
+a 3490 4345 4
+a 5157 4527 8
+a 2091 6965 2
+a 8743 3534 3
+a 1274 3342 1
+a 111 1130 8
+a 91 512 2
+a 773 1508 9
+a 1110 2159 7
+a 2246 6408 8
+a 4496 6767 8
+a 840 327 8
+a 7862 1603 7
+a 5043 1386 6
+a 6234 3281 5
+a 55 407 7
+a 255 348 10
+a 123 736 2
+a 1326 8351 7
+a 2767 9548 1
+a 6798 9996 7
+a 9098 7862 9
+a 952 131 9
+a 5396 5838 2
+a 9098 7486 4
+a 266 412 3
+a 928 986 9
+a 3096 5635 8
+a 2323 1828 2
+a 3102 1886 4
+a 9186 4613 5
+a 1001 7029 7
+a 583 3031 5
+a 382 514 10
+a 1499 4788 8
+a 6748 967 9
+a 9222 9904 2
+a 38 87 7
+a 2453 4839 7
+a 6524 860 8
+a 1674 5575 7
+a 562 920 6
+a 1170 8693 10
+a 1560 7686 10
+a 4164 6219 5
+a 130 296 7
+a 2145 8280 6
+a 7269 1009 7
+a 2560 3203 8
+a 7832 1140 1
+a 468 991 2
+a 7061 3184 7
+a 9660 9336 8
+a 1167 547 4
+a 4337 6429 5
+a 1774 5948 7
+a 149 489 8
+a 8351 6981 2
+a 4815 876 6
+a 8452 3145 10
+a 1 4571 2
+a 7590 1350 6
+a 295 1393 3
+a 109 129 1
+a 732 4388 10
+a 4854 1299 7
+a 5253 9890 8
+a 4159 606 5
+a 5549 6281 5
+a 243 5958 10
+a 5258 6983 7
+a 8097 7904 8
+a 77 145 6
+a 93 102 8
+a 123 4208 3
+a 3973 367 1
+a 131 4671 9
+a 347 9292 9
+a 3463 539 10
+a 8671 5122 6
+a 112 113 2
+a 5341 9430 9
+a 1988 3508 1
+a 5059 8872 5
+a 98 1596 9
+a 220 652 7
+a 1552 1611 7
+a 2704 3228 2
+a 3217 4820 3
+a 4981 9671 4
+a 5729 3549 1
+a 2642 6609 4
+a 463 1441 9
+a 3391 3289 1
+a 1594 7145 9
+a 918 1231 8
+a 5950 5374 5
+a 4908 1913 9
+a 7006 5901 3
+a 8742 6872 4
+a 7253 9105 1
+a 9170 5611 5
+a 2303 4275 10
+a 3646 4124 10
+a 3424 6487 3
+a 9275 7404 7
+a 2999 4862 2
+a 6377 2751 3
+a 2053 6906 2
+a 2942 7439 5
+a 7488 3191 3
+a 593 5413 7
+a 8255 189 10
+a 554 712 7
+a 2 43 5
+a 289 2937 5
+a 3973 7512 4
+a 30 467 8
+a 660 165 6
+a 2976 9754 1
+a 7392 2533 7
+a 1205 3497 3
+a 2496 5003 8
+a 8887 9430 10
+a 68 1852 3
+a 2740 1975 3
+a 904 3123 5
+a 5463 7430 8
+a 948 1689 10
+a 1 2 10
+a 21 146 4
+a 1221 486 3
+a 9542 5779 9
+a 950 3507 8
+a 4616 6676 10
+a 7172 3115 3
+a 312 675 1
+a 2893 519 7
+a 1872 4575 2
+a 4260 9364 4
+a 444 589 3
+a 4064 4993 7
+a 7218 6582 4
+a 48 4250 4
+a 789 5111 2
+a 2702 2748 9
+a 133 188 9
+a 37 126 6
+a 127 301 8
+a 331 510 3
+a 3413 7913 2
+a 421 1251 10
+a 4020 8968 6
+a 8028 3474 4
+a 109 1723 8
+a 504 1519 3
+a 2296 2056 5
+a 5630 4916 9
+a 1188 167 7
+a 2984 216 9
+a 6256 8701 10
+a 1754 1424 8
+a 321 386 9
+a 9663 6523 6
+a 4511 467 3
+a 522 1318 1
+a 3145 6939 3
+a 3577 2959 1
+a 7973 7318 10
+a 9392 7497 5
+a 410 6220 3
+a 6397 8807 3
+a 671 1678 1
+a 83 99 3
+a 237 4910 2
+a 7423 8343 9
+a 8238 5374 6
+a 243 293 10
+a 3703 5818 9
+a 4394 3115 8
+a 6025 6133 4
+a 5801 5956 2
+a 5483 4383 2
+a 2258 1582 5
+a 68 695 2
+a 1067 1420 3
+a 3146 1991 3
+a 7698 1672 1
+a 158 289 7
+a 456 1171 2
+a 1419 2425 6
+a 551 8265 4
+a 4190 8963 3
+a 318 9209 5
+a 7307 816 6
+a 1696 5730 2
+a 76 6281 8
+a 40 704 6
+a 62 2212 9
+a 4035 6489 5
+a 203 556 9
+a 1549 171 9
+a 633 1352 1
+a 2154 7915 3
+a 7288 1457 9
+a 4489 2168 8
+a 9176 6428 1
+a 292 382 3
+a 67 106 5
+a 142 1008 4
+a 5875 5470 6
+a 6562 1601 4
+a 86 548 6
+a 406 9475 1
+a 3125 1378 8
+a 6339 9259 1
+a 830 4676 9
+a 2904 8879 2
+a 3530 6926 6
+a 198 334 5
+a 350 1012 8
+a 2794 3600 10
+a 37 39 5
+a 470 3633 2
+a 23 49 3
+a 308 565 7
+a 746 2023 8
+a 9107 9363 4
+a 1770 3339 6
+a 8874 6609 2
+a 8802 8107 3
+a 452 536 4
+a 3582 5505 9
+a 7474 2159 2
+a 5821 9619 8
+a 2789 3612 1
+a 6087 1763 3
+a 7021 2162 7
+a 171 2842 4
+a 7403 1668 10
+a 6325 2400 8
+a 5429 9376 7
+a 12 81 4
+a 142 1594 9
+a 3393 1864 10
+a 2757 209 3
+a 2575 949 5
+a 9 78 8
+a 78 1877 4
+a 2274 1392 3
+a 4842 8271 8
+a 390 5310 3
+a 4666 7134 3
+a 1456 7774 10
+a 370 482 3
+a 131 3509 5
+a 4646 5760 5
+a 3238 8499 8
+a 295 906 7
+a 1747 1474 5
+a 8532 7702 8
+a 7666 6464 3
+a 8570 9991 10
+a 405 8830 6
+a 6837 5634 3
+a 338 1057 7
+a 3535 4964 2
+a 1400 991 10
+a 1901 1697 3
+a 888 1256 9
+a 319 812 9
+a 1019 4474 9
+a 2473 7093 9
+a 483 5659 7
+a 3351 5983 2
+a 7710 1929 6
+a 5161 6416 10
+a 4 99 4
+a 309 1100 1
+a 7202 4906 4
+a 9048 8210 3
+a 348 830 10
+a 4398 3970 4
+a 7740 9218 8
+a 6638 4797 3
+a 8048 7676 9
+a 107 1698 9
+a 720 3482 3
+a 8344 4219 3
+a 1341 241 1
+a 2490 403 10
+a 1631 8368 1
+a 1950 1546 1
+a 6845 3776 7
+a 76 420 8
+a 820 178 2
+a 3179 90 10
+a 6518 1245 10
+a 1648 2018 7
+a 2719 3025 6
+a 8623 7830 10
+a 741 3054 3
+a 1509 2256 3
+a 2502 866 3
+a 8925 5692 2
+a 83 115 7
+a 541 228 6
+a 6961 773 7
+a 3545 1600 4
+a 6547 7878 5
+a 730 5121 6
+a 5020 1074 6
+a 21 2401 3
+a 2965 1115 5
+a 3443 1068 4
+a 6808 3140 2
+a 401 5711 7
+a 1904 2670 4
+a 3059 2073 3
+a 3777 4237 8
+a 8501 4388 7
+a 7265 2241 10
+a 6726 7812 7
+a 4401 9603 6
+a 46 609 1
+a 2225 3406 2
+a 1097 2356 5
+a 1511 3924 5
+a 377 2513 1
+a 3252 4299 10
+a 6075 6499 9
+a 7394 3203 5
+a 9548 7029 3
+a 553 997 1
+a 144 979 7
+a 390 604 3
+a 667 8255 7
+a 832 8700 3
+a 6245 1275 2
+a 8470 7233 4
+a 2656 519 3
+a 168 337 3
+a 3234 1054 1
+a 3980 1460 3
+a 7408 1521 9
+a 5526 9346 7
+a 3757 1618 2
+a 8997 7234 5
+a 1724 1852 3
+a 7576 1055 6
+a 221 801 1
+a 1266 8318 10
+a 234 9044 10
+a 20 54 8
+a 634 162 1
+a 734 4410 10
+a 4179 4523 2
+a 1624 368 8
+a 1049 2976 7
+a 5399 1491 7
+a 4 9 10
+a 45 85 2
+a 249 19 7
+a 426 596 10
+a 7579 2779 10
+a 625 810 1
+a 4183 180 3
+a 6103 2670 4
+a 6826 7886 7
+a 9256 1440 9
+a 476 7545 5
+a 8120 1927 7
+a 543 1988 8
+a 162 391 9
+a 440 6349 10
+a 8301 5770 9
+a 1 20 1
+a 48 97 8
+a 81 135 9
+a 9999 6938 4
+a 3187 5017 8
+a 4795 7019 2
+a 8557 5936 7
+a 758 4421 10
+a 6567 5132 8
+a 3099 8640 10
+a 1362 3270 4
+a 262 1359 4
+a 1523 94 7
+a 8752 404 4
+a 755 5169 8
+a 1361 4668 4
+a 9991 860 4
+a 2959 3589 9
+a 6 123 2
+a 149 1528 5
+a 7826 1019 1
+a 8897 2229 2
+a 389 1080 7
+a 903 727 1
+a 1345 6775 10
+a 9604 7637 9
+a 7847 8016 1
+a 123 242 1
+a 22 4213 4
+a 18 46 8
+a 46 1915 2
+a 49 5412 8
+a 4464 3374 9
+a 231 1436 1
+a 1908 5489 6
+a 5025 4919 8
+a 5733 9737 5
+a 7912 8700 10
+a 1056 8889 6
+a 53 2582 7
+a 75 190 2
+a 414 2850 9
+a 4173 2280 1
+a 8247 3124 5
+a 7124 6020 9
+a 748 896 1
+a 1232 1918 8
+a 2030 7153 5
+a 7521 3465 8
+a 724 1429 7
+a 875 930 8
+a 1116 1713 2
+a 4744 3453 1
+a 2769 3560 7
+a 3245 3642 9
+a 725 6743 9
+a 1 2003 9
+a 2836 7389 4
+a 2653 861 10
+a 8176 2961 3
+a 4016 8748 3
+a 9060 7381 4
+a 1049 1081 5
+a 39 108 9
+a 78 571 2
+a 770 2000 6
+a 934 6206 3
+a 3359 8268 8
+a 6131 6187 9
+a 122 879 9
+a 1094 7613 6
+a 9206 9043 4
+a 12 19 2
+a 623 6457 7
+a 48 212 10
+a 797 3236 7
+a 137 508 5
+a 1364 2033 4
+a 1368 4260 5
+a 8120 7656 8
+a 2920 2487 5
+a 5743 3598 2
+a 3145 4506 5
+a 5970 4838 9
+a 3852 9225 3
+a 9864 6770 10
+a 281 294 3
+a 651 1818 5
+a 1 14 2
+a 23 423 9
+a 1364 9015 10
+a 1427 7883 4
+a 461 5370 7
+a 2152 497 8
+a 9804 2447 7
+a 8611 5356 6
+a 239 681 10
+a 34 1303 7
+a 6711 2073 9
+a 1350 2769 10
+a 435 1065 4
+a 3411 2782 5
+a 3843 5853 2
+a 37 116 8
+a 9762 6031 3
+a 7323 457 8
+a 3306 6436 3
+a 72 87 7
+a 1545 1943 10
+a 7262 377 10
+a 1857 1046 6
+a 950 247 1
+a 2691 284 4
+a 8875 4143 8
+a 2278 1588 2
+a 580 890 6
+a 3435 5459 1
+a 7628 1101 6
+a 1662 1822 5
+a 2387 2865 7
+a 4091 417 1
+a 5988 638 10
+a 4326 6776 1
+a 5812 7315 5
+a 3437 6539 4
+a 259 3685 10
+a 5689 3017 8
+a 4736 5915 6
+a 39 199 2
+a 1468 2280 1
+a 4168 2498 2
+a 8129 5979 2
+a 6051 4306 3
+a 3172 5801 3
+a 4116 3513 2
+a 470 932 6
+a 2715 5714 7
+a 3348 5031 3
+a 7649 6961 3
+a 1855 2029 10
+a 54 7123 9
+a 3642 8807 9
+a 8628 9578 10
+a 7562 5914 3
+a 45 48 9
+a 938 1732 9
+a 1606 2772 4
+a 4569 291 6
+a 5547 3373 4
+a 7410 1832 9
+a 1401 2978 4
+a 1469 6610 3
+a 2091 7037 4
+a 3032 4884 1
+a 565 1110 5
+a 902 1207 10
+a 143 883 7
+a 456 544 6
+a 1490 652 9
+a 3051 7675 1
+a 3693 2910 2
+a 5571 2810 2
+a 1431 1929 1
+a 9674 8339 6
+a 429 365 3
+a 466 545 6
+a 562 3118 9
+a 3652 7914 1
+a 2667 602 9
+a 3095 2280 9
+a 6331 5332 8
+a 1202 2364 10
+a 9078 3320 1
+a 110 1778 1
+a 8100 6307 8
+a 4466 6841 5
+a 9662 416 5
+a 790 2254 6
+a 126 127 10
+a 568 1829 6
+a 4187 5125 3
+a 2770 1227 7
+a 6210 6423 4
+a 1655 2308 2
+a 3119 3882 7
+a 705 712 7
+a 5720 6029 4
+a 8362 9887 1
+a 386 552 1
+a 826 491 8
+a 228 138 2
+a 836 351 4
+a 2587 950 2
+a 4676 7973 9
+a 3900 7462 4
+a 63 110 7
+a 2819 3344 3
+a 8664 9899 4
+a 2163 9771 1
+a 39 257 10
+a 741 3156 8
+a 4087 1287 6
+a 4568 1505 10
+a 5051 5942 6
+a 9915 3546 10
+a 6312 4056 4
+a 445 666 5
+a 1163 7746 10
+a 8682 2478 6
+a 4230 6970 4
+a 1621 1807 1
+a 4177 244 5
+a 5944 7938 1
+a 1530 1390 10
+a 2624 1020 10
+a 6797 190 1
+a 3757 4696 4
+a 42 51 8
+a 875 267 5
+a 432 351 8
+a 435 2291 9
+a 106 112 5
+a 555 2467 10
+a 3388 713 8
+a 4511 866 1
+a 521 8053 5
+a 8766 2456 8
+a 3510 2255 10
+a 2831 6456 7
+a 33 55 10
+a 508 1934 4
+a 1670 353 1
+a 1745 4526 8
+a 215 264 2
+a 903 2460 9
+a 1061 4410 6
+a 9267 1014 1
+a 8613 5212 4
+a 258 615 6
+a 6 61 6
+a 4 14 2
+a 23 223 7
+a 790 4438 7
+a 8766 9088 10
+a 1120 1579 4
+a 2 39 6
+a 39 1286 10
+a 658 1349 8
+a 6432 4612 3
+a 4273 9461 3
+a 4294 1102 10
+a 3694 2209 6
+a 146 391 8
+a 2175 948 7
+a 2107 1130 10
+a 9410 3443 6
+a 407 445 2
+a 4003 818 5
+a 7925 8249 10
+a 4695 7839 5
+a 4487 8082 1
+a 329 1661 7
+a 487 791 7
+a 223 1297 6
+a 2352 2338 9
+a 3815 8680 2
+a 3541 5547 7
+a 2810 5202 2
+a 941 351 4
+a 1705 4452 3
+a 3252 6592 2
+a 5407 7424 2
+a 3923 4494 9
+a 173 475 9
+a 5 213 10
+a 1178 3393 10
+a 4417 284 8
+a 7196 3879 7
+a 9066 9586 8
+a 1826 9900 7
+a 2311 1472 6
+a 6316 8631 1
+a 9101 2940 2
+a 506 582 1
+a 7 26 4
+a 42 971 8
+a 1585 5341 9
+a 555 640 7
+a 4648 648 9
+a 7039 2714 4
+a 12 27 4
+a 5785 787 4
+a 5863 712 1
+a 3745 8553 3
+a 2 3 10
+a 470 494 7
+a 2719 383 7
+a 22 1931 7
+a 6465 375 4
+a 8031 8391 10
+a 8481 383 5
+a 2790 3156 6
+a 2561 5399 10
+a 291 4531 8
+a 9542 8053 10
+a 1015 1753 7
+a 7351 1931 9
+a 38 3135 5
+a 590 6397 4
+a 9569 4760 6
+a 3402 248 10
+a 4922 1496 10
+a 9 19 2
+a 175 227 6
+a 1770 167 7
+a 3566 2818 5
+a 5740 7714 3
+a 78 1312 7
+a 3405 4387 2
+a 2703 2161 4
+a 6716 5429 8
+a 4968 7337 5
+a 1597 3996 8
+a 6708 3568 3
+a 1256 1480 9
+a 2 23 10
+a 72 1967 4
+a 615 2653 2
+a 10 106 5
+a 180 3655 1
+a 6669 6065 4
+a 913 7615 1
+a 4454 5602 5
+a 8968 6640 9
+a 3721 1628 5
+a 31 67 1
+a 169 3485 6
+a 2854 6712 4
+a 3960 3009 1
+a 6529 2274 1
+a 8938 3410 5
+a 2444 3170 6
+a 158 1935 4
+a 1989 1234 4
+a 4401 616 3
+a 291 2849 5
+a 1063 3025 8
+a 6618 2275 7
+a 6126 6069 4
+a 229 243 4
+a 5681 908 6
+a 4378 3651 2
+a 1458 3114 4
+a 5380 1818 5
+a 337 1301 10
+a 560 1606 1
+a 5426 4114 2
+a 9320 8697 7
+a 4276 9100 10
+a 47 64 6
+a 2569 2926 2
+a 3816 8329 7
+a 5688 8987 8
+a 5132 96 2
+a 4 62 6
+a 1238 1669 2
+a 5126 633 7
+a 6327 1220 4
+a 1951 6291 4
+a 2435 9080 8
+a 4250 1660 4
+a 388 1451 7
+a 89 185 4
+a 1340 664 1
+a 5516 5267 3
+a 2655 2742 8
+a 3100 2733 3
+a 3114 7842 10
+a 4279 1061 7
+a 6356 244 3
+a 5265 4866 6
+a 8780 9981 2
+a 1678 3221 5
+a 3878 253 2
+a 1086 4136 1
+a 53 105 2
+a 164 371 10
+a 569 1427 9
+a 3629 1506 5
+a 9465 3397 5
+a 159 2647 1
+a 5530 3585 10
+a 4000 431 4
+a 556 718 5
+a 8623 2605 5
+a 118 4408 5
+a 516 8060 4
+a 72 280 3
+a 978 4074 1
+a 2271 7166 2
+a 4105 4362 4
+a 2782 350 10
+a 88 174 9
+a 7 24 1
+a 26 60 2
+a 81 3614 9
+a 6023 4356 1
+a 4019 2260 9
+a 1394 5152 10
+a 428 2622 1
+a 1620 3710 7
+a 2321 4830 3
+a 9313 7375 9
+a 2778 6625 10
+a 29 949 8
+a 461 702 7
+a 736 1217 1
+a 3505 190 6
+a 5595 1240 8
+a 7828 8017 1
+a 4962 6466 3
+a 1170 1356 3
+a 5788 3026 8
+a 5802 4275 10
+a 74 135 2
+a 1931 4123 6
+a 5593 2724 4
+a 2611 1872 9
+a 3114 2762 5
+a 4458 4468 9
+a 5664 6045 2
+a 1522 1869 4
+a 1855 5652 1
+a 755 3426 6
+a 1843 6009 5
+a 4968 5986 9
+a 4265 858 5
+a 350 472 6
+a 129 180 4
+a 1846 5801 6
+a 7039 2123 7
+a 9233 7388 5
+a 4774 8268 3
+a 5869 4147 4
+a 201 61 3
+a 6733 6058 7
+a 1740 7767 7
+a 4 276 7
+a 364 674 4
+a 1467 2148 7
+a 1463 2460 7
+a 999 4196 4
+a 6432 7120 5
+a 8190 7820 9
+a 1994 3472 8
+a 548 819 6
+a 2305 582 4
+a 891 5190 6
+a 6078 9842 3
+a 982 1075 1
+a 315 561 9
+a 622 1812 6
+a 3784 5698 1
+a 4603 7047 6
+a 9866 8729 5
+a 7417 6870 10
+a 4755 4758 8
+a 155 3141 3
+a 4357 8598 10
+a 2818 5658 7
+a 1982 3236 2
+a 5837 3330 2
+a 823 3706 10
+a 9519 9612 10
+a 8212 6685 8
+a 1090 6386 6
+a 7382 8394 9
+a 26 416 4
+a 53 1218 7
+a 4395 6492 1
+a 7987 8670 8
+a 98 194 3
+a 1579 272 1
+a 2736 280 10
+a 6879 1165 2
+a 3713 8389 2
+a 4639 3755 6
+a 7105 8929 10
+a 107 1877 1
+a 1134 1156 1
+a 1542 733 10
+a 7822 8899 10
+a 203 271 2
+a 426 2484 7
+a 1744 6013 9
+a 5709 5933 3
+a 8030 4820 6
+a 4879 9930 6
+a 7596 5799 5
+a 837 909 7
+a 1545 1940 5
+a 1773 1360 10
+a 10 15 3
+a 451 4417 2
+a 920 5940 4
+a 6697 5438 1
+a 1977 2707 5
+a 117 398 9
+a 6 10 6
+a 1045 1207 7
+a 3372 5430 5
+a 4591 9601 6
+a 5517 6952 4
+a 3496 7616 1
+a 127 1238 6
+a 8798 2478 6
+a 4626 3602 6
+a 1261 4919 7
+a 35 112 1
+a 250 207 2
+a 5453 4760 5
+a 8297 3142 8
+a 9263 4805 1
+a 6499 3255 8
+a 1215 6919 7
+a 4464 4244 3
+a 2312 2024 3
+a 1941 2092 3
+a 2366 5530 8
+a 3185 3395 7
+a 4961 4859 6
+a 7809 8301 9
+a 9872 1957 5
+a 6255 6645 8
+a 391 1061 6
+a 24 765 5
+a 2833 1927 3
+a 8482 530 1
+a 6302 5949 2
+a 1980 1594 5
+a 8150 7754 4
+a 1364 308 6
+a 1512 425 5
+a 4800 62 3
+a 7937 8376 7
+a 3706 9543 6
+a 316 757 8
+a 2226 2331 8
+a 3711 4028 3
+a 86 389 6
+a 786 9606 1
+a 157 715 8
+a 2978 4324 3
+a 353 148 4
+a 6012 298 3
+a 3252 7364 4
+a 7434 3398 9
+a 1640 1895 8
+a 149 161 4
+a 81 342 8
+a 1232 2969 10
+a 223 6959 2
+a 232 501 6
+a 616 849 2
+a 8896 5250 7
+a 4335 9578 2
+a 7301 929 8
+a 4387 5433 7
+a 3421 8370 5
+a 199 240 7
+a 1026 5178 10
+a 5893 1107 8
+a 651 358 10
+a 54 2314 8
+a 3752 1083 3
+a 6483 1728 7
+a 2694 936 10
+a 2555 7341 8
+a 8674 1927 2
+a 606 6308 8
+a 18 151 4
+a 1636 196 8
+a 2025 4878 9
+a 4149 6677 9
+a 40 169 4
+a 6070 5488 4
+a 9705 5744 3
+a 9728 4981 7
+a 5564 9964 6
+a 1343 3229 10
+a 362 1372 5
+a 204 533 6
+a 6361 889 8
+a 6558 1840 3
+a 4641 4554 10
+a 1183 863 5
+a 4134 332 2
+a 3695 1170 7
+a 7635 5337 6
+a 5681 6850 4
+a 2426 1251 6
+a 73 761 1
+a 315 458 3
+a 150 255 8
+a 828 449 4
+a 7400 491 2
+a 9346 1663 9
+a 6175 5994 4
+a 1316 3746 8
+a 4581 1065 7
+a 455 2132 2
+a 941 2952 10
+a 131 201 2
+a 1591 355 4
+a 3055 561 2
+a 1025 637 1
+a 3707 6924 1
+a 7276 1547 10
+a 319 517 8
+a 5143 4309 10
+a 1410 2308 2
+a 5686 7080 2
+a 7402 2640 1
+a 3707 2222 3
+a 392 606 5
+a 1475 3275 4
+a 5105 7261 3
+a 2 2441 10
+a 169 6149 10
+a 7191 1821 1
+a 7230 4998 10
+a 4879 2646 8
+a 5104 522 3
+a 9559 4169 4
+a 9053 534 10
+a 3892 3781 9
+a 132 693 7
+a 1266 1816 3
+a 1757 4066 10
+a 5081 6139 9
+a 8405 7883 4
+a 9759 7258 9
+a 5971 9981 9
+a 7863 4751 3
+a 1689 4451 9
+a 2016 8325 9
+a 9094 1313 10
+a 2245 8963 6
+a 506 703 2
+a 824 1766 1
+a 115 187 8
+a 1904 114 6
+a 6871 692 9
+a 6457 6428 10
+a 3831 5831 6
+a 2375 6439 5
+a 8106 7594 9
+a 5030 9816 8
+a 172 199 1
+a 954 1161 8
+a 4951 7559 9
+a 3953 2731 4
+a 4107 300 7
+a 5866 3505 5
+a 9625 4569 7
+a 122 1679 6
+a 9327 3684 7
+a 2865 78 10
+a 7128 8562 7
+a 27 76 7
+a 598 972 8
+a 1294 28 7
+a 580 4261 7
+a 1426 3744 7
+a 2111 5377 10
+a 2639 2238 1
+a 674 5940 6
+a 8 207 4
+a 4214 6368 7
+a 2453 6082 1
+a 3 149 9
+a 2280 327 3
+a 1288 1555 9
+a 2115 5330 10
+a 2557 1769 10
+a 8642 1792 7
+a 4653 4363 5
+a 412 924 6
+a 679 1074 1
+a 6388 1069 6
+a 7926 3020 3
+a 4523 7807 4
+a 16 30 1
+a 65 4805 8
+a 2601 5633 10
+a 3167 6645 6
+a 1885 6257 6
+a 2540 3029 5
+a 2074 8480 5
+a 200 404 7
+a 1142 1369 4
+a 1510 1168 3
+a 4781 9823 6
+a 421 700 4
+a 3180 3311 7
+a 8346 9205 3
+a 5828 2938 6
+a 1610 5968 3
+a 6052 6392 4
+a 4517 9292 9
+a 986 2442 9
+a 4456 482 3
+a 3405 5504 9
+a 5205 5374 7
+a 8901 7788 6
+a 6251 727 8
+a 922 1284 9
+a 255 450 7
+a 2710 3004 9
+a 3217 9555 5
+a 1856 188 2
+a 7154 3555 7
+a 7188 8426 5
+a 9531 7340 3
+a 27 252 6
+a 7118 9688 9
+a 7253 6523 4
+a 398 1672 3
+a 3594 3508 8
+a 3808 143 6
+a 9316 9194 5
+a 4325 4512 9
+a 4501 1324 9
+a 8507 8291 8
+a 46 68 7
+a 1432 2647 2
+a 3648 637 9
+a 5446 5246 9
+a 9191 7254 5
+a 2414 2435 1
+a 3805 575 9
+a 1927 713 7
+a 6423 4562 3
+a 5222 2800 3
+a 2704 5990 8
+a 5085 8940 7
+a 1217 1739 8
+a 31 641 10
+a 1723 2063 5
+a 7593 9298 3
+a 1648 1967 5
+a 3190 2447 1
+a 3485 2815 8
+a 6730 3653 3
+a 9533 4038 5
+a 9460 5376 2
+a 1040 627 9
+a 2969 3826 7
+a 4662 1470 4
+a 8918 5582 8
+a 107 417 5
+a 359 390 10
+a 439 484 6
+a 5378 6560 7
+a 2893 6166 9
+a 6052 8761 3
+a 6279 4974 9
+a 1834 4675 10
+a 568 1027 10
+a 1223 3228 8
+a 365 5611 9
+a 5303 8715 1
+a 6193 8069 2
+a 746 1120 6
+a 6332 4465 1
+a 316 6294 4
+a 9930 9361 3
+a 78 390 3
+a 212 235 10
+a 872 1158 7
+a 1864 652 5
+a 3530 2091 8
+a 2316 5853 7
+a 505 7181 4
+a 8831 663 7
+a 1189 959 2
+a 9538 6892 2
+a 275 3788 9
+a 8035 5094 10
+a 615 747 4
+a 89 496 2
+a 949 1849 3
+a 2441 5239 5
+a 4930 7149 8
+a 1384 2729 10
+a 9236 5761 4
+a 1191 2458 10
+a 5112 5078 1
+a 3392 7899 8
+a 67 221 5
+a 2231 3221 7
+a 4206 2539 6
+a 627 2689 3
+a 3142 2662 5
+a 8981 2684 4
+a 158 6710 5
+a 1860 2892 9
+a 479 386 2
+a 9467 3666 7
+a 9664 4912 10
+a 7528 3691 3
+a 358 3723 10
+a 2890 3685 3
+a 28 61 3
+a 7 18 3
+a 209 976 4
+a 3814 3099 5
+a 3543 3559 8
+a 2319 9868 7
+a 359 3063 8
+a 4622 8310 1
+a 6718 2572 6
+a 20 237 3
+a 1890 4405 8
+a 4621 1038 7
+a 401 849 8
+a 569 3107 4
+a 957 3728 3
+a 7089 7013 10
+a 6659 9586 5
+a 98 444 7
+a 363 3711 4
+a 1506 746 1
+a 8077 172 3
+a 85 190 8
+a 17 19 7
+a 97 685 4
+a 1788 792 5
+a 4667 1789 2
+a 7382 1953 4
+a 4573 4723 7
+a 1240 6369 6
+a 588 789 7
+a 2617 4786 6
+a 9882 7670 6
+a 40 2263 1
+a 4115 582 8
+a 1942 2492 9
+a 9126 6984 8
+a 6984 3719 2
+a 4098 9681 7
+a 1846 713 6
+a 261 1194 9
+a 1508 6115 7
+a 217 2837 8
+a 2835 6633 2
+a 274 364 9
+a 844 2923 7
+a 808 6744 3
+a 920 7227 3
+a 1878 2927 1
+a 92 268 10
+a 2423 7538 6
+a 114 685 1
+a 6 12 6
+a 13 206 6
+a 6586 6011 9
+a 447 1064 5
+a 1313 5104 2
+a 2495 9132 3
+a 8903 546 1
+a 23 7301 6
+a 348 7941 2
+a 218 3818 5
+a 27 405 6
+a 765 99 5
+a 2160 3508 8
+a 250 609 9
+a 1210 3069 9
+a 8539 3383 10
+a 5620 317 6
+a 6556 2224 6
+a 91 234 8
+a 120 191 10
+a 157 524 9
+a 587 5997 3
+a 722 8765 8
+a 4694 2303 9
+a 4311 3559 1
+a 552 1628 10
+a 3627 2465 2
+a 3435 705 2
+a 692 1156 5
+a 77 278 10
+a 1061 654 10
+a 3840 863 8
+a 2897 4906 3
+a 6583 5113 7
+a 1035 9042 4
+a 2028 2454 6
+a 7210 5232 1
+a 3124 6535 2
+a 3655 8694 1
+a 6447 8199 5
+a 7144 8352 6
+a 549 700 10
+a 142 1179 9
+a 206 533 3
+a 1683 1053 10
+a 3647 3636 10
+a 349 6297 9
+a 5865 1571 9
+a 3140 666 2
+a 7095 9846 10
+a 7290 9140 8
+a 14 186 7
+a 585 1358 3
+a 6174 8141 9
+a 319 353 2
+a 4803 1770 5
+a 7740 2714 3
+a 7437 924 1
+a 4745 4446 5
+a 2732 2766 7
+a 3342 3788 1
+a 2448 6907 3
+a 7330 537 3
+a 217 523 9
+a 4 56 5
+a 447 2657 10
+a 2764 7055 7
+a 2824 6054 3
+a 5304 6059 2
+a 6137 3449 10
+a 468 5984 2
+a 285 300 2
+a 2831 9027 6
+a 7083 4376 10
+a 551 2453 5
+a 5040 190 9
+a 3886 45 5
+a 9745 2761 3
+a 9052 560 9
+a 4824 6675 6
+a 4669 5482 5
+a 1588 2045 1
+a 1257 100 4
+a 7141 299 3
+a 9464 6538 8
+a 434 485 8
+a 561 1408 1
+a 877 2996 5
+a 1642 5855 1
+a 589 1924 3
+a 8856 852 8
+a 8210 2997 6
+a 170 455 2
+a 548 6184 7
+a 6192 68 7
+a 9870 1113 7
+a 856 1744 10
+a 3885 787 6
+a 8509 2452 7
+a 5820 2488 5
+a 731 7717 10
+a 8770 1940 6
+a 6378 8780 7
+a 244 2248 8
+a 4072 2320 3
+a 2878 2602 9
+a 5846 5174 2
+a 353 809 5
+a 146 1287 1
+a 2697 2297 4
+a 4287 2347 9
+a 6040 6641 3
+a 827 2934 2
+a 7785 7432 7
+a 6970 1074 10
+a 1151 1340 9
+a 3895 1065 10
+a 4824 1841 9
+a 9548 2793 10
+a 1263 1501 7
+a 4952 6528 8
+a 7856 7947 8
+a 6675 1911 10
+a 310 2383 3
+a 1198 3902 6
+a 9 13 10
+a 222 331 6
+a 1093 7034 10
+a 9027 7425 8
+a 7521 7291 8
+a 720 774 7
+a 3297 3914 5
+a 6896 1040 5
+a 8815 4576 9
+a 5980 7554 7
+a 9175 4756 1
+a 35 8458 9
+a 8283 4444 5
+a 311 383 3
+a 4127 2825 9
+a 5748 2156 2
+a 8447 6291 9
+a 2007 3242 9
+a 2153 1279 5
+a 4184 1282 3
+a 4330 5077 6
+a 6815 8072 10
+a 142 276 6
+a 902 1964 4
+a 646 828 8
+a 860 1459 6
+a 2028 1588 2
+a 5753 4188 8
+a 4126 1871 6
+a 7039 801 8
+a 2658 2393 3
+a 3606 7157 9
+a 2842 4160 5
+a 8471 1226 4
+a 234 1117 2
+a 1951 1991 4
+a 193 469 5
+a 1036 197 6
+a 2573 810 3
+a 1817 537 6
+a 2495 1019 6
+a 3437 889 7
+a 1371 722 2
+a 3903 3480 10
+a 473 1421 2
+a 285 727 10
+a 740 220 7
+a 1441 72 7
+a 5450 3999 4
+a 8249 6026 9
+a 7816 626 6
+a 324 2724 7
+a 8483 3350 4
+a 6416 2266 5
+a 850 3226 2
+a 36 41 2
+a 181 275 10
+a 1246 392 8
+a 52 1809 5
+a 6549 3130 6
+a 6558 9843 7
+a 8795 320 5
+a 6966 4153 3
+a 1537 4230 5
+a 305 6928 8
+a 3222 1732 5
+a 41 135 1
+a 759 1066 10
+a 2137 1140 5
+a 5172 9923 2
+a 1678 2264 7
+a 1700 8207 4
+a 8861 9946 9
+a 1158 2028 5
+a 990 1417 8
+a 1581 6540 10
+a 2233 6402 2
+a 8733 1457 9
+a 2375 3191 4
+a 5160 2923 10
+a 2616 967 8
+a 5582 2852 5
+a 7610 4483 7
+a 3366 7797 2
+a 5769 1538 2
+a 317 1448 8
+a 1236 1521 3
+a 1857 4320 5
+a 3671 462 5
+a 16 32 5
+a 57 3470 8
+a 1323 5303 8
+a 4057 7826 2
+a 5200 4713 3
+a 1728 7159 4
+a 524 8962 2
+a 898 2813 8
+a 2903 4349 4
+a 305 2456 7
+a 1379 697 4
+a 8335 1375 2
+a 4386 3044 7
+a 566 837 10
+a 28 105 7
+a 3489 789 9
+a 3548 1029 6
+a 6514 758 1
+a 7993 5645 5
+a 5999 1903 2
+a 9268 2659 5
+a 2355 6143 9
+a 7180 1612 2
+a 4670 6694 9
+a 10 56 9
+a 1982 570 3
+a 3387 1669 5
+a 3471 7291 9
+a 3611 4255 8
+a 4865 902 8
+a 8881 3168 8
+a 143 678 7
+a 1421 2143 2
+a 4701 280 7
+a 3635 1380 4
+a 1787 4415 10
+a 110 151 7
+a 575 454 6
+a 64 3519 9
+a 1306 5710 1
+a 2704 9628 9
+a 6904 2631 3
+a 1458 3389 5
+a 5 15 3
+a 35 42 2
+a 261 2148 7
+a 9190 3683 6
+a 58 114 1
+a 700 3060 6
+a 5757 7070 4
+a 1170 1021 10
+a 132 2467 7
+a 5408 1570 3
+a 3191 3718 9
+a 114 129 3
+a 311 679 10
+a 2768 5733 6
+a 16 17 5
+a 113 321 8
+a 521 8117 2
+a 3803 8308 8
+a 5066 2013 4
+a 5232 6403 4
+a 4686 9138 8
+a 1110 6745 5
+a 968 1836 4
+a 2922 1708 1
+a 8118 779 6
+a 9594 2701 5
+a 890 1020 1
+a 1902 1396 3
+a 6756 1503 1
+a 7152 7747 6
+a 5603 5276 10
+a 224 418 9
+a 2940 5079 3
+a 139 231 3
+a 326 13 10
+a 1424 600 8
+a 3643 3422 10
+a 1448 6125 1
+a 2022 1317 8
+a 5698 7539 10
+a 6630 7745 3
+a 4243 6093 7
+a 1586 7027 6
+a 1178 3640 9
+a 77 560 8
+a 269 332 7
+a 1501 2563 5
+a 4420 3985 6
+a 5823 1175 8
+a 5233 5351 9
+a 965 481 1
+a 1 4481 6
+a 4388 731 10
+a 1505 2544 9
+a 4136 7578 6
+a 1 3508 2
+a 5755 570 6
+a 688 885 2
+a 1044 6075 5
+a 2564 7142 3
+a 4638 2544 1
+a 30 1206 4
+a 459 2864 5
+a 4036 545 7
+a 6643 2035 10
+a 7437 4890 3
+a 5974 6291 5
+a 8773 5442 4
+a 9252 9019 2
+a 751 1320 2
+a 5549 2833 3
+a 228 2865 5
+a 1394 3830 7
+a 273 1191 1
+a 674 164 2
+a 2561 3434 7
+a 9307 7067 6
+a 8237 3016 1
+a 151 255 8
+a 31 56 5
+a 1 6 1
+a 839 619 4
+a 951 5714 8
+a 6908 917 6
+a 4777 8295 6
+a 2002 5569 6
+a 8 9 4
+a 117 2922 10
+a 243 6564 9
+a 2572 3321 7
+a 1439 5596 5
+a 4669 972 5
+a 5981 8507 8
+a 197 1058 2
+a 1555 2762 1
+a 940 3116 5
+a 1915 4810 3
+a 161 509 1
+a 846 1533 6
+a 5943 1648 4
+a 3818 9076 10
+a 4441 5210 3
+a 96 179 4
+a 150 697 8
+a 637 861 9
+a 1011 846 9
+a 7025 1767 8
+a 8002 1125 8
+a 6273 7574 4
+a 631 3800 7
+a 2965 5768 8
+a 6841 4548 8
+a 3302 8196 4
+a 79 460 3
+a 242 698 3
+a 108 766 10
+a 2305 249 7
+a 3431 744 8
+a 3342 6556 4
+a 8495 2104 4
+a 716 3456 3
+a 3241 262 3
+a 3833 9775 3
+a 76 112 7
+a 31 66 10
+a 248 40 3
+a 1886 1228 7
+a 5281 1173 3
+a 5659 2861 6
+a 7065 6817 8
+a 175 272 6
+a 3216 9223 1
+a 5749 1884 5
+a 71 186 3
+a 5729 1304 3
+a 7701 1972 7
+a 8093 3881 10
+a 9820 1515 9
+a 1309 2373 10
+a 4340 6493 10
+a 3470 5074 6
+a 52 483 6
+a 564 334 1
+a 1721 1706 8
+a 2 75 3
+a 152 2715 4
+a 235 8384 2
+a 9171 7537 1
+a 5301 8799 3
+a 7469 7713 4
+a 3423 3118 8
+a 448 1546 9
+a 2555 7370 7
+a 7907 6722 9
+a 3241 697 4
+a 653 1108 7
+a 6226 6272 3
+a 8140 3045 9
+a 9602 4605 5
+a 259 275 1
+a 342 377 4
+a 1067 1194 6
+a 1297 4892 3
+a 1423 6818 4
+a 6068 7507 9
+a 1938 822 1
+a 6060 791 7
+a 5381 6060 6
+a 2803 6954 8
+a 94 508 10
+a 411 791 6
+a 2444 285 2
+a 2073 3205 3
+a 4863 1710 8
+a 5785 2356 3
+a 8874 3553 4
+a 2086 2429 10
+a 1182 1826 10
+a 9476 3005 8
+a 9875 529 8
+a 3546 6286 1
+a 756 1173 2
+a 4382 4885 6
+a 9341 231 3
+a 1631 4601 6
+a 5176 2680 9
+a 6047 4098 9
+a 1237 1787 3
+a 6255 6416 6
+a 829 851 7
+a 2159 8570 5
+a 6080 1318 4
+a 373 408 10
+a 2107 2252 2
+a 993 850 5
+a 6059 1631 2
+a 4552 9129 1
+a 8145 7314 10
+a 3990 6891 5
+a 113 122 2
+a 4657 5808 1
+a 8563 3393 1
+a 4024 5649 8
+a 768 780 1
+a 1080 1590 1
+a 746 1913 1
+a 5132 4029 6
+a 2658 4123 4
+a 6564 8821 3
+a 3086 9303 7
+a 4 355 5
+a 118 4685 6
+a 5098 7415 7
+a 1074 2916 7
+a 264 1149 5
+a 3519 675 5
+a 3760 3614 7
+a 2136 5496 5
+a 2758 7271 3
+a 7855 2563 2
+a 7289 3952 2
+a 1 185 3
+a 296 4334 1
+a 2325 3633 3
+a 4123 8189 7
+a 483 3059 8
+a 1017 1236 8
+a 1446 6165 4
+a 5579 6974 9
+a 5170 4567 10
+a 7004 8702 3
+a 8119 4066 9
+a 5857 5627 5
+a 187 347 8
+a 1630 3157 10
+a 279 1187 8
+a 470 2955 8
+a 692 1450 1
+a 843 2298 7
+a 8046 4171 6
+a 2497 3736 9
+a 9182 9948 7
+a 185 363 6
+a 132 189 3
+a 147 342 6
+a 342 769 4
+a 3792 1114 3
+a 2286 1939 2
+a 612 2856 1
+a 121 151 10
+a 331 39 2
+a 550 245 2
+a 5267 2458 8
+a 1211 1789 5
+a 1905 5964 4
+a 8020 5990 9
+a 104 1689 10
+a 2191 1850 5
+a 1117 2164 2
+a 4406 9433 9
+a 2 12 5
+a 61 622 3
+a 956 6901 3
+a 4232 9358 9
+a 8021 2001 9
+a 33 46 6
+a 68 238 5
+a 1124 1311 7
+a 2697 4207 6
+a 7350 6172 7
+a 6 2992 8
+a 9409 1697 10
+a 131 4193 3
+a 2267 3782 9
+a 5643 7406 3
+a 6447 8816 3
+a 4580 882 9
+a 482 2233 8
+a 2 1 6
+a 1513 1598 2
+a 4376 27 9
+a 6333 262 3
+a 4660 5878 2
+a 6268 3203 3
+a 3 1294 2
+a 4319 5788 3
+a 2904 2851 6
+a 16 26 10
+a 3595 3652 9
+a 3725 4091 7
+a 52 4045 8
+a 2673 902 4
+a 3951 7597 1
+a 2991 547 6
+a 900 1450 5
+a 630 5461 10
+a 7110 4221 6
+a 8372 8493 5
+a 321 360 3
+a 314 540 4
+a 4707 722 10
+a 929 1019 3
+a 2930 3394 9
+a 7199 8778 1
+a 5498 2377 5
+a 9483 8896 9
+a 126 518 7
+a 4921 6113 6
+a 536 349 9
+a 1416 1699 8
+a 1723 1767 1
+a 6002 5176 4
+a 8655 5380 10
+a 6925 9914 8
+a 635 1804 6
+a 5644 5570 2
+a 1045 3927 2
+a 166 272 1
+a 437 1395 5
+a 552 1377 9
+a 9089 4572 5
+a 349 568 10
+a 1731 6783 8
+a 179 3 1
+a 3295 3 4
+a 7953 7127 3
+a 9332 5587 5
+a 14 3392 4
+a 67 71 10
+a 1306 7421 6
+a 7657 2025 7
+a 6456 7373 3
+a 23 36 7
+a 145 5717 8
+a 247 7321 2
+a 6348 1701 7
+a 2898 8355 4
+a 8507 2919 2
+a 2238 9449 3
+a 2193 3004 3
+a 4053 1081 7
+a 3129 7832 9
+a 5449 2237 2
+a 4730 9619 6
+a 600 1139 3
+a 226 859 6
+a 314 406 6
+a 3547 6757 5
+a 1379 5316 4
+a 4833 35 9
+a 7238 2441 3
+a 5079 2433 6
+a 634 9655 6
+a 1047 1282 3
+a 4430 6885 6
+a 102 7442 9
+a 5351 5469 5
+a 5989 4563 10
+a 2321 2926 5
+a 3163 3675 9
+a 6560 7532 6
+a 696 4031 3
+a 216 2548 7
+a 20 23 7
+a 21 81 10
+a 653 592 7
+a 8848 6896 5
+a 6011 9789 9
+a 889 993 3
+a 1287 826 6
+a 438 2974 6
+a 3031 4135 6
+a 1782 2089 1
+a 5560 6829 5
+a 2286 2383 9
+a 20 70 2
+a 1606 3047 10
+a 5322 2503 7
+a 943 8150 10
+a 67 270 6
+a 5605 4213 3
+a 9261 5450 8
+a 4957 7713 1
+a 4280 6903 10
+a 6484 918 8
+a 7980 6003 10
+a 317 854 8
+a 1586 4339 9
+a 6295 3769 4
+a 626 670 8
+a 22 48 10
+a 55 871 2
+a 2379 8880 10
+a 3981 6189 4
+a 8723 2101 7
+a 434 2900 2
+a 9230 915 4
+a 1602 2050 2
+a 2204 5511 10
+a 3625 2272 5
+a 6683 2478 8
+a 1555 2092 7
+a 81 756 9
+a 1531 1061 5
+a 1127 1907 9
+a 8657 8426 8
+a 14 22 2
+a 1305 1601 4
+a 4093 1326 7
+a 53 2075 8
+a 9489 3916 10
+a 6959 5525 6
+a 7097 6348 9
+a 3866 1440 2
+a 209 1259 8
+a 1614 290 4
+a 5967 4409 8
+a 593 4806 4
+a 263 8131 8
+a 5577 6874 2
+a 8560 4061 2
+a 152 165 3
+a 231 637 6
+a 3498 780 6
+a 6352 7676 1
+a 4028 4227 1
+a 144 1875 5
+a 8665 4648 2
+a 782 5847 8
+a 4763 1598 7
+a 78 100 10
+a 1276 2691 5
+a 521 620 3
+a 1702 1795 8
+a 6081 7613 2
+a 7911 7349 8
+a 1592 2249 4
+a 3 15 8
+a 85 631 3
+a 225 967 6
+a 3864 8107 3
+a 8924 6501 9
+a 555 6405 3
+a 8792 8704 1
+a 231 1068 7
+a 1271 1651 5
+a 4142 7277 4
+a 6213 8000 8
+a 22 14 7
+a 944 931 2
+a 7988 7599 3
+a 8489 5544 5
+a 9998 591 2
+a 42 64 7
+a 3313 3881 10
+a 315 2833 2
+a 3708 3505 9
+a 6094 7846 8
+a 859 4998 5
+a 6813 2738 9
+a 221 5007 9
+a 6590 3295 9
+a 8483 4940 6
+a 4750 9889 5
+a 2697 3205 4
+a 67 5508 4
+a 446 608 8
+a 62 994 10
+a 3815 1296 4
+a 6533 4980 10
+a 5874 5815 6
+a 8231 2229 5
+a 786 1776 2
+a 4962 7921 9
+a 1751 2265 3
+a 120 122 5
+a 249 373 1
+a 855 7056 2
+a 2705 4408 10
+a 164 2123 6
+a 196 9317 4
+a 7831 4960 4
+a 6 11 5
+a 2612 7237 4
+a 1845 8463 2
+a 6115 6401 4
+a 982 1602 10
+a 43 123 10
+a 1673 768 1
+a 3407 1554 6
+a 3912 2627 7
+a 4820 8059 9
+a 719 9669 1
+a 7707 1532 9
+a 3013 3464 10
+a 6645 6049 1
+a 1137 6012 9
+a 210 785 5
+a 5276 967 3
+a 692 841 9
+a 7882 7691 5
+a 9134 7215 7
+a 1387 3208 1
+a 7873 5570 3
+a 111 437 7
+a 311 716 2
+a 6846 2518 5
+a 305 704 5
+a 3718 2964 1
+a 7524 3919 2
+a 8022 2455 6
+a 291 9725 2
+a 1732 2606 9
+a 6419 1839 1
+a 806 890 3
+a 2578 349 1
+a 6034 79 7
+a 7479 396 4
+a 21 35 5
+a 2154 2726 1
+a 2734 6538 8
+a 9664 4332 6
+a 9011 4629 3
+a 89 103 6
+a 182 1725 5
+a 517 952 1
+a 1494 2260 7
+a 6999 5010 9
+a 2635 1665 4
+a 7905 4691 4
+a 1865 4097 2
+a 2173 7763 5
+a 3322 6812 4
+a 2334 3682 10
+a 443 686 5
+a 1113 1421 6
+a 107 462 9
+a 685 469 6
+a 3036 5124 6
+a 7252 7694 6
+a 2777 438 7
+a 3155 5024 2
+a 9053 1790 1
+a 7132 6190 2
+a 167 353 8
+a 1804 2229 7
+a 3375 747 7
+a 1804 7351 3
+a 706 8 5
+a 5126 404 3
+a 6583 3483 5
+a 796 6025 10
+a 96 189 8
+a 4497 7387 2
+a 222 4110 8
+a 2011 9383 5
+a 1651 2989 2
+a 20 87 6
+a 99 58 5
+a 5531 966 2
+a 5815 1222 8
+a 8282 5493 10
+a 5019 4179 6
+a 4454 70 10
+a 1779 3171 5
+a 6278 5276 1
+a 607 1018 10
+a 40 570 8
+a 4904 1612 9
+a 1599 1760 4
+a 4429 3195 2
+a 5096 3185 1
+a 1600 1210 7
+a 4409 4368 3
+a 12 702 2
+a 392 747 5
+a 1997 9793 6
+a 9867 8800 10
+a 506 2494 6
+a 3518 112 6
+a 1011 464 6
+a 1852 1038 5
+a 4948 178 4
+a 2706 8452 8
+a 8673 5918 7
+a 163 954 4
+a 416 856 7
+a 1077 4916 8
+a 2080 257 4
+a 1508 1719 2
+a 7366 2890 5
+a 9104 4135 4
+a 5369 3304 3
+a 8875 6925 7
+a 8785 2875 10
+a 9346 6134 5
+a 129 384 8
+a 3120 1063 10
+a 6810 1170 8
+a 8928 2324 7
+a 264 293 4
+a 731 1009 10
+a 2096 1951 1
+a 2931 3785 3
+a 6571 3394 9
+a 3782 3962 2
+a 5464 2721 7
+a 3964 4144 5
+a 234 346 10
+a 2698 471 8
+a 1901 1119 9
+a 7622 9729 5
+a 2334 4890 9
+a 63 6307 6
+a 2010 8883 10
+a 854 2190 5
+a 1879 6495 8
+a 39 50 2
+a 487 1480 1
+a 3501 3662 3
+a 3691 3731 5
+a 5854 7174 2
+a 4082 9349 1
+a 86 246 8
+a 27 74 5
+a 374 370 6
+a 9781 3835 8
+a 5492 7526 9
+a 2756 1018 6
+a 5995 5170 7
+a 2738 6689 3
+a 93 163 8
+a 262 1478 9
+a 2930 409 4
+a 9145 585 1
+a 3636 4952 9
+a 6457 842 8
+a 7376 3031 9
+a 9315 4517 3
+a 7606 1248 8
+a 3706 4227 2
+a 977 1126 9
+a 1473 2210 8
+a 2856 1401 2
+a 5177 1553 7
+a 2495 9072 6
+a 5697 8431 9
+a 6441 3462 9
+a 5474 5213 1
+a 6668 6661 4
+a 9014 8343 10
+a 5368 7882 9
+a 47 129 3
+a 101 399 6
+a 14 16 4
+a 38 835 10
+a 4509 867 2
+a 4358 638 8
+a 4914 3783 8
+a 1139 8104 1
+a 584 8539 1
+a 2340 2245 6
+a 427 611 2
+a 194 301 9
+a 524 8145 2
+a 2990 8 8
+a 1271 2902 10
+a 5609 3178 10
+a 3275 8522 2
+a 133 228 8
+a 6952 9645 5
+a 6167 975 2
+a 776 7254 9
+a 47 678 3
+a 276 566 2
+a 3976 744 5
+a 3971 4373 2
+a 4182 868 2
+a 5564 9201 4
+a 558 6950 8
+a 2097 5284 5
+a 470 2400 4
+a 7478 6569 8
+a 7993 5295 10
+a 51 154 9
+a 289 934 6
+a 1353 6797 7
+a 2171 7427 10
+a 4081 948 7
+a 2209 5464 5
+a 6315 2548 5
+a 537 648 4
+a 114 392 8
+a 975 4301 2
+a 3174 3893 9
+a 6566 3812 8
+a 630 976 6
+a 3164 2623 4
+a 2556 1929 4
+a 5198 4681 10
+a 5860 7854 2
+a 9409 8875 7
+a 572 8110 10
+a 1622 1792 4
+a 27 698 5
+a 4112 6446 9
+a 6859 4891 7
+a 464 2567 1
+a 3044 252 3
+a 5380 3229 7
+a 8186 763 10
+a 4106 5957 10
+a 2436 7829 3
+a 1083 1158 7
+a 1928 3420 1
+a 4807 500 9
+a 6255 4224 1
+a 550 2040 7
+a 260 8505 3
+a 6021 6887 10
+a 176 213 1
+a 18 19 4
+a 62 3554 5
+a 7312 5940 10
+a 2629 6627 10
+a 6477 7531 6
+a 7569 454 10
+a 8996 907 3
+a 135 254 5
+a 9547 7474 7
+a 40 3161 10
+a 91 135 5
+a 4500 7676 9
+a 1151 6193 1
+a 2151 9189 10
+a 4657 9081 5
+a 8454 1620 5
+a 6249 1712 5
+a 585 609 7
+a 3389 3422 3
+a 4128 1217 7
+a 2869 1690 1
+a 782 8173 3
+a 42 55 5
+a 90 154 10
+a 665 772 1
+a 2807 1405 8
+a 1150 255 9
+a 2215 3491 9
+a 3649 2159 8
+a 24 102 1
+a 226 773 6
+a 869 3229 3
+a 5464 2866 8
+a 646 654 2
+a 1248 808 5
+a 9364 2678 3
+a 2246 779 10
+a 7193 2847 8
+a 8130 6805 7
+a 9936 7035 3
+a 235 600 3
+a 2189 570 10
+a 4912 9124 6
+a 2789 3389 1
+a 326 1306 7
+a 1367 4325 1
+a 1448 9667 1
+a 5890 9447 10
+a 2158 2633 7
+a 1710 3767 3
+a 2829 8346 7
+a 67 83 9
+a 4145 6492 2
+a 2608 955 10
+a 3290 1275 1
+a 13 62 6
+a 2338 1335 4
+a 5231 5070 10
+a 7910 1252 3
+a 3305 4953 2
+a 57 592 6
+a 493 791 1
+a 108 413 10
+a 6867 2258 2
+a 8180 9394 7
+a 7164 98 10
+a 7365 2003 1
+a 2958 3544 2
+a 2551 3653 9
+a 7624 4545 6
+a 6914 8247 5
+a 1685 604 10
+a 647 760 1
+a 1011 2514 2
+a 650 2423 2
+a 2602 552 3
+a 3589 879 4
+a 1765 6706 2
+a 532 1259 4
+a 6760 76 7
+a 532 3231 5
+a 9303 9692 4
+a 27 147 7
+a 44 158 3
+a 221 3071 7
+a 157 5116 5
+a 6203 8860 5
+a 6818 9668 4
+a 1230 7815 5
+a 256 3989 8
+a 3419 365 7
+a 574 322 1
+a 791 7736 7
+a 7430 988 2
+a 2996 3363 9
+a 1 161 2
+a 551 1213 3
+a 60 71 3
+a 74 3234 4
+a 7276 9328 1
+a 2079 6290 5
+a 8951 7137 4
+a 1979 2034 6
+a 6849 356 10
+a 8232 8263 5
+a 902 1510 6
+a 250 715 9
+a 3162 147 6
+a 1819 4705 1
+a 1011 5060 2
+a 6352 8592 2
+a 9854 2766 7
+a 2061 2281 8
+a 755 929 5
+a 8113 2489 10
+a 4489 4169 9
+a 4482 3391 2
+a 221 1576 9
+a 12 126 2
+a 464 877 7
+a 1713 3664 5
+a 431 55 10
+a 3303 239 7
+a 2722 5731 10
+a 4253 1407 8
+a 6 1 7
+a 3702 5812 7
+a 7872 6354 3
+a 10 24 5
+a 63 1201 3
+a 1633 528 1
+a 5797 731 4
+a 389 2299 6
+a 155 9603 7
+a 8744 9386 10
+a 209 271 7
+a 60 5731 7
+a 3958 6620 4
+a 9066 2201 3
+a 11 39 5
+a 347 3186 1
+a 4737 220 1
+a 5025 859 5
+a 364 5913 3
+a 1541 1410 10
+a 3834 9155 10
+a 1652 2196 6
+a 1 4 1
+a 1191 454 9
+a 7610 4252 9
+a 1052 1586 10
+a 3185 123 8
+a 4033 183 3
+a 4670 8405 9
+a 4891 2906 5
+a 577 257 5
+a 4037 2586 10
+a 661 676 1
+a 2773 1458 4
+a 9845 8013 2
+a 9 11 4
+a 1641 1563 2
+a 9487 2673 5
+a 4194 2258 7
+a 2853 5579 1
+a 381 522 9
+a 104 1454 4
+a 540 2503 4
+a 3053 3050 10
+a 3175 5255 6
+a 7176 1520 7
+a 8240 4135 5
+a 6787 7812 10
+a 9224 7403 4
+a 1387 9367 5
+a 106 1599 3
+a 63 71 2
+a 95 544 3
+a 3350 739 2
+a 4371 3672 3
+a 5385 4899 6
+a 3020 9672 10
+a 453 2041 10
+a 962 2111 7
+a 5975 6074 5
+a 16 14 10
+a 55 52 1
+a 199 1218 8
+a 433 6687 8
+a 345 175 7
+a 6283 6817 5
+a 4431 6716 5
+a 38 165 4
+a 710 2707 4
+a 3966 228 5
+a 9846 792 7
+a 752 873 10
+a 1197 654 7
+a 4057 837 7
+a 4203 6710 7
+a 4423 9490 7
+a 5985 785 2
+a 9573 5050 1
+a 1251 3472 3
+a 3734 720 7
+a 332 1862 6
+a 2083 3495 7
+a 1024 2390 9
+a 130 389 1
+a 3608 850 7
+a 8980 3791 6
+a 414 1219 8
+a 6241 4311 2
+a 9959 4421 6
+a 5342 2237 5
+a 66 70 5
+a 215 997 5
+a 96 2481 5
+a 3518 5019 7
+a 27 271 4
+a 216 140 6
+a 5350 1686 4
+a 7857 4910 3
+a 9631 2120 7
+a 118 202 6
+a 3 6 10
+a 479 2147 8
+a 3574 249 10
+a 6647 922 10
+a 3570 6304 2
+a 3050 4331 4
+a 6693 91 9
+a 8372 177 6
+a 7549 8668 10
+a 6525 4269 8
+a 4008 5873 4
+a 33 49 5
+a 1587 1704 3
+a 4221 5215 3
+a 6587 6797 4
+a 2518 5324 5
+a 9829 9274 1
+a 5756 53 8
+a 7741 8569 2
+a 9192 7852 6
+a 257 339 8
+a 72 250 1
+a 417 4532 6
+a 495 1111 1
+a 5446 1331 8
+a 9783 5807 10
+a 4173 8625 3
+a 292 7557 10
+a 560 4919 7
+a 8159 7651 4
+a 1416 1031 10
+a 2754 6744 7
+a 642 895 8
+a 348 374 2
+a 756 549 3
+a 2450 4696 1
+a 377 2649 3
+a 1105 6076 5
+a 1355 551 3
+a 2779 6315 5
+a 44 78 6
+a 3593 6071 5
+a 4960 9263 1
+a 212 752 6
+a 835 3307 6
+a 4023 8693 4
+a 9447 9126 1
+a 4622 4233 7
+a 6846 2083 5
+a 5416 1731 6
+a 393 410 2
+a 4029 1972 9
+a 9343 9839 1
+a 8911 5169 7
+a 2495 964 10
+a 467 499 10
+a 7 12 1
+a 24 314 4
+a 5839 6890 4
+a 1445 3381 2
+a 1638 4639 8
+a 3505 6890 6
+a 1999 9633 6
+a 1249 1298 2
+a 7017 8477 7
+a 4322 1025 1
+a 146 259 10
+a 2779 5450 9
+a 1574 2222 2
+a 3372 9786 8
+a 5019 6704 4
+a 1187 2662 5
+a 304 594 3
+a 252 621 5
+a 155 675 1
+a 1033 20 7
+a 687 7412 5
+a 7395 3448 2
+a 55 104 1
+a 122 6105 1
+a 1806 2860 9
+a 2122 5467 10
+a 5278 6314 4
+a 6449 7067 3
+a 5475 3349 2
+a 245 464 1
+a 1649 1753 8
+a 2274 1219 8
+a 7209 3520 2
+a 530 971 8
+a 999 3470 6
+a 1300 9678 5
+a 9863 3110 3
+a 8341 4031 10
+a 5911 6363 6
+a 5038 9176 5
+a 51 330 2
+a 484 659 9
+a 6670 5417 1
+a 1939 3120 8
+a 714 715 1
+a 1029 3950 10
+a 9780 5706 10
+a 6745 985 6
+a 1172 8765 4
+a 3788 6055 8
+a 2713 8559 7
+a 216 1193 1
+a 4225 486 4
+a 711 1180 2
+a 974 6956 5
+a 90 428 4
+a 2174 1988 8
+a 6931 6173 4
+a 5821 5900 10
+a 7426 9803 2
+a 66 236 10
+a 224 293 8
+a 19 80 6
+a 443 780 2
+a 4932 3895 1
+a 7366 2145 2
+a 3689 5105 7
+a 859 1911 3
+a 1991 3866 3
+a 2072 9210 7
+a 6431 4222 4
+a 4680 7676 3
+a 14 548 5
+a 2543 4030 3
+a 8 75 8
+a 326 969 9
+a 6232 9020 1
+a 6333 6325 10
+a 2608 1369 10
+a 5218 2007 7
+a 1786 9441 1
+a 5360 1910 8
+a 3336 3704 8
+a 270 1014 10
+a 1622 8041 7
+a 5436 5797 2
+a 7885 304 7
+a 8286 1557 9
+a 9888 5937 7
+a 2 9 10
+a 6575 5438 4
+a 2239 3060 5
+a 4965 4105 10
+a 6871 6578 2
+a 7889 3113 1
+a 8089 2645 6
+a 968 2067 7
+a 9566 1369 10
+a 267 1358 2
+a 2320 884 1
+a 1868 2447 4
+a 6681 5253 2
+a 4724 5179 5
+a 8697 2258 9
+a 9765 5506 3
+a 9663 660 2
+a 4569 9100 7
+a 471 3665 4
+a 130 167 10
+a 231 739 3
+a 2681 7070 4
+a 2953 8917 4
+a 1110 3469 7
+a 58 3992 2
+a 5546 360 5
+a 969 308 8
+a 1427 4054 6
+a 9745 9141 1
+a 6725 5362 3
+a 412 828 1
+a 319 360 6
+a 8 79 2
+a 137 5001 5
+a 2541 9450 10
+a 4817 3507 2
+a 6099 9947 3
+a 517 1355 9
+a 3463 3324 3
+a 5538 3055 3
+a 102 172 3
+a 76 110 9
+a 1454 1959 6
+a 2783 1037 7
+a 1899 1791 1
+a 2212 9541 7
+a 413 9278 10
+a 794 957 4
+a 8433 1234 10
+a 2330 6708 10
+a 6417 5952 7
+a 911 1454 5
+a 124 169 2
+a 1656 4033 9
+a 5190 242 7
+a 1863 368 4
+a 7772 5757 6
+a 7106 4938 8
+a 6330 7126 4
+a 517 1481 7
+a 7907 6293 4
+a 1769 1273 9
+a 3 313 9
+a 421 4894 9
+a 65 78 7
+a 2529 1029 1
+a 1404 5563 1
+a 9934 7856 3
+a 959 5310 9
+a 10 44 1
+a 178 709 8
+a 1049 4294 4
+a 935 5015 4
+a 5217 414 10
+a 390 645 2
+a 1524 1501 4
+a 1973 3383 4
+a 7866 3514 6
+a 3193 4627 5
+a 5211 3619 5
+a 6800 1606 3
+a 43 125 1
+a 486 542 4
+a 4062 2642 3
+a 1834 1823 6
+a 2 27 1
+a 1305 4667 1
+a 1310 7926 7
+a 3874 2840 1
+a 2478 6787 7
+a 2148 6257 4
+a 1915 5460 6
+a 61 204 9
+a 3396 2519 5
+a 3243 7391 8
+a 9834 5613 9
+a 8063 8379 1
+a 241 329 9
+a 405 2572 1
+a 721 2210 7
+a 4895 5105 3
+a 3509 3345 5
+a 1458 1385 3
+a 5868 8683 10
+a 29 122 4
+a 151 214 10
+a 529 1190 4
+a 8111 3966 2
+a 61 173 5
+a 234 7788 2
+a 684 8164 1
+a 3186 8651 1
+a 8314 9355 5
+a 7339 5790 10
+a 6317 4063 6
+a 466 758 3
+a 945 7613 4
+a 259 142 7
+a 527 981 2
+a 322 1096 3
+a 97 125 5
+a 392 9218 10
+a 732 9520 4
+a 677 4691 7
+a 6371 7836 10
+a 2512 219 9
+a 168 1892 9
+a 190 473 4
+a 510 3777 9
+a 4648 665 5
+a 7391 9661 2
+a 50 59 10
+a 5064 1123 2
+a 8579 5239 10
+a 4113 2771 9
+a 6846 9482 8
+a 91 2113 10
+a 204 723 4
+a 316 415 3
+a 450 30 5
+a 9894 58 5
+a 8969 3470 6
+a 1364 4287 10
+a 5901 4927 1
+a 9510 6706 6
+a 3846 2730 4
+a 4912 6826 10
+a 317 2942 10
+a 1006 1074 6
+a 28 184 4
+a 269 791 4
+a 1455 2332 9
+a 8276 5725 3
+a 2387 5718 4
+a 1833 178 10
+a 1556 3530 9
+a 1926 4827 8
+a 33 34 7
+a 65 1256 6
+a 1325 1614 6
+a 110 868 2
+a 3300 1267 4
+a 4405 2480 2
+a 9096 2650 6
+a 19 150 7
+a 5757 798 1
+a 9781 7957 10
+a 797 2039 3
+a 2445 84 4
+a 2982 1421 1
+a 9202 4761 1
+a 3173 4307 6
+a 2106 6340 5
+a 3794 8826 4
+a 669 1207 7
+a 630 644 3
+a 1926 1339 10
+a 4122 8573 8
+a 213 424 7
+a 4943 2331 2
+a 9189 9762 6
+a 1344 6460 3
+a 6659 3018 6
+a 5580 7234 7
+a 3755 1079 4
+a 64 91 2
+a 120 3077 5
+a 971 6539 3
+a 1901 2407 2
+a 1863 4953 3
+a 2957 4998 5
+a 876 9462 6
+a 3609 2510 8
+a 892 1335 2
+a 1311 1549 3
+a 1836 2004 7
+a 4164 5448 5
+a 6824 6772 2
+a 6428 3467 6
+a 3229 8449 7
+a 1778 2594 6
+a 760 3539 1
+a 8776 9999 2
+a 1710 5100 7
+a 110 174 9
+a 321 1920 8
+a 5328 354 1
+a 2322 226 9
+a 4072 536 7
+a 4922 9352 5
+a 2727 6344 6
+a 525 1298 4
+a 5154 3885 9
+a 6824 6999 7
+a 7020 4741 1
+a 254 386 4
+a 470 3396 2
+a 4765 519 10
+a 413 1341 10
+a 7729 266 7
+a 8097 6129 4
+a 9228 2436 7
+a 5589 9328 5
+a 31 1702 8
+a 667 1626 6
+a 8559 9215 1
+a 77 777 3
+a 1401 159 1
+a 3103 3692 5
+a 6898 9233 9
+a 2335 2187 5
+a 484 5915 4
+a 1280 6570 3
+a 66 110 3
+a 194 5784 7
+a 577 4152 9
+a 7745 3924 3
+a 118 222 6
+a 243 2917 3
+a 3335 1327 6
+a 5418 2762 1
+a 309 9192 9
+a 1153 858 4
+a 4771 3404 3
+a 39 75 8
+a 370 423 7
+a 699 526 9
+a 7035 8145 9
+a 1100 1823 7
+a 2529 2500 1
+a 8474 4484 1
+a 2442 3939 1
+a 976 3177 4
+a 883 10 10
+a 8583 7634 7
+a 31 166 1
+a 369 2054 5
+a 2556 119 7
+a 5730 363 1
+a 23 2 9
+a 807 989 6
+a 2435 874 2
+a 6827 5686 10
+a 5502 813 5
+a 7532 276 1
+a 1536 6909 2
+a 41 2587 8
+a 3192 4295 10
+a 4707 247 3
+a 4342 1649 6
+a 7658 1812 5
+a 862 1202 8
+a 4252 5652 8
+a 8427 6183 8
+a 4250 8497 9
+a 3337 6316 10
+a 1079 1142 6
+a 738 1662 7
+a 974 3681 7
+a 3805 4196 3
+a 5752 7527 6
+a 9413 8502 9
+a 1 2002 9
+a 2052 2629 1
+a 9574 3534 8
+a 9928 8911 10
+a 9058 1607 10
+a 4702 3974 1
+a 5433 4146 7
+a 2134 5661 3
+a 487 1406 6
+a 4661 592 10
+a 5615 7771 6
+a 8796 8397 7
+a 105 307 2
+a 3178 4282 4
+a 9283 4884 4
+a 3065 4172 3
+a 393 4747 9
+a 1562 2338 7
+a 1683 5512 8
+a 802 3523 7
+a 4061 1171 10
+a 9174 3840 7
+a 3017 2458 9
+a 8168 9660 1
+a 743 252 5
+a 153 7265 7
+a 418 8276 5
+a 3652 3025 3
+a 4893 498 3
+a 21 24 5
+a 6 35 7
+a 368 1024 9
+a 1106 5636 2
+a 1196 5652 8
+a 7314 5549 4
+a 9888 8909 3
+a 61 2175 10
+a 8068 8838 10
+a 4980 2515 5
+a 643 1169 10
+a 1310 1918 6
+a 4399 2372 5
+a 6300 4721 8
+a 137 816 7
+a 2399 908 7
+a 450 4998 7
+a 34 60 9
+a 2310 2497 1
+a 6194 9908 2
+a 4195 9906 6
+a 2 85 2
+a 294 1106 5
+a 5327 4642 2
+a 832 3868 7
+a 1859 320 9
+a 5171 696 7
+a 259 2322 8
+a 3997 9131 6
+a 344 676 6
+a 2128 6278 6
+a 1661 6321 10
+a 522 850 7
+a 1296 1121 2
+a 7378 1849 10
+a 9165 3324 3
+a 4857 6234 1
+a 625 967 1
+a 6602 2250 4
+a 246 86 1
+a 22 45 4
+a 163 646 2
+a 4053 3105 10
+a 6433 9124 2
+a 2 24 7
+a 591 5428 9
+a 837 4436 3
+a 1250 6229 9
+a 912 9852 8
+a 147 3272 4
+a 7998 5131 8
+a 97 339 6
+a 6778 9151 5
+a 129 437 8
+a 6959 9093 4
+a 3502 2350 1
+a 4 8 10
+a 11 6496 10
+a 74 1299 4
+a 419 1464 4
+a 119 8030 8
+a 454 964 5
+a 2102 4884 1
+a 6 9 6
+a 184 144 10
+a 36 2151 5
+a 5364 2429 10
+a 8745 9594 10
+a 8901 5803 7
+a 8156 6538 2
+a 736 2243 1
+a 1317 3142 4
+a 634 1620 3
+a 1759 3093 9
+a 2478 6313 3
+a 6669 2630 1
+a 743 750 8
+a 3321 230 3
+a 1895 4164 10
+a 9198 452 9
+a 2032 2221 2
+a 22 285 2
+a 341 1817 5
+a 3734 1984 7
+a 4620 327 4
+a 8623 2627 2
+a 2550 3893 5
+a 9675 2626 5
+a 2271 3865 7
+a 5717 8396 8
+a 8185 3123 6
+a 5803 4703 5
+a 2010 2062 6
+a 685 1124 3
+a 2523 2512 2
+a 8096 308 1
+a 3647 223 8
+a 8308 284 2
+a 7036 8498 3
+a 8327 3740 3
+a 630 1135 6
+a 9123 1239 2
+a 5432 9024 1
+a 11 12 10
+a 21 3437 1
+a 1262 2631 2
+a 7771 9657 9
+a 55 4448 3
+a 1386 2290 3
+a 2351 4076 2
+a 42 499 8
+a 506 1674 1
+a 9246 8223 1
+a 7696 2605 3
+a 242 1427 2
+a 3605 324 8
+a 1701 3125 7
+a 3854 4744 6
+a 9098 393 2
+a 7532 5402 6
+a 5855 1259 4
+a 229 280 9
+a 156 168 1
+a 653 405 2
+a 8509 3793 8
+a 36 65 1
+a 78 248 4
+a 191 334 10
+a 358 8982 4
+a 4193 2429 8
+a 6518 2425 7
+a 8708 1303 10
+a 64 79 10
+a 221 1360 3
+a 690 450 8
+a 2017 8813 3
+a 31 55 6
+a 735 2101 2
+a 3529 13 7
+a 6408 499 10
+a 9326 8017 3
+a 529 8744 8
+a 8129 6514 2
+a 8176 3808 2
+a 940 1313 3
+a 1860 2774 7
+a 1421 806 2
+a 3413 874 1
+a 4 11 10
+a 3114 324 5
+a 3971 5216 2
+a 1436 7172 8
+a 1109 2728 8
+a 436 718 8
+a 311 528 5
+a 162 388 9
+a 2469 9128 7
+a 6638 9167 6
+a 7071 6684 2
+a 11 64 6
+a 217 500 10
+a 1216 3331 5
+a 2326 9826 10
+a 5744 2384 2
+a 9437 7308 9
+a 95 790 10
+a 222 778 3
+a 159 532 4
+a 557 873 6
+a 305 3189 2
+a 5830 7386 7
+a 166 408 10
+a 983 1960 7
+a 1482 7227 5
+a 525 8056 2
+a 8134 5561 10
+a 111 155 6
+a 191 230 3
+a 8 4 5
+a 9 9716 7
+a 266 9985 4
+a 2079 7155 6
+a 6313 3152 1
+a 608 52 5
+a 20 4529 9
+a 4402 6536 5
+a 9197 9468 5
+a 8959 5667 5
+a 1 10 2
+a 337 567 9
+a 101 424 3
+a 1318 1960 8
+a 2507 6001 9
+a 2465 7391 3
+a 6365 5767 8
+a 803 5139 9
+a 468 1176 8
+a 6309 9365 4
+a 27 111 7
+a 120 185 8
+a 391 838 2
+a 182 1690 4
+a 166 1360 5
+a 371 1916 2
+a 3058 7996 2
+a 29 73 5
+a 2356 128 10
+a 8580 4761 10
+a 5366 2797 1
+a 2 126 5
+a 5008 5449 7
+a 6177 2094 3
+a 276 1294 4
+a 304 1518 10
+a 1207 5810 1
+a 9897 1897 10
+a 3696 6769 3
+a 69 137 2
+a 533 2018 5
+a 4418 2168 4
+a 31 75 8
+a 93 691 10
+a 4685 433 8
+a 5790 3415 3
+a 111 861 10
+a 6408 4099 5
+a 9101 343 3
+a 1067 1873 2
+a 1888 1657 6
+a 9109 6059 5
+a 248 2053 1
+a 5156 3861 3
+a 7331 8872 2
+a 6838 7559 2
+a 4908 129 10
+a 6426 3051 5
+a 699 2064 9
+a 1262 1498 9
+a 4148 4553 7
+a 7151 2720 3
+a 8171 4689 9
+a 98 121 10
+a 159 2523 2
+a 3156 9780 2
+a 6664 872 5
+a 8591 3806 8
+a 11 93 6
+a 916 1298 6
+a 18 188 8
+a 452 2561 4
+a 2334 6216 6
+a 7848 1729 2
+a 2041 9908 6
+a 9648 9817 10
+a 8501 2015 6
+a 756 948 2
+a 331 1112 3
+a 1112 96 6
+a 2466 9153 5
+a 5836 5165 9
+a 9470 9204 10
+a 6396 9578 9
+a 1155 2612 4
+a 1246 5255 8
+a 2508 9625 9
+a 9257 690 8
+a 60 75 8
+a 1561 1721 2
+a 4552 740 5
+a 8318 3843 3
+a 1815 3093 8
+a 4608 3131 3
+a 5174 995 7
+a 1567 2163 2
+a 2 295 5
+a 760 941 10
+a 4142 1046 1
+a 7107 3735 3
+a 1247 1447 7
+a 1757 2372 2
+a 3214 1198 1
+a 3739 4911 4
+a 4459 2965 2
+a 1254 2465 7
+a 7224 9122 8
+a 514 1276 1
+a 268 565 1
+a 900 429 4
+a 2264 7770 3
+a 608 2013 9
+a 2675 482 8
+a 6073 1893 7
+a 1877 2417 6
+a 8980 4942 9
+a 7607 7179 1
+a 2748 4294 6
+a 1157 1507 5
+a 1669 73 1
+a 9877 9942 1
+a 998 1016 2
+a 2300 2360 9
+a 7908 3486 9
+a 9190 5718 1
+a 35 8250 8
+a 6189 9067 10
+a 6026 3975 5
+a 3684 4146 6
+a 2 10 10
+a 12 3741 10
+a 2673 2584 1
+a 4814 4150 4
+a 1463 6806 3
+a 7395 527 9
+a 9914 1740 7
+a 951 3665 9
+a 5970 4394 8
+a 1767 3766 3
+a 233 1383 10
+a 226 244 10
+a 1282 535 10
+a 1837 2499 10
+a 1538 8569 1
+a 1773 6878 3
+a 8105 5297 9
+a 893 573 3
+a 9474 3420 3
+a 9753 8412 10
+a 213 7152 9
+a 305 609 9
+a 210 402 10
+a 955 4067 2
+a 5798 843 7
+a 8832 2885 1
+a 2194 1189 9
+a 2100 847 4
+a 1493 6984 6
+a 2074 5702 7
+a 3271 3758 3
+a 203 451 4
+a 963 1027 4
+a 1099 4692 3
+a 1983 1042 7
+a 1228 3366 7
+a 7879 3843 3
+a 1363 3849 9
+a 41 89 9
+a 2744 1674 7
+a 5708 3622 6
+a 7799 5472 4
+a 8891 4371 6
+a 7095 4447 4
+a 1415 3653 10
+a 7176 8288 6
+a 91 888 10
+a 2878 691 8
+a 8841 1133 2
+a 833 6083 9
+a 101 5055 7
+a 8781 2098 10
+a 8383 9755 8
+a 8344 4168 3
+a 155 387 10
+a 383 470 7
+a 1271 3642 10
+a 522 4278 3
+a 4696 4326 9
+a 5722 5126 1
+a 8839 4188 6
+a 3832 2930 4
+a 1146 2742 8
+a 9188 3062 1
+a 4127 4426 7
+a 9422 1732 6
+a 284 1354 8
+a 221 696 1
+a 1015 2169 8
+a 3285 2556 7
+a 196 6832 4
+a 831 6884 7
+a 3008 1927 4
+a 6677 9411 9
+a 94 175 8
+a 7145 4342 9
+a 1976 6601 2
+a 133 1339 10
+a 2821 16 4
+a 82 1047 8
+a 3440 1213 5
+a 7842 7395 2
+a 5506 8432 1
+a 6458 4545 5
+a 30 46 5
+a 4404 4671 6
+a 7325 1741 2
+a 4406 4699 5
+a 103 629 6
+a 1669 3651 4
+a 4332 1025 1
+a 5372 1519 8
+a 6978 4664 8
+a 4014 8299 2
+a 3264 7566 9
+a 718 3664 7
+a 85 1800 5
+a 3431 6692 7
+a 2005 7836 9
+a 9 54 10
+a 163 4519 4
+a 3892 5717 3
+a 8965 4539 6
+a 5587 9948 5
+a 2558 8232 9
+a 3335 7211 10
+a 1891 2597 9
+a 3692 1134 9
+a 256 1863 4
+a 668 1994 10
+a 259 561 9
+a 1009 1576 4
+a 5101 97 2
+a 5217 4139 4
+a 5168 459 5
+a 3293 2225 7
+a 8992 9478 8
+a 2872 1498 10
+a 8 21 6
+a 25 300 8
+a 7643 445 4
+a 7910 8862 5
+a 82 176 10
+a 205 2637 6
+a 2579 3112 5
+a 5673 694 7
+a 7148 8048 4
+a 112 115 7
+a 245 886 6
+a 27 224 8
+a 307 2911 6
+a 3793 7921 4
+a 3542 5007 9
+a 4072 2920 5
+a 6272 2958 6
+a 1643 1800 1
+a 2340 1572 5
+a 3296 1257 5
+a 6616 8019 3
+a 2683 2086 8
+a 4562 489 8
+a 4652 5838 1
+a 1107 2760 1
+a 268 463 7
+a 922 161 6
+a 5824 6532 5
+a 234 457 9
+a 691 1519 7
+a 968 4142 9
+a 7039 3784 7
+a 8706 7993 4
+a 7657 3047 3
+a 1530 9456 5
+a 30 44 5
+a 820 858 10
+a 8964 144 3
+a 9402 178 5
+a 16 98 6
+a 1240 2050 2
+a 2397 810 10
+a 3813 3186 9
+a 6706 7338 6
+a 769 3947 1
+a 8763 9208 6
+a 2816 6060 10
+a 136 249 8
+a 507 6142 9
+a 69 3377 4
+a 494 5782 6
+a 164 397 1
+a 468 1704 8
+a 581 7963 1
+a 3086 5521 9
+a 2080 705 4
+a 230 255 3
+a 18 66 5
+a 61 419 7
+a 1257 5429 6
+a 1402 6737 7
+a 7885 8158 5
+a 210 6343 10
+a 6441 112 7
+a 7578 3029 10
+a 659 1065 9
+a 1095 2059 9
+a 5579 6352 5
+a 3 34 1
+a 9820 6348 5
+a 82 214 10
+a 244 102 2
+a 5043 2046 2
+a 9980 5659 7
+a 84 1048 7
+a 970 953 7
+a 3559 9341 6
+a 58 9698 10
+a 2458 2847 5
+a 62 135 7
+a 838 4552 10
+a 1680 2135 4
+a 4446 4901 6
+a 9869 6043 6
+a 2987 1090 9
+a 7650 2704 3
+a 5338 1774 3
+a 1275 1382 1
+a 1567 6853 4
+a 6155 1104 9
+a 2842 6718 4
+a 109 745 10
+a 689 1033 7
+a 3054 4288 7
+a 5192 4877 7
+a 8019 5268 4
+a 1620 6063 2
+a 1208 5416 2
+a 1257 383 8
+a 84 8539 5
+a 2379 3859 10
+a 154 178 4
+a 33 56 8
+a 84 8332 9
+a 1143 1438 7
+a 1073 2220 10
+a 1988 4453 4
+a 8110 7895 6
+a 12 720 9
+a 331 7894 3
+a 3762 7477 10
+a 5428 7873 3
+a 5126 6336 5
+a 5857 376 2
+a 441 486 2
+a 515 649 10
+a 111 486 7
+a 873 7626 8
+a 955 7710 1
+a 3331 6348 4
+a 3251 9459 9
+a 2741 2637 1
+a 4845 5360 8
+a 7809 6173 3
+a 47 176 7
+a 1475 2901 9
+a 3811 4387 9
+a 876 13 4
+a 2923 399 1
+a 7831 4952 9
+a 7728 512 5
+a 6938 8757 6
+a 250 1329 8
+a 8366 9299 7
+a 1343 4151 7
+a 3110 6808 10
+a 790 1424 10
+a 1 1083 10
+a 1110 3473 6
+a 3607 1648 3
+a 1207 1045 6
+a 4754 9356 4
+a 1361 7413 4
+a 6439 1148 7
+a 535 704 1
+a 6281 2969 4
+a 5199 1057 9
+a 21 295 8
+a 417 2249 2
+a 4492 688 6
+a 8252 1493 9
+a 1809 2757 1
+a 6219 1687 5
+a 73 3653 2
+a 243 3443 1
+a 2636 1305 1
+a 2048 9941 8
+a 6799 8085 8
+a 169 604 5
+a 1901 5648 9
+a 2675 42 8
+a 7390 58 4
+a 1978 7078 3
+a 2917 6685 5
+a 1262 2174 1
+a 158 742 4
+a 533 1145 7
+a 1605 1 5
+a 8141 1123 8
+a 4895 9007 2
+a 69 5896 9
+a 2963 6398 2
+a 754 4811 4
+a 973 6545 6
+a 2849 3784 2
+a 4492 2313 10
+a 7737 5250 8
+a 75 156 6
+a 340 728 5
+a 1132 1172 8
+a 124 578 5
+a 615 50 9
+a 1237 7792 8
+a 2289 5280 10
+a 707 3671 5
+a 6483 45 2
+a 7158 5119 8
+a 123 220 9
+a 1732 3605 10
+a 1178 4166 4
+a 5875 4406 9
+a 20 322 5
+a 4000 157 8
+a 7158 180 8
+a 8153 5167 9
+a 4312 2658 7
+a 13 1375 6
+a 108 227 5
+a 1074 1961 4
+a 2267 1630 1
+a 2825 4501 4
+a 1926 2787 3
+a 254 402 3
+a 2056 1074 3
+a 9743 3844 6
+a 5853 8047 1
+a 9207 8560 9
+a 1085 1738 5
+a 1198 1611 9
+a 109 3552 1
+a 3638 54 10
+a 5562 57 8
+a 9616 3908 6
+a 7707 2721 6
+a 2717 5216 1
+a 5534 4720 2
+a 5232 6867 6
+a 485 5035 3
+a 1002 1321 3
+a 2545 4194 4
+a 8746 2389 2
+a 3060 7406 7
+a 6605 7707 10
+a 7343 4680 9
+a 165 8676 9
+a 9061 7728 5
+a 4951 9897 10
+a 4223 140 1
+a 6239 428 10
+a 4309 8444 4
+a 9728 9408 6
+a 2455 3006 10
+a 1 36 7
+a 151 559 8
+a 1425 4035 5
+a 1860 4220 7
+a 9188 6904 3
+a 3295 7187 1
+a 37 1820 1
+a 3821 6468 3
+a 3407 383 6
+a 2471 5247 9
+a 225 383 5
+a 403 4694 4
+a 8835 289 3
+a 223 5925 6
+a 623 6973 7
+a 3006 5978 7
+a 20 66 2
+a 5751 3769 2
+a 2525 8916 5
+a 9388 8839 7
+a 842 2366 4
+a 28 52 10
+a 65 5190 4
+a 5278 2105 4
+a 6035 4564 3
+a 7045 8815 1
+a 4824 3178 10
+a 94 8693 1
+a 450 2170 10
+a 5672 7620 3
+a 3483 2591 7
+a 2739 3506 2
+a 6871 8442 10
+a 2164 1467 4
+a 2803 2062 6
+a 7105 9698 1
+a 3226 3286 5
+a 7485 6503 4
+a 605 1058 10
+a 293 897 6
+a 2976 2010 9
+a 9863 8227 10
+a 3197 3726 5
+a 2938 4153 3
+a 4306 4386 6
+a 8535 3438 3
+a 9013 7054 10
+a 5862 5148 6
+a 452 8349 6
+a 9205 3788 4
+a 3708 3804 2
+a 41 146 4
+a 323 7336 5
+a 2905 55 9
+a 159 321 10
+a 766 2344 7
+a 3947 7684 6
+a 6458 6613 2
+a 1326 6139 8
+a 1962 2482 7
+a 1599 7350 2
+a 281 1581 10
+a 1947 1886 4
+a 2893 9222 5
+a 95 595 9
+a 5768 4689 8
+a 82 296 4
+a 2021 1329 5
+a 7353 2224 6
+a 7878 5839 5
+a 8430 4491 8
+a 7944 8122 6
+a 3136 9995 8
+a 603 1662 6
+a 5546 6035 3
+a 7127 1198 4
+a 3879 5262 1
+a 376 665 8
+a 2652 978 8
+a 3826 1096 1
+a 9269 1020 3
+a 7621 368 4
+a 99 712 1
+a 1405 7825 5
+a 813 1091 8
+a 3243 379 9
+a 620 1325 9
+a 794 2862 4
+a 230 907 10
+a 62 75 6
+a 1081 763 2
+a 2763 4777 1
+a 9441 6611 7
+a 8022 9254 8
+a 7172 6574 3
+a 7573 1126 4
+a 208 427 4
+a 1450 1027 8
+a 2857 3091 1
+a 3560 3968 8
+a 182 534 9
+a 2813 1395 9
+a 4316 3436 4
+a 2348 4002 8
+a 8076 7326 3
+a 244 1473 4
+a 389 1844 7
+a 154 1404 7
+a 6009 1981 2
+a 9680 3636 2
+a 4845 5600 8
+a 1328 297 3
+a 2382 5039 1
+a 5505 6011 10
+a 2999 3970 9
+a 5450 9898 3
+a 642 763 3
+a 73 176 1
+a 2216 3353 1
+a 4265 95 3
+a 4699 684 10
+a 2152 9456 8
+a 846 5483 4
+a 230 48 8
+a 6466 6469 10
+a 6941 562 4
+a 149 667 5
+a 23 272 4
+a 1729 2212 3
+a 847 6562 10
+a 1103 1836 6
+a 6788 5838 5
+a 3022 7735 5
+a 1949 9450 7
+a 483 629 1
+a 826 2936 10
+a 6949 3532 3
+a 9421 902 4
+a 177 4074 1
+a 3758 3865 5
+a 6604 53 8
+a 4281 3437 6
+a 3819 3020 5
+a 7305 7686 1
+a 8581 2124 4
+a 6059 4273 2
+a 1402 3645 5
+a 5847 3609 5
+a 7083 1674 7
+a 58 73 9
+a 840 1007 3
+a 2801 3013 1
+a 5185 9437 8
+a 3078 1858 10
+a 7640 660 7
+a 442 2017 10
+a 416 1240 5
+a 3519 110 6
+a 1658 39 2
+a 25 222 4
+a 97 1504 5
+a 1095 5131 3
+a 3888 3525 1
+a 5 6 8
+a 136 526 8
+a 1261 1827 8
+a 6258 5861 5
+a 9753 6746 6
+a 2019 8556 2
+a 4990 3500 10
+a 2188 5399 8
+a 1666 6930 9
+a 7619 55 2
+a 129 650 5
+a 22 33 7
+a 1515 1892 8
+a 1016 3158 2
+a 5637 2388 1
+a 9214 5375 5
+a 4164 9374 1
+a 7784 4692 2
+a 2006 2058 7
+a 5036 6516 9
+a 7622 4426 4
+a 5804 7800 3
+a 1348 2857 9
+a 1181 3540 5
+a 4085 2622 8
+a 7778 5062 8
+a 4856 5643 1
+a 8229 7072 1
+a 6897 6438 9
+a 7816 8189 8
+a 857 861 6
+a 8072 5577 10
+a 4617 3242 7
+a 251 304 6
+a 849 788 2
+a 2900 208 2
+a 4491 269 1
+a 9554 973 4
+a 2461 6639 8
+a 1819 3002 4
+a 565 1231 3
+a 1176 4540 2
+a 7473 3149 1
+a 4898 7719 7
+a 60 101 5
+a 247 3807 9
+a 1008 7159 5
+a 6157 9177 7
+a 414 8077 8
+a 6575 4629 4
+a 4717 1038 2
+a 427 952 4
+a 2026 3633 4
+a 6496 2264 8
+a 9819 7325 5
+a 948 1315 2
+a 1714 3861 4
+a 1994 4058 6
+a 5548 6810 9
+a 1451 6951 3
+a 2324 9519 6
+a 8889 3577 8
+a 1750 2251 7
+a 3049 3481 6
+a 586 4158 5
+a 9588 8079 5
+a 721 857 5
+a 1847 2619 1
+a 3417 6784 8
+a 5166 8376 10
+a 5612 3662 1
+a 2206 110 2
+a 7014 4100 3
+a 9577 9948 8
+a 862 1476 9
+a 2372 2966 8
+a 955 3613 2
+a 4657 7392 4
+a 63 199 8
+a 2939 37 10
+a 5613 3033 3
+a 4270 5782 7
+a 6323 6846 6
+a 665 1242 8
+a 1 184 7
+a 810 4932 3
+a 5475 1848 9
+a 5647 6550 10
+a 7343 212 6
+a 102 2059 9
+a 610 1414 10
+a 1668 1225 3
+a 1988 1474 4
+a 9107 8863 10
+a 4148 2252 2
+a 2909 9891 1
+a 5874 3905 5
+a 5798 6032 1
+a 9061 8848 10
+a 221 2348 6
+a 5397 2804 7
+a 24 35 4
+a 7960 710 9
+a 8724 5077 9
+a 732 3217 5
+a 990 7428 8
+a 1581 3317 7
+a 51 162 1
+a 209 461 10
+a 3187 3908 7
+a 4993 5120 10
+a 821 8288 4
+a 1014 7814 8
+a 221 2172 2
+a 487 22 2
+a 1122 311 6
+a 9470 3044 7
+a 3538 7469 4
+a 286 458 8
+a 310 346 4
+a 89 229 6
+a 242 1335 4
+a 356 3242 10
+a 3816 1759 5
+a 2951 7025 4
+a 698 3679 10
+a 7244 3851 10
+a 2850 3152 6
+a 1105 2088 1
+a 818 2498 8
+a 3736 3108 6
+a 3473 766 7
+a 976 344 1
+a 3475 696 1
+a 2423 4786 1
+a 194 201 10
+a 8998 6122 4
+a 4918 857 1
+a 7503 1869 2
+a 29 36 6
+a 543 672 2
+a 704 665 2
+a 103 690 10
+a 6603 5536 3
+a 7060 5695 1
+a 3779 9377 4
+a 4800 2261 7
+a 2656 5714 1
+a 4117 2248 8
+a 1612 8156 2
+a 387 466 6
+a 3963 2314 10
+a 2194 1142 9
+a 3427 3721 4
+a 7116 4832 1
+a 7580 2806 2
+a 9756 8834 8
+a 767 1957 1
+a 6754 1258 4
+a 8367 6543 9
+a 16 71 8
+a 3318 1860 1
+a 4467 3052 8
+a 51 9030 1
+a 1316 7112 2
+a 8721 320 1
+a 3992 3806 4
+a 3 2 1
+a 4 4746 8
+a 543 7446 10
+a 580 7825 1
+a 303 1123 7
+a 3554 106 7
+a 5526 367 3
+a 8587 1575 2
+a 4869 6102 3
+a 1275 1614 9
+a 128 270 8
+a 62 103 9
+a 412 4916 7
+a 535 9597 3
+a 9756 3577 5
+a 4074 1061 9
+a 3863 8212 3
+a 7943 3630 2
+a 1175 1896 1
+a 13 621 6
+a 3120 5912 3
+a 2283 4281 5
+a 5097 2141 7
+a 9367 7110 7
+a 2842 7793 6
+a 8739 8261 5
+a 2647 2911 8
+a 4073 9653 3
+a 5681 7581 6
+a 1024 2807 4
+a 3519 515 6
+a 1453 2881 5
+a 9532 9086 8
+a 4394 4256 8
+a 5479 8767 3
+a 7049 4351 1
+a 944 1421 8
+a 331 1750 6
+a 3282 4130 7
+a 5145 4058 10
+a 7170 9262 6
+a 14 17 7
+a 36 479 3
+a 1318 2073 9
+a 2254 3139 2
+a 4822 3107 4
+a 8970 3813 1
+a 9574 1398 8
+a 30 31 8
+a 3851 4139 1
+a 6382 716 4
+a 6614 73 5
+a 506 1060 2
+a 2683 6340 8
+a 6802 6523 1
+a 1039 7001 6
+a 7 9773 3
+a 5622 4363 7
+a 2130 2313 6
+a 1144 5066 3
+a 53 1567 4
+a 2112 1804 1
+a 495 702 3
+a 7658 8002 3
+a 183 417 7
+a 1065 3708 8
+a 1275 6373 7
+a 8371 8707 2
+a 1815 4108 1
+a 3855 7731 10
+a 6079 6281 10
+a 84 276 5
+a 29 315 1
+a 1044 5406 4
+a 5262 9210 8
+a 1024 1315 2
+a 4293 407 7
+a 8456 3673 2
+a 79 3513 7
+a 3479 1571 10
+a 2214 7862 4
+a 8585 7634 7
+a 3 4 10
+a 8 1174 3
+a 8009 1483 4
+a 8826 5367 8
+a 82 1853 4
+a 91 289 7
+a 8293 283 6
+a 9528 866 5
+a 2128 7527 7
+a 1496 8156 8
+a 3071 4931 3
+a 7642 190 5
+a 1318 1334 4
+a 1823 3881 3
+a 23 2469 7
+a 23 3217 6
+a 3430 5899 10
+a 2659 1489 5
+a 8403 1795 4
+a 8812 3172 3
+a 9067 9437 2
+a 100 145 2
+a 3 7 4
+a 635 2176 9
+a 3097 2978 10
+a 5250 2978 8
+a 242 7931 2
+a 764 4459 10
+a 54 235 8
+a 646 2800 1
+a 1348 2931 8
+a 5436 1009 2
+a 8200 4065 6
+a 423 6642 4
+a 4457 1661 10
+a 1236 2373 4
+a 3698 178 4
+a 3504 5881 6
+a 7252 5893 4
+a 23 24 9
+a 910 4004 2
+a 1887 8183 1
+a 4317 5207 8
+a 9654 1530 9
+a 55 313 5
+a 106 110 3
+a 315 517 4
+a 2051 610 8
+a 9715 1790 8
+a 9731 737 3
+a 8456 5631 9
+a 80 1008 9
+a 3476 1288 3
+a 8037 4052 8
+a 388 301 7
+a 1958 9358 5
+a 309 2770 8
+a 2650 3007 6
+a 2034 2880 3
+a 3352 798 6
+a 7522 4850 5
+a 5596 3937 8
+a 614 2792 3
+a 3415 417 8
+a 1235 463 9
+a 2491 1492 4
+a 1667 3033 10
+a 61 6 2
+a 407 46 3
+a 4727 3765 5
+a 2388 6603 10
+a 3723 9233 6
+a 1925 6028 6
+a 544 999 1
+a 1093 2431 5
+a 4792 122 5
+a 7680 2984 2
+a 247 533 6
+a 238 416 6
+a 2344 70 8
+a 1794 357 6
+a 3580 368 10
+a 4919 3972 9
+a 3829 1811 7
+a 5642 2214 4
+a 55 84 7
+a 7717 862 4
+a 5369 2902 7
+a 13 47 2
+a 813 20 7
+a 3542 2780 10
+a 5464 7461 7
+a 6973 133 2
+a 4372 3968 4
+a 2920 3756 2
+a 852 2539 1
+a 4 24 7
+a 60 3244 10
+a 2512 3877 1
+a 1987 9584 1
+a 8714 4339 6
+a 15 7277 8
+a 196 256 8
+a 750 3704 6
+a 64 9170 3
+a 1369 3594 10
+a 2670 7314 8
+a 1930 4752 3
+a 4870 5619 2
+a 67 31 10
+a 6669 1191 6
+a 2390 3705 9
+a 848 2275 7
+a 3577 1847 9
+a 1179 7411 8
+a 9087 8562 4
+a 9297 9908 2
+a 9420 1222 4
+a 8169 8033 3
+a 101 513 5
+a 6242 844 2
+a 776 4494 7
+a 6299 442 5
+a 9880 1414 10
+a 4810 1609 10
+a 9255 7338 9
+a 3928 5219 7
+a 115 771 4
+a 56 5562 1
+a 6342 990 10
+a 7667 8063 3
+a 1392 8002 4
+a 7021 7506 10
+a 1216 1791 10
+a 8793 6177 9
+a 8222 5082 7
+a 139 159 10
+a 185 187 3
+a 846 5812 5
+a 173 1298 7
+a 2453 5235 5
+a 2830 8763 6
+a 2022 970 1
+a 7013 3081 7
+a 455 665 5
+a 8377 5329 10
+a 9481 4811 3
+a 7319 3080 2
+a 1489 2441 8
+a 3 43 3
+a 563 879 2
+a 7243 2288 7
+a 109 128 10
+a 121 169 5
+a 6178 6174 7
+a 4479 1138 8
+a 29 48 5
+a 8932 7076 7
+a 2807 9448 2
+a 14 200 9
+a 464 117 8
+a 8032 717 1
+a 8438 1262 2
+a 3906 7741 10
+a 750 3996 8
+a 3669 5703 9
+a 214 6724 4
+a 19 3848 4
+a 7021 496 7
+a 7174 7388 8
+a 525 6483 6
+a 6765 2129 10
+a 555 9208 1
+a 4535 9262 8
+a 7790 2575 4
+a 3782 48 8
+a 7132 6582 7
+a 268 443 2
+a 17 56 4
+a 265 14 7
+a 9076 6368 6
+a 304 1468 9
+a 2834 1454 7
+a 3403 3743 9
+a 9621 2951 3
+a 137 9874 7
+a 7501 1561 4
+a 8445 6244 8
+a 97 560 10
+a 1355 988 2
+a 1190 9269 4
+a 3833 9527 6
+a 10 13 4
+a 66 215 7
+a 2616 1950 1
+a 9107 9983 9
+a 3266 5595 7
+a 1788 8484 3
+a 2808 9094 3
+a 7108 2337 8
+a 537 871 1
+a 1067 5062 3
+a 2606 7287 1
+a 3359 8367 10
+a 447 593 10
+a 1294 4636 6
+a 3645 9446 8
+a 2847 2698 8
+a 7410 2943 2
+a 368 1259 2
+a 109 177 4
+a 315 1396 9
+a 4825 986 5
+a 7634 2846 6
+a 9209 9061 10
+a 254 355 1
+a 107 916 8
+a 3413 3227 7
+a 4842 5058 6
+a 1149 4680 4
+a 8987 1932 1
+a 8865 1909 4
+a 9165 6951 8
+a 25 194 5
+a 435 626 10
+a 292 580 3
+a 857 4260 2
+a 119 189 6
+a 2173 4887 9
+a 5822 5127 8
+a 9200 4664 4
+a 7967 8108 8
+a 1339 1891 1
+a 196 234 1
+a 29 37 3
+a 301 3010 7
+a 7737 4457 6
+a 347 4037 10
+a 8481 5209 4
+a 278 2692 5
+a 1141 1288 10
+a 1367 3471 1
+a 2913 3548 1
+a 1983 1660 1
+a 7836 3028 3
+a 301 2121 5
+a 7659 6542 9
+a 24 336 2
+a 602 1506 3
+a 2681 122 3
+a 7874 4024 10
+a 79 3533 4
+a 1574 2537 9
+a 6995 3712 5
+a 225 1629 7
+a 9331 1524 2
+a 302 567 9
+a 129 246 10
+a 4314 4937 5
+a 7243 128 5
+a 9220 3511 1
+a 9275 7712 1
+a 6307 7054 8
+a 28 3055 6
+a 2398 3438 6
+a 3927 2444 1
+a 9200 5971 5
+a 6 3 5
+a 134 1609 3
+a 32 43 5
+a 62 1275 4
+a 115 1686 6
+a 207 1689 6
+a 8773 9882 8
+a 2415 1043 2
+a 13 2633 10
+a 5384 2197 3
+a 2 123 9
+a 2319 7522 5
+a 5 1736 8
+a 146 666 7
+a 451 1141 9
+a 2022 570 5
+a 7950 659 1
+a 4023 7777 8
+a 3067 2616 7
+a 4768 2205 5
+a 8599 5470 3
+a 180 193 2
+a 1387 2178 5
+a 3086 225 2
+a 2496 5129 3
+a 1258 7786 4
+a 2037 9706 9
+a 6342 4049 9
+a 4435 3104 10
+a 422 1144 4
+a 2858 6837 6
+a 4422 3807 5
+a 484 666 8
+a 920 6272 3
+a 4456 3787 1
+a 7503 3815 10
+a 1626 7650 2
+a 3125 5032 3
+a 6085 737 3
+a 252 1941 10
+a 102 3043 10
+a 852 1077 2
+a 4497 6591 7
+a 2989 4668 6
+a 499 813 2
+a 329 392 10
+a 1729 2278 3
+a 3464 880 10
+a 7271 172 8
+a 8969 406 3
+a 1770 4601 3
+a 2275 5011 3
+a 169 4583 10
+a 7542 1101 9
+a 4024 6972 10
+a 196 273 8
+a 3711 275 3
+a 2304 7592 1
+a 4417 7832 2
+a 4913 636 8
+a 1563 8975 8
+a 1656 7923 5
+a 556 1963 6
+a 148 359 3
+a 493 346 4
+a 9030 2558 10
+a 9972 9762 6
+a 142 216 9
+a 349 1074 1
+a 3930 75 3
+a 6146 552 7
+a 4376 6645 6
+a 4941 653 9
+a 7001 7074 3
+a 40 346 4
+a 229 306 6
+a 2574 259 3
+a 8578 4186 3
+a 1 3 10
+a 35 4531 7
+a 2062 5504 1
+a 6241 4150 10
+a 9192 8595 1
+a 2635 6382 1
+a 744 9712 2
+a 1252 2338 8
+a 2431 4013 2
+a 4979 9977 7
+a 1147 5574 5
+a 84 115 9
+a 869 646 3
+a 1062 2687 9
+a 7747 3314 1
+a 9296 5732 3
+a 3139 4907 8
+a 6624 2647 1
+a 323 413 6
+a 2874 2115 4
+a 6816 381 9
+a 7594 4621 8
+a 429 1354 2
+a 2900 59 4
+a 4789 1698 3
+a 1513 283 10
+a 5424 2021 4
+a 623 1809 10
+a 62 5648 1
+a 3159 4663 7
+a 5256 5462 7
+a 5636 8118 1
+a 5418 3943 1
+a 3617 7067 6
+a 1588 8196 3
+a 3491 1357 6
+a 8491 5705 4
+a 2111 9367 6
+a 5427 984 7
+a 411 796 6
+a 237 1318 9
+a 268 2824 5
+a 3146 2552 4
+a 4430 2693 7
+a 1108 6240 10
+a 8301 4490 1
+a 1534 3841 2
+a 1098 1059 4
+a 4065 1430 1
+a 5494 9561 2
+a 4126 2250 4
+a 228 923 6
+a 50 903 7
+a 107 1407 5
+a 2001 1087 9
+a 4027 9732 10
+a 8233 8016 5
+a 8152 1474 4
+a 121 724 5
+a 750 3697 1
+a 1594 6264 5
+a 2933 6155 2
+a 4221 7109 1
+a 1922 490 6
+a 6844 7010 9
+a 128 197 8
+a 2234 5591 7
+a 2526 3866 6
+a 8688 5397 5
+a 51 361 9
+a 3160 2554 4
+a 4039 6374 10
+a 9255 6594 2
+a 3094 2448 3
+a 900 2847 9
+a 1333 1676 10
+a 282 283 7
+a 3897 8988 4
+a 7041 9828 8
+a 4631 2949 2
+a 2792 8126 9
+a 2532 432 7
+a 7553 2624 3
+a 9494 3280 3
+a 6768 7578 4
+a 9006 2563 4
+a 1391 6702 3
+a 331 814 9
+a 2130 3863 9
+a 4702 5324 1
+a 7803 9361 6
+a 1013 2553 1
+a 4682 6575 5
+a 2080 2040 6
+a 3034 5674 8
+a 4648 2158 5
+a 86 102 4
+a 154 485 9
+a 561 3072 6
+a 375 1163 9
+a 2570 257 6
+a 9850 2123 4
+a 3280 4452 5
+a 168 234 2
+a 3358 551 2
+a 1504 9193 4
+a 6688 8623 9
+a 302 1133 3
+a 73 497 2
+a 1216 1787 10
+a 7625 5352 10
+a 4912 881 9
+a 6072 1620 4
+a 2323 5514 8
+a 1303 2681 10
+a 4457 4828 3
+a 9507 5631 3
+a 4034 4909 2
+a 98 623 6
+a 687 1460 7
+a 237 1132 3
+a 1131 4515 4
+a 866 2450 2
+a 9341 7770 10
+a 305 7550 9
+a 51 218 1
+a 1353 1539 7
+a 9108 304 4
+a 2840 34 10
+a 7720 1652 8
+a 704 3383 3
+a 3878 4964 10
+a 1665 3625 6
+a 2068 4088 6
+a 4704 6488 5
+a 9628 2650 4
+a 2055 5575 8
+a 8 13 6
+a 959 2077 3
+a 5118 585 6
+a 2492 409 8
+a 118 240 9
+a 539 366 7
+a 5041 539 2
+a 760 7174 4
+a 9040 9747 10
+a 1701 4329 7
+a 4678 3647 10
+a 12 15 9
+a 20 7148 6
+a 7280 4953 9
+a 9700 3513 8
+a 2843 7668 1
+a 8591 9026 5
+a 390 4702 7
+a 1032 1456 5
+a 1670 6618 8
+a 7023 1489 10
+a 4079 923 7
+a 7436 1319 8
+a 778 1731 8
+a 8039 7247 4
+a 1423 3067 3
+a 7478 8449 7
+a 689 6224 3
+a 603 641 4
+a 733 405 8
+a 1083 2943 4
+a 9913 8348 5
+a 1985 5120 9
+a 9980 8519 6
+a 4289 3733 9
+a 676 740 7
+a 614 1062 5
+a 6449 1287 9
+a 4322 8050 9
+a 6922 3672 3
+a 773 1895 3
+a 2584 3931 4
+a 54 777 7
+a 3195 2034 9
+a 6325 5582 2
+a 3001 4392 4
+a 8286 831 6
+a 27 47 1
+a 441 598 3
+a 1870 543 8
+a 1931 8815 4
+a 49 667 3
+a 2183 1538 10
+a 5888 6678 3
+a 1393 201 1
+a 7501 6370 8
+a 3793 2311 5
+a 6527 7207 5
+a 29 80 7
+a 1158 29 8
+a 9953 306 7
+a 600 653 10
+a 852 1650 1
+a 2536 132 10
+a 3445 1576 7
+a 9720 2864 8
+a 7070 8292 6
+a 4479 7973 6
+a 8414 9236 8
+a 2056 3700 10
+a 8923 1654 2
+a 1391 4 5
+a 4730 4240 1
+a 1153 5532 4
+a 2700 3858 8
+a 4835 4179 5
+a 9056 3710 4
+a 9986 3489 5
+a 7 99 7
+a 594 1131 10
+a 176 217 6
+a 682 993 9
+a 7293 1276 9
+a 1090 2461 9
+a 6785 5302 9
+a 7230 264 3
+a 2585 1532 8
+a 8862 1880 9
+a 1073 7615 9
+a 5373 9805 1
+a 44 2033 8
+a 29 54 7
+a 262 790 7
+a 1272 50 5
+a 9524 2083 3
+a 8251 5657 7
+a 8579 774 10
+a 124 786 5
+a 6465 4730 3
+a 2412 8740 7
+a 274 359 3
+a 212 421 7
+a 518 1506 4
+a 463 4419 10
+a 19 8013 9
+a 1193 8436 1
+a 8613 2748 8
+a 14 4 4
+a 814 2779 4
+a 1643 1734 5
+a 7859 9408 8
+a 6491 1976 3
+a 1144 8899 5
+a 294 1337 7
+a 2363 3312 3
+a 10 6 3
+a 247 149 4
+a 8131 1315 6
+a 1146 698 10
+a 9803 9244 6
+a 4958 8441 4
+a 2637 8229 10
+a 6558 4979 2
+a 22 296 3
+a 466 584 3
+a 1451 4499 6
+a 545 414 1
+a 959 763 6
+a 3860 950 3
+a 5254 6237 8
+a 63 8251 5
+a 607 755 9
+a 6166 9702 6
+a 5039 5886 1
+a 1161 5683 8
+a 79 82 1
+a 2030 4025 10
+a 4046 482 10
+a 691 5468 8
+a 1319 3104 9
+a 3578 5334 5
+a 5567 1184 5
+a 309 3046 1
+a 139 720 4
+a 2436 8931 7
+a 1583 6030 8
+a 482 621 3
+a 1015 2218 9
+a 2395 1261 2
+a 9753 1480 8
+a 6187 2220 3
+a 5238 2902 7
+a 2066 7393 4
+a 557 985 3
+a 3044 100 9
+a 9470 6185 1
+a 3505 5649 4
+a 27 187 10
+a 229 688 7
+a 147 4986 7
+a 307 6630 2
+a 1216 7359 1
+a 6790 8976 10
+a 7982 9056 2
+a 21 54 6
+a 451 2953 2
+a 4020 8567 9
+a 3522 991 10
+a 95 275 4
+a 328 2587 10
+a 1788 3145 5
+a 2769 4585 5
+a 8548 973 9
+a 7407 611 3
+a 4221 3131 9
+a 594 639 8
+a 2039 4581 10
+a 6010 5209 1
+a 136 321 10
+a 923 366 10
+a 8882 2264 3
+a 4197 5280 8
+a 7561 8593 4
+a 151 908 8
+a 10 2225 1
+a 17 235 3
+a 1320 4700 3
+a 7660 8092 5
+a 1175 8650 7
+a 6777 1063 10
+a 3686 2408 9
+a 2347 2326 5
+a 1682 8842 1
+a 241 576 10
+a 5 332 7
+a 359 2285 6
+a 636 6630 9
+a 3175 5143 6
+a 6283 8853 6
+a 3133 8207 8
+a 732 1666 3
+a 7441 7651 3
+a 6067 6363 9
+a 4861 7299 4
+a 8759 2400 9
+a 2101 253 2
+a 4073 7209 5
+a 9569 8106 5
+a 5864 4458 2
+a 3054 1925 10
+a 460 1431 1
+a 669 2521 9
+a 2897 4036 8
+a 6212 8562 8
+a 1720 3701 2
+a 4035 8394 8
+a 6033 8597 6
+a 998 9621 7
+a 2488 4793 6
+a 8614 7657 3
+a 8711 2119 3
+a 44 110 10
+a 223 5772 1
+a 1147 309 7
+a 8657 867 9
+a 35 164 6
+a 10 29 9
+a 80 3190 6
+a 9291 6086 1
+a 4371 9697 7
+a 9850 3436 7
+a 772 4167 9
+a 1836 687 1
+a 14 674 4
+a 810 4961 10
+a 19 948 7
+a 1719 1717 2
+a 66 326 5
+a 214 251 9
+a 815 3639 2
+a 4269 5220 2
+a 7904 3961 7
+a 4112 9252 4
+a 9091 1881 5
+a 2851 8841 1
+a 1404 2322 5
+a 2467 3592 3
+a 5096 4435 9
+a 240 132 5
+a 65 103 8
+a 808 106 6
+a 2794 196 3
+a 1489 4678 5
+a 2692 8186 5
+a 4383 5596 5
+a 9458 4900 1
+a 8 33 10
+a 290 527 1
+a 61 1440 3
+a 1458 1559 2
+a 173 1102 7
+a 692 443 5
+a 2189 851 10
+a 7781 1252 6
+a 4836 8502 7
+a 7 233 7
+a 22 30 2
+a 3451 3454 9
+a 8105 5089 5
+a 8926 6101 10
+a 3344 2481 6
+a 4633 3658 3
+a 1145 678 5
+a 443 4174 9
+a 7430 5756 9
+a 2533 9446 5
+a 2263 3807 8
+a 15 38 4
+a 55 133 4
+a 2 4 7
+a 41 375 5
+a 246 2876 10
+a 9816 262 5
+a 3952 2684 3
+a 2972 224 3
+a 4137 7455 10
+a 3589 9508 6
+a 188 3900 6
+a 164 304 2
+a 1367 5965 2
+a 8272 10 8
+a 250 3561 1
+a 835 4025 4
+a 7781 5887 8
+a 169 221 10
+a 1428 3366 2
+a 5928 2788 10
+a 6713 4321 4
+a 2977 3282 1
+a 643 1005 6
+a 24 67 1
+a 36 92 3
+a 17 21 4
+a 214 670 7
+a 625 2609 6
+a 7680 6366 7
+a 2905 9454 6
+a 2535 1525 8
+a 4910 5360 10
+a 6307 2671 5
+a 165 327 5
+a 131 300 7
+a 3428 1274 6
+a 1344 4960 3
+a 813 133 9
+a 8835 2046 9
+a 9863 4328 2
+a 4482 508 2
+a 332 356 6
+a 2775 7129 9
+a 3045 66 10
+a 583 3577 5
+a 19 31 3
+a 677 1006 1
+a 1249 25 10
+a 86 8324 10
+a 545 4452 7
+a 4145 5121 8
+a 3638 2295 8
+a 152 2937 5
+a 38 93 10
+a 1080 8760 6
+a 7549 3571 8
+a 427 1370 5
+a 8887 8235 8
+a 1258 1189 5
+a 4742 6114 1
+a 9724 9808 10
+a 5426 5797 9
+a 2479 7535 2
+a 643 932 1
+a 3631 4632 5
+a 8693 6659 6
+a 6901 7052 5
+a 572 1070 8
+a 2062 1194 4
+a 2115 9573 1
+a 3426 9845 6
+a 3961 5672 9
+a 806 3698 10
+a 9260 1476 5
+a 862 1968 5
+a 16 72 2
+a 172 822 8
+a 5709 4397 4
+a 828 2021 6
+a 4186 8824 7
+a 7307 9479 3
+a 3390 3356 3
+a 6389 3336 3
+a 9527 8119 3
+a 9534 8338 8
+a 855 1053 4
+a 2850 552 10
+a 5211 3763 7
+a 5863 4537 7
+a 66 560 8
+a 200 275 6
+a 3677 4566 2
+a 4153 7897 9
+a 7557 2162 8
+a 3006 1364 10
+a 8031 1083 6
+a 2087 3953 4
+a 1690 2314 6
+a 6585 690 6
+a 4585 3079 6
+a 4739 8716 1
+a 3558 5054 9
+a 1725 3204 3
+a 5724 9875 7
+a 5867 6859 8
+a 7193 832 5
+a 356 523 7
+a 2133 2969 1
+a 74 372 8
+a 1093 1136 9
+a 5383 1276 10
+a 471 8659 9
+a 8882 1587 7
+a 4294 7228 7
+a 29 1345 1
+a 6308 4282 9
+a 32 270 4
+a 81 750 8
+a 9650 5195 3
+a 3342 2727 5
+a 6867 3680 6
+a 4649 9783 7
+a 3716 3685 5
+a 1382 2936 6
+a 379 3175 2
+a 2557 4087 3
+a 273 728 6
+a 1495 2468 6
+a 2000 5159 10
+a 7890 6635 5
+a 2184 2696 6
+a 8721 9779 9
+a 584 9960 5
+a 117 142 5
+a 1397 2179 2
+a 7394 8045 7
+a 678 1103 8
+a 5060 2875 7
+a 1661 3430 6
+a 4821 44 8
+a 2232 235 8
+a 6437 243 4
+a 8428 48 3
+a 4420 2088 2
+a 54 9237 7
+a 654 690 3
+a 720 2664 4
+a 3314 1765 2
+a 8173 1767 8
+a 280 901 7
+a 2274 4145 4
+a 5095 5214 7
+a 4066 4469 1
+a 4005 4265 3
+a 9426 4736 5
+a 4367 4514 6
+a 427 955 1
+a 1299 1279 6
+a 9693 9244 5
+a 1209 355 4
+a 2872 4318 4
+a 5814 9 6
+a 6819 9941 1
+a 8712 8581 2
+a 2080 6886 2
+a 5337 784 5
+a 6205 1662 1
+a 5350 6180 5
+a 8328 6873 7
+a 4518 790 10
+a 9924 4829 10
+a 1632 5228 2
+a 3680 1491 7
+a 4193 1776 8
+a 1029 483 5
+a 7578 8193 10
+a 922 1097 8
+a 473 1185 7
+a 1840 2258 6
+a 4067 1314 7
+a 7693 9544 6
+a 7995 5522 3
+a 644 4 7
+a 8878 3241 2
+a 1593 2093 8
+a 3432 5556 4
+a 3358 9272 3
+a 9556 9161 1
+a 890 1411 8
+a 430 693 6
+a 220 624 7
+a 1404 7237 3
+a 1571 9939 4
+a 3209 2660 2
+a 1170 7497 3
+a 2213 2638 3
+a 4612 3403 5
+a 7682 7038 7
+a 598 846 9
+a 111 137 3
+a 403 3176 9
+a 1989 2502 8
+a 1071 780 9
+a 4111 3128 7
+a 7906 5705 6
+a 399 636 4
+a 2867 4936 8
+a 6109 254 9
+a 7223 3326 5
+a 3453 4489 4
+a 8190 5692 5
+a 3 12 8
+a 785 1950 10
+a 2439 3292 3
+a 3691 1774 8
+a 5326 2126 4
+a 4647 4379 1
+a 4952 1238 6
+a 3507 583 1
+a 4614 73 3
+a 7774 4457 1
+a 945 946 1
+a 303 865 1
+a 1981 69 10
+a 1620 1569 4
+a 1464 859 8
+a 8503 1559 4
+a 6265 7393 7
+a 5134 8807 2
+a 438 1269 9
+a 7890 6913 10
+a 8163 7490 8
+a 6296 219 4
+a 442 1515 5
+a 98 4300 7
+a 7674 2172 5
+a 1693 6237 10
+a 6181 1046 2
+a 9545 2648 10
+a 40 1770 4
+a 5626 7563 7
+a 649 1720 7
+a 2574 8633 4
+a 1681 9374 10
+a 255 474 2
+a 744 1293 4
+a 8964 555 4
+a 9757 3392 10
+a 1019 1535 9
+a 8164 4189 9
+a 6387 9116 6
+a 731 8126 8
+a 24 3490 7
+a 1587 5482 7
+a 9613 8877 6
+a 149 150 4
+a 970 3732 4
+a 1845 1633 7
+a 8117 2719 6
+a 1384 8707 7
+a 5988 1271 2
+a 1305 801 4
+a 85 240 1
+a 570 679 6
+a 3454 56 10
+a 1905 4234 5
+a 1013 1914 3
+a 5461 3603 5
+a 7820 4397 1
+a 1862 3905 10
+a 7415 3940 7
+a 177 7 5
+a 839 3225 2
+a 198 220 7
+a 1849 2125 10
+a 6261 9825 8
+a 5 16 9
+a 4456 6828 7
+a 6638 7797 5
+a 1734 1011 10
+a 2662 8864 2
+a 643 1344 10
+a 28 273 9
+a 78 145 7
+a 199 3491 5
+a 3530 4120 7
+a 5541 3459 1
+a 7936 5011 9
+a 576 2087 4
+a 6815 5530 5
+a 6938 9095 7
+a 51 961 1
+a 1136 1508 7
+a 2129 3094 2
+a 2750 2184 4
+a 3342 550 7
+a 7377 3304 9
+a 7057 5612 5
+a 779 1606 1
+a 87 96 10
+a 9933 9207 10
+a 8833 6229 2
+a 55 81 10
+a 1300 1371 4
+a 1732 113 2
+a 255 803 5
+a 755 340 10
+a 1321 3734 3
+a 5498 2872 10
+a 754 3410 10
+a 104 105 7
+a 800 1415 6
+a 9259 5752 10
+a 213 225 7
+a 1215 610 4
+a 952 3935 10
+a 5740 9881 4
+a 1473 5537 9
+a 429 4759 7
+a 9298 8870 3
+a 654 826 3
+a 17 97 8
+a 183 637 5
+a 8633 2372 7
+a 7217 4841 8
+a 5538 4511 2
+a 53 9104 8
+a 64 735 5
+a 1131 709 5
+a 4895 9611 3
+a 7055 5279 9
+a 8686 5714 5
+a 8429 9153 4
+a 1286 3509 2
+a 1698 3541 2
+a 258 5734 10
+a 9418 3456 3
+a 107 183 8
+a 5111 69 3
+a 1588 4995 9
+a 1828 7711 1
+a 5994 9737 6
+a 2414 5792 3
+a 810 6881 9
+a 504 1305 5
+a 1930 1631 1
+a 293 295 1
+a 3637 9062 9
+a 3996 6135 3
+a 7271 4003 7
+a 5746 7817 9
+a 8153 7903 7
+a 8806 9210 10
+a 7793 8490 10
+a 4589 2359 9
+a 3738 5516 9
+a 792 1083 9
+a 1561 6884 6
+a 4490 1191 6
+a 1752 3320 4
+a 3531 1109 7
+a 5620 1763 1
+a 5955 5204 4
+a 8680 4117 1
+a 8939 8378 1
+a 4210 1329 8
+a 3043 4041 6
+a 4905 2692 8
+a 3290 3482 5
+a 9217 4392 1
+a 168 1589 3
+a 1918 1926 3
+a 5916 16 5
+a 9427 308 7
+a 5685 2497 2
+a 5769 1764 9
+a 3639 2737 2
+a 1777 3668 2
+a 362 499 2
+a 633 2419 9
+a 146 7222 9
+a 224 8528 9
+a 546 1314 1
+a 8212 917 7
+a 8912 2299 7
+a 4694 142 5
+a 4731 3378 10
+a 658 1922 3
+a 22 83 9
+a 42 67 4
+a 301 1556 10
+a 563 9046 4
+a 1982 946 6
+a 493 1595 3
+a 565 1031 2
+a 1788 876 9
+a 2184 1989 2
+a 5741 9284 4
+a 7328 2456 1
+a 4690 6978 3
+a 4391 8686 8
+a 450 625 7
+a 5468 4136 9
+a 370 8102 4
+a 1624 9354 2
+a 241 357 1
+a 670 2102 1
+a 4414 3312 9
+a 8611 8564 2
+a 9689 4960 6
+a 148 185 4
+a 69 120 6
+a 29 481 5
+a 872 5182 4
+a 6318 7606 7
+a 6632 7455 5
+a 7976 4533 6
+a 1073 1032 1
+a 1664 962 8
+a 4197 2099 6
+a 6200 4987 6
+a 2623 859 4
+a 38 168 10
+a 158 188 4
+a 1326 2058 1
+a 2569 3483 3
+a 3476 7188 2
+a 6877 1099 9
+a 6655 1047 1
+a 235 1318 3
+a 1282 9531 2
+a 8805 8694 1
+a 699 963 9
+a 7 48 4
+a 516 6692 8
+a 5966 1051 10
+a 2114 1122 9
+a 6055 1499 4
+a 2488 9789 2
+a 20 317 1
+a 1624 1371 5
+a 6257 6666 9
+a 1594 8013 4
+a 42 146 1
+a 219 818 4
+a 1126 2020 9
+a 1215 197 1
+a 4873 4470 2
+a 7916 5479 10
+a 843 3491 8
+a 1110 148 8
+a 262 3574 10
+a 3671 8380 7
+a 1046 7837 4
+a 2572 2983 6
+a 3837 857 6
+a 4765 4125 4
+a 5352 5114 9
+a 6494 6221 1
+a 1417 8516 4
+a 4614 387 10
+a 341 728 6
+a 97 346 6
+a 979 3711 4
+a 7179 6095 1
+a 9959 1074 3
+a 2988 8158 10
+a 1 935 2
+a 139 182 3
+a 190 228 5
+a 21 3925 5
+a 323 3829 10
+a 2511 6144 9
+a 6645 1515 4
+a 6255 5343 3
+a 85 112 4
+a 9543 6307 1
+a 4336 4660 2
+a 3132 8466 7
+a 1177 1935 8
+a 595 686 7
+a 697 2126 6
+a 9942 7035 5
+a 2282 2522 1
+a 4920 7085 4
+a 5002 8677 10
+a 826 950 6
+a 611 8405 5
+a 51 321 6
+a 1175 4276 2
+a 5774 9852 9
+a 4891 8740 9
+a 1244 9646 10
+a 681 8182 2
+a 9692 5910 3
+a 166 1175 9
+a 1975 4618 5
+a 441 364 10
+a 1794 2457 5
+a 558 1124 8
+a 7050 2578 9
+a 8818 7419 9
+a 2326 9468 9
+a 9697 9477 1
+a 576 5698 9
+a 247 279 8
+a 2959 4231 6
+a 4691 3542 5
+a 5738 6303 3
+a 7896 2000 10
+a 4646 9109 1
+a 1641 280 2
+a 162 4156 3
+a 907 7300 3
+a 6827 9013 4
+a 7280 2521 1
+a 26 53 8
+a 1939 2906 10
+a 7537 6235 3
+a 386 2077 2
+a 6062 7623 1
+a 2929 2265 6
+a 8295 2893 5
+a 3045 476 7
+a 883 2760 5
+a 1962 3111 6
+a 4797 7284 7
+a 7258 3956 5
+a 16 201 5
+a 926 2015 9
+a 8630 6887 10
+a 3 1479 3
+a 25 7816 3
+a 431 8325 2
+a 8770 1812 10
+a 35 105 6
+a 226 2986 8
+a 2829 7577 2
+a 7387 9246 1
+a 1917 7481 7
+a 4440 8617 9
+a 1227 1600 8
+a 631 1696 1
+a 2867 1689 2
+a 3909 1332 7
+a 5599 9519 6
+a 227 280 2
+a 762 2400 4
+a 9537 2687 4
+a 218 3731 2
+a 6936 595 6
+a 422 621 4
+a 678 1359 6
+a 1024 3365 9
+a 5012 1584 8
+a 5384 6272 3
+a 2931 9213 5
+a 6123 2024 1
+a 297 3212 7
+a 219 3826 3
+a 4716 8236 10
+a 9296 806 4
+a 2949 8110 7
+a 46 105 9
+a 407 1316 1
+a 337 486 10
+a 1327 75 10
+a 1454 9992 6
+a 2631 6329 6
+a 9054 656 4
+a 1319 6324 8
+a 1449 8465 2
+a 7741 2778 1
+a 366 926 5
+a 633 846 2
+a 1027 1032 7
+a 1183 1283 7
+a 2278 1302 7
+a 9261 3041 5
+a 1490 9282 2
+a 1698 1771 2
+a 3648 6456 8
+a 5536 5629 5
+a 7045 7569 1
+a 9068 4942 8
+a 4895 19 1
+a 634 677 1
+a 630 1797 3
+a 1900 2437 2
+a 2778 42 6
+a 5436 655 9
+a 7482 10000 10
+a 2089 1227 1
+a 3822 4268 8
+a 8099 4075 9
+a 2601 4641 6
+a 3907 3931 4
+a 590 3025 5
+a 5157 1434 4
+a 4472 6551 2
+a 6882 25 5
+a 8221 7695 1
+a 3302 98 2
+a 9912 6095 7
+a 4154 4600 6
+a 6803 8328 7
+a 1630 7115 5
+a 7858 7184 6
+a 3174 3426 10
+a 268 296 1
+a 315 4268 10
+a 5627 6477 6
+a 1259 4513 9
+a 5947 7299 9
+a 1653 8554 4
+a 268 3713 7
+a 716 750 5
+a 7510 8381 5
+a 6642 3349 1
+a 346 1626 2
+a 1996 1618 4
+a 590 835 2
+a 1453 3468 5
+a 2954 2692 7
+a 4856 9982 8
+a 4165 8086 6
+a 240 405 6
+a 1393 6968 5
+a 2250 8064 2
+a 4136 6518 2
+a 2482 2825 10
+a 3772 936 6
+a 1216 3970 10
+a 6321 9205 9
+a 5473 1208 9
+a 6593 3527 8
+a 2890 6835 2
+a 285 348 8
+a 1146 1423 8
+a 1622 942 3
+a 298 4324 8
+a 121 1167 6
+a 6688 1725 4
+a 6720 5575 4
+a 8871 5347 1
+a 7640 4392 8
+a 7502 7134 10
+a 5760 143 9
+a 1880 2669 3
+a 3258 162 10
+a 9906 4017 8
+a 89 786 8
+a 6592 3160 1
+a 9694 4851 10
+a 5644 9126 6
+a 1570 688 6
+a 1621 3835 9
+a 452 1111 6
+a 1733 2317 1
+a 5916 2039 2
+a 9709 2790 4
+a 9842 4630 9
+a 2863 8139 8
+a 6230 3281 3
+a 6906 3128 6
+a 4925 457 2
+a 45 526 9
+a 107 2005 3
+a 5790 2609 1
+a 1986 2188 4
+a 3761 4989 9
+a 4427 7223 4
+a 6173 4225 6
+a 342 545 3
+a 5373 8755 3
+a 1152 7812 10
+a 141 369 1
+a 444 3962 1
+a 2452 1177 5
+a 9136 1557 3
+a 557 5500 9
+a 8757 95 3
+a 4558 7672 1
+a 309 1247 9
+a 2465 4920 5
+a 5478 16 3
+a 9617 3574 4
+a 315 1582 2
+a 4668 2396 7
+a 5033 7459 7
+a 7422 3165 4
+a 4196 7981 10
+a 1454 437 8
+a 6812 660 2
+a 2496 3221 10
+a 5516 101 2
+a 3984 1355 1
+a 5533 1893 8
+a 101 1048 6
+a 60 175 5
+a 2218 6764 8
+a 2781 7267 7
+a 2483 1235 8
+a 6179 5172 4
+a 6990 6820 2
+a 1509 4747 5
+a 457 652 2
+a 797 993 2
+a 3157 57 9
+a 9109 746 9
+a 1409 1884 3
+a 2281 803 2
+a 5123 1438 8
+a 1112 7629 7
+a 3652 6767 7
+a 1970 2074 8
+a 1359 2197 9
+a 542 763 3
+a 1303 208 2
+a 1876 815 7
+a 1417 8548 9
+a 6767 5149 6
+a 1027 1054 8
+a 8862 1694 6
+a 981 5886 5
+a 4473 4585 8
+a 236 299 2
+a 43 270 6
+a 13 21 4
+a 53 560 2
+a 153 1356 3
+a 3657 2403 3
+a 3006 5194 8
+a 901 7345 1
+a 7690 4306 8
+a 149 1483 4
+a 380 715 3
+a 3668 4251 1
+a 7101 12 8
+a 1411 996 1
+a 2918 4577 8
+a 9683 5197 9
+a 8889 2679 10
+a 746 5994 7
+a 190 354 1
+a 1659 7487 1
+a 3874 26 7
+a 9991 2433 10
+a 1174 1201 10
+a 305 363 7
+a 713 16 10
+a 1208 1472 8
+a 790 3971 10
+a 1554 8780 10
+a 6550 6264 9
+a 6847 6237 9
+a 553 728 1
+a 3427 5660 2
+a 4001 950 2
+a 188 1923 2
+a 4703 6889 5
+a 5851 2202 5
+a 8356 3188 5
+a 4865 9764 7
+a 8392 2785 9
+a 9377 2624 9
+a 6 812 10
+a 4635 1238 9
+a 9639 8109 8
+a 4199 2465 7
+a 6521 3368 1
+a 142 333 6
+a 488 737 2
+a 1953 208 8
+a 7428 4470 8
+a 6750 2265 3
+a 9840 2282 9
+a 7183 2624 3
+a 1439 7498 9
+a 595 1069 4
+a 9992 6575 10
+a 9445 2307 8
+a 167 216 3
+a 1933 2002 1
+a 4455 951 10
+a 5891 7505 1
+a 4570 2300 10
+a 9630 3891 8
+a 6751 1326 9
+a 309 1511 10
+a 444 5726 6
+a 8203 1808 4
+a 7795 5069 3
+a 8825 7827 3
+a 46 69 6
+a 316 1376 5
+a 46 1422 6
+a 96 4155 9
+a 1053 4541 2
+a 5026 65 2
+a 3179 8472 7
+a 4 3 6
+a 1343 2220 4
+a 3058 39 4
+a 2903 1839 6
+a 744 1090 5
+a 1415 4910 4
+a 8211 5645 4
+a 862 8444 2
+a 6993 7861 7
+a 1451 3029 5
+a 8327 2724 5
+a 20 149 6
+a 465 1827 4
+a 8767 801 3
+a 74 99 5
+a 5 17 3
+a 938 847 7
+a 980 3123 8
+a 8554 2499 2
+a 9269 3910 4
+a 3210 2491 5
+a 1057 636 10
+a 2281 2979 8
+a 4028 1768 9
+a 6961 1839 8
+a 9447 8535 6
+a 5196 6477 1
+a 143 406 5
+a 8761 480 9
+a 2557 9281 9
+a 6880 1862 6
+a 47 130 10
+a 72 4708 1
+a 31 232 5
+a 672 406 10
+a 908 607 10
+a 4310 6020 1
+a 1595 4196 2
+a 8744 641 4
+a 6 2586 9
+a 9 2843 1
+a 4901 5465 3
+a 8214 360 5
+a 4 1 1
+a 808 1151 9
+a 6 168 9
+a 217 3901 4
+a 761 5413 4
+a 7320 5652 3
+a 9548 4708 8
+a 1291 1469 7
+a 7788 8608 10
+a 1687 7017 3
+a 47 657 5
+a 119 195 4
+a 2990 5788 5
+a 5328 1876 8
+a 1896 252 8
+a 2950 3856 10
+a 944 3622 1
+a 1662 1787 4
+a 2898 3612 7
+a 1072 2269 9
+a 2625 999 3
+a 7564 4997 1
+a 2124 7096 5
+a 518 3595 3
+a 2141 4632 6
+a 9335 9725 5
+a 69 273 2
+a 1502 6933 8
+a 244 1343 4
+a 3112 2397 7
+a 703 1095 4
+a 8410 203 2
+a 9710 394 4
+a 701 3875 8
+a 2430 8149 2
+a 3440 4825 1
+a 242 244 6
+a 1377 1718 2
+a 2665 1226 2
+a 5858 2002 5
+a 3874 1350 8
+a 2536 9978 8
+a 2209 1972 6
+a 2735 1202 7
+a 4154 4738 3
+a 3504 6338 7
+a 9919 1422 4
+a 1683 2302 1
+a 315 626 5
+a 68 2401 2
+a 3448 3889 5
+a 5133 9135 1
+a 2710 4419 4
+a 3728 7456 8
+a 1680 1112 7
+a 3284 8334 8
+a 6564 1574 8
+a 392 1017 2
+a 93 312 9
+a 1538 3641 6
+a 1717 56 2
+a 4658 4245 10
+a 9244 4465 5
+a 8859 1732 7
+a 1286 2440 9
+a 5084 2447 1
+a 9411 52 8
+a 5575 6686 2
+a 21 93 8
+a 383 800 10
+a 3193 15 1
+a 1516 6330 8
+a 56 3511 6
+a 642 6048 1
+a 1583 1871 7
+a 7500 6903 5
+a 34 37 9
+a 4884 6714 7
+a 2614 4982 4
+a 747 2450 3
+a 3212 3125 9
+a 14 8518 8
+a 1249 8922 2
+a 5824 3254 3
+a 3795 6514 6
+a 5599 8597 8
+a 2051 8185 9
+a 9017 2154 9
+a 2384 3355 3
+a 4535 189 5
+a 6518 1926 3
+a 7070 2889 7
+a 166 1494 6
+a 671 3381 7
+a 5021 609 9
+a 2582 1073 1
+a 4302 95 8
+a 6695 2047 5
+a 2230 6777 10
+a 224 5573 7
+a 381 3615 3
+a 4039 6133 5
+a 5024 1780 1
+a 1227 1430 9
+a 1807 4777 1
+a 102 234 6
+a 422 475 10
+a 4237 8327 1
+a 7965 159 4
+a 9905 8022 2
+a 74 78 8
+a 900 34 8
+a 5218 6759 5
+a 308 9600 3
+a 1643 4830 7
+a 54 627 8
+a 12 63 6
+a 304 4183 9
+a 1208 2669 10
+a 1038 4012 5
+a 3624 7273 1
+a 3764 8117 5
+a 8257 2835 5
+a 607 1027 3
+a 2215 2725 6
+a 9475 2125 9
+a 134 160 8
+a 189 3310 1
+a 2850 4993 8
+a 5775 9100 8
+a 689 7169 7
+a 8542 4066 7
+a 8135 5143 5
+a 1045 1112 4
+a 1642 5137 6
+a 6757 1418 1
+a 9173 6308 10
+a 4957 4550 10
+a 173 300 9
+a 2965 1104 2
+a 8227 5532 7
+a 9029 8764 3
+a 7878 1498 6
+a 7384 1003 3
+a 504 4945 6
+a 157 185 4
+a 1788 2433 2
+a 3634 582 5
+a 845 8692 8
+a 92 361 9
+a 387 2869 4
+a 1964 4877 9
+a 2155 1737 4
+a 9873 4592 5
+a 1162 1893 3
+a 8235 4120 9
+a 85 133 2
+a 270 1379 8
+a 8049 2472 9
+a 696 744 9
+a 1077 2406 7
+a 2611 1546 9
+a 5722 1617 3
+a 1357 8095 1
+a 3395 8811 10
+a 2002 8517 4
+a 7150 4249 4
+a 8 32 1
+a 1085 1110 2
+a 790 689 5
+a 2420 8095 10
+a 384 1529 5
+a 6068 4160 8
+a 8056 5525 4
+a 6434 6371 5
+a 2612 4412 10
+a 2095 4313 1
+a 129 493 3
+a 109 169 3
+a 1796 1544 7
+a 3686 5945 7
+a 1311 5830 9
+a 4323 2432 4
+a 4538 2918 2
+a 2441 2485 8
+a 1391 3048 4
+a 619 2387 7
+a 3862 2426 2
+a 5962 2444 4
+a 6361 3168 3
+a 6734 4618 1
+a 8183 9885 1
+a 818 8940 9
+a 2490 5258 8
+a 7960 2546 8
+a 6469 8911 1
+a 1843 7056 2
+a 7970 660 9
+a 2872 1687 5
+a 9420 7814 1
+a 8531 8477 4
+a 6590 3045 6
+a 9383 9029 6
+a 461 1701 5
+a 219 2139 8
diff --git a/src/boost/libs/graph/example/max_flow6.dat b/src/boost/libs/graph/example/max_flow6.dat
new file mode 100644
index 000000000..44ee64dff
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow6.dat
@@ -0,0 +1,404 @@
+c Random Network
+p max 100 400
+n 1 s
+n 100 t
+a 74 44 94
+a 2 4 67
+a 34 45 100
+a 4 35 14
+a 25 28 62
+a 34 26 91
+a 10 90 25
+a 13 3 77
+a 58 24 19
+a 22 34 52
+a 61 34 20
+a 3 12 48
+a 80 54 80
+a 13 86 20
+a 2 5 7
+a 44 34 41
+a 5 1 32
+a 8 13 87
+a 20 31 90
+a 90 3 74
+a 37 47 69
+a 65 54 82
+a 89 66 1
+a 40 36 16
+a 1 19 40
+a 3 4 55
+a 3 11 35
+a 61 85 72
+a 47 66 70
+a 82 87 59
+a 33 74 75
+a 81 91 75
+a 2 12 7
+a 25 45 30
+a 20 18 56
+a 3 21 63
+a 9 10 26
+a 25 3 37
+a 3 63 23
+a 1 3 64
+a 4 13 50
+a 5 68 14
+a 38 73 56
+a 64 96 60
+a 65 89 30
+a 14 37 81
+a 97 53 56
+a 6 30 36
+a 10 9 41
+a 13 9 83
+a 15 6 47
+a 7 1 13
+a 37 73 6
+a 50 62 33
+a 99 1 58
+a 71 1 59
+a 95 7 91
+a 1 34 92
+a 45 67 22
+a 96 3 15
+a 7 39 84
+a 1 2 66
+a 4 3 12
+a 13 85 93
+a 3 1 5
+a 7 66 63
+a 21 92 73
+a 33 82 82
+a 43 82 32
+a 64 47 54
+a 98 90 37
+a 65 28 34
+a 2 73 41
+a 20 35 55
+a 71 31 25
+a 10 32 47
+a 94 99 37
+a 13 8 27
+a 100 13 79
+a 7 18 81
+a 40 71 64
+a 85 1 44
+a 18 7 67
+a 12 10 68
+a 59 32 38
+a 11 97 97
+a 35 26 17
+a 94 63 10
+a 87 1 47
+a 9 16 10
+a 37 29 14
+a 68 78 64
+a 81 96 47
+a 3 5 25
+a 3 6 1
+a 11 21 44
+a 34 12 6
+a 36 32 18
+a 86 44 26
+a 53 87 8
+a 48 13 93
+a 48 25 43
+a 97 37 82
+a 11 17 77
+a 89 86 57
+a 49 52 53
+a 49 59 86
+a 6 15 1
+a 24 43 100
+a 8 25 70
+a 29 13 17
+a 4 9 37
+a 6 10 48
+a 45 95 17
+a 61 76 56
+a 11 10 15
+a 23 63 67
+a 19 53 21
+a 19 56 71
+a 36 35 64
+a 63 8 90
+a 74 25 58
+a 54 77 50
+a 57 81 61
+a 28 54 79
+a 61 23 74
+a 12 23 8
+a 27 36 72
+a 60 72 37
+a 35 51 92
+a 54 11 24
+a 57 15 79
+a 2 3 55
+a 75 7 42
+a 39 83 64
+a 18 36 63
+a 61 5 79
+a 34 3 28
+a 16 96 5
+a 33 30 82
+a 33 38 27
+a 10 1 20
+a 40 45 48
+a 4 8 14
+a 36 73 28
+a 1 4 18
+a 12 4 13
+a 14 9 9
+a 100 35 33
+a 86 43 78
+a 59 43 75
+a 4 2 34
+a 23 12 63
+a 85 44 75
+a 28 56 48
+a 7 9 64
+a 35 52 58
+a 70 93 54
+a 93 41 100
+a 73 17 68
+a 4 6 47
+a 4 5 73
+a 5 15 4
+a 26 38 57
+a 7 14 82
+a 35 31 5
+a 47 62 96
+a 75 33 45
+a 58 15 12
+a 94 75 94
+a 87 60 28
+a 2 1 92
+a 4 12 84
+a 22 19 14
+a 27 38 16
+a 55 35 23
+a 50 79 84
+a 9 1 53
+a 39 12 68
+a 73 8 89
+a 1 5 81
+a 28 9 33
+a 58 26 40
+a 29 2 17
+a 75 6 3
+a 89 40 45
+a 15 64 68
+a 58 5 28
+a 9 22 12
+a 3 34 93
+a 87 10 97
+a 2 49 28
+a 14 48 83
+a 8 19 35
+a 13 59 93
+a 35 82 59
+a 8 58 81
+a 54 85 41
+a 31 10 100
+a 78 94 41
+a 25 84 48
+a 70 82 70
+a 2 10 60
+a 47 96 7
+a 6 34 63
+a 1 9 19
+a 27 87 47
+a 5 7 44
+a 11 4 89
+a 98 8 26
+a 28 25 69
+a 13 61 95
+a 16 97 73
+a 16 90 73
+a 1 72 82
+a 60 32 30
+a 5 3 38
+a 88 91 20
+a 3 70 97
+a 9 13 29
+a 19 54 25
+a 17 25 97
+a 37 46 2
+a 8 83 19
+a 42 96 97
+a 22 96 98
+a 25 20 32
+a 3 2 26
+a 29 100 9
+a 8 33 20
+a 35 30 16
+a 4 95 69
+a 84 63 33
+a 58 72 82
+a 12 6 39
+a 44 8 99
+a 23 13 54
+a 100 93 54
+a 56 41 50
+a 91 10 16
+a 11 58 100
+a 29 67 73
+a 7 68 98
+a 9 75 22
+a 75 92 96
+a 93 61 60
+a 30 31 100
+a 5 6 77
+a 11 30 36
+a 49 22 7
+a 59 53 20
+a 9 80 63
+a 46 99 58
+a 50 37 68
+a 21 8 67
+a 3 29 48
+a 3 88 5
+a 17 29 22
+a 13 51 34
+a 38 86 49
+a 82 33 38
+a 20 70 43
+a 6 5 29
+a 30 48 62
+a 94 83 97
+a 7 53 50
+a 64 21 4
+a 6 9 71
+a 80 33 69
+a 98 51 26
+a 11 1 23
+a 92 1 7
+a 69 29 36
+a 99 98 33
+a 4 7 84
+a 51 88 45
+a 75 78 30
+a 81 1 92
+a 62 38 71
+a 8 16 69
+a 41 49 27
+a 38 42 82
+a 22 66 77
+a 5 22 88
+a 27 30 67
+a 40 87 4
+a 78 100 95
+a 87 40 52
+a 32 75 92
+a 61 84 46
+a 26 9 85
+a 41 55 1
+a 24 10 39
+a 55 95 55
+a 85 75 63
+a 87 91 69
+a 67 24 93
+a 15 24 58
+a 7 27 90
+a 32 58 68
+a 23 26 79
+a 49 28 87
+a 6 3 72
+a 14 13 28
+a 20 7 74
+a 3 89 58
+a 5 2 39
+a 35 8 100
+a 12 24 18
+a 69 7 11
+a 96 9 61
+a 63 39 22
+a 84 30 43
+a 24 52 33
+a 80 26 9
+a 10 16 78
+a 21 34 18
+a 5 14 40
+a 18 1 14
+a 36 10 38
+a 79 56 25
+a 85 59 39
+a 64 32 27
+a 75 83 71
+a 2 67 10
+a 60 66 81
+a 14 8 83
+a 54 50 57
+a 12 2 37
+a 2 11 97
+a 61 70 83
+a 37 21 98
+a 19 64 18
+a 9 7 9
+a 11 39 84
+a 43 34 29
+a 3 14 74
+a 49 18 85
+a 33 91 89
+a 21 93 47
+a 15 46 93
+a 34 100 9
+a 63 12 40
+a 70 34 9
+a 39 63 57
+a 10 19 78
+a 54 47 95
+a 20 48 45
+a 8 15 84
+a 12 3 89
+a 71 48 71
+a 68 96 38
+a 6 18 4
+a 88 46 62
+a 48 44 99
+a 30 1 20
+a 24 23 46
+a 71 72 79
+a 99 44 92
+a 61 52 34
+a 29 3 11
+a 64 67 9
+a 72 15 61
+a 26 24 43
+a 29 46 36
+a 94 37 64
+a 95 71 99
+a 45 8 54
+a 85 53 95
+a 94 78 74
+a 74 65 83
+a 50 25 42
+a 25 4 53
+a 7 5 17
+a 25 42 66
+a 47 24 1
+a 80 13 66
+a 88 17 28
+a 18 30 30
+a 45 10 96
+a 95 18 36
+a 98 12 20
+a 1 30 65
+a 99 39 50
+a 1 6 98
+a 20 8 53
+a 28 8 47
+a 91 49 69
+a 72 12 33
+a 28 4 91
+a 39 8 28
+a 58 34 23
+a 27 88 21
+a 3 18 41
+a 14 18 50
+a 66 38 85
+a 76 66 83
+a 35 1 37
+a 89 88 92
+a 7 31 40
diff --git a/src/boost/libs/graph/example/max_flow7.dat b/src/boost/libs/graph/example/max_flow7.dat
new file mode 100644
index 000000000..0032f1a1a
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow7.dat
@@ -0,0 +1,10004 @@
+c Random Network
+p max 1000 10000
+n 1 s
+n 1000 t
+a 891 389 58
+a 155 799 81
+a 64 78 97
+a 608 271 90
+a 680 471 15
+a 791 143 63
+a 698 19 93
+a 106 404 60
+a 146 13 5
+a 701 569 24
+a 604 635 52
+a 929 722 63
+a 896 583 49
+a 1 2 68
+a 17 48 52
+a 29 63 16
+a 535 672 50
+a 294 665 91
+a 11 21 49
+a 853 773 40
+a 785 429 88
+a 83 515 3
+a 560 153 33
+a 5 425 26
+a 676 437 9
+a 850 452 96
+a 357 694 95
+a 3 279 28
+a 133 219 63
+a 546 881 100
+a 77 2 76
+a 713 54 63
+a 585 290 11
+a 2 8 12
+a 119 131 73
+a 296 405 90
+a 533 455 73
+a 330 686 26
+a 237 287 7
+a 4 47 30
+a 979 101 74
+a 496 634 4
+a 107 335 71
+a 969 73 45
+a 529 71 71
+a 967 581 82
+a 174 681 8
+a 509 733 4
+a 913 506 97
+a 868 667 66
+a 236 99 22
+a 268 195 55
+a 151 198 89
+a 196 198 23
+a 457 460 47
+a 407 210 27
+a 482 269 65
+a 828 30 8
+a 89 93 31
+a 385 441 80
+a 694 998 14
+a 44 262 16
+a 273 505 12
+a 868 69 91
+a 276 653 80
+a 370 142 4
+a 141 180 52
+a 562 69 15
+a 543 977 93
+a 926 347 25
+a 456 191 45
+a 840 306 39
+a 79 234 11
+a 302 35 36
+a 437 780 62
+a 661 320 42
+a 167 219 48
+a 197 838 76
+a 162 142 42
+a 358 708 35
+a 983 660 23
+a 65 130 66
+a 356 58 87
+a 262 777 65
+a 612 866 93
+a 336 63 77
+a 95 189 39
+a 418 387 30
+a 551 377 94
+a 91 61 47
+a 247 915 26
+a 185 325 82
+a 9 28 34
+a 246 276 21
+a 5 426 67
+a 15 694 34
+a 895 83 59
+a 581 903 45
+a 21 37 82
+a 859 324 36
+a 750 276 3
+a 2 1 66
+a 125 12 18
+a 4 570 23
+a 847 63 30
+a 933 151 37
+a 55 117 21
+a 148 50 75
+a 566 655 51
+a 142 656 49
+a 539 838 80
+a 135 264 64
+a 2 16 6
+a 115 143 28
+a 584 888 72
+a 527 974 99
+a 508 210 68
+a 80 471 80
+a 631 531 36
+a 155 180 14
+a 305 360 5
+a 470 406 65
+a 968 859 91
+a 998 391 61
+a 5 79 47
+a 99 127 21
+a 222 528 86
+a 870 573 53
+a 971 121 9
+a 753 359 77
+a 2 14 49
+a 226 16 39
+a 156 104 39
+a 766 331 29
+a 433 316 44
+a 19 66 8
+a 18 270 22
+a 13 30 56
+a 45 61 17
+a 90 4 76
+a 222 11 41
+a 592 182 23
+a 972 566 91
+a 2 19 6
+a 20 408 17
+a 30 779 67
+a 327 128 82
+a 7 18 68
+a 804 192 45
+a 18 41 48
+a 77 651 99
+a 526 236 89
+a 104 735 47
+a 60 70 29
+a 82 162 77
+a 257 593 90
+a 827 589 8
+a 17 391 41
+a 8 20 51
+a 102 1 33
+a 749 882 74
+a 300 11 93
+a 505 205 34
+a 148 434 60
+a 698 160 55
+a 681 49 74
+a 972 228 15
+a 138 334 73
+a 973 384 90
+a 90 113 70
+a 123 10 67
+a 366 34 1
+a 935 540 57
+a 509 235 1
+a 16 25 28
+a 909 160 33
+a 3 9 61
+a 29 64 19
+a 210 25 6
+a 259 782 72
+a 655 584 47
+a 618 676 64
+a 18 43 67
+a 100 393 43
+a 161 855 4
+a 673 197 39
+a 426 546 93
+a 689 527 37
+a 5 108 93
+a 134 469 44
+a 682 59 7
+a 201 545 7
+a 51 83 15
+a 272 5 52
+a 905 379 86
+a 42 170 47
+a 33 499 39
+a 112 698 59
+a 124 21 39
+a 21 31 42
+a 43 52 69
+a 141 74 53
+a 543 188 4
+a 601 730 81
+a 43 79 29
+a 254 247 92
+a 49 193 93
+a 324 70 58
+a 831 469 53
+a 726 971 32
+a 948 157 76
+a 49 69 31
+a 73 178 81
+a 89 866 17
+a 378 609 17
+a 378 284 71
+a 248 562 73
+a 453 171 49
+a 26 104 52
+a 206 352 21
+a 316 51 72
+a 891 391 6
+a 458 785 17
+a 91 112 62
+a 225 324 74
+a 624 165 5
+a 177 106 66
+a 555 702 86
+a 999 490 3
+a 8 13 26
+a 32 145 18
+a 989 782 94
+a 571 380 75
+a 522 48 78
+a 92 171 75
+a 31 416 38
+a 437 676 84
+a 9 42 23
+a 14 213 31
+a 244 6 41
+a 979 511 58
+a 468 731 52
+a 3 11 38
+a 25 459 71
+a 296 46 79
+a 29 134 85
+a 314 417 35
+a 457 734 92
+a 556 982 17
+a 145 95 54
+a 65 66 60
+a 86 311 82
+a 310 367 90
+a 794 469 91
+a 759 660 54
+a 42 175 86
+a 216 326 12
+a 11 14 4
+a 18 32 23
+a 76 9 85
+a 345 146 73
+a 373 850 18
+a 4 9 5
+a 100 108 4
+a 82 378 85
+a 255 241 36
+a 751 466 32
+a 535 366 64
+a 81 138 72
+a 49 62 62
+a 747 432 67
+a 334 508 13
+a 257 387 76
+a 41 422 31
+a 537 924 93
+a 3 5 86
+a 26 54 84
+a 291 674 73
+a 570 144 53
+a 573 408 51
+a 7 15 24
+a 27 122 27
+a 196 11 18
+a 591 573 53
+a 220 483 76
+a 665 493 45
+a 78 494 26
+a 60 73 49
+a 97 10 18
+a 288 180 76
+a 402 197 13
+a 500 929 45
+a 226 231 22
+a 30 46 100
+a 464 359 8
+a 55 99 90
+a 190 48 100
+a 690 594 19
+a 576 901 33
+a 777 789 96
+a 117 223 91
+a 437 50 52
+a 251 234 92
+a 942 425 99
+a 666 51 63
+a 758 124 66
+a 785 53 13
+a 495 537 33
+a 45 56 3
+a 461 108 3
+a 34 802 53
+a 179 88 64
+a 703 806 81
+a 476 656 63
+a 750 338 8
+a 766 692 44
+a 135 221 14
+a 510 371 50
+a 948 748 54
+a 123 732 42
+a 718 741 4
+a 744 33 76
+a 66 96 31
+a 192 696 65
+a 265 301 77
+a 503 645 84
+a 188 230 60
+a 720 18 63
+a 215 524 70
+a 576 168 38
+a 83 110 89
+a 39 309 21
+a 119 718 49
+a 48 56 50
+a 188 115 42
+a 547 540 89
+a 112 671 52
+a 479 807 55
+a 50 67 39
+a 256 95 55
+a 428 102 11
+a 716 654 17
+a 7 23 54
+a 705 32 74
+a 8 183 24
+a 222 312 75
+a 151 510 17
+a 746 983 33
+a 358 100 93
+a 234 79 14
+a 3 84 49
+a 70 71 96
+a 336 947 92
+a 790 451 100
+a 48 382 24
+a 468 87 23
+a 964 816 85
+a 767 198 95
+a 840 596 95
+a 152 184 83
+a 264 288 51
+a 802 584 3
+a 674 242 88
+a 478 803 94
+a 798 567 61
+a 13 48 47
+a 336 221 2
+a 128 386 58
+a 632 70 98
+a 153 246 24
+a 56 62 86
+a 186 4 73
+a 21 54 88
+a 249 288 3
+a 517 467 52
+a 720 530 77
+a 320 725 23
+a 841 757 85
+a 4 6 88
+a 50 220 7
+a 219 746 28
+a 693 778 5
+a 113 154 82
+a 338 256 71
+a 49 73 31
+a 549 162 16
+a 835 321 86
+a 873 877 97
+a 3 49 8
+a 384 238 31
+a 899 673 92
+a 568 40 13
+a 405 94 100
+a 68 102 1
+a 142 287 44
+a 255 320 45
+a 198 475 34
+a 27 916 88
+a 152 204 67
+a 222 214 31
+a 661 734 37
+a 100 103 71
+a 646 539 30
+a 486 595 52
+a 2 17 7
+a 427 251 72
+a 46 49 24
+a 282 159 32
+a 773 366 15
+a 25 420 81
+a 232 75 53
+a 126 319 41
+a 827 425 21
+a 614 513 89
+a 101 5 39
+a 727 149 59
+a 264 237 1
+a 34 108 48
+a 426 279 78
+a 313 601 28
+a 28 37 38
+a 530 124 8
+a 5 444 40
+a 347 715 3
+a 500 185 38
+a 5 3 37
+a 4 15 31
+a 440 35 16
+a 479 312 6
+a 144 32 47
+a 908 805 94
+a 108 778 14
+a 6 78 94
+a 98 193 11
+a 302 253 7
+a 493 446 61
+a 587 912 77
+a 1 3 95
+a 4 143 66
+a 639 877 89
+a 635 781 5
+a 632 310 68
+a 242 620 78
+a 5 18 76
+a 389 125 29
+a 19 365 15
+a 638 267 32
+a 224 845 40
+a 33 143 25
+a 263 102 99
+a 11 17 96
+a 16 65 92
+a 147 73 71
+a 463 99 5
+a 615 846 18
+a 338 970 20
+a 189 252 64
+a 258 215 63
+a 508 304 55
+a 63 5 6
+a 153 208 30
+a 885 328 23
+a 654 725 97
+a 35 242 69
+a 582 255 21
+a 817 333 58
+a 419 319 8
+a 246 421 48
+a 995 602 82
+a 94 167 30
+a 323 178 54
+a 293 565 5
+a 2 3 45
+a 102 57 88
+a 5 38 21
+a 717 933 56
+a 747 519 99
+a 8 9 74
+a 482 330 59
+a 123 92 58
+a 155 109 55
+a 909 231 42
+a 43 70 75
+a 1 9 43
+a 6 151 85
+a 37 170 28
+a 57 183 43
+a 999 933 15
+a 16 19 21
+a 349 40 35
+a 437 489 9
+a 122 292 49
+a 308 373 19
+a 767 422 56
+a 943 394 2
+a 876 296 35
+a 89 115 19
+a 349 55 14
+a 974 13 45
+a 1000 107 65
+a 322 433 29
+a 484 393 14
+a 11 270 19
+a 6 357 26
+a 826 9 86
+a 380 868 35
+a 332 365 78
+a 168 631 7
+a 5 297 69
+a 919 960 43
+a 86 148 30
+a 365 830 62
+a 541 879 42
+a 750 836 84
+a 739 653 27
+a 60 78 95
+a 503 853 75
+a 7 52 14
+a 9 223 14
+a 455 105 48
+a 349 502 54
+a 2 4 44
+a 451 44 41
+a 7 44 7
+a 254 640 94
+a 495 29 55
+a 120 382 93
+a 161 344 16
+a 65 162 54
+a 145 190 39
+a 226 94 35
+a 949 244 22
+a 63 902 91
+a 736 802 14
+a 4 10 80
+a 31 330 48
+a 38 702 69
+a 281 776 41
+a 16 21 4
+a 438 868 67
+a 100 353 90
+a 429 39 25
+a 644 504 54
+a 860 77 39
+a 16 31 29
+a 32 502 52
+a 335 887 68
+a 589 519 47
+a 468 657 63
+a 34 127 40
+a 698 338 16
+a 504 370 67
+a 18 914 34
+a 175 713 87
+a 7 8 30
+a 33 165 47
+a 465 582 14
+a 3 2 35
+a 422 240 99
+a 812 370 90
+a 5 11 73
+a 194 148 39
+a 20 379 84
+a 896 557 55
+a 508 466 45
+a 30 62 68
+a 412 62 23
+a 370 504 82
+a 18 52 48
+a 412 28 37
+a 649 101 50
+a 117 476 19
+a 421 182 15
+a 169 217 48
+a 8 10 80
+a 42 168 61
+a 81 200 75
+a 197 203 46
+a 55 463 98
+a 730 458 14
+a 8 33 10
+a 4 128 16
+a 58 108 31
+a 893 405 66
+a 3 1 36
+a 632 457 62
+a 371 869 81
+a 120 122 10
+a 236 227 67
+a 697 323 33
+a 274 875 47
+a 244 582 53
+a 58 95 69
+a 138 506 62
+a 423 974 70
+a 957 303 34
+a 106 339 68
+a 430 406 77
+a 18 38 63
+a 56 530 97
+a 682 844 18
+a 303 549 49
+a 340 521 30
+a 196 451 5
+a 603 287 67
+a 42 284 59
+a 494 79 39
+a 236 16 77
+a 750 38 62
+a 172 326 47
+a 105 201 18
+a 3 14 63
+a 64 87 46
+a 128 729 39
+a 21 378 46
+a 3 56 46
+a 24 92 94
+a 26 33 45
+a 63 117 68
+a 72 375 84
+a 846 118 10
+a 266 823 7
+a 46 201 1
+a 406 418 42
+a 19 44 31
+a 140 318 45
+a 755 35 76
+a 869 87 49
+a 728 679 53
+a 385 453 82
+a 25 42 63
+a 387 10 1
+a 738 394 9
+a 731 831 84
+a 93 247 64
+a 280 59 93
+a 50 294 54
+a 591 317 53
+a 645 940 35
+a 173 964 20
+a 339 464 72
+a 2 7 5
+a 30 480 27
+a 500 618 87
+a 387 362 31
+a 317 865 51
+a 383 845 47
+a 184 952 76
+a 102 137 60
+a 45 743 91
+a 170 383 55
+a 475 194 30
+a 690 195 56
+a 15 45 22
+a 158 118 59
+a 403 725 22
+a 460 632 2
+a 964 860 64
+a 877 121 33
+a 59 288 52
+a 13 28 13
+a 260 92 43
+a 839 135 60
+a 849 620 52
+a 27 84 45
+a 538 702 78
+a 167 354 16
+a 475 400 9
+a 52 77 24
+a 23 26 65
+a 142 354 49
+a 47 143 52
+a 126 159 39
+a 13 21 35
+a 28 126 88
+a 322 535 38
+a 599 1 58
+a 821 34 85
+a 960 253 14
+a 282 410 44
+a 17 23 96
+a 341 382 2
+a 966 404 1
+a 360 553 9
+a 139 153 90
+a 772 183 9
+a 131 769 7
+a 145 166 70
+a 283 410 37
+a 692 270 98
+a 980 682 71
+a 572 294 61
+a 23 142 86
+a 208 244 19
+a 376 649 95
+a 318 91 57
+a 816 807 16
+a 317 771 79
+a 9 12 55
+a 732 713 41
+a 20 366 61
+a 768 241 31
+a 83 397 38
+a 181 49 31
+a 1 45 75
+a 230 983 76
+a 33 73 86
+a 75 832 95
+a 925 539 83
+a 998 939 26
+a 462 454 97
+a 213 14 80
+a 427 261 30
+a 171 317 72
+a 753 618 85
+a 841 413 72
+a 805 954 15
+a 1 15 62
+a 282 259 55
+a 34 253 69
+a 128 406 58
+a 902 651 99
+a 51 149 41
+a 45 329 18
+a 52 59 100
+a 582 890 85
+a 8 242 20
+a 60 561 28
+a 220 741 59
+a 775 495 86
+a 606 419 50
+a 17 28 95
+a 37 83 45
+a 845 714 31
+a 8 15 73
+a 487 40 42
+a 299 487 62
+a 4 7 80
+a 431 21 3
+a 19 295 88
+a 13 786 58
+a 73 132 65
+a 7 72 71
+a 116 7 22
+a 663 769 23
+a 6 19 61
+a 26 464 81
+a 530 485 56
+a 140 794 79
+a 387 626 42
+a 48 99 6
+a 157 465 80
+a 205 141 18
+a 364 79 60
+a 545 307 100
+a 155 516 61
+a 1 4 20
+a 310 142 62
+a 30 49 57
+a 743 690 3
+a 827 471 5
+a 9 17 83
+a 655 308 45
+a 5 20 12
+a 106 308 45
+a 311 41 85
+a 759 306 64
+a 104 473 8
+a 490 662 6
+a 15 22 13
+a 60 486 22
+a 167 908 2
+a 786 671 80
+a 298 641 71
+a 542 875 41
+a 169 413 37
+a 810 19 45
+a 838 523 4
+a 833 366 18
+a 43 173 25
+a 384 224 97
+a 453 174 2
+a 34 876 68
+a 267 169 1
+a 40 68 64
+a 71 299 63
+a 523 571 35
+a 995 749 5
+a 77 652 50
+a 871 438 86
+a 5 139 29
+a 25 98 1
+a 811 334 78
+a 134 148 41
+a 449 803 58
+a 844 866 96
+a 768 201 24
+a 512 203 75
+a 730 919 68
+a 5 162 13
+a 53 337 80
+a 553 427 92
+a 110 147 51
+a 113 27 39
+a 919 137 75
+a 267 219 62
+a 94 107 19
+a 5 132 91
+a 305 2 3
+a 824 215 88
+a 65 177 19
+a 5 15 99
+a 177 415 14
+a 5 27 72
+a 37 350 75
+a 731 726 8
+a 893 609 76
+a 550 416 53
+a 277 317 89
+a 375 826 91
+a 92 223 83
+a 410 38 7
+a 372 569 37
+a 585 589 16
+a 743 441 98
+a 32 104 100
+a 61 517 98
+a 309 168 86
+a 365 576 62
+a 866 323 13
+a 62 220 7
+a 110 750 59
+a 22 25 67
+a 105 829 50
+a 999 854 80
+a 59 575 70
+a 484 84 5
+a 62 92 81
+a 592 665 15
+a 687 773 65
+a 186 102 19
+a 437 713 95
+a 19 153 93
+a 188 210 46
+a 132 555 14
+a 2 5 37
+a 17 19 85
+a 28 13 28
+a 16 34 67
+a 416 119 51
+a 9 8 93
+a 87 145 43
+a 1 14 96
+a 17 566 46
+a 461 755 43
+a 483 585 69
+a 796 477 42
+a 42 19 17
+a 47 62 15
+a 13 24 41
+a 542 560 32
+a 195 22 50
+a 559 449 80
+a 597 126 51
+a 64 76 31
+a 194 222 40
+a 282 114 53
+a 466 853 99
+a 398 3 63
+a 11 128 31
+a 303 395 70
+a 12 14 63
+a 668 722 20
+a 764 995 39
+a 664 342 100
+a 764 44 64
+a 1 71 22
+a 283 27 56
+a 287 29 96
+a 248 379 62
+a 448 403 55
+a 697 229 18
+a 527 610 31
+a 19 31 26
+a 180 136 62
+a 36 682 32
+a 556 918 55
+a 378 792 94
+a 63 114 75
+a 337 269 28
+a 99 813 100
+a 159 204 100
+a 897 219 75
+a 149 843 59
+a 13 42 90
+a 109 131 1
+a 326 208 91
+a 988 144 64
+a 20 139 93
+a 916 415 10
+a 244 600 44
+a 39 58 80
+a 260 125 11
+a 957 497 27
+a 583 748 11
+a 467 636 57
+a 107 404 59
+a 433 93 7
+a 517 609 25
+a 696 338 65
+a 906 670 2
+a 805 956 75
+a 220 274 51
+a 230 40 36
+a 350 408 26
+a 25 407 11
+a 42 418 52
+a 3 4 24
+a 2 121 89
+a 12 20 16
+a 570 593 3
+a 105 108 89
+a 203 511 50
+a 184 135 5
+a 642 559 1
+a 33 177 74
+a 186 515 47
+a 108 99 67
+a 33 157 55
+a 30 550 12
+a 345 338 90
+a 400 969 65
+a 823 198 47
+a 187 286 58
+a 27 30 1
+a 22 471 64
+a 697 772 30
+a 2 317 76
+a 259 103 53
+a 243 526 9
+a 4 5 15
+a 33 31 69
+a 132 894 47
+a 54 184 6
+a 681 814 50
+a 6 26 11
+a 101 97 35
+a 765 733 82
+a 733 608 95
+a 56 844 26
+a 61 893 74
+a 772 822 23
+a 32 34 41
+a 68 305 47
+a 499 586 9
+a 992 945 32
+a 742 73 31
+a 284 482 2
+a 42 160 27
+a 358 591 27
+a 789 732 71
+a 66 84 47
+a 21 41 37
+a 514 257 24
+a 14 188 68
+a 972 476 7
+a 13 17 88
+a 14 9 67
+a 543 784 47
+a 321 6 18
+a 597 600 68
+a 188 601 71
+a 127 186 46
+a 5 7 13
+a 674 975 73
+a 537 54 45
+a 523 190 30
+a 380 155 45
+a 499 341 88
+a 57 95 29
+a 359 442 91
+a 819 4 48
+a 381 730 33
+a 966 545 95
+a 32 73 14
+a 221 1 38
+a 268 887 1
+a 880 970 80
+a 383 276 4
+a 563 818 88
+a 3 144 59
+a 123 46 64
+a 191 335 74
+a 622 477 81
+a 715 17 86
+a 116 121 12
+a 514 361 34
+a 51 199 10
+a 18 31 76
+a 505 803 61
+a 609 905 21
+a 463 770 81
+a 723 946 35
+a 272 399 46
+a 714 402 8
+a 744 562 2
+a 158 662 17
+a 123 214 76
+a 346 754 9
+a 2 10 36
+a 11 89 86
+a 323 766 56
+a 44 721 29
+a 209 237 34
+a 248 620 68
+a 181 856 63
+a 433 455 11
+a 15 20 21
+a 38 106 9
+a 246 136 15
+a 55 628 23
+a 478 63 35
+a 115 316 4
+a 396 401 94
+a 952 882 81
+a 512 638 25
+a 47 97 41
+a 138 735 42
+a 24 109 11
+a 141 336 17
+a 115 989 35
+a 172 673 54
+a 291 581 56
+a 10 14 39
+a 94 141 45
+a 636 131 58
+a 356 106 42
+a 206 22 96
+a 648 33 5
+a 63 717 20
+a 51 69 82
+a 184 227 63
+a 31 505 93
+a 973 532 17
+a 152 198 12
+a 543 806 17
+a 383 81 5
+a 162 853 50
+a 15 181 48
+a 199 47 55
+a 875 296 67
+a 320 206 85
+a 227 403 34
+a 825 204 53
+a 949 255 45
+a 496 511 85
+a 515 114 87
+a 792 148 45
+a 367 114 84
+a 108 138 62
+a 73 150 99
+a 929 192 65
+a 948 380 67
+a 778 790 70
+a 323 456 59
+a 201 19 28
+a 124 149 16
+a 595 343 2
+a 649 419 60
+a 163 88 76
+a 332 619 39
+a 975 598 45
+a 37 25 58
+a 391 88 22
+a 130 405 47
+a 361 39 30
+a 451 361 43
+a 550 771 63
+a 927 610 21
+a 164 441 68
+a 9 68 88
+a 21 658 42
+a 285 826 98
+a 4 286 72
+a 239 280 27
+a 81 266 79
+a 491 221 36
+a 3 22 72
+a 182 118 45
+a 588 413 80
+a 410 154 59
+a 66 266 34
+a 437 400 69
+a 838 167 16
+a 230 122 43
+a 142 408 59
+a 216 618 63
+a 55 88 90
+a 55 260 81
+a 204 845 51
+a 291 762 27
+a 162 843 3
+a 22 30 27
+a 274 228 76
+a 869 621 86
+a 18 12 79
+a 24 666 4
+a 724 404 95
+a 1 6 22
+a 5 10 81
+a 640 270 32
+a 769 358 64
+a 979 725 81
+a 2 256 68
+a 14 3 24
+a 26 674 13
+a 116 215 57
+a 222 96 71
+a 332 112 39
+a 257 923 58
+a 957 703 14
+a 28 55 20
+a 212 73 31
+a 217 570 43
+a 230 459 46
+a 241 594 60
+a 99 992 32
+a 2 36 28
+a 20 571 4
+a 202 173 60
+a 747 843 72
+a 7 10 16
+a 20 329 97
+a 27 342 100
+a 86 572 6
+a 46 26 68
+a 952 957 66
+a 414 671 62
+a 346 516 42
+a 257 670 39
+a 25 85 44
+a 85 478 67
+a 821 485 5
+a 5 8 64
+a 81 704 69
+a 758 405 96
+a 70 109 61
+a 61 218 3
+a 738 255 18
+a 149 154 57
+a 233 266 100
+a 801 376 74
+a 35 124 43
+a 11 226 38
+a 682 766 69
+a 231 357 80
+a 489 52 39
+a 107 227 30
+a 946 169 74
+a 769 846 5
+a 7 20 37
+a 20 8 46
+a 131 800 76
+a 317 627 85
+a 14 67 58
+a 209 106 41
+a 505 130 92
+a 784 677 40
+a 89 173 89
+a 297 40 52
+a 702 291 11
+a 7 5 94
+a 32 423 86
+a 632 43 72
+a 713 342 24
+a 10 246 41
+a 81 98 48
+a 20 30 10
+a 88 40 23
+a 621 194 38
+a 602 58 49
+a 12 87 3
+a 178 670 62
+a 8 50 89
+a 96 141 2
+a 153 250 51
+a 415 299 57
+a 683 189 83
+a 20 28 23
+a 114 606 98
+a 274 976 77
+a 873 755 6
+a 829 959 14
+a 610 170 16
+a 134 787 12
+a 93 325 69
+a 52 115 63
+a 631 38 70
+a 797 529 46
+a 869 96 23
+a 29 32 21
+a 318 404 89
+a 663 45 95
+a 32 9 68
+a 130 16 95
+a 48 324 21
+a 4 12 84
+a 68 170 21
+a 335 72 24
+a 964 537 84
+a 172 28 69
+a 665 44 9
+a 430 990 28
+a 53 73 6
+a 114 1 90
+a 182 43 11
+a 410 221 93
+a 482 917 77
+a 12 99 72
+a 108 20 48
+a 878 629 47
+a 84 161 33
+a 382 422 19
+a 193 737 98
+a 18 33 82
+a 108 408 27
+a 418 59 50
+a 394 724 92
+a 638 763 73
+a 58 62 57
+a 230 287 80
+a 2 29 64
+a 370 423 61
+a 495 173 63
+a 495 297 44
+a 53 450 67
+a 760 830 40
+a 256 422 76
+a 555 81 78
+a 944 749 34
+a 488 925 90
+a 144 186 92
+a 146 435 65
+a 181 989 26
+a 3 57 84
+a 21 145 24
+a 199 71 22
+a 887 91 88
+a 6 12 48
+a 793 645 78
+a 420 263 94
+a 15 437 73
+a 46 105 83
+a 113 68 67
+a 833 341 21
+a 447 131 58
+a 644 463 49
+a 366 655 83
+a 818 324 30
+a 933 513 51
+a 904 784 7
+a 260 396 96
+a 289 123 35
+a 68 109 4
+a 169 252 47
+a 874 391 7
+a 265 91 37
+a 883 328 30
+a 335 966 34
+a 9 73 42
+a 17 98 69
+a 870 917 6
+a 160 177 60
+a 450 190 46
+a 836 865 55
+a 525 500 18
+a 270 472 95
+a 41 46 57
+a 361 724 64
+a 188 660 76
+a 237 380 91
+a 248 782 93
+a 380 533 51
+a 3 28 33
+a 111 546 47
+a 29 202 70
+a 991 365 76
+a 497 463 39
+a 27 52 6
+a 645 97 40
+a 221 616 50
+a 744 967 75
+a 8 11 10
+a 89 244 23
+a 268 245 75
+a 162 502 22
+a 212 176 43
+a 77 78 39
+a 165 147 33
+a 737 313 53
+a 288 568 97
+a 133 125 54
+a 159 394 100
+a 46 143 74
+a 16 399 73
+a 444 167 14
+a 238 917 21
+a 75 127 99
+a 375 329 77
+a 599 911 38
+a 328 562 15
+a 6 1 12
+a 187 319 54
+a 701 830 66
+a 668 305 36
+a 717 848 85
+a 395 712 78
+a 2 154 100
+a 2 224 75
+a 353 575 73
+a 45 25 93
+a 526 783 94
+a 193 800 66
+a 146 214 72
+a 243 109 58
+a 269 295 12
+a 654 776 13
+a 95 234 34
+a 214 948 100
+a 573 910 56
+a 550 395 40
+a 71 340 71
+a 415 98 56
+a 702 35 11
+a 783 670 37
+a 315 946 87
+a 23 41 43
+a 164 1 29
+a 659 417 14
+a 220 704 86
+a 676 480 25
+a 957 735 91
+a 142 158 94
+a 34 190 43
+a 197 67 71
+a 980 119 84
+a 188 55 21
+a 23 27 60
+a 60 77 97
+a 19 16 36
+a 254 324 97
+a 542 157 9
+a 694 192 38
+a 78 710 11
+a 234 922 3
+a 201 404 70
+a 1 63 20
+a 1 86 55
+a 240 229 50
+a 29 55 14
+a 191 744 84
+a 319 743 44
+a 12 13 83
+a 133 695 37
+a 165 122 52
+a 919 58 80
+a 271 295 11
+a 598 4 81
+a 42 107 39
+a 197 587 8
+a 389 966 97
+a 3 179 12
+a 92 256 20
+a 81 883 61
+a 296 958 35
+a 475 961 97
+a 72 78 77
+a 195 833 22
+a 90 80 14
+a 51 654 86
+a 228 756 67
+a 268 629 83
+a 9 47 63
+a 70 82 42
+a 463 13 14
+a 540 67 32
+a 582 774 75
+a 46 283 54
+a 27 91 67
+a 5 339 9
+a 41 109 79
+a 136 531 34
+a 607 59 17
+a 196 646 42
+a 13 361 81
+a 25 68 71
+a 187 58 25
+a 417 744 85
+a 943 925 28
+a 653 52 72
+a 621 274 37
+a 9 32 11
+a 613 22 33
+a 128 580 53
+a 717 849 33
+a 167 446 15
+a 363 288 54
+a 788 909 47
+a 949 7 54
+a 968 897 84
+a 10 28 19
+a 491 4 77
+a 32 198 65
+a 391 999 35
+a 349 395 83
+a 11 15 79
+a 359 949 71
+a 612 488 86
+a 341 105 23
+a 608 520 70
+a 955 246 38
+a 135 222 62
+a 34 197 84
+a 340 282 27
+a 412 723 90
+a 162 442 83
+a 16 87 71
+a 740 398 26
+a 500 937 53
+a 63 77 85
+a 362 6 32
+a 302 276 100
+a 539 8 33
+a 971 500 91
+a 2 43 85
+a 118 144 21
+a 422 4 62
+a 482 96 50
+a 57 796 84
+a 937 487 67
+a 7 47 23
+a 52 46 78
+a 174 2 12
+a 408 780 35
+a 2 12 91
+a 212 266 73
+a 12 93 23
+a 51 269 51
+a 733 240 63
+a 807 464 9
+a 20 325 55
+a 113 615 33
+a 6 113 41
+a 205 51 51
+a 289 762 20
+a 653 884 30
+a 9 14 89
+a 806 446 93
+a 143 251 11
+a 286 25 97
+a 913 1000 57
+a 431 50 26
+a 407 978 33
+a 362 626 48
+a 629 657 21
+a 406 847 93
+a 60 230 23
+a 188 472 97
+a 842 484 60
+a 657 775 70
+a 167 172 77
+a 143 221 38
+a 342 470 49
+a 465 829 15
+a 674 135 84
+a 9 3 67
+a 257 44 70
+a 3 10 67
+a 21 373 10
+a 21 567 87
+a 988 896 52
+a 928 373 86
+a 278 130 65
+a 935 305 79
+a 8 87 39
+a 218 97 93
+a 162 10 62
+a 169 87 62
+a 713 659 95
+a 27 117 78
+a 2 6 27
+a 116 16 99
+a 217 48 27
+a 549 533 69
+a 69 77 39
+a 6 15 28
+a 63 66 50
+a 750 294 23
+a 758 373 5
+a 339 743 48
+a 750 984 84
+a 14 21 17
+a 32 69 95
+a 927 259 94
+a 776 440 79
+a 90 225 15
+a 745 232 46
+a 19 737 53
+a 19 22 84
+a 236 175 52
+a 293 8 28
+a 47 632 39
+a 331 641 55
+a 196 219 37
+a 21 110 11
+a 356 11 3
+a 93 67 30
+a 360 535 91
+a 438 774 12
+a 16 27 67
+a 15 6 45
+a 812 978 77
+a 715 810 31
+a 438 418 26
+a 371 421 68
+a 724 228 56
+a 141 192 58
+a 197 183 85
+a 476 76 66
+a 399 204 87
+a 222 25 84
+a 3 12 65
+a 72 13 69
+a 724 286 46
+a 197 457 74
+a 551 78 95
+a 565 595 42
+a 5 24 74
+a 126 7 59
+a 52 74 6
+a 557 293 10
+a 597 877 68
+a 61 116 61
+a 117 9 39
+a 108 216 31
+a 424 230 60
+a 21 66 33
+a 606 109 37
+a 338 655 52
+a 767 218 48
+a 606 357 98
+a 128 239 47
+a 307 7 51
+a 925 271 48
+a 6 37 14
+a 545 352 2
+a 723 589 92
+a 20 61 51
+a 276 327 49
+a 184 167 35
+a 309 929 22
+a 49 271 37
+a 569 879 100
+a 29 41 86
+a 152 46 86
+a 463 928 100
+a 263 269 9
+a 43 62 96
+a 58 70 13
+a 869 60 15
+a 912 239 96
+a 620 895 33
+a 62 371 81
+a 179 159 24
+a 516 813 14
+a 15 317 57
+a 138 928 78
+a 724 870 99
+a 718 426 14
+a 313 99 11
+a 101 130 9
+a 326 28 73
+a 778 556 44
+a 293 214 38
+a 731 547 7
+a 990 791 73
+a 611 789 16
+a 96 117 28
+a 86 137 28
+a 112 204 92
+a 204 931 6
+a 185 608 86
+a 717 234 28
+a 550 515 24
+a 857 199 18
+a 12 70 71
+a 370 304 44
+a 510 230 98
+a 673 423 64
+a 127 182 66
+a 228 22 81
+a 934 828 64
+a 318 469 80
+a 840 152 58
+a 934 727 100
+a 921 800 62
+a 139 516 48
+a 12 36 25
+a 56 334 42
+a 613 662 56
+a 787 650 94
+a 8 12 8
+a 127 471 58
+a 52 27 12
+a 121 45 17
+a 355 708 59
+a 270 914 23
+a 679 814 19
+a 406 474 36
+a 672 66 67
+a 685 569 83
+a 631 205 98
+a 178 530 56
+a 837 593 99
+a 616 582 45
+a 11 5 90
+a 792 141 22
+a 28 181 79
+a 303 645 67
+a 373 89 85
+a 101 618 11
+a 146 217 97
+a 32 207 69
+a 116 34 69
+a 159 770 69
+a 246 239 26
+a 9 1 88
+a 38 108 20
+a 717 15 21
+a 152 622 22
+a 98 14 75
+a 76 93 43
+a 465 208 3
+a 91 822 38
+a 108 109 17
+a 88 57 14
+a 233 8 85
+a 894 471 7
+a 38 330 72
+a 11 16 54
+a 290 27 38
+a 497 56 32
+a 124 582 48
+a 872 943 48
+a 231 620 84
+a 20 29 64
+a 23 7 19
+a 303 186 2
+a 441 407 68
+a 10 709 23
+a 32 255 39
+a 409 75 24
+a 140 119 65
+a 7 12 39
+a 75 167 8
+a 527 584 87
+a 402 865 18
+a 278 4 8
+a 80 417 99
+a 422 270 97
+a 276 724 38
+a 610 276 76
+a 656 511 95
+a 856 333 10
+a 45 48 73
+a 52 391 89
+a 255 628 92
+a 717 737 32
+a 14 32 55
+a 974 524 37
+a 65 73 95
+a 140 143 63
+a 735 193 92
+a 879 209 76
+a 627 628 52
+a 741 975 7
+a 6 4 38
+a 11 48 9
+a 318 254 67
+a 756 123 50
+a 37 78 55
+a 785 786 1
+a 10 34 70
+a 141 19 54
+a 498 615 21
+a 502 769 29
+a 609 896 100
+a 29 136 69
+a 339 140 13
+a 737 329 88
+a 447 118 62
+a 3 131 51
+a 68 697 75
+a 34 221 96
+a 852 649 82
+a 7 128 39
+a 7 14 97
+a 54 36 39
+a 716 162 13
+a 81 475 51
+a 597 80 5
+a 422 324 78
+a 544 395 76
+a 7 97 52
+a 316 76 59
+a 8 797 33
+a 880 895 16
+a 121 177 45
+a 774 559 59
+a 305 623 98
+a 988 196 18
+a 649 323 44
+a 86 227 97
+a 518 106 43
+a 269 96 13
+a 462 239 90
+a 39 764 83
+a 63 113 18
+a 198 219 63
+a 702 441 55
+a 82 371 17
+a 578 595 69
+a 53 84 66
+a 10 16 63
+a 65 121 82
+a 69 254 49
+a 112 327 36
+a 896 889 32
+a 4 2 1
+a 432 805 82
+a 384 954 36
+a 115 119 66
+a 170 544 52
+a 457 65 46
+a 671 679 68
+a 902 661 4
+a 2 89 95
+a 113 42 71
+a 821 695 6
+a 91 440 57
+a 474 545 76
+a 922 958 74
+a 172 254 45
+a 334 178 6
+a 446 608 61
+a 129 469 1
+a 71 139 58
+a 624 121 43
+a 13 38 83
+a 33 100 90
+a 190 3 22
+a 230 650 9
+a 761 240 13
+a 478 281 21
+a 29 258 1
+a 388 240 100
+a 574 909 17
+a 917 633 16
+a 124 226 61
+a 288 969 17
+a 1 235 6
+a 401 14 35
+a 457 44 50
+a 628 50 79
+a 683 270 11
+a 260 340 14
+a 369 36 42
+a 836 590 89
+a 389 109 95
+a 70 54 49
+a 78 733 48
+a 652 883 92
+a 30 31 31
+a 20 31 25
+a 663 93 89
+a 819 622 1
+a 440 894 8
+a 50 555 3
+a 429 408 45
+a 46 83 96
+a 125 68 93
+a 475 366 84
+a 242 183 30
+a 945 677 9
+a 97 157 17
+a 293 460 86
+a 858 222 92
+a 538 302 95
+a 786 983 87
+a 137 422 47
+a 439 881 54
+a 567 947 74
+a 458 920 4
+a 416 19 45
+a 17 227 63
+a 325 936 99
+a 787 893 76
+a 548 124 39
+a 871 974 7
+a 969 396 37
+a 28 178 3
+a 468 710 27
+a 203 276 19
+a 752 579 61
+a 621 618 69
+a 154 228 16
+a 393 534 100
+a 2 235 45
+a 41 121 52
+a 148 591 77
+a 645 649 19
+a 551 849 47
+a 19 915 49
+a 6 11 76
+a 149 740 23
+a 205 955 50
+a 649 863 41
+a 94 146 62
+a 662 939 40
+a 7 13 14
+a 234 30 61
+a 883 550 55
+a 359 87 40
+a 6 31 64
+a 68 54 34
+a 95 975 100
+a 119 502 94
+a 409 383 12
+a 632 443 96
+a 378 26 58
+a 30 40 3
+a 69 97 56
+a 356 18 91
+a 555 988 11
+a 516 381 66
+a 80 188 93
+a 643 9 35
+a 27 179 29
+a 275 840 98
+a 765 924 26
+a 398 142 82
+a 234 419 34
+a 30 66 53
+a 315 150 64
+a 373 471 60
+a 448 168 57
+a 827 401 16
+a 200 864 38
+a 420 324 23
+a 8 7 70
+a 8 593 89
+a 13 2 3
+a 323 367 30
+a 253 135 58
+a 6 2 20
+a 284 341 100
+a 366 895 68
+a 874 325 81
+a 966 402 15
+a 250 229 5
+a 177 480 38
+a 38 104 41
+a 782 918 19
+a 502 750 68
+a 300 587 71
+a 220 481 81
+a 219 915 69
+a 20 104 48
+a 144 137 47
+a 849 328 4
+a 185 533 2
+a 479 599 63
+a 12 15 12
+a 351 302 92
+a 975 546 65
+a 585 713 48
+a 907 886 56
+a 44 189 95
+a 19 61 93
+a 861 273 84
+a 132 327 94
+a 779 583 6
+a 501 736 27
+a 713 777 52
+a 439 127 94
+a 26 61 28
+a 368 668 4
+a 2 150 73
+a 5 234 66
+a 561 307 42
+a 513 777 83
+a 28 977 23
+a 39 52 99
+a 74 7 50
+a 58 366 49
+a 10 202 12
+a 779 901 11
+a 776 775 65
+a 14 2 71
+a 590 338 14
+a 23 176 20
+a 950 372 97
+a 667 860 6
+a 251 401 71
+a 126 330 18
+a 68 189 80
+a 138 476 56
+a 140 248 39
+a 399 359 1
+a 571 987 19
+a 973 784 9
+a 393 220 37
+a 22 70 45
+a 136 902 46
+a 342 421 67
+a 53 477 90
+a 113 316 98
+a 279 716 82
+a 161 225 81
+a 74 198 55
+a 286 70 10
+a 931 834 79
+a 837 32 14
+a 41 18 48
+a 161 479 35
+a 49 63 73
+a 5 46 96
+a 121 299 20
+a 146 865 59
+a 206 744 14
+a 260 409 23
+a 65 250 22
+a 571 137 86
+a 874 277 42
+a 640 95 94
+a 118 161 46
+a 71 260 99
+a 674 322 9
+a 23 607 80
+a 14 131 100
+a 61 703 100
+a 148 873 98
+a 8 14 80
+a 979 547 70
+a 468 677 94
+a 351 111 68
+a 50 51 95
+a 555 568 38
+a 912 32 19
+a 732 704 90
+a 201 717 80
+a 515 452 55
+a 14 24 88
+a 69 129 13
+a 536 651 23
+a 224 125 20
+a 671 130 20
+a 238 741 43
+a 93 166 76
+a 30 39 3
+a 579 87 81
+a 684 88 26
+a 758 123 78
+a 76 126 16
+a 15 270 35
+a 644 665 84
+a 64 88 88
+a 153 292 1
+a 628 2 42
+a 346 792 45
+a 153 91 64
+a 22 230 1
+a 311 2 44
+a 90 499 11
+a 701 474 86
+a 124 875 12
+a 740 776 43
+a 18 56 1
+a 19 363 71
+a 73 436 71
+a 524 135 79
+a 852 195 55
+a 403 116 84
+a 633 501 78
+a 764 453 99
+a 42 47 97
+a 52 319 7
+a 107 63 6
+a 71 325 10
+a 303 158 52
+a 8 49 20
+a 93 20 86
+a 210 164 93
+a 90 22 75
+a 556 934 16
+a 495 798 47
+a 15 1 17
+a 203 550 11
+a 81 125 46
+a 247 415 15
+a 677 478 17
+a 46 196 21
+a 45 186 6
+a 245 283 1
+a 14 27 55
+a 62 932 11
+a 310 952 51
+a 894 491 29
+a 663 755 49
+a 55 74 31
+a 289 142 37
+a 839 776 54
+a 801 600 40
+a 7 11 13
+a 327 778 43
+a 88 230 25
+a 651 584 49
+a 430 429 40
+a 760 872 32
+a 40 74 90
+a 305 190 46
+a 625 384 88
+a 595 837 43
+a 685 906 94
+a 23 65 8
+a 171 262 44
+a 926 267 71
+a 331 404 18
+a 731 454 37
+a 684 745 43
+a 907 105 31
+a 512 634 73
+a 789 486 52
+a 934 869 19
+a 977 430 78
+a 60 375 30
+a 396 869 32
+a 398 117 28
+a 100 927 46
+a 309 388 80
+a 84 229 98
+a 14 89 26
+a 589 799 29
+a 67 233 93
+a 50 231 42
+a 543 344 25
+a 82 985 94
+a 670 602 22
+a 169 775 100
+a 17 18 28
+a 22 151 57
+a 753 844 93
+a 921 524 91
+a 526 262 46
+a 502 219 95
+a 12 7 12
+a 518 111 100
+a 159 709 100
+a 970 613 34
+a 54 197 95
+a 24 626 15
+a 849 199 19
+a 277 419 93
+a 29 33 8
+a 216 51 11
+a 714 389 2
+a 246 455 89
+a 595 65 15
+a 88 103 11
+a 510 288 16
+a 568 392 27
+a 183 75 44
+a 586 729 6
+a 991 160 42
+a 7 133 61
+a 416 561 67
+a 546 270 42
+a 902 150 2
+a 478 737 20
+a 47 67 46
+a 753 137 65
+a 17 386 89
+a 19 50 66
+a 100 583 31
+a 851 757 1
+a 964 706 2
+a 932 889 100
+a 4 114 29
+a 123 131 83
+a 494 620 36
+a 580 66 13
+a 234 365 37
+a 158 887 30
+a 12 122 60
+a 196 35 25
+a 65 642 30
+a 279 249 44
+a 284 422 14
+a 2 95 16
+a 357 133 57
+a 849 698 50
+a 444 617 44
+a 8 63 36
+a 229 358 7
+a 655 585 54
+a 535 829 8
+a 99 495 45
+a 72 79 71
+a 135 405 53
+a 748 603 70
+a 750 863 95
+a 425 36 9
+a 631 899 43
+a 153 582 16
+a 7 21 86
+a 675 362 36
+a 88 30 67
+a 317 381 64
+a 683 406 74
+a 22 29 22
+a 3 100 96
+a 909 794 30
+a 320 213 80
+a 13 96 26
+a 673 502 98
+a 13 113 67
+a 532 323 70
+a 75 120 59
+a 20 97 27
+a 527 166 75
+a 522 403 96
+a 8 291 80
+a 27 534 92
+a 281 686 68
+a 8 2 85
+a 251 425 85
+a 853 737 22
+a 298 394 23
+a 23 193 39
+a 125 5 25
+a 627 558 62
+a 14 11 1
+a 32 308 83
+a 828 383 98
+a 169 310 3
+a 311 979 98
+a 58 183 39
+a 295 333 15
+a 613 919 73
+a 480 192 17
+a 224 804 54
+a 517 596 32
+a 315 344 99
+a 24 370 21
+a 370 402 70
+a 254 442 72
+a 644 635 71
+a 220 460 12
+a 11 85 69
+a 11 8 34
+a 357 683 13
+a 26 34 57
+a 82 121 41
+a 526 942 70
+a 505 534 42
+a 386 992 91
+a 782 993 32
+a 6 696 79
+a 55 818 64
+a 525 685 25
+a 283 375 8
+a 747 634 82
+a 727 756 98
+a 5 51 61
+a 19 25 42
+a 610 358 40
+a 113 756 1
+a 585 169 6
+a 134 236 9
+a 73 581 86
+a 686 12 84
+a 696 250 33
+a 300 353 24
+a 464 123 31
+a 12 33 64
+a 100 29 94
+a 479 50 58
+a 136 5 39
+a 67 132 45
+a 684 700 80
+a 100 114 53
+a 899 242 45
+a 227 410 61
+a 940 358 22
+a 341 765 52
+a 5 35 87
+a 94 199 61
+a 220 359 86
+a 255 585 71
+a 212 858 2
+a 528 878 48
+a 323 812 30
+a 56 67 97
+a 2 45 35
+a 419 530 11
+a 905 588 100
+a 120 263 18
+a 66 239 100
+a 190 219 80
+a 5 190 70
+a 217 510 89
+a 943 865 98
+a 65 797 90
+a 728 19 19
+a 23 210 90
+a 51 327 82
+a 5 13 37
+a 883 639 31
+a 362 503 84
+a 293 439 66
+a 21 34 31
+a 133 237 40
+a 49 277 41
+a 652 862 85
+a 316 194 11
+a 9 99 25
+a 326 393 69
+a 189 496 35
+a 896 158 9
+a 904 462 1
+a 825 73 80
+a 1 13 13
+a 74 159 92
+a 148 27 78
+a 709 311 45
+a 509 898 83
+a 3 59 22
+a 750 563 36
+a 409 981 100
+a 197 216 50
+a 272 114 71
+a 878 407 75
+a 313 310 48
+a 368 743 97
+a 200 253 80
+a 437 19 87
+a 487 961 65
+a 146 786 11
+a 928 748 69
+a 734 375 61
+a 38 87 29
+a 172 664 64
+a 325 562 61
+a 336 445 52
+a 84 150 82
+a 573 874 29
+a 597 74 31
+a 173 745 14
+a 63 456 87
+a 604 65 54
+a 152 908 35
+a 871 108 66
+a 676 597 85
+a 23 33 65
+a 48 166 47
+a 179 740 21
+a 458 267 96
+a 378 573 46
+a 202 358 25
+a 11 45 1
+a 173 180 37
+a 65 299 70
+a 646 375 52
+a 427 603 42
+a 20 129 74
+a 489 355 27
+a 18 181 21
+a 4 11 3
+a 62 157 91
+a 167 500 45
+a 446 511 60
+a 9 110 90
+a 159 167 75
+a 202 11 1
+a 387 581 72
+a 951 745 70
+a 276 376 67
+a 265 118 3
+a 41 113 43
+a 132 599 66
+a 886 322 46
+a 444 758 83
+a 95 194 2
+a 599 295 60
+a 517 833 79
+a 199 205 83
+a 63 85 49
+a 417 384 66
+a 280 666 88
+a 26 23 6
+a 5 9 99
+a 626 774 73
+a 781 858 56
+a 655 73 9
+a 470 524 94
+a 19 40 33
+a 86 415 73
+a 416 140 95
+a 745 527 37
+a 396 502 45
+a 875 342 8
+a 71 134 29
+a 312 383 6
+a 869 710 60
+a 862 978 71
+a 24 263 63
+a 157 451 23
+a 642 932 29
+a 280 291 43
+a 142 331 68
+a 343 239 59
+a 45 112 52
+a 92 911 95
+a 39 115 99
+a 21 19 18
+a 607 426 5
+a 552 603 52
+a 650 882 84
+a 993 488 86
+a 117 240 88
+a 12 16 70
+a 682 584 96
+a 740 364 76
+a 175 138 14
+a 217 535 60
+a 871 482 93
+a 967 504 17
+a 279 384 37
+a 148 151 98
+a 71 158 95
+a 605 626 64
+a 913 952 37
+a 337 356 11
+a 345 351 88
+a 162 361 82
+a 17 32 97
+a 197 18 50
+a 905 216 34
+a 672 923 65
+a 637 217 32
+a 9 25 32
+a 113 617 27
+a 167 698 23
+a 685 198 46
+a 606 461 34
+a 274 197 19
+a 178 809 49
+a 68 137 65
+a 44 110 76
+a 392 10 51
+a 173 794 65
+a 28 393 15
+a 4 18 14
+a 41 169 19
+a 434 163 97
+a 151 16 15
+a 259 51 52
+a 918 571 56
+a 43 82 23
+a 12 17 29
+a 552 731 27
+a 705 499 98
+a 298 234 66
+a 121 700 32
+a 877 16 7
+a 31 35 37
+a 174 439 29
+a 779 734 22
+a 269 890 63
+a 559 91 33
+a 390 714 94
+a 755 488 10
+a 14 938 29
+a 127 980 39
+a 556 237 33
+a 255 181 10
+a 5 2 36
+a 499 168 71
+a 14 505 57
+a 559 20 54
+a 272 83 79
+a 279 358 86
+a 554 7 38
+a 50 125 43
+a 381 667 5
+a 78 859 17
+a 525 934 9
+a 71 177 88
+a 793 264 48
+a 127 132 100
+a 8 5 54
+a 13 82 47
+a 621 411 79
+a 48 287 55
+a 832 485 18
+a 367 823 65
+a 209 267 27
+a 333 344 80
+a 447 135 1
+a 589 156 9
+a 138 163 50
+a 795 15 49
+a 131 134 92
+a 21 746 4
+a 14 285 77
+a 370 645 22
+a 531 137 49
+a 956 789 70
+a 905 562 57
+a 84 197 82
+a 392 57 79
+a 826 405 31
+a 424 494 44
+a 925 969 43
+a 744 289 41
+a 129 145 4
+a 438 167 13
+a 354 292 93
+a 706 830 34
+a 319 735 40
+a 34 234 21
+a 31 696 64
+a 21 22 80
+a 460 540 61
+a 219 14 99
+a 739 420 21
+a 282 863 60
+a 236 490 75
+a 666 191 92
+a 896 448 31
+a 94 384 41
+a 337 87 93
+a 7 4 46
+a 24 4 89
+a 217 9 96
+a 392 421 88
+a 21 7 54
+a 41 218 51
+a 561 497 40
+a 963 382 83
+a 390 432 14
+a 176 4 36
+a 657 186 64
+a 286 335 83
+a 7 550 93
+a 328 69 92
+a 278 791 60
+a 154 711 77
+a 982 322 85
+a 68 319 100
+a 99 555 23
+a 308 81 85
+a 590 46 44
+a 982 181 84
+a 630 326 78
+a 30 109 35
+a 9 98 20
+a 167 477 16
+a 200 781 85
+a 444 971 91
+a 24 26 69
+a 364 374 30
+a 407 658 50
+a 3 30 71
+a 173 144 9
+a 181 134 5
+a 664 472 62
+a 50 313 47
+a 12 26 45
+a 56 87 27
+a 137 735 77
+a 796 859 45
+a 950 976 32
+a 358 702 2
+a 3 23 28
+a 218 421 100
+a 37 111 41
+a 3 609 89
+a 9 13 18
+a 147 92 19
+a 550 410 95
+a 309 4 16
+a 902 24 53
+a 503 985 66
+a 217 228 9
+a 248 352 48
+a 162 418 71
+a 237 490 97
+a 177 55 68
+a 11 24 84
+a 661 1 3
+a 80 92 94
+a 244 30 66
+a 827 216 100
+a 475 829 63
+a 426 551 100
+a 108 219 25
+a 313 6 90
+a 465 34 67
+a 557 959 3
+a 837 850 81
+a 881 17 34
+a 104 196 10
+a 27 47 22
+a 153 16 76
+a 361 4 83
+a 55 282 26
+a 923 370 32
+a 23 30 2
+a 15 221 64
+a 744 166 39
+a 296 2 80
+a 458 247 22
+a 246 388 64
+a 154 156 24
+a 12 6 57
+a 573 37 3
+a 859 152 24
+a 541 870 47
+a 436 443 60
+a 823 111 65
+a 858 123 78
+a 3 652 96
+a 10 15 44
+a 487 73 39
+a 321 114 75
+a 342 982 82
+a 350 308 61
+a 55 71 9
+a 234 409 48
+a 556 555 53
+a 6 707 64
+a 70 797 43
+a 372 608 17
+a 813 794 54
+a 54 83 76
+a 4 16 15
+a 85 475 99
+a 981 571 7
+a 983 237 80
+a 798 487 99
+a 707 123 83
+a 373 872 4
+a 177 462 83
+a 358 82 25
+a 557 678 58
+a 477 643 14
+a 519 346 58
+a 147 325 59
+a 14 80 99
+a 615 791 36
+a 217 430 91
+a 491 53 56
+a 750 666 50
+a 716 362 21
+a 205 261 39
+a 14 538 58
+a 33 812 72
+a 103 987 62
+a 281 19 67
+a 153 179 87
+a 318 110 78
+a 389 338 23
+a 400 764 79
+a 696 842 97
+a 54 171 16
+a 227 409 42
+a 700 619 28
+a 476 426 100
+a 10 26 39
+a 166 415 86
+a 36 283 49
+a 548 36 87
+a 507 771 11
+a 883 81 59
+a 168 536 8
+a 15 124 4
+a 285 184 70
+a 303 718 20
+a 129 23 41
+a 123 657 47
+a 242 738 26
+a 276 996 87
+a 2 119 52
+a 44 51 59
+a 35 374 98
+a 234 500 3
+a 997 563 35
+a 6 18 21
+a 212 321 24
+a 78 151 38
+a 809 132 84
+a 872 154 51
+a 239 774 41
+a 842 139 21
+a 95 589 35
+a 127 885 94
+a 3 35 10
+a 652 116 35
+a 670 722 29
+a 22 675 15
+a 18 39 11
+a 649 415 73
+a 180 486 12
+a 123 713 32
+a 850 714 7
+a 394 524 9
+a 78 561 62
+a 283 764 36
+a 1 7 87
+a 31 13 14
+a 121 294 78
+a 506 721 31
+a 204 848 65
+a 194 295 39
+a 538 17 68
+a 817 856 24
+a 782 525 30
+a 614 23 2
+a 277 607 21
+a 486 866 48
+a 144 201 9
+a 71 448 78
+a 709 62 87
+a 70 201 47
+a 87 472 79
+a 392 847 17
+a 10 18 52
+a 769 784 36
+a 618 631 5
+a 659 264 68
+a 900 513 35
+a 780 228 55
+a 859 622 4
+a 282 564 43
+a 423 881 87
+a 63 153 46
+a 662 24 84
+a 180 197 43
+a 360 170 37
+a 676 297 29
+a 956 172 19
+a 59 201 59
+a 9 5 81
+a 49 260 90
+a 683 791 64
+a 461 466 29
+a 11 12 94
+a 611 996 52
+a 14 16 65
+a 27 460 89
+a 930 259 65
+a 119 497 45
+a 255 289 72
+a 18 37 79
+a 601 67 15
+a 114 906 72
+a 140 233 87
+a 65 8 58
+a 72 11 60
+a 645 571 12
+a 14 62 54
+a 1 50 10
+a 723 9 19
+a 956 837 4
+a 942 159 18
+a 444 654 83
+a 54 564 84
+a 157 877 69
+a 250 528 44
+a 379 641 12
+a 390 416 97
+a 430 200 14
+a 334 609 63
+a 12 40 58
+a 19 587 46
+a 790 476 60
+a 251 141 12
+a 27 53 33
+a 416 658 65
+a 528 312 68
+a 674 974 20
+a 359 437 46
+a 35 94 56
+a 438 2 25
+a 39 139 14
+a 602 746 48
+a 575 740 65
+a 307 390 65
+a 10 7 11
+a 25 330 73
+a 22 101 53
+a 761 958 57
+a 159 281 78
+a 15 8 56
+a 651 316 63
+a 1 497 49
+a 12 158 20
+a 218 440 10
+a 219 482 61
+a 712 113 99
+a 619 569 60
+a 19 35 31
+a 80 561 9
+a 99 656 29
+a 26 716 51
+a 177 305 57
+a 839 664 18
+a 7 32 97
+a 321 139 86
+a 340 851 98
+a 360 147 15
+a 56 18 64
+a 88 672 33
+a 6 196 25
+a 545 868 78
+a 72 277 73
+a 495 620 13
+a 840 993 86
+a 562 926 41
+a 412 800 25
+a 183 259 4
+a 536 512 1
+a 781 553 94
+a 432 693 27
+a 9 29 11
+a 830 708 47
+a 4 44 64
+a 96 9 1
+a 924 324 78
+a 212 35 3
+a 683 225 37
+a 14 12 84
+a 544 291 80
+a 692 213 34
+a 105 167 74
+a 418 629 16
+a 570 826 8
+a 631 40 63
+a 136 216 97
+a 130 153 32
+a 2 60 46
+a 2 96 87
+a 346 953 66
+a 387 411 65
+a 241 182 18
+a 554 762 33
+a 89 114 99
+a 165 50 6
+a 408 484 96
+a 216 589 25
+a 4 35 41
+a 200 156 3
+a 467 887 12
+a 958 189 42
+a 104 181 84
+a 792 725 98
+a 845 101 92
+a 28 66 75
+a 8 26 14
+a 52 44 31
+a 178 271 79
+a 217 124 41
+a 29 45 27
+a 26 180 76
+a 13 43 63
+a 140 126 95
+a 477 314 95
+a 178 926 84
+a 931 34 59
+a 20 45 55
+a 84 379 30
+a 655 822 88
+a 371 483 3
+a 40 194 2
+a 166 725 40
+a 396 941 13
+a 18 86 62
+a 68 60 13
+a 739 488 97
+a 749 621 18
+a 867 47 25
+a 59 3 39
+a 485 69 93
+a 982 903 34
+a 867 981 61
+a 53 912 28
+a 46 337 30
+a 447 306 63
+a 14 17 33
+a 20 21 34
+a 72 290 73
+a 941 629 27
+a 666 390 67
+a 358 807 68
+a 73 867 69
+a 36 45 13
+a 90 438 56
+a 56 389 45
+a 317 951 64
+a 371 21 18
+a 8 78 44
+a 129 336 23
+a 879 600 37
+a 334 194 100
+a 376 363 50
+a 221 350 79
+a 192 322 61
+a 45 58 69
+a 117 214 82
+a 434 913 22
+a 25 389 53
+a 37 40 71
+a 351 552 1
+a 198 576 49
+a 15 30 49
+a 101 294 31
+a 143 130 100
+a 206 741 77
+a 49 82 65
+a 18 65 28
+a 69 114 99
+a 47 372 9
+a 775 810 99
+a 115 157 7
+a 175 754 12
+a 32 248 81
+a 9 4 19
+a 18 206 21
+a 347 874 9
+a 77 250 42
+a 71 181 4
+a 50 90 20
+a 977 426 31
+a 52 119 34
+a 230 233 78
+a 311 282 58
+a 902 296 90
+a 206 484 100
+a 52 18 94
+a 97 248 81
+a 8 543 34
+a 695 596 15
+a 100 268 37
+a 133 459 80
+a 898 87 6
+a 18 50 97
+a 4 374 65
+a 665 214 77
+a 968 414 81
+a 825 678 90
+a 13 76 90
+a 11 26 32
+a 59 232 71
+a 9 65 16
+a 312 489 53
+a 392 655 85
+a 562 988 9
+a 558 224 1
+a 57 129 9
+a 284 241 66
+a 188 491 59
+a 29 971 70
+a 30 511 40
+a 67 645 88
+a 479 556 23
+a 3 7 3
+a 3 353 96
+a 662 607 50
+a 746 469 10
+a 613 574 40
+a 357 121 94
+a 652 927 12
+a 7 9 43
+a 20 141 55
+a 487 20 79
+a 295 372 83
+a 639 106 64
+a 716 980 59
+a 101 289 66
+a 87 5 82
+a 474 727 9
+a 5 568 19
+a 128 572 87
+a 196 666 92
+a 344 422 20
+a 17 13 76
+a 15 33 7
+a 133 70 66
+a 207 162 74
+a 498 929 93
+a 291 756 71
+a 144 329 14
+a 95 597 46
+a 34 61 84
+a 57 230 69
+a 176 33 6
+a 473 797 50
+a 1 514 85
+a 4 8 70
+a 26 727 97
+a 556 181 72
+a 12 2 16
+a 37 411 32
+a 58 933 9
+a 527 324 64
+a 4 1 76
+a 382 359 80
+a 538 710 19
+a 23 293 56
+a 82 434 76
+a 774 717 71
+a 528 14 98
+a 134 71 98
+a 211 616 89
+a 215 189 55
+a 98 957 54
+a 687 635 42
+a 9 39 73
+a 40 30 33
+a 531 535 48
+a 69 240 96
+a 113 956 97
+a 792 222 74
+a 567 743 50
+a 4 19 78
+a 9 19 58
+a 52 694 44
+a 764 752 14
+a 291 392 17
+a 613 490 31
+a 699 537 36
+a 720 308 62
+a 167 190 65
+a 308 443 18
+a 566 594 50
+a 622 778 12
+a 157 819 67
+a 48 186 30
+a 386 434 94
+a 704 842 64
+a 172 32 5
+a 476 297 21
+a 550 402 2
+a 50 136 23
+a 3 24 26
+a 236 190 54
+a 721 265 54
+a 235 100 37
+a 709 414 16
+a 144 479 44
+a 784 514 15
+a 383 854 21
+a 110 83 43
+a 9 48 3
+a 646 149 3
+a 751 462 71
+a 628 904 51
+a 351 514 26
+a 320 152 68
+a 237 444 22
+a 655 4 57
+a 949 9 75
+a 359 472 40
+a 503 961 58
+a 107 209 19
+a 274 15 66
+a 437 41 97
+a 915 345 56
+a 924 789 79
+a 985 338 67
+a 198 618 78
+a 84 87 41
+a 76 211 85
+a 443 191 97
+a 227 325 76
+a 996 717 91
+a 153 610 81
+a 67 96 13
+a 474 248 28
+a 597 837 41
+a 1 708 37
+a 731 1000 58
+a 223 33 44
+a 621 326 33
+a 563 182 55
+a 191 10 50
+a 932 360 51
+a 753 815 46
+a 33 109 59
+a 125 539 5
+a 850 687 86
+a 266 887 91
+a 965 327 35
+a 82 262 78
+a 306 258 17
+a 580 795 37
+a 869 299 50
+a 26 86 69
+a 141 171 34
+a 2 31 10
+a 125 37 92
+a 2 222 35
+a 884 237 85
+a 996 438 90
+a 145 729 15
+a 1 117 75
+a 746 145 60
+a 112 254 25
+a 229 828 25
+a 198 411 90
+a 775 640 39
+a 255 741 46
+a 606 256 100
+a 609 649 57
+a 7 30 87
+a 171 652 94
+a 657 977 91
+a 91 482 78
+a 694 984 65
+a 379 68 22
+a 22 45 91
+a 524 290 94
+a 169 817 19
+a 324 846 74
+a 394 439 24
+a 250 890 70
+a 110 203 45
+a 333 232 84
+a 57 62 33
+a 97 457 52
+a 550 652 84
+a 399 720 10
+a 280 660 36
+a 15 41 54
+a 224 314 39
+a 207 819 34
+a 841 747 1
+a 28 167 73
+a 359 634 51
+a 47 76 30
+a 154 2 53
+a 164 750 15
+a 297 26 79
+a 608 26 8
+a 487 830 71
+a 145 189 53
+a 11 37 75
+a 276 217 35
+a 221 247 13
+a 274 255 75
+a 821 44 32
+a 432 884 48
+a 355 984 79
+a 32 7 51
+a 356 19 43
+a 525 900 16
+a 973 249 58
+a 128 963 64
+a 301 457 95
+a 64 107 69
+a 88 928 82
+a 175 878 76
+a 84 144 90
+a 16 2 75
+a 203 547 45
+a 247 820 1
+a 29 44 20
+a 151 20 4
+a 940 187 37
+a 100 221 54
+a 645 295 3
+a 426 238 35
+a 165 129 24
+a 820 139 85
+a 603 966 24
+a 76 81 51
+a 851 906 80
+a 462 607 20
+a 49 54 9
+a 732 16 36
+a 468 641 71
+a 121 65 3
+a 564 282 12
+a 243 596 33
+a 43 91 44
+a 88 494 75
+a 238 320 66
+a 321 330 98
+a 590 616 73
+a 422 383 23
+a 59 527 91
+a 14 8 95
+a 18 343 95
+a 69 530 79
+a 628 466 23
+a 4 14 22
+a 574 918 33
+a 59 111 17
+a 151 62 40
+a 182 510 25
+a 201 565 7
+a 30 3 44
+a 168 164 45
+a 348 976 68
+a 42 63 86
+a 204 54 2
+a 361 73 46
+a 360 875 23
+a 122 149 91
+a 112 154 5
+a 86 64 35
+a 556 255 69
+a 135 4 35
+a 60 84 12
+a 534 186 11
+a 45 73 84
+a 333 138 49
+a 732 478 18
+a 99 667 77
+a 445 448 28
+a 6 130 22
+a 212 132 67
+a 347 183 66
+a 686 102 65
+a 658 733 74
+a 444 77 38
+a 724 793 3
+a 386 456 79
+a 22 4 62
+a 572 53 19
+a 194 20 17
+a 194 303 29
+a 827 842 19
+a 51 57 100
+a 620 505 90
+a 44 117 86
+a 198 512 62
+a 925 582 74
+a 478 59 56
+a 645 52 49
+a 60 173 87
+a 413 46 4
+a 821 66 97
+a 885 559 77
+a 553 888 80
+a 156 163 74
+a 436 854 87
+a 795 122 6
+a 12 141 26
+a 24 30 84
+a 382 266 44
+a 885 746 18
+a 466 526 92
+a 27 126 98
+a 130 663 56
+a 4 3 53
+a 6 125 27
+a 197 265 31
+a 18 720 95
+a 628 979 42
+a 59 930 13
+a 77 419 41
+a 959 946 34
+a 586 75 9
+a 914 990 38
+a 93 146 99
+a 909 506 2
+a 734 227 54
+a 34 69 40
+a 11 132 57
+a 6 124 44
+a 302 194 5
+a 76 102 97
+a 818 552 7
+a 152 61 21
+a 81 921 97
+a 63 158 2
+a 566 446 42
+a 986 405 90
+a 727 826 100
+a 2 213 85
+a 416 266 19
+a 740 179 6
+a 2 18 98
+a 17 97 36
+a 426 528 36
+a 449 914 89
+a 213 229 53
+a 826 492 39
+a 257 865 81
+a 568 504 91
+a 819 9 29
+a 111 229 58
+a 13 5 36
+a 14 10 62
+a 16 586 2
+a 991 959 4
+a 493 950 45
+a 884 954 76
+a 14 86 52
+a 97 538 75
+a 432 980 43
+a 230 509 80
+a 130 108 76
+a 429 886 63
+a 848 487 7
+a 24 358 4
+a 27 10 69
+a 358 95 38
+a 299 346 46
+a 52 743 28
+a 10 25 65
+a 35 33 56
+a 785 586 91
+a 396 789 46
+a 502 861 95
+a 17 555 13
+a 50 84 90
+a 18 23 86
+a 258 652 79
+a 324 247 1
+a 226 528 12
+a 240 644 3
+a 351 285 21
+a 231 553 45
+a 601 13 47
+a 821 680 83
+a 879 939 1
+a 848 920 25
+a 185 188 30
+a 206 300 73
+a 566 734 99
+a 738 321 11
+a 767 154 84
+a 702 280 3
+a 110 196 19
+a 21 86 17
+a 200 608 94
+a 144 176 98
+a 265 928 91
+a 805 66 57
+a 15 128 46
+a 21 183 17
+a 980 191 71
+a 141 153 75
+a 293 402 64
+a 534 527 58
+a 632 580 62
+a 631 95 21
+a 61 81 31
+a 172 85 14
+a 807 705 60
+a 409 370 35
+a 74 200 47
+a 575 82 57
+a 431 500 95
+a 48 15 16
+a 807 548 18
+a 417 499 81
+a 16 11 8
+a 816 430 91
+a 145 6 27
+a 562 739 6
+a 400 207 100
+a 90 248 10
+a 380 78 23
+a 602 199 6
+a 803 555 50
+a 338 645 26
+a 15 56 40
+a 333 210 29
+a 991 369 65
+a 574 24 58
+a 962 862 41
+a 826 173 43
+a 16 20 55
+a 87 120 20
+a 18 230 22
+a 28 956 60
+a 26 87 45
+a 227 319 2
+a 482 603 43
+a 944 641 87
+a 192 18 29
+a 106 38 89
+a 356 125 24
+a 331 492 94
+a 118 143 12
+a 824 659 8
+a 27 36 20
+a 47 22 65
+a 370 536 96
+a 523 135 98
+a 665 176 19
+a 125 26 69
+a 18 28 86
+a 30 24 71
+a 542 864 6
+a 373 527 81
+a 383 856 83
+a 26 73 64
+a 70 877 2
+a 24 29 23
+a 816 473 100
+a 637 920 97
+a 834 588 66
+a 212 84 59
+a 74 186 9
+a 460 643 73
+a 672 119 47
+a 919 99 99
+a 874 810 68
+a 7 212 36
+a 83 101 79
+a 149 395 50
+a 228 4 97
+a 276 222 50
+a 572 957 16
+a 12 46 27
+a 92 158 76
+a 195 354 92
+a 10 27 57
+a 112 431 9
+a 716 531 39
+a 242 976 45
+a 451 411 52
+a 86 103 1
+a 164 265 30
+a 344 375 16
+a 941 765 94
+a 2 15 21
+a 82 609 13
+a 23 3 46
+a 139 557 35
+a 844 256 74
+a 261 669 88
+a 4 20 85
+a 698 59 9
+a 253 696 71
+a 329 210 62
+a 125 488 97
+a 782 332 82
+a 917 990 61
+a 787 860 2
+a 832 608 18
+a 655 482 42
+a 41 148 92
+a 219 352 67
+a 694 832 91
+a 51 130 87
+a 721 298 23
+a 61 214 91
+a 101 109 21
+a 463 296 43
+a 127 494 91
+a 26 341 42
+a 639 970 92
+a 104 227 19
+a 14 107 41
+a 234 23 27
+a 79 123 99
+a 220 2 21
+a 515 338 97
+a 243 650 10
+a 73 886 16
+a 410 262 92
+a 2 108 60
+a 50 177 87
+a 910 311 12
+a 13 14 8
+a 4 837 74
+a 609 884 88
+a 464 569 10
+a 2 255 30
+a 876 207 81
+a 326 767 32
+a 578 1 63
+a 147 353 39
+a 235 53 65
+a 839 494 23
+a 55 736 26
+a 6 546 19
+a 768 252 48
+a 7 549 67
+a 459 194 73
+a 424 606 18
+a 100 719 9
+a 445 128 57
+a 389 967 58
+a 2 118 3
+a 3 225 17
+a 745 643 63
+a 753 879 37
+a 64 116 50
+a 26 28 85
+a 94 281 8
+a 181 566 36
+a 640 59 87
+a 4 34 15
+a 402 624 96
+a 19 257 13
+a 4 21 91
+a 16 280 46
+a 227 306 77
+a 36 824 92
+a 80 996 55
+a 774 600 25
+a 12 8 44
+a 415 706 99
+a 305 400 59
+a 24 384 93
+a 29 837 38
+a 538 402 31
+a 698 966 90
+a 549 689 54
+a 42 35 22
+a 712 262 35
+a 686 343 53
+a 52 484 19
+a 68 959 15
+a 546 264 43
+a 5 14 10
+a 106 286 93
+a 122 128 92
+a 165 178 94
+a 762 839 28
+a 375 766 23
+a 782 9 32
+a 107 583 24
+a 18 20 43
+a 114 548 35
+a 685 693 65
+a 133 644 67
+a 384 151 17
+a 69 81 10
+a 154 18 38
+a 413 376 45
+a 856 557 43
+a 3 317 90
+a 477 730 8
+a 240 276 30
+a 503 968 6
+a 18 236 17
+a 6 13 94
+a 288 270 50
+a 445 271 93
+a 82 617 34
+a 262 281 37
+a 730 143 26
+a 12 207 10
+a 301 464 62
+a 30 280 97
+a 649 470 98
+a 571 187 40
+a 2 124 57
+a 383 529 85
+a 692 159 45
+a 900 31 79
+a 51 111 35
+a 445 644 83
+a 352 655 50
+a 648 760 34
+a 814 612 95
+a 17 54 98
+a 62 449 7
+a 383 314 21
+a 10 24 20
+a 60 537 50
+a 738 227 24
+a 92 144 20
+a 15 131 87
+a 231 194 92
+a 181 520 54
+a 418 843 9
+a 733 314 89
+a 533 912 30
+a 98 407 29
+a 4 501 36
+a 892 84 9
+a 240 274 55
+a 4 301 27
+a 571 625 48
+a 10 537 65
+a 72 678 74
+a 530 258 29
+a 630 118 18
+a 605 802 27
+a 405 691 87
+a 49 72 96
+a 94 425 97
+a 143 396 59
+a 614 744 59
+a 25 28 42
+a 82 214 20
+a 305 412 62
+a 85 233 39
+a 41 69 79
+a 101 343 29
+a 624 982 37
+a 263 69 12
+a 219 685 78
+a 77 104 89
+a 233 427 55
+a 420 709 26
+a 697 373 89
+a 63 147 26
+a 551 333 91
+a 12 37 54
+a 76 58 12
+a 970 321 59
+a 783 715 25
+a 297 602 6
+a 64 65 6
+a 326 223 21
+a 658 6 41
+a 191 8 53
+a 5 54 35
+a 25 101 39
+a 8 545 52
+a 398 316 34
+a 55 157 57
+a 108 310 33
+a 410 823 17
+a 651 849 15
+a 674 973 79
+a 297 6 90
+a 842 585 5
+a 54 223 39
+a 440 90 9
+a 716 798 98
+a 831 186 62
+a 21 94 47
+a 154 110 11
+a 206 11 65
+a 433 388 24
+a 562 150 55
+a 900 464 47
+a 285 938 24
+a 20 63 20
+a 39 125 25
+a 30 149 98
+a 49 890 55
+a 89 203 37
+a 1 24 71
+a 135 183 60
+a 14 20 52
+a 31 300 85
+a 89 750 26
+a 671 381 84
+a 732 706 98
+a 17 109 35
+a 138 123 5
+a 574 331 19
+a 822 450 75
+a 572 187 54
+a 722 140 54
+a 524 958 6
+a 2 28 85
+a 451 16 76
+a 261 418 96
+a 899 849 79
+a 797 204 74
+a 83 121 46
+a 823 59 97
+a 914 513 37
+a 48 70 52
+a 921 694 94
+a 877 45 84
+a 164 138 4
+a 34 762 25
+a 42 440 85
+a 586 649 78
+a 7 22 70
+a 412 127 44
+a 985 882 44
+a 178 18 86
+a 285 902 34
+a 959 572 19
+a 967 288 43
+a 514 828 62
+a 189 205 17
+a 320 291 37
+a 40 464 56
+a 100 254 96
+a 49 96 22
+a 59 338 55
+a 500 945 49
+a 991 877 92
+a 4 296 95
+a 289 100 97
+a 30 76 68
+a 337 301 34
+a 696 203 11
+a 288 357 57
+a 28 144 77
+a 365 68 97
+a 733 86 67
+a 56 112 92
+a 380 359 48
+a 22 31 63
+a 124 125 97
+a 208 751 47
+a 5 170 51
+a 68 62 47
+a 488 516 30
+a 117 229 74
+a 325 31 75
+a 458 352 74
+a 583 982 29
+a 121 135 29
+a 159 154 61
+a 607 919 33
+a 558 951 62
+a 6 203 87
+a 64 938 74
+a 51 878 38
+a 233 646 15
+a 44 7 83
+a 61 162 61
+a 291 734 30
+a 338 992 45
+a 369 291 63
+a 44 32 47
+a 190 272 13
+a 10 23 69
+a 120 140 58
+a 210 713 2
+a 603 835 69
+a 468 297 36
+a 2 51 75
+a 155 324 46
+a 730 619 18
+a 589 535 17
+a 263 128 75
+a 412 258 23
+a 50 922 75
+a 19 70 52
+a 36 37 100
+a 362 371 49
+a 622 379 42
+a 770 399 18
+a 182 207 49
+a 47 526 79
+a 58 104 21
+a 287 192 24
+a 403 408 70
+a 824 593 22
+a 969 27 74
+a 57 92 94
+a 130 238 95
+a 395 483 5
+a 515 87 93
+a 372 482 38
+a 904 355 94
+a 924 918 3
+a 824 707 44
+a 122 678 56
+a 26 48 5
+a 76 301 8
+a 108 774 17
+a 584 817 52
+a 44 66 40
+a 329 510 16
+a 14 15 74
+a 257 131 92
+a 592 803 40
+a 400 439 98
+a 558 554 73
+a 36 292 50
+a 347 242 56
+a 109 850 3
+a 77 621 78
+a 177 252 11
+a 308 413 63
+a 278 643 37
+a 118 156 10
+a 16 12 86
+a 780 59 76
+a 890 346 49
+a 949 175 81
+a 4 48 75
+a 17 254 59
+a 6 10 37
+a 10 213 6
+a 32 319 33
+a 815 45 64
+a 453 848 24
+a 80 322 29
+a 88 357 32
+a 10 5 18
+a 579 823 43
+a 133 811 3
+a 606 770 37
+a 106 140 12
+a 133 765 83
+a 460 132 73
+a 98 400 28
+a 978 65 23
+a 25 64 29
+a 54 141 10
+a 806 465 8
+a 888 122 94
+a 936 241 13
+a 300 75 56
+a 15 482 35
+a 11 20 38
+a 487 69 90
+a 805 72 27
+a 185 209 19
+a 1 470 65
+a 98 774 16
+a 83 619 11
+a 19 281 9
+a 388 64 33
+a 759 339 60
+a 430 643 92
+a 429 707 67
+a 302 343 15
+a 595 210 31
+a 359 85 91
+a 404 750 97
+a 972 521 89
+a 629 732 91
+a 24 108 10
+a 285 84 23
+a 259 13 40
+a 524 616 23
+a 592 865 19
+a 94 279 42
+a 65 84 57
+a 423 366 42
+a 717 895 42
+a 479 535 94
+a 298 413 64
+a 87 13 31
+a 327 5 58
+a 348 28 78
+a 665 962 93
+a 83 150 99
+a 277 14 53
+a 187 215 49
+a 430 59 29
+a 740 152 71
+a 309 417 69
+a 858 588 80
+a 54 62 37
+a 167 290 42
+a 282 370 85
+a 650 391 59
+a 114 547 52
+a 84 253 38
+a 696 763 58
+a 15 10 19
+a 33 134 83
+a 25 52 20
+a 802 714 23
+a 910 612 10
+a 5 6 87
+a 561 92 98
+a 488 731 43
+a 885 193 30
+a 896 976 31
+a 723 203 2
+a 422 483 54
+a 51 290 32
+a 131 422 95
+a 303 901 80
+a 546 943 49
+a 28 9 80
+a 43 137 62
+a 343 25 61
+a 429 327 85
+a 124 634 94
+a 26 53 4
+a 286 621 82
+a 143 408 73
+a 321 834 83
+a 692 555 83
+a 10 11 84
+a 832 625 93
+a 24 5 58
+a 112 660 55
+a 247 935 9
+a 264 761 30
+a 441 528 12
+a 269 617 73
+a 7 191 44
+a 15 532 75
+a 13 86 99
+a 613 709 82
+a 112 145 15
+a 96 330 87
+a 525 385 12
+a 546 674 14
+a 232 458 64
+a 670 776 62
+a 88 258 4
+a 496 488 47
+a 71 342 36
+a 5 19 34
+a 555 415 62
+a 688 960 8
+a 28 20 32
+a 427 108 24
+a 47 239 41
+a 825 324 89
+a 51 220 99
+a 987 564 81
+a 168 333 92
+a 631 81 83
+a 29 60 33
+a 74 252 4
+a 212 434 20
+a 609 675 10
+a 974 562 47
+a 140 174 5
+a 194 63 69
+a 19 94 59
+a 44 617 97
+a 68 95 5
+a 97 414 54
+a 661 20 10
+a 38 47 94
+a 10 48 38
+a 77 12 37
+a 194 13 22
+a 979 36 26
+a 671 772 55
+a 9 354 94
+a 991 251 90
+a 266 733 17
+a 290 326 10
+a 641 82 16
+a 529 623 13
+a 445 463 39
+a 871 853 84
+a 73 414 3
+a 1 143 65
+a 886 742 54
+a 220 283 1
+a 378 298 88
+a 515 611 29
+a 7 620 60
+a 61 251 76
+a 6 302 28
+a 661 962 1
+a 612 7 97
+a 499 469 9
+a 233 480 58
+a 347 520 57
+a 659 121 13
+a 41 222 14
+a 66 395 54
+a 254 178 56
+a 901 355 74
+a 970 648 15
+a 46 162 22
+a 537 938 86
+a 61 211 5
+a 343 222 39
+a 461 260 8
+a 521 785 86
+a 183 180 88
+a 53 65 39
+a 186 144 58
+a 515 959 47
+a 977 3 29
+a 840 970 91
+a 108 632 13
+a 625 716 57
+a 310 15 88
+a 16 56 67
+a 3 143 59
+a 39 142 64
+a 779 545 65
+a 82 197 43
+a 140 620 11
+a 977 790 88
+a 165 469 97
+a 448 552 29
+a 749 157 36
+a 931 671 13
+a 996 231 90
+a 89 90 13
+a 450 594 16
+a 650 454 78
+a 232 401 68
+a 3 6 34
+a 16 10 81
+a 153 440 56
+a 402 73 78
+a 246 441 4
+a 539 984 25
+a 38 12 18
+a 203 797 54
+a 723 794 37
+a 3 149 65
+a 271 771 73
+a 209 634 27
+a 37 92 34
+a 6 506 38
+a 139 424 19
+a 68 2 79
+a 379 2 20
+a 780 445 56
+a 681 122 17
+a 59 985 81
+a 7 407 41
+a 231 203 7
+a 11 32 59
+a 213 2 89
+a 353 43 35
+a 178 332 81
+a 598 790 20
+a 745 879 80
+a 68 125 88
+a 965 279 31
+a 366 465 14
+a 564 469 18
+a 877 522 83
+a 820 627 87
+a 591 903 43
+a 487 217 16
+a 837 423 77
+a 438 487 98
+a 466 237 6
+a 400 1 66
+a 235 351 62
+a 7 143 70
+a 181 1 55
+a 234 62 89
+a 398 51 62
+a 39 6 56
+a 73 82 12
+a 389 7 54
+a 241 202 93
+a 137 545 49
+a 169 558 90
+a 154 774 40
+a 109 115 65
+a 129 329 57
+a 36 87 74
+a 154 157 38
+a 69 763 8
+a 4 13 87
+a 243 265 82
+a 368 994 57
+a 470 871 38
+a 137 158 31
+a 83 257 38
+a 348 162 3
+a 929 147 34
+a 198 862 38
+a 61 62 14
+a 56 109 74
+a 103 969 31
+a 577 187 45
+a 953 360 27
+a 112 19 26
+a 755 229 54
+a 24 25 17
+a 20 809 33
+a 362 910 90
+a 1 5 74
+a 29 2 3
+a 283 100 49
+a 652 272 29
+a 20 883 53
+a 20 228 8
+a 13 8 94
+a 351 5 9
+a 421 19 3
+a 77 844 86
+a 67 177 94
+a 14 121 12
+a 6 21 10
+a 24 47 28
+a 918 143 45
+a 867 771 7
+a 157 550 41
+a 117 946 13
+a 17 2 5
+a 36 4 75
+a 938 500 9
+a 285 530 4
+a 97 49 50
+a 376 54 3
+a 678 804 31
+a 988 472 48
+a 5 55 78
+a 825 484 82
+a 15 123 1
+a 79 155 57
+a 695 372 46
+a 143 395 23
+a 607 884 73
+a 828 321 76
+a 10 3 9
+a 445 303 51
+a 150 68 84
+a 891 413 76
+a 42 191 68
+a 785 738 52
+a 354 344 31
+a 17 39 45
+a 72 697 97
+a 196 898 87
+a 291 23 28
+a 218 81 33
+a 46 76 76
+a 82 778 21
+a 681 849 56
+a 790 837 56
+a 25 465 23
+a 9 472 26
+a 43 105 16
+a 381 340 38
+a 791 302 85
+a 743 965 29
+a 171 207 85
+a 30 43 10
+a 91 289 78
+a 386 998 92
+a 625 43 38
+a 225 896 7
+a 394 901 10
+a 58 726 89
+a 103 158 68
+a 12 179 33
+a 545 164 82
+a 630 635 54
+a 857 726 92
+a 336 346 69
+a 258 494 87
+a 15 28 11
+a 83 883 100
+a 912 955 47
+a 773 832 92
+a 926 674 56
+a 76 72 5
+a 462 221 57
+a 38 41 92
+a 579 30 5
+a 997 884 85
+a 50 110 67
+a 126 342 67
+a 735 657 67
+a 894 396 68
+a 757 341 59
+a 34 36 21
+a 413 276 29
+a 720 890 3
+a 535 449 48
+a 160 783 88
+a 461 357 60
+a 75 188 63
+a 107 562 99
+a 288 777 95
+a 476 261 26
+a 587 310 94
+a 263 750 80
+a 1 305 92
+a 2 25 18
+a 850 747 4
+a 9 92 83
+a 276 396 19
+a 624 839 45
+a 827 684 26
+a 611 526 28
+a 256 397 68
+a 526 25 23
+a 360 390 26
+a 515 799 35
+a 560 265 2
+a 516 538 37
+a 17 37 82
+a 111 157 38
+a 74 275 91
+a 568 933 6
+a 62 68 71
+a 614 394 26
+a 217 63 69
+a 34 46 29
+a 388 226 73
+a 388 228 21
+a 652 492 76
+a 102 338 40
+a 61 334 5
+a 371 93 18
+a 372 754 59
+a 577 488 98
+a 102 124 8
+a 873 7 56
+a 28 92 40
+a 219 7 3
+a 515 494 16
+a 892 893 67
+a 155 593 25
+a 158 495 90
+a 503 215 88
+a 558 437 80
+a 240 148 83
+a 844 10 37
+a 923 21 62
+a 708 243 12
+a 782 802 14
+a 52 103 42
+a 358 87 68
+a 893 223 48
+a 969 717 74
+a 133 148 46
+a 257 247 32
+a 254 317 83
+a 6 460 33
+a 10 911 31
+a 866 474 33
+a 703 798 91
+a 42 242 58
+a 699 178 53
+a 949 121 20
+a 902 763 6
+a 379 575 100
+a 8 489 2
+a 273 870 76
+a 847 820 15
+a 118 134 64
+a 478 628 98
+a 33 193 59
+a 345 709 96
+a 731 499 23
+a 28 10 3
+a 443 375 84
+a 936 542 16
+a 46 66 78
+a 354 191 89
+a 154 9 31
+a 654 245 9
+a 597 733 93
+a 36 133 29
+a 374 64 95
+a 43 481 77
+a 681 483 1
+a 168 358 97
+a 245 751 40
+a 802 597 40
+a 315 903 83
+a 432 996 23
+a 114 307 37
+a 665 533 99
+a 666 487 99
+a 60 225 34
+a 273 981 28
+a 308 416 13
+a 963 78 22
+a 320 545 21
+a 371 202 53
+a 108 149 42
+a 275 371 84
+a 118 215 3
+a 51 826 54
+a 37 66 84
+a 38 693 70
+a 524 75 16
+a 1 11 17
+a 114 134 17
+a 19 2 22
+a 22 15 26
+a 891 632 33
+a 596 693 22
+a 177 142 70
+a 515 823 20
+a 18 29 62
+a 60 228 14
+a 347 962 2
+a 946 519 53
+a 94 515 83
+a 117 167 82
+a 206 770 13
+a 217 312 53
+a 220 518 72
+a 179 205 48
+a 529 211 30
+a 884 607 27
+a 63 86 61
+a 52 116 63
+a 56 151 78
+a 102 699 57
+a 604 875 59
+a 784 723 69
+a 175 223 100
+a 400 372 63
+a 2 44 97
+a 78 162 14
+a 540 127 90
+a 266 478 62
+a 300 904 3
+a 16 77 100
+a 777 140 59
+a 65 790 30
+a 150 899 20
+a 295 767 93
+a 174 193 25
+a 127 160 62
+a 386 515 42
+a 732 78 66
+a 502 664 97
+a 60 97 11
+a 538 61 60
+a 592 573 41
+a 11 4 5
+a 48 331 7
+a 689 786 64
+a 597 371 49
+a 17 209 60
+a 405 948 17
+a 7 838 59
+a 20 950 64
+a 4 414 34
+a 515 877 4
+a 789 64 96
+a 754 443 66
+a 45 342 16
+a 476 61 50
+a 157 737 77
+a 448 183 73
+a 748 870 46
+a 147 437 99
+a 141 68 91
+a 21 221 76
+a 12 76 45
+a 191 41 26
+a 763 305 23
+a 277 470 24
+a 841 156 99
+a 16 64 84
+a 20 169 27
+a 366 189 51
+a 10 19 42
+a 304 260 14
+a 339 917 73
+a 103 772 14
+a 38 70 54
+a 22 27 67
+a 34 372 49
+a 635 503 92
+a 442 604 53
+a 446 166 55
+a 101 38 98
+a 50 665 11
+a 13 18 84
+a 23 9 12
+a 369 697 42
+a 58 45 62
+a 705 280 30
+a 52 73 83
+a 89 638 37
+a 635 798 28
+a 950 119 66
+a 631 4 26
+a 984 47 65
+a 139 711 89
+a 260 262 63
+a 7 59 31
+a 175 200 42
+a 487 911 23
+a 292 724 81
+a 82 153 70
+a 219 664 89
+a 144 245 6
+a 648 84 15
+a 688 84 47
+a 232 875 20
+a 218 120 95
+a 126 108 24
+a 658 192 74
+a 12 4 1
+a 264 45 33
+a 21 301 6
+a 529 416 81
+a 886 115 100
+a 397 754 46
+a 14 5 40
+a 1 10 90
+a 23 200 38
+a 82 269 22
+a 348 59 92
+a 153 200 41
+a 157 948 15
+a 123 132 94
+a 553 116 11
+a 755 324 80
+a 833 156 93
+a 535 215 56
+a 151 271 99
+a 511 135 76
+a 975 266 22
+a 188 312 17
+a 639 81 9
+a 671 246 14
+a 975 950 49
+a 23 70 70
+a 132 295 56
+a 624 4 13
+a 811 56 57
+a 581 532 57
+a 337 532 13
+a 466 126 32
+a 35 31 4
+a 42 38 11
+a 355 42 63
+a 440 731 99
+a 710 357 63
+a 179 50 25
+a 435 352 42
+a 922 951 85
+a 816 421 47
+a 391 32 65
+a 794 607 45
+a 831 739 79
+a 35 64 35
+a 15 12 12
+a 428 16 45
+a 977 481 82
+a 463 14 36
+a 62 128 69
+a 52 261 89
+a 29 9 63
+a 54 449 69
+a 555 556 81
+a 704 133 49
+a 548 365 44
+a 14 92 5
+a 443 17 56
+a 579 90 44
+a 123 397 85
+a 162 339 19
+a 248 798 98
+a 605 410 74
+a 124 426 23
+a 147 88 53
+a 574 411 17
+a 753 680 66
+a 74 706 21
+a 27 142 65
+a 624 633 78
+a 892 832 39
+a 30 4 92
+a 50 10 53
+a 332 48 65
+a 624 392 79
+a 101 196 96
+a 39 99 46
+a 322 546 22
+a 5 12 21
+a 6 9 89
+a 284 813 52
+a 10 288 25
+a 50 94 74
+a 9 794 66
+a 225 66 62
+a 385 669 18
+a 972 680 18
+a 621 188 9
+a 79 143 83
+a 318 526 57
+a 104 193 95
+a 599 208 94
+a 952 773 34
+a 564 24 4
+a 23 334 20
+a 70 83 95
+a 268 26 60
+a 337 38 74
+a 258 49 34
+a 272 363 2
+a 3 626 8
+a 50 744 65
+a 814 768 21
+a 557 423 3
+a 15 233 48
+a 195 337 72
+a 482 7 64
+a 501 9 6
+a 715 984 88
+a 19 419 48
+a 413 318 61
+a 472 990 87
+a 20 60 84
+a 103 300 93
+a 295 283 91
+a 148 589 42
+a 463 904 13
+a 20 48 49
+a 106 290 42
+a 89 267 9
+a 102 560 67
+a 47 63 91
+a 152 690 33
+a 401 216 36
+a 239 850 92
+a 267 502 87
+a 147 294 7
+a 303 51 33
+a 251 329 92
+a 822 950 88
+a 393 532 64
+a 102 512 41
+a 45 47 20
+a 237 255 1
+a 224 231 25
+a 29 274 7
+a 721 737 79
+a 6 8 48
+a 224 2 99
+a 20 14 95
+a 478 671 84
+a 184 460 23
+a 5 36 27
+a 295 418 63
+a 8 503 90
+a 973 860 47
+a 529 334 67
+a 13 15 83
+a 711 334 66
+a 799 444 81
+a 710 657 53
+a 787 676 40
+a 700 628 34
+a 75 168 12
+a 345 681 47
+a 451 208 6
+a 539 63 26
+a 243 9 19
+a 287 262 17
+a 32 793 9
+a 874 18 19
+a 10 39 92
+a 17 461 65
+a 52 257 68
+a 498 66 19
+a 689 353 58
+a 17 14 81
+a 361 25 33
+a 99 546 97
+a 162 72 61
+a 430 276 57
+a 419 798 66
+a 149 161 3
+a 105 184 38
+a 159 234 89
+a 162 451 35
+a 165 812 81
+a 3 17 20
+a 598 133 77
+a 906 922 21
+a 93 123 9
+a 135 272 32
+a 951 453 88
+a 476 557 62
+a 996 902 100
+a 44 122 49
+a 244 418 61
+a 920 365 55
+a 710 469 76
+a 777 583 65
+a 293 368 77
+a 310 317 24
+a 95 502 31
+a 755 308 15
+a 527 378 42
+a 22 46 90
+a 649 158 28
+a 38 130 78
+a 19 26 45
+a 32 74 91
+a 290 186 33
+a 364 734 85
+a 549 344 73
+a 613 935 88
+a 8 420 45
+a 443 951 88
+a 516 655 67
+a 143 160 7
+a 291 173 34
+a 769 209 85
+a 6 22 38
+a 288 165 97
+a 175 570 51
+a 825 332 51
+a 884 857 83
+a 17 27 36
+a 285 100 44
+a 223 121 70
+a 736 320 96
+a 39 55 87
+a 98 145 56
+a 76 91 9
+a 167 399 64
+a 709 340 78
+a 2 35 70
+a 43 8 100
+a 654 373 3
+a 952 805 88
+a 138 588 62
+a 118 333 30
+a 52 330 73
+a 107 485 55
+a 616 3 11
+a 767 88 35
+a 32 18 27
+a 340 615 40
+a 365 374 33
+a 463 132 42
+a 249 196 59
+a 122 166 44
+a 246 126 61
+a 353 92 12
+a 624 985 88
+a 246 478 47
+a 90 182 33
+a 411 331 65
+a 789 210 13
+a 66 639 33
+a 768 650 59
+a 937 214 78
+a 596 840 68
+a 167 263 17
+a 37 49 55
+a 72 258 63
+a 193 717 39
+a 813 788 23
+a 976 226 35
+a 589 890 97
+a 676 310 68
+a 49 74 43
+a 249 333 18
+a 176 200 90
+a 932 885 99
+a 780 793 2
+a 9 71 11
+a 34 609 68
+a 531 375 85
+a 452 9 68
+a 556 154 41
+a 756 774 16
+a 118 356 57
+a 27 29 38
+a 482 841 1
+a 823 175 77
+a 463 634 17
+a 35 72 85
+a 55 3 88
+a 234 45 85
+a 102 670 29
+a 720 355 78
+a 8 69 85
+a 36 5 29
+a 196 146 10
+a 598 518 76
+a 218 927 4
+a 614 529 49
+a 730 117 93
+a 217 645 32
+a 669 497 53
+a 752 378 56
+a 997 953 69
+a 790 584 86
+a 31 236 62
+a 257 331 6
+a 464 615 68
+a 607 311 56
+a 479 51 34
+a 575 514 29
+a 307 22 2
+a 52 63 84
+a 76 112 62
+a 4 61 62
+a 15 132 13
+a 514 758 40
+a 642 46 33
+a 423 415 53
+a 308 695 82
+a 212 354 59
+a 801 826 55
+a 523 968 64
+a 807 998 70
+a 32 257 33
+a 435 651 94
+a 260 431 4
+a 172 118 82
+a 50 18 6
+a 103 120 55
+a 516 675 9
+a 574 481 69
+a 282 125 92
+a 545 540 6
+a 10 208 18
+a 255 849 62
+a 970 367 45
+a 15 21 14
+a 111 270 68
+a 766 810 62
+a 566 274 16
+a 21 51 45
+a 760 99 16
+a 175 287 66
+a 816 741 26
+a 241 804 87
+a 30 74 35
+a 47 141 81
+a 902 578 87
+a 138 703 27
+a 842 100 58
+a 226 463 43
+a 884 395 63
+a 45 18 2
+a 93 94 11
+a 184 453 80
+a 476 230 48
+a 436 160 14
+a 422 625 10
+a 727 119 70
+a 17 64 14
+a 352 219 20
+a 385 224 55
+a 567 360 99
+a 26 344 55
+a 355 962 74
+a 88 410 59
+a 449 613 64
+a 733 8 79
+a 819 448 79
+a 308 598 1
+a 252 883 84
+a 370 426 38
+a 784 18 61
+a 991 806 83
+a 756 676 22
+a 84 95 42
+a 363 419 55
+a 31 90 58
+a 106 316 8
+a 231 770 42
+a 373 917 83
+a 86 17 68
+a 29 48 77
+a 210 565 30
+a 261 233 86
+a 105 625 70
+a 23 75 75
+a 214 237 62
+a 662 541 53
+a 34 65 3
+a 998 871 11
+a 36 68 78
+a 98 73 88
+a 112 696 70
+a 601 385 25
+a 242 65 2
+a 717 439 34
+a 59 83 10
+a 199 105 33
+a 420 985 13
+a 490 465 25
+a 5 74 49
+a 265 415 40
+a 260 299 35
+a 440 112 43
+a 26 30 55
+a 58 312 77
+a 223 732 97
+a 171 156 45
+a 920 689 64
+a 14 30 93
+a 40 134 10
+a 90 184 87
+a 147 662 80
+a 36 23 59
+a 680 262 53
+a 597 693 34
+a 905 221 32
+a 494 621 93
+a 930 980 44
+a 47 370 38
+a 167 232 96
+a 444 105 79
+a 419 809 5
+a 118 89 85
+a 7 3 50
+a 24 14 40
+a 18 325 24
+a 574 233 17
+a 741 970 44
+a 15 25 55
+a 102 304 29
+a 524 424 2
+a 71 127 46
+a 33 806 50
+a 66 154 76
+a 838 598 10
+a 10 44 5
+a 54 4 3
+a 120 416 5
+a 284 18 44
+a 6 7 83
+a 679 623 44
+a 853 293 8
+a 69 135 64
+a 186 140 28
+a 206 704 3
+a 844 721 14
+a 61 609 30
+a 155 167 39
+a 230 183 82
+a 677 199 82
+a 289 822 90
+a 33 39 89
+a 842 765 64
+a 411 521 74
+a 558 351 64
+a 292 5 94
+a 414 968 71
+a 213 947 70
+a 18 7 41
+a 49 2 6
+a 544 921 83
+a 62 51 50
+a 38 394 53
+a 443 532 55
+a 909 122 98
+a 236 121 10
+a 17 105 100
+a 138 142 71
+a 272 372 38
+a 305 538 85
+a 161 96 44
+a 266 589 94
+a 593 58 49
+a 12 3 57
+a 362 70 83
+a 38 465 89
+a 497 704 49
+a 572 283 63
+a 6 266 50
+a 325 412 77
+a 15 172 72
+a 622 949 50
+a 20 218 92
+a 332 510 32
+a 997 546 77
+a 486 516 35
+a 658 507 7
+a 31 20 100
+a 116 149 95
+a 157 292 1
+a 564 724 25
+a 438 603 92
+a 493 997 94
+a 869 713 12
+a 170 416 71
+a 63 159 42
+a 586 42 97
+a 901 134 7
+a 35 597 5
+a 290 411 46
+a 18 24 46
+a 794 281 48
+a 79 137 83
+a 154 32 56
+a 772 394 58
+a 179 38 18
+a 973 944 39
+a 28 15 82
+a 427 160 66
+a 906 559 50
+a 386 265 66
+a 563 888 53
+a 494 923 39
+a 333 464 11
+a 86 203 33
+a 109 606 91
+a 806 590 93
+a 21 4 4
+a 531 637 56
+a 223 181 54
+a 150 155 42
+a 523 19 66
+a 882 37 65
+a 969 395 65
+a 940 664 14
+a 21 52 10
+a 235 192 39
+a 493 665 85
+a 722 801 67
+a 96 283 84
+a 542 107 45
+a 761 368 10
+a 86 309 29
+a 474 524 53
+a 17 21 78
+a 317 121 74
+a 470 583 94
+a 411 248 91
+a 87 257 33
+a 401 383 11
+a 494 742 41
+a 51 79 18
+a 118 561 65
+a 5 938 71
+a 309 768 73
+a 326 736 19
+a 223 344 12
+a 5 599 48
+a 125 219 34
+a 906 485 33
+a 181 94 25
+a 858 899 17
+a 195 814 25
+a 5 65 74
+a 38 51 63
+a 798 57 85
+a 704 608 59
+a 152 3 98
+a 28 224 65
+a 463 29 6
+a 565 43 17
+a 307 710 20
+a 128 167 43
+a 138 193 2
+a 316 412 81
+a 376 415 27
+a 920 423 13
+a 213 238 27
+a 518 783 35
+a 24 27 78
+a 56 8 15
+a 121 47 70
+a 173 481 93
+a 598 351 67
+a 9 7 83
+a 365 590 21
+a 901 949 15
+a 38 801 23
+a 577 930 16
+a 571 470 40
+a 753 585 99
+a 40 69 63
+a 103 270 94
+a 196 102 59
+a 95 612 38
+a 184 640 66
+a 16 18 74
+a 11 2 85
+a 478 278 42
+a 3 18 88
+a 91 249 33
+a 268 961 92
+a 970 251 81
+a 823 400 37
+a 184 82 38
+a 371 505 87
+a 181 183 73
+a 477 171 49
+a 553 178 35
+a 651 653 68
+a 21 28 38
+a 409 165 21
+a 28 161 92
+a 629 683 16
+a 312 420 86
+a 6 105 66
+a 623 300 67
+a 133 558 84
+a 203 618 47
+a 507 734 64
+a 774 405 37
+a 22 7 32
+a 228 356 77
+a 374 193 95
+a 486 194 42
+a 807 365 5
+a 27 103 20
+a 657 71 40
+a 492 607 93
+a 610 128 92
+a 333 603 11
+a 41 441 53
+a 712 962 60
+a 66 1 67
+a 78 16 52
+a 61 433 46
+a 14 33 12
+a 418 840 76
+a 62 74 50
+a 190 76 17
+a 262 146 47
+a 977 18 58
+a 306 442 65
+a 913 365 14
+a 962 805 59
+a 234 401 73
+a 69 8 14
+a 40 75 10
+a 41 176 49
+a 242 493 91
+a 2 11 66
+a 277 550 4
+a 254 538 39
+a 567 563 33
+a 266 25 15
+a 250 15 64
+a 568 32 51
+a 606 935 61
+a 46 90 38
+a 184 17 24
+a 693 163 78
+a 961 750 13
+a 40 508 32
+a 26 115 65
+a 336 145 29
+a 536 492 13
+a 931 323 98
+a 181 205 93
+a 634 251 17
+a 481 398 84
+a 44 10 62
+a 33 34 42
+a 267 74 45
+a 667 963 84
+a 357 112 15
+a 193 174 11
+a 429 230 28
+a 24 57 24
+a 181 113 87
+a 189 258 29
+a 376 663 23
+a 96 209 80
+a 12 31 46
+a 150 908 1
+a 168 646 19
+a 44 132 55
+a 234 3 58
+a 335 545 52
+a 334 765 28
+a 191 212 92
+a 186 243 27
+a 58 126 61
+a 76 609 93
+a 873 472 8
+a 257 846 39
+a 298 45 30
+a 983 401 46
+a 49 117 22
+a 210 398 55
+a 60 381 1
+a 467 415 86
+a 588 252 84
+a 9 24 9
+a 31 270 92
+a 648 788 3
+a 567 996 95
+a 3 186 7
+a 13 522 11
+a 209 258 57
+a 375 182 67
+a 321 373 80
+a 713 199 87
+a 6 507 4
+a 163 687 17
+a 861 171 43
+a 544 412 32
+a 47 933 75
+a 553 795 73
+a 128 7 98
+a 28 179 41
+a 840 165 21
+a 984 812 91
+a 15 19 27
+a 652 715 88
+a 962 623 75
+a 977 934 87
+a 3 176 54
+a 268 114 17
+a 275 739 16
+a 330 212 2
+a 778 424 42
+a 915 957 50
+a 142 536 86
+a 184 313 90
+a 384 156 10
+a 201 170 48
+a 745 748 64
+a 768 767 57
+a 708 795 49
+a 76 166 15
+a 310 324 88
+a 493 509 66
+a 624 526 42
+a 360 378 67
+a 551 610 1
+a 671 731 9
+a 478 967 89
+a 62 237 38
+a 238 117 66
+a 326 345 4
+a 865 513 75
+a 179 541 29
+a 62 80 47
+a 830 5 30
+a 523 412 96
+a 81 11 10
+a 512 83 84
+a 306 585 3
+a 15 59 12
+a 43 84 19
+a 184 244 41
+a 583 474 98
+a 23 392 40
+a 143 184 62
+a 662 130 18
+a 599 42 49
+a 103 962 40
+a 8 116 83
+a 379 31 12
+a 181 5 95
+a 17 92 21
+a 552 748 55
+a 199 291 64
+a 24 11 78
+a 190 306 72
+a 35 37 87
+a 40 46 5
+a 109 51 76
+a 666 69 79
+a 769 864 30
+a 6 5 82
+a 8 405 25
+a 20 649 39
+a 181 426 56
+a 910 850 96
+a 449 256 34
+a 534 334 62
+a 12 19 15
+a 164 35 91
+a 60 161 75
+a 733 426 88
+a 188 124 9
+a 20 27 88
+a 76 135 81
+a 518 274 42
+a 26 45 23
+a 71 277 69
+a 259 669 64
+a 90 514 63
+a 273 51 54
+a 525 172 8
+a 977 375 48
+a 284 294 6
+a 798 813 75
+a 65 100 17
+a 262 106 11
+a 538 645 59
+a 35 44 31
+a 52 65 94
+a 752 79 43
+a 907 285 63
+a 487 510 87
+a 252 503 62
+a 112 37 86
+a 382 467 94
+a 187 504 16
+a 291 785 59
+a 137 92 81
+a 551 692 90
+a 581 938 34
+a 182 383 31
+a 35 83 66
+a 270 584 9
+a 623 76 9
+a 10 32 3
+a 98 309 27
+a 391 595 93
+a 418 945 23
+a 786 220 98
+a 11 13 36
+a 16 132 74
+a 140 374 21
+a 182 344 79
+a 15 66 87
+a 624 444 10
+a 257 715 68
+a 7 317 43
+a 343 36 40
+a 18 440 61
+a 988 169 64
+a 231 310 66
+a 944 30 76
+a 148 114 96
+a 14 166 26
+a 366 182 18
+a 634 535 16
+a 845 955 25
+a 295 781 47
+a 90 266 59
+a 420 19 70
+a 641 627 27
+a 592 92 60
+a 22 26 33
+a 225 909 53
+a 140 234 88
+a 421 381 38
+a 439 733 57
+a 808 484 93
+a 668 635 10
+a 4 109 80
+a 227 582 47
+a 560 72 31
+a 85 28 76
+a 121 7 12
+a 933 35 66
+a 225 220 19
+a 47 54 47
+a 97 7 76
+a 712 153 65
+a 878 283 49
+a 13 715 1
+a 29 133 100
+a 537 14 36
+a 323 441 48
+a 466 51 12
+a 695 146 32
+a 716 778 3
+a 789 575 63
+a 13 37 18
+a 133 626 62
+a 704 160 65
+a 674 59 27
+a 132 306 66
+a 112 252 34
+a 260 46 67
+a 608 998 69
+a 868 221 28
+a 735 712 20
+a 155 400 35
+a 448 482 89
+a 66 258 71
+a 745 259 67
+a 7 36 86
+a 196 220 26
+a 529 395 11
+a 184 863 9
+a 883 340 94
+a 159 381 38
+a 511 222 28
+a 541 532 39
+a 341 330 35
+a 3 25 4
+a 46 849 91
+a 861 960 92
+a 58 138 97
+a 35 372 20
+a 205 308 80
+a 287 816 76
+a 692 291 12
+a 13 25 67
+a 219 727 23
+a 337 315 93
+a 46 12 58
+a 85 180 20
+a 642 255 82
+a 847 280 35
+a 852 644 95
+a 22 169 40
+a 244 466 82
+a 706 588 4
+a 25 298 63
+a 228 86 32
+a 448 672 84
+a 25 197 90
+a 95 163 69
+a 34 116 85
+a 176 24 32
+a 468 25 55
+a 119 829 5
+a 8 101 72
+a 130 194 92
+a 45 29 34
+a 520 384 31
+a 566 821 34
+a 750 760 54
+a 156 678 34
+a 30 44 89
+a 158 462 84
+a 935 582 27
+a 424 460 97
+a 774 212 23
+a 774 816 35
+a 159 217 7
+a 30 41 6
+a 692 377 1
+a 71 392 85
+a 87 637 8
+a 286 842 63
+a 383 656 43
+a 8 508 70
+a 804 783 74
+a 17 24 72
+a 201 4 38
+a 955 182 29
+a 129 621 84
+a 674 235 35
+a 147 500 14
+a 531 643 26
+a 83 115 4
+a 120 700 81
+a 57 97 73
+a 339 208 26
+a 523 256 1
+a 253 111 19
+a 145 509 80
+a 26 65 49
+a 76 74 48
+a 337 291 12
+a 812 129 28
+a 23 793 92
+a 2 623 63
+a 201 267 28
+a 312 150 46
+a 72 838 41
+a 955 154 93
+a 984 365 52
+a 17 705 71
+a 10 622 100
+a 627 223 44
+a 36 970 20
+a 90 157 32
+a 196 268 64
+a 665 857 31
+a 953 664 36
+a 968 223 89
+a 1 31 34
+a 115 103 84
+a 188 394 20
+a 430 480 65
+a 176 218 1
+a 908 151 56
+a 392 430 47
+a 741 689 47
+a 818 617 3
+a 944 768 65
+a 68 194 8
+a 327 540 32
+a 454 766 64
+a 63 160 39
+a 124 122 28
+a 390 324 1
+a 550 244 100
+a 8 16 87
+a 63 152 74
+a 113 582 1
+a 237 652 45
+a 294 205 37
+a 20 43 72
+a 253 753 47
+a 257 299 72
+a 474 80 70
+a 658 573 70
+a 906 574 37
+a 886 97 24
+a 516 96 44
+a 20 9 48
+a 83 69 6
+a 500 582 24
+a 254 885 19
+a 95 202 56
+a 312 257 83
+a 635 239 30
+a 23 29 82
+a 11 1 83
+a 89 37 51
+a 621 64 78
+a 972 960 23
+a 41 84 66
+a 55 231 75
+a 10 1 87
+a 16 379 99
+a 31 757 51
+a 490 579 30
+a 109 395 96
+a 3 148 68
+a 173 970 99
+a 342 631 61
+a 54 8 65
+a 95 295 62
+a 808 985 10
+a 58 180 100
+a 27 194 51
+a 298 560 52
+a 86 14 2
+a 20 450 64
+a 496 582 76
+a 14 4 90
+a 337 774 67
+a 16 41 41
+a 45 72 89
+a 890 79 30
+a 43 265 12
+a 494 524 64
+a 2 270 11
+a 484 609 24
+a 509 671 53
+a 657 862 87
+a 997 645 11
+a 245 935 100
+a 806 378 83
+a 276 448 6
+a 226 289 33
+a 773 127 94
+a 628 69 34
+a 613 358 12
+a 71 145 26
+a 447 62 26
+a 888 464 43
+a 20 528 79
+a 918 893 91
+a 386 99 34
+a 5 954 71
+a 189 200 41
+a 341 36 48
+a 856 548 85
+a 9 61 67
+a 398 482 89
+a 568 424 59
+a 36 446 18
+a 26 31 95
+a 185 192 71
+a 117 49 100
+a 25 973 54
+a 629 636 39
+a 30 75 89
+a 1 703 15
+a 980 120 79
+a 28 159 35
+a 489 146 24
+a 598 207 6
+a 284 67 76
+a 301 568 19
+a 21 20 54
+a 161 176 86
+a 562 724 46
+a 592 718 72
+a 997 67 43
+a 300 891 32
+a 651 735 57
+a 60 110 50
+a 248 881 45
+a 227 130 56
+a 211 906 47
+a 436 826 70
+a 93 194 18
+a 177 691 18
+a 859 657 96
+a 34 149 8
+a 198 239 14
+a 67 334 48
+a 23 10 45
+a 46 91 99
+a 701 329 2
+a 574 924 30
+a 529 93 33
+a 564 648 75
+a 187 895 40
+a 233 506 9
+a 10 229 76
+a 180 704 60
+a 759 271 84
+a 237 92 86
+a 853 638 82
+a 30 51 13
+a 120 70 23
+a 947 621 74
+a 270 815 39
+a 494 926 52
+a 76 575 88
+a 20 84 96
+a 36 85 94
+a 524 87 93
+a 978 288 37
+a 504 643 4
+a 116 229 77
+a 888 485 60
+a 396 742 31
+a 359 443 92
+a 566 18 24
+a 847 146 5
+a 896 105 50
+a 386 302 13
+a 130 187 23
+a 845 110 93
+a 703 585 76
+a 895 58 22
+a 530 330 15
+a 28 637 32
+a 13 41 8
+a 511 302 37
+a 112 158 61
+a 955 119 29
+a 17 42 18
+a 898 120 45
+a 12 221 71
+a 13 60 23
+a 153 101 17
+a 603 231 45
+a 852 637 64
+a 261 877 60
+a 917 943 24
+a 71 467 45
+a 119 489 38
+a 236 119 94
+a 146 156 14
+a 327 109 78
+a 867 186 50
+a 730 711 77
+a 125 240 46
+a 25 21 64
+a 93 258 8
+a 93 313 93
+a 786 970 2
+a 555 10 53
+a 726 22 52
+a 563 220 4
+a 612 68 88
+a 195 511 95
+a 421 197 38
+a 715 172 11
+a 961 639 17
+a 710 709 31
+a 143 207 69
+a 318 48 62
+a 964 473 20
+a 226 511 1
+a 315 637 51
+a 553 963 18
+a 35 59 57
+a 8 59 49
+a 342 430 44
+a 366 78 26
+a 15 246 52
+a 595 887 51
+a 99 174 88
+a 194 329 1
+a 275 420 8
+a 804 605 13
+a 870 226 75
+a 5 4 11
+a 315 6 41
+a 909 11 18
+a 636 651 42
+a 5 64 86
+a 927 559 54
+a 3 33 3
+a 200 395 61
+a 156 883 95
+a 236 741 76
+a 193 668 31
+a 9 6 47
+a 47 565 98
+a 345 329 80
+a 226 699 81
+a 209 134 59
+a 856 636 75
+a 209 16 26
+a 30 146 4
+a 11 116 53
+a 404 35 65
+a 481 97 61
+a 582 484 40
+a 213 341 68
+a 142 65 45
+a 874 880 78
+a 29 22 77
+a 97 59 100
+a 549 73 96
+a 148 600 16
+a 59 104 77
+a 200 53 3
+a 6 287 68
+a 882 954 49
+a 209 44 62
+a 940 234 58
+a 121 154 80
+a 1 16 24
+a 249 313 25
+a 190 8 95
+a 14 277 41
+a 841 640 13
+a 15 37 63
+a 443 468 3
+a 375 309 46
+a 6 102 52
+a 15 174 98
+a 21 854 21
+a 159 188 38
+a 479 870 90
+a 675 452 32
+a 17 467 43
+a 361 60 99
+a 841 594 50
+a 64 69 18
+a 92 266 13
+a 610 360 43
+a 979 17 64
+a 99 284 73
+a 16 58 45
+a 96 41 10
+a 115 296 34
+a 384 655 51
+a 52 194 87
+a 746 57 84
+a 33 89 16
+a 350 127 42
+a 532 146 66
+a 681 458 34
+a 121 405 66
+a 507 75 93
+a 167 618 87
+a 33 835 15
+a 3 691 85
+a 10 8 66
+a 97 507 98
+a 95 881 26
+a 722 886 5
+a 31 363 37
+a 13 7 88
+a 13 647 74
+a 502 164 74
+a 13 83 82
+a 329 199 57
+a 829 7 5
+a 18 249 46
+a 72 60 95
+a 502 139 64
+a 589 181 39
+a 408 759 13
+a 23 31 97
+a 565 77 46
+a 270 13 57
+a 3 60 66
+a 64 306 1
+a 68 458 74
+a 668 480 70
+a 264 154 7
+a 100 40 49
+a 126 284 26
+a 977 464 25
+a 657 405 98
+a 193 370 87
+a 792 469 50
+a 285 281 28
+a 240 288 71
+a 763 433 3
+a 321 318 61
+a 780 169 42
+a 431 455 18
+a 413 577 73
+a 344 61 30
+a 5 40 9
+a 84 218 91
+a 792 986 80
+a 126 757 94
+a 40 717 94
+a 133 356 30
+a 408 602 39
+a 764 986 63
+a 287 76 70
+a 1 146 52
+a 684 397 20
+a 288 401 69
+a 617 186 13
+a 309 14 81
+a 677 232 27
+a 995 532 33
+a 753 772 36
+a 274 7 31
+a 484 181 65
+a 339 557 28
+a 2 93 56
+a 649 932 26
+a 830 987 26
+a 33 403 59
+a 460 194 84
+a 634 302 92
+a 13 679 57
+a 24 768 99
+a 946 446 61
+a 155 379 5
+a 691 486 57
+a 951 145 25
+a 56 77 84
+a 392 209 20
+a 154 242 7
+a 269 506 17
+a 324 370 88
+a 658 232 45
+a 62 794 84
+a 69 622 14
+a 198 310 31
+a 523 483 94
+a 213 489 21
+a 770 994 45
+a 389 259 17
+a 29 82 100
+a 195 197 62
+a 455 119 55
+a 534 886 60
+a 146 506 4
+a 147 784 86
+a 806 740 70
+a 7 115 47
+a 192 39 88
+a 4 369 70
+a 5 745 29
+a 490 658 79
+a 461 532 42
+a 3 42 44
+a 599 288 27
+a 537 231 64
+a 28 302 38
+a 131 54 16
+a 450 33 20
+a 398 882 29
+a 566 900 67
+a 25 30 46
+a 365 457 86
+a 485 150 23
+a 1 84 56
+a 53 128 85
+a 717 926 46
+a 215 869 28
+a 79 345 42
+a 198 855 21
+a 13 295 20
+a 29 983 91
+a 625 636 65
+a 14 52 28
+a 21 17 23
+a 28 101 29
+a 102 120 36
+a 822 992 26
+a 555 733 8
+a 53 105 41
+a 203 355 72
+a 224 401 7
+a 637 999 74
+a 18 10 50
+a 39 288 22
+a 12 9 30
+a 44 653 19
+a 54 951 31
+a 478 836 36
+a 643 285 8
+a 5 1 58
+a 25 267 78
+a 727 749 46
+a 37 520 15
+a 20 444 33
+a 202 686 14
+a 44 584 15
+a 8 19 95
+a 70 181 78
+a 236 111 45
+a 343 182 17
+a 501 181 2
+a 7 1 26
+a 239 403 57
+a 6 88 95
+a 282 632 2
+a 564 768 5
+a 223 833 87
+a 939 139 57
+a 255 244 50
+a 257 698 20
+a 25 123 1
+a 236 290 46
+a 465 5 99
+a 497 157 56
+a 770 573 66
+a 126 139 51
+a 25 41 20
+a 494 239 89
+a 848 310 29
+a 771 546 77
+a 53 126 92
+a 88 540 1
+a 33 3 83
+a 73 39 58
+a 176 211 95
+a 736 890 10
+a 387 395 87
+a 18 21 26
+a 129 263 79
+a 663 286 76
+a 126 850 93
+a 324 955 65
+a 13 997 40
+a 179 220 66
+a 43 68 89
+a 1 223 56
+a 845 107 39
+a 667 518 48
+a 856 671 95
+a 902 77 95
+a 29 430 52
+a 923 456 6
+a 1 218 71
+a 678 304 69
+a 776 957 83
+a 608 788 69
+a 847 288 43
+a 32 38 69
+a 166 427 26
+a 571 299 27
+a 891 519 54
+a 75 77 6
+a 128 131 51
+a 202 706 52
+a 2 54 32
+a 206 328 66
+a 323 182 18
+a 613 661 66
+a 308 855 33
+a 56 66 12
+a 546 199 48
+a 26 22 24
+a 52 744 93
+a 275 977 78
+a 655 701 90
+a 687 356 47
+a 134 189 58
+a 609 138 7
+a 767 311 30
+a 173 13 64
+a 681 473 49
+a 923 295 65
+a 993 817 86
+a 12 28 100
+a 529 257 45
+a 57 6 97
+a 766 475 61
+a 197 233 59
+a 142 165 91
+a 238 239 36
+a 128 209 27
+a 206 191 33
+a 743 525 21
+a 901 354 83
+a 3 137 19
+a 62 14 54
+a 818 378 6
+a 934 208 74
+a 575 40 88
+a 176 184 35
+a 81 2 9
+a 98 2 74
+a 569 819 9
+a 842 999 65
+a 2 38 7
+a 12 54 78
+a 142 16 38
+a 184 663 70
+a 616 565 66
+a 77 165 8
+a 173 874 49
+a 15 51 26
+a 93 265 45
+a 27 661 91
+a 689 670 32
+a 858 76 50
+a 15 255 69
+a 26 615 68
+a 325 7 63
+a 814 438 74
+a 62 66 98
+a 66 195 21
+a 192 197 32
+a 365 783 64
+a 660 709 89
+a 27 659 2
+a 679 182 85
+a 812 319 2
+a 987 76 62
+a 31 121 11
+a 995 682 28
+a 24 70 24
+a 73 336 2
+a 528 145 74
+a 100 767 71
+a 995 483 8
+a 57 124 79
+a 839 662 77
+a 802 856 28
+a 74 86 81
+a 107 70 86
+a 541 301 79
+a 762 366 12
+a 418 560 66
+a 33 59 99
+a 190 388 92
+a 310 891 42
+a 552 683 16
+a 4 50 36
+a 243 435 81
+a 185 746 58
+a 11 628 62
+a 166 297 80
+a 214 981 77
+a 845 942 67
+a 8 615 22
+a 86 1 93
+a 745 123 82
+a 112 629 14
+a 23 17 4
+a 104 148 69
+a 675 236 73
+a 88 768 73
+a 914 942 14
+a 285 534 96
+a 535 27 29
+a 965 54 13
+a 208 303 25
+a 608 662 23
+a 786 980 54
+a 76 116 29
+a 142 324 17
+a 557 408 39
+a 331 561 89
+a 5 23 39
+a 34 212 39
+a 920 268 30
+a 112 176 49
+a 36 27 2
+a 69 10 94
+a 596 29 79
+a 538 864 98
+a 606 113 100
+a 32 40 76
+a 89 436 51
+a 245 976 7
+a 191 367 46
+a 34 21 23
+a 487 702 77
+a 15 118 27
+a 309 118 36
+a 477 646 57
+a 944 470 24
+a 622 604 20
+a 51 67 29
+a 96 183 38
+a 5 49 46
+a 264 584 88
+a 5 68 6
+a 107 8 58
+a 130 323 71
+a 559 812 51
+a 299 612 100
+a 99 159 75
+a 255 418 57
+a 391 681 46
+a 289 982 84
+a 4 49 19
+a 824 934 5
+a 68 446 50
+a 457 286 19
+a 333 434 60
+a 671 929 27
+a 171 173 12
+a 203 423 21
+a 671 209 16
+a 890 724 75
+a 128 146 50
+a 155 936 68
+a 349 213 18
+a 86 91 67
+a 11 22 37
+a 36 2 57
+a 864 6 13
+a 541 616 63
+a 181 142 13
+a 840 94 19
+a 832 597 48
+a 69 79 23
+a 249 119 77
+a 513 710 33
+a 677 168 1
+a 339 884 22
+a 110 125 21
+a 188 48 82
+a 816 683 55
+a 934 117 25
+a 418 585 49
+a 655 941 98
+a 1000 213 92
+a 176 343 49
+a 136 279 5
+a 506 103 34
+a 693 445 31
+a 685 703 12
+a 87 312 2
+a 431 492 43
+a 376 771 28
+a 407 656 55
+a 23 603 63
+a 329 92 67
+a 170 993 69
+a 166 100 19
+a 25 54 34
+a 368 451 72
+a 253 144 67
+a 33 97 20
+a 238 458 81
+a 260 784 24
+a 880 342 92
+a 781 880 33
+a 22 39 91
+a 570 95 84
+a 848 414 36
+a 832 950 99
+a 94 312 98
+a 240 326 61
+a 89 183 13
+a 269 143 98
+a 473 943 22
+a 586 866 63
+a 677 471 73
+a 127 175 39
+a 446 213 6
+a 822 224 37
+a 373 544 73
+a 245 11 96
+a 530 86 28
+a 280 367 59
+a 11 27 1
+a 134 181 7
+a 603 504 61
+a 902 641 77
+a 665 429 25
+a 185 429 68
+a 283 156 97
+a 33 48 91
+a 63 428 48
+a 349 480 14
+a 264 854 43
+a 336 20 46
+a 17 117 46
+a 627 332 74
+a 551 60 91
+a 568 617 8
+a 12 32 70
+a 75 191 99
+a 83 832 71
+a 938 169 36
+a 277 812 80
+a 16 14 86
+a 504 15 30
+a 566 292 83
+a 161 900 26
+a 431 53 59
+a 117 917 14
+a 12 56 12
+a 101 283 81
+a 362 212 23
+a 144 955 93
+a 504 566 48
+a 595 334 26
+a 76 35 92
+a 397 256 38
+a 730 606 3
+a 305 375 10
+a 502 63 37
+a 517 294 98
+a 347 903 86
+a 947 603 49
+a 56 70 38
+a 153 236 23
+a 922 648 96
+a 382 436 29
+a 40 91 14
+a 887 584 79
+a 10 4 30
+a 66 228 84
+a 20 491 88
+a 112 232 9
+a 946 579 67
+a 12 323 82
+a 488 763 44
+a 174 834 96
+a 267 573 58
+a 30 45 65
+a 57 53 63
+a 953 689 64
+a 188 53 2
+a 82 301 60
+a 50 109 29
+a 221 646 19
+a 679 796 25
+a 946 594 18
+a 827 598 92
+a 159 966 5
+a 9 21 36
+a 553 425 94
+a 57 785 13
+a 115 635 41
+a 360 138 86
+a 301 362 2
+a 61 463 23
+a 52 287 62
+a 374 859 86
+a 80 34 68
+a 386 130 41
+a 445 250 18
+a 141 83 56
+a 895 95 64
+a 957 356 33
+a 41 44 97
+a 710 54 43
+a 12 38 28
+a 102 725 6
+a 937 994 23
+a 217 632 75
+a 31 6 44
+a 232 649 97
+a 918 327 11
+a 274 514 30
+a 204 233 41
+a 462 622 31
+a 349 935 97
+a 407 933 16
+a 10 42 80
+a 294 510 33
+a 52 513 92
+a 189 184 59
+a 211 213 70
+a 111 135 77
+a 31 16 51
+a 807 98 30
+a 34 88 29
+a 101 319 24
+a 749 772 1
+a 339 968 43
+a 504 529 99
+a 137 179 22
+a 193 472 75
+a 293 656 16
+a 134 797 51
+a 132 171 58
+a 182 105 56
+a 17 846 29
+a 129 447 85
+a 48 75 56
+a 460 4 65
+a 422 531 30
+a 50 619 66
+a 16 26 3
+a 194 333 24
+a 520 202 99
+a 309 510 79
+a 316 632 23
+a 322 572 48
+a 83 261 16
+a 41 71 43
+a 57 477 64
+a 427 502 97
+a 22 244 36
+a 241 3 19
+a 937 326 27
+a 40 150 71
+a 630 35 24
+a 518 94 18
+a 672 230 65
+a 698 384 27
+a 755 785 90
+a 89 14 38
+a 520 184 27
+a 187 462 78
+a 112 38 92
+a 858 73 2
+a 617 564 26
+a 4 43 72
+a 38 464 94
+a 362 406 51
+a 808 497 86
+a 48 264 40
+a 250 316 77
+a 24 86 27
+a 737 82 71
+a 250 949 76
+a 9 500 65
+a 582 40 21
+a 14 506 1
+a 594 673 22
+a 110 933 64
+a 320 329 15
+a 554 66 62
+a 261 163 93
+a 129 392 42
+a 158 833 52
+a 879 420 37
+a 106 122 47
+a 347 470 5
+a 149 838 17
+a 788 635 38
+a 143 691 12
+a 44 329 42
+a 989 669 50
+a 34 68 12
+a 156 128 8
+a 307 502 48
+a 926 144 10
+a 566 107 99
+a 71 167 17
+a 206 203 23
+a 212 995 44
+a 278 536 69
+a 11 358 100
+a 44 378 67
+a 760 487 92
+a 33 419 12
+a 40 394 97
+a 294 304 78
+a 344 526 58
+a 353 735 100
+a 523 323 18
+a 45 76 16
+a 402 512 16
+a 311 453 73
+a 69 307 36
+a 139 119 10
+a 467 433 53
+a 755 644 69
+a 836 136 45
+a 62 117 36
+a 182 447 13
+a 899 447 99
+a 449 896 71
+a 27 153 81
+a 499 238 2
+a 500 543 21
+a 550 582 24
+a 739 854 33
+a 44 2 65
+a 741 751 39
+a 627 119 33
+a 811 441 52
+a 129 401 21
+a 582 27 8
+a 131 266 48
+a 739 980 27
+a 584 639 50
+a 13 22 31
+a 123 33 18
+a 102 159 62
+a 373 383 75
+a 109 10 50
+a 208 98 12
+a 10 6 62
+a 7 74 24
+a 28 12 81
+a 242 99 18
+a 798 366 36
+a 219 965 42
+a 32 63 32
+a 1 109 1
+a 594 844 50
+a 218 61 73
+a 410 125 80
+a 540 263 33
+a 651 241 18
+a 24 738 8
+a 37 56 49
+a 84 199 18
+a 284 209 44
+a 633 963 89
+a 883 741 4
+a 928 974 50
+a 32 36 20
+a 323 213 97
+a 120 79 53
+a 204 433 52
+a 4 255 52
+a 927 187 49
+a 232 632 60
+a 86 406 64
+a 14 79 81
+a 144 212 44
+a 831 734 41
+a 208 457 81
+a 440 706 95
+a 3 107 45
+a 264 126 72
+a 175 971 96
+a 845 318 65
+a 347 916 89
+a 293 510 52
+a 29 20 23
+a 137 571 48
+a 82 444 44
+a 7 374 18
+a 538 191 47
+a 41 45 13
+a 1 206 83
+a 383 82 9
+a 687 251 19
+a 18 4 93
+a 94 787 47
+a 38 714 19
+a 658 938 14
+a 270 569 82
+a 515 617 31
+a 31 619 86
+a 90 268 98
+a 951 703 13
+a 61 9 49
+a 792 50 25
+a 928 834 50
+a 13 32 34
+a 1 43 35
+a 318 754 39
+a 790 45 75
+a 63 446 3
+a 674 952 62
+a 357 875 56
+a 769 239 97
+a 397 123 63
+a 48 455 92
+a 512 561 13
+a 115 644 56
+a 821 566 87
+a 939 703 92
+a 30 32 62
+a 646 788 58
+a 46 100 59
+a 132 53 89
+a 236 427 53
+a 243 92 100
+a 313 485 34
+a 105 122 25
+a 271 125 10
+a 455 847 24
+a 780 738 97
+a 172 193 99
+a 923 315 39
+a 756 169 36
+a 111 152 42
+a 15 242 69
+a 266 207 83
+a 120 103 15
+a 495 989 31
+a 166 158 55
+a 334 282 100
+a 988 497 88
+a 856 931 74
+a 487 984 48
+a 2 283 10
+a 421 190 80
+a 2 805 15
+a 636 604 10
+a 389 451 49
+a 14 19 63
+a 27 381 31
+a 4 84 74
+a 274 10 46
+a 63 73 87
+a 76 273 72
+a 683 312 43
+a 203 346 60
+a 344 754 12
+a 113 360 88
+a 366 86 78
+a 869 203 47
+a 522 350 48
+a 253 663 34
+a 486 864 7
+a 17 125 40
+a 41 146 84
+a 613 103 43
+a 91 256 26
+a 260 398 22
+a 641 159 12
+a 35 51 58
+a 21 6 83
+a 491 538 59
+a 527 374 35
+a 3 675 51
+a 205 62 8
+a 940 966 69
+a 237 393 65
+a 596 611 59
+a 69 109 93
+a 192 284 60
+a 355 727 25
+a 251 593 48
+a 386 926 96
+a 791 135 90
+a 141 169 68
+a 90 95 65
+a 750 464 93
+a 435 829 31
+a 253 50 30
+a 200 144 79
+a 533 684 37
+a 274 594 83
+a 84 132 70
+a 479 222 78
+a 157 487 53
+a 87 773 26
+a 211 161 44
+a 21 106 67
+a 32 43 50
+a 199 887 25
+a 893 196 80
+a 26 734 68
+a 744 820 32
+a 211 405 93
+a 585 600 73
+a 812 241 48
+a 38 45 46
+a 90 107 47
+a 49 474 92
+a 249 755 81
+a 57 439 96
+a 940 830 72
+a 711 524 79
+a 6 27 44
+a 6 17 84
+a 235 7 43
+a 296 7 1
+a 385 362 5
+a 57 116 2
+a 30 363 68
+a 106 136 76
+a 190 56 66
+a 658 70 12
+a 576 102 4
+a 715 936 40
+a 635 149 90
+a 753 419 15
+a 84 287 50
+a 18 5 85
+a 426 877 79
+a 942 810 30
+a 11 31 30
+a 108 223 36
+a 60 106 23
+a 269 929 98
+a 215 541 87
+a 18 6 65
+a 77 585 56
+a 424 287 35
+a 232 290 89
+a 482 20 53
+a 657 24 52
+a 854 141 100
+a 965 677 41
+a 21 14 94
+a 257 105 73
+a 806 206 29
+a 1 295 9
+a 984 887 84
+a 970 197 22
+a 800 6 1
+a 57 24 30
+a 260 31 49
+a 129 116 78
+a 726 176 15
+a 819 47 50
+a 48 61 3
+a 601 105 90
+a 797 296 48
+a 161 515 72
+a 394 721 97
+a 363 293 7
+a 23 127 10
+a 134 331 91
+a 259 19 6
+a 538 595 44
+a 155 16 70
+a 444 268 52
+a 4 90 42
+a 137 339 4
+a 563 982 51
+a 575 86 57
+a 613 673 90
+a 142 147 5
+a 201 12 22
+a 728 297 13
+a 139 492 80
+a 661 59 55
+a 697 566 76
+a 725 754 84
+a 3 258 64
+a 541 79 66
+a 123 680 91
+a 297 600 49
+a 983 638 42
+a 30 236 88
+a 79 389 100
+a 791 125 19
+a 127 138 96
+a 170 314 78
+a 364 903 79
+a 82 497 11
+a 60 867 78
+a 25 116 77
+a 298 192 27
+a 868 600 71
+a 82 251 5
+a 1 39 89
+a 23 67 47
+a 839 935 49
+a 114 234 20
+a 11 23 74
+a 353 959 100
+a 346 477 36
+a 10 2 37
+a 1 389 43
+a 441 479 66
+a 525 524 89
+a 69 353 41
+a 448 358 34
+a 210 387 14
+a 465 997 72
+a 791 443 39
+a 8 96 47
+a 107 90 16
+a 348 816 73
+a 847 104 52
+a 226 120 14
+a 368 234 98
+a 308 747 27
+a 45 38 81
+a 129 191 24
+a 638 400 100
+a 979 564 90
+a 737 127 2
+a 193 271 57
+a 1 325 87
+a 336 489 66
+a 42 17 55
+a 66 2 51
+a 47 167 93
+a 532 26 78
+a 53 2 34
+a 506 30 45
+a 872 471 61
+a 50 8 89
+a 77 163 81
+a 43 50 48
+a 67 32 22
+a 145 48 17
+a 512 248 15
+a 845 197 59
+a 130 689 85
+a 261 986 100
+a 380 832 21
+a 32 100 3
+a 249 671 47
+a 684 694 75
+a 868 981 91
+a 371 134 95
+a 59 511 45
+a 184 215 62
+a 429 164 45
+a 523 240 82
+a 209 952 55
+a 523 530 89
+a 785 490 62
+a 95 134 38
+a 326 332 80
+a 68 706 3
+a 916 443 63
+a 487 154 74
+a 227 155 82
+a 13 455 19
+a 177 89 8
+a 643 130 77
+a 228 20 27
+a 231 87 94
+a 292 94 92
+a 964 162 31
+a 459 644 76
+a 14 72 40
+a 243 155 85
+a 917 281 4
+a 360 359 33
+a 51 155 36
+a 317 702 98
+a 31 21 61
+a 148 134 13
+a 215 107 66
+a 431 653 76
+a 10 29 19
+a 88 55 33
+a 679 688 86
+a 710 152 86
+a 39 9 82
+a 71 10 44
+a 300 558 38
+a 20 22 10
+a 335 419 29
+a 215 503 99
+a 680 583 5
+a 720 665 52
+a 358 427 37
+a 606 43 43
+a 147 258 16
+a 495 341 52
+a 911 867 49
+a 213 33 28
+a 805 847 89
+a 791 843 28
+a 270 31 44
+a 50 448 74
+a 616 963 65
+a 913 265 20
+a 66 108 59
+a 436 347 75
+a 327 200 88
+a 6 36 43
+a 17 44 87
+a 879 488 82
+a 899 555 62
+a 616 337 38
+a 2 50 10
+a 93 296 67
+a 9 18 48
+a 172 760 32
+a 204 788 88
+a 780 574 80
+a 305 550 25
+a 751 43 14
+a 950 636 1
+a 177 474 29
+a 316 751 64
+a 554 798 86
+a 8 28 73
+a 28 276 19
+a 273 904 25
+a 974 699 100
+a 718 498 89
+a 44 53 19
+a 93 718 80
+a 114 704 69
+a 695 438 91
+a 403 302 97
+a 79 439 46
+a 36 39 78
+a 279 240 56
+a 100 499 11
+a 318 367 96
+a 862 982 37
+a 29 65 22
+a 260 54 4
+a 261 301 90
+a 6 3 96
+a 17 221 83
+a 166 926 43
+a 486 497 8
+a 145 982 3
+a 175 244 26
+a 284 192 71
+a 331 231 10
+a 694 632 98
+a 130 251 56
+a 343 669 77
+a 620 401 51
+a 2 56 22
+a 340 71 19
+a 15 473 8
+a 244 342 75
+a 9 15 92
+a 422 100 5
+a 422 52 19
+a 74 113 44
+a 303 546 42
+a 826 860 79
+a 653 546 66
+a 677 950 28
+a 228 264 54
+a 346 24 64
+a 984 26 71
+a 804 336 38
+a 29 91 44
+a 847 372 32
+a 5 25 56
+a 249 95 45
+a 43 694 5
+a 527 122 27
+a 986 584 39
+a 15 27 24
+a 31 198 93
+a 426 729 92
+a 193 12 51
+a 186 576 21
+a 239 770 82
+a 532 515 100
+a 113 166 75
+a 106 118 14
+a 504 3 42
+a 881 206 70
+a 637 490 36
+a 479 481 94
+a 254 511 68
+a 11 33 17
+a 42 10 12
+a 62 589 17
+a 795 527 41
+a 745 144 75
+a 5 401 61
+a 49 495 30
+a 848 777 90
+a 701 140 69
+a 229 317 54
+a 438 445 75
+a 487 993 58
+a 162 874 8
+a 202 198 11
+a 26 37 29
+a 192 22 50
+a 707 489 86
+a 343 479 99
+a 62 414 69
+a 917 123 67
+a 103 442 27
+a 159 65 93
+a 331 11 34
+a 254 141 45
+a 417 891 51
+a 541 520 54
+a 102 291 13
+a 399 566 60
+a 659 77 52
+a 32 50 88
+a 231 546 23
+a 260 836 42
+a 429 234 43
+a 980 930 46
+a 10 77 83
+a 198 96 58
+a 738 476 93
+a 135 3 58
+a 76 98 13
+a 68 719 59
+a 121 892 4
+a 709 577 14
+a 62 56 54
+a 832 798 4
+a 774 358 69
+a 544 944 49
+a 773 177 87
+a 670 88 65
+a 89 317 78
+a 96 109 21
+a 117 129 56
+a 402 591 54
+a 429 378 14
+a 184 178 92
+a 96 743 25
+a 224 586 15
+a 124 151 26
+a 965 252 52
+a 130 264 100
+a 823 536 38
+a 945 887 52
+a 12 24 94
+a 14 70 2
+a 627 71 93
+a 734 83 46
+a 66 805 29
+a 415 601 54
+a 30 129 15
+a 240 786 52
+a 139 230 100
+a 485 580 59
+a 109 660 74
+a 621 849 15
+a 62 877 16
+a 298 419 30
+a 42 71 93
+a 52 630 18
+a 995 417 45
+a 95 187 25
+a 774 95 55
+a 926 353 73
+a 830 572 38
+a 138 149 34
+a 13 255 69
+a 148 303 77
+a 532 382 85
+a 619 585 16
+a 829 830 91
+a 38 350 52
+a 417 198 57
+a 684 146 35
+a 563 887 13
+a 390 915 44
+a 133 601 63
+a 642 105 77
+a 223 962 94
+a 267 445 3
+a 966 239 76
+a 127 589 72
+a 14 122 97
+a 466 37 31
+a 182 957 47
+a 676 625 62
+a 407 862 48
+a 77 213 21
+a 570 98 89
+a 3 13 51
+a 327 466 4
+a 166 244 90
+a 908 727 90
+a 561 439 87
+a 588 278 14
+a 992 689 83
+a 8 104 63
+a 252 188 28
+a 134 622 20
+a 7 65 69
+a 954 907 86
+a 938 510 27
+a 19 81 96
+a 227 820 73
+a 119 5 48
+a 411 17 34
+a 142 198 24
+a 185 745 100
+a 145 180 30
+a 667 129 70
+a 3 262 17
+a 166 729 89
+a 1000 155 10
+a 967 276 25
+a 579 7 18
+a 321 652 95
+a 56 136 58
+a 356 1 11
+a 19 15 46
+a 287 325 66
+a 888 755 42
+a 471 370 38
+a 35 68 99
+a 138 296 35
+a 290 719 23
+a 736 831 94
+a 847 415 63
+a 23 32 19
+a 81 61 56
+a 468 114 74
+a 62 94 87
+a 98 240 30
+a 322 36 24
+a 122 777 59
+a 510 278 20
+a 71 87 14
+a 158 16 48
+a 214 36 1
+a 794 529 99
+a 849 622 69
+a 493 846 92
+a 18 9 73
+a 657 157 17
+a 184 35 47
+a 44 92 55
+a 256 302 39
+a 903 982 17
+a 297 665 95
+a 894 949 45
+a 52 7 51
+a 87 100 20
+a 605 808 66
+a 150 715 98
+a 592 926 40
+a 63 197 6
+a 552 209 53
+a 644 275 11
+a 312 888 36
+a 147 19 43
+a 147 130 94
+a 417 31 71
+a 61 71 94
+a 24 135 15
+a 184 247 20
+a 894 279 95
+a 471 933 98
+a 84 160 26
+a 28 121 86
+a 888 837 38
+a 27 45 15
+a 83 152 76
+a 657 734 21
+a 109 837 70
+a 483 119 83
+a 90 156 97
+a 362 732 24
+a 418 632 6
+a 801 434 69
+a 545 230 78
+a 988 473 35
+a 47 127 84
+a 325 18 36
+a 161 14 42
+a 680 451 50
+a 97 207 49
+a 781 993 48
+a 170 633 23
+a 128 62 44
+a 132 266 13
+a 375 534 6
+a 35 947 67
+a 17 833 21
+a 33 36 76
+a 121 96 26
+a 830 623 88
+a 687 980 11
+a 7 40 10
+a 647 306 22
+a 424 841 30
+a 10 110 2
+a 254 303 77
+a 72 272 17
+a 595 538 58
+a 636 165 49
+a 24 120 53
+a 394 533 28
+a 373 951 98
+a 117 132 99
+a 306 414 69
+a 441 425 48
+a 921 243 39
+a 871 689 73
+a 519 597 70
+a 646 221 50
+a 694 826 2
+a 807 764 8
+a 122 278 15
+a 49 33 91
+a 481 342 57
+a 192 513 14
+a 35 39 31
+a 1 142 67
+a 208 827 29
+a 175 678 62
+a 32 766 62
+a 25 36 62
+a 111 960 55
+a 510 950 21
+a 62 217 49
+a 73 939 24
+a 389 12 1
+a 113 472 11
+a 204 581 65
+a 901 408 18
+a 170 83 25
+a 738 22 66
+a 214 559 40
+a 520 747 33
+a 865 587 18
+a 784 817 6
+a 920 868 4
+a 547 113 60
+a 21 40 93
+a 74 750 96
+a 156 278 50
+a 693 944 59
+a 108 38 3
+a 311 885 5
+a 972 890 37
+a 979 172 87
+a 223 591 61
+a 10 111 47
+a 111 338 62
+a 305 440 71
+a 628 987 48
+a 129 30 100
+a 703 659 92
+a 265 509 48
+a 594 4 15
+a 442 224 43
+a 676 11 75
+a 261 864 85
+a 92 897 83
+a 4 177 70
+a 90 412 90
+a 25 47 73
+a 960 977 90
+a 18 78 5
+a 116 148 14
+a 784 150 80
+a 225 406 71
+a 486 329 57
+a 103 427 43
+a 24 657 21
+a 89 297 35
+a 299 690 68
+a 28 597 95
+a 643 453 98
+a 35 58 51
+a 6 152 7
+a 82 156 8
+a 133 293 24
+a 215 470 75
+a 755 289 97
+a 40 44 65
+a 10 53 9
+a 357 664 14
+a 600 850 69
+a 23 217 83
+a 65 212 54
+a 43 717 6
+a 952 204 91
+a 449 749 22
+a 1 8 100
+a 221 40 99
+a 12 298 19
+a 26 235 99
+a 500 849 41
+a 438 903 86
+a 203 517 16
+a 22 192 73
+a 439 624 48
+a 745 896 84
+a 13 9 91
+a 117 155 33
+a 140 243 80
+a 613 587 33
+a 657 744 87
+a 3 16 80
+a 53 63 30
+a 312 79 92
+a 550 894 1
+a 717 111 38
+a 29 18 4
+a 607 119 11
+a 951 273 28
+a 27 366 87
+a 701 530 17
+a 78 703 28
+a 812 460 9
+a 37 136 3
+a 11 10 13
+a 74 357 14
+a 675 470 38
+a 977 316 89
+a 12 74 92
+a 115 68 32
+a 126 362 83
+a 164 39 40
+a 696 765 96
+a 461 896 83
+a 90 275 22
+a 386 508 65
+a 614 375 92
+a 21 162 5
+a 269 155 49
+a 303 166 34
+a 12 44 2
+a 243 70 42
+a 70 60 98
+a 578 861 81
+a 114 122 88
+a 613 391 88
+a 43 214 3
+a 611 404 50
+a 261 113 34
+a 626 123 82
+a 492 215 76
+a 7 892 95
+a 813 20 7
+a 100 267 33
+a 143 269 27
+a 92 145 82
+a 446 167 56
+a 820 243 98
+a 366 690 96
+a 5 32 59
+a 429 175 2
+a 68 71 29
+a 269 670 24
+a 839 315 84
+a 218 336 76
+a 67 397 95
+a 561 209 28
+a 81 142 94
+a 249 363 26
+a 364 455 94
+a 149 279 80
+a 42 324 29
+a 736 980 3
+a 160 60 16
+a 327 142 98
+a 660 225 73
+a 57 65 89
+a 699 452 64
+a 940 163 61
+a 270 296 27
+a 155 403 100
+a 325 146 22
+a 964 203 17
+a 103 110 84
+a 591 825 19
+a 378 234 24
+a 779 503 70
+a 936 337 88
+a 24 173 9
+a 611 299 38
+a 339 473 96
+a 187 9 45
+a 656 293 35
+a 145 289 72
+a 111 8 82
+a 924 517 90
+a 68 141 81
+a 501 139 19
+a 34 977 61
+a 85 11 74
+a 8 44 98
+a 203 68 1
+a 294 111 10
+a 59 321 44
+a 28 17 72
+a 608 482 23
+a 808 237 7
+a 35 36 99
+a 487 673 55
+a 788 582 54
+a 900 741 40
+a 316 583 13
+a 93 167 1
+a 260 56 8
+a 907 321 70
+a 399 168 3
+a 697 611 61
+a 11 568 98
+a 181 611 31
+a 506 478 84
+a 686 130 7
+a 634 78 75
+a 20 395 11
+a 683 429 87
+a 154 171 97
+a 26 39 94
+a 74 78 67
+a 378 722 8
+a 955 854 6
+a 26 437 47
+a 29 51 96
+a 90 122 65
+a 224 164 72
+a 837 619 58
+a 4 53 59
+a 84 258 90
+a 19 32 78
+a 46 13 58
+a 986 146 96
+a 866 621 20
+a 762 9 99
+a 77 408 71
+a 682 21 49
+a 93 72 98
+a 436 242 10
+a 110 452 47
+a 533 640 20
+a 902 175 34
+a 14 39 93
+a 30 15 5
+a 4 186 94
+a 229 4 34
+a 979 555 5
+a 39 40 67
+a 35 63 53
+a 525 606 26
+a 693 305 23
+a 723 929 40
+a 137 285 32
+a 585 928 85
+a 132 43 89
+a 508 405 11
+a 3 72 15
+a 250 14 67
+a 213 258 56
+a 459 667 44
+a 537 684 43
+a 302 958 42
+a 669 794 57
+a 107 138 50
+a 265 10 67
+a 281 148 56
+a 99 768 29
+a 318 87 84
+a 152 705 21
+a 23 62 5
+a 378 107 29
+a 985 521 51
+a 462 127 87
+a 467 873 46
+a 110 210 2
+a 230 28 57
+a 963 416 86
+a 624 219 9
+a 180 53 22
+a 514 66 28
+a 737 105 46
+a 48 79 21
+a 254 327 57
+a 249 221 93
+a 423 657 75
+a 509 607 31
+a 6 107 89
+a 654 42 7
+a 36 64 91
+a 373 442 97
+a 640 748 56
+a 397 441 20
+a 192 269 75
+a 713 96 93
+a 917 188 22
+a 582 688 56
+a 592 86 62
+a 417 212 85
+a 334 714 38
+a 22 77 50
+a 171 56 9
+a 257 827 77
+a 425 658 18
+a 947 948 13
+a 7 45 6
+a 224 149 16
+a 312 859 61
+a 199 418 45
+a 821 273 20
+a 947 633 91
+a 636 522 61
+a 144 247 51
+a 78 136 67
+a 327 112 5
+a 354 360 39
+a 72 912 44
+a 721 596 35
+a 259 145 99
+a 551 628 61
+a 183 215 16
+a 67 150 11
+a 20 26 80
+a 216 16 63
+a 313 401 52
+a 434 635 58
+a 1 22 49
+a 38 328 98
+a 10 12 60
+a 28 282 69
+a 36 296 100
+a 274 635 5
+a 549 140 71
+a 244 285 42
+a 922 398 21
+a 63 75 96
+a 180 697 46
+a 810 572 57
+a 21 24 42
+a 61 195 86
+a 891 731 69
+a 561 272 78
+a 764 967 24
+a 92 317 28
+a 412 158 13
+a 838 265 95
+a 372 495 71
+a 736 509 71
+a 729 1000 33
+a 96 391 58
+a 301 22 27
+a 644 4 25
+a 196 730 51
+a 715 817 14
+a 30 13 75
+a 101 552 31
+a 71 126 67
+a 5 57 1
+a 94 539 96
+a 266 665 94
+a 214 506 2
+a 70 481 18
+a 28 47 34
+a 101 426 80
+a 289 452 5
+a 359 373 68
+a 10 50 59
+a 873 253 40
+a 51 53 24
+a 323 484 71
+a 483 786 20
+a 909 588 98
+a 255 791 60
+a 100 70 48
+a 616 792 30
+a 263 47 39
+a 118 386 49
+a 396 424 89
+a 775 978 68
+a 169 744 31
+a 464 276 65
+a 897 745 77
+a 31 241 85
+a 45 492 5
+a 663 412 61
+a 53 88 54
+a 584 183 52
+a 226 166 88
+a 231 315 100
+a 296 128 34
+a 321 169 88
+a 316 773 18
+a 750 799 29
+a 191 217 73
+a 300 90 43
+a 164 12 38
+a 475 988 92
+a 397 653 78
+a 743 195 37
+a 491 542 67
+a 987 589 66
+a 992 543 36
+a 56 102 70
+a 118 505 39
+a 537 541 63
+a 525 499 16
+a 977 787 79
+a 682 130 39
+a 23 88 76
+a 555 586 87
+a 111 493 57
+a 877 771 80
+a 68 90 30
+a 991 384 47
+a 398 351 7
+a 737 727 74
+a 3 64 66
+a 116 59 80
+a 832 840 86
+a 880 131 93
+a 467 293 81
+a 11 230 18
+a 624 323 18
+a 33 586 97
+a 792 527 61
+a 346 219 68
+a 574 456 4
+a 122 251 73
+a 175 42 91
+a 13 449 17
+a 471 45 20
+a 505 102 87
+a 478 975 40
+a 4 39 76
+a 41 55 77
+a 536 273 23
+a 777 402 77
+a 19 199 91
+a 35 222 63
+a 43 715 91
+a 566 575 67
+a 724 878 95
+a 124 275 79
+a 347 478 84
+a 110 378 51
+a 118 800 67
+a 85 79 82
+a 264 266 8
+a 895 43 27
+a 737 417 93
+a 10 216 83
+a 604 39 26
+a 382 518 29
+a 445 346 20
+a 560 124 57
+a 778 145 45
+a 333 553 46
+a 113 305 57
+a 169 495 16
+a 4 24 84
+a 718 5 80
+a 719 213 89
+a 988 953 81
+a 722 477 9
+a 633 272 92
+a 69 361 47
+a 593 231 52
+a 139 823 49
+a 783 835 32
+a 1000 968 43
+a 278 293 58
+a 26 276 99
+a 757 156 31
+a 870 817 86
+a 8 121 81
+a 369 375 100
+a 796 749 2
+a 354 114 55
+a 880 852 97
+a 31 60 90
+a 300 65 41
+a 403 558 62
+a 948 364 47
+a 209 288 85
+a 813 601 70
+a 90 635 41
+a 768 17 50
+a 380 848 1
+a 810 126 11
+a 35 127 78
+a 291 794 45
+a 465 502 80
+a 251 147 82
+a 476 719 69
+a 909 651 32
+a 37 438 31
+a 436 85 84
+a 594 860 8
+a 531 89 15
+a 544 330 34
+a 87 204 66
+a 205 64 86
+a 602 710 58
+a 340 368 27
+a 997 485 89
+a 483 598 94
+a 98 192 57
+a 41 61 88
+a 62 53 56
+a 391 611 53
+a 234 937 94
+a 28 50 42
+a 103 116 61
+a 427 400 77
+a 64 108 77
+a 340 628 63
+a 794 74 63
+a 979 822 43
+a 675 467 24
+a 81 93 83
+a 267 13 40
+a 311 802 54
+a 128 923 16
+a 343 166 93
+a 12 468 50
+a 46 101 49
+a 80 90 92
+a 260 714 50
+a 883 711 71
+a 9 41 55
+a 774 711 32
+a 195 537 79
+a 43 96 86
+a 120 4 96
+a 778 77 48
+a 738 30 99
+a 35 11 20
+a 143 33 37
+a 177 8 48
+a 841 339 31
+a 848 252 30
+a 43 110 16
+a 330 712 31
+a 11 7 29
+a 65 19 28
+a 595 933 27
+a 800 215 59
+a 293 456 56
+a 21 44 16
+a 116 747 71
+a 650 604 86
+a 259 270 18
+a 103 260 59
+a 183 658 51
+a 697 83 90
+a 19 30 75
+a 52 69 13
+a 91 88 60
+a 277 530 98
+a 591 597 66
+a 31 51 44
+a 122 88 50
+a 36 94 56
+a 160 444 71
+a 244 642 97
+a 48 769 18
+a 918 247 56
+a 340 370 40
+a 751 539 50
+a 584 359 64
+a 206 821 76
+a 2 90 50
+a 174 51 87
+a 703 317 63
+a 344 820 92
+a 458 121 75
+a 27 46 84
+a 213 306 81
+a 738 521 58
+a 32 670 86
+a 18 27 37
+a 146 870 36
+a 200 212 45
+a 224 42 20
+a 646 684 23
+a 751 316 52
+a 550 756 23
+a 405 772 79
+a 35 120 85
+a 520 497 77
+a 44 72 28
+a 762 742 14
+a 138 15 67
+a 722 90 78
+a 672 14 18
+a 235 51 65
+a 608 856 90
+a 33 42 37
+a 105 14 22
+a 912 518 54
+a 330 516 10
+a 52 197 42
+a 535 194 63
+a 99 153 8
+a 47 134 69
+a 202 435 4
+a 714 867 9
+a 806 411 92
+a 654 485 95
+a 568 155 13
+a 532 343 93
+a 895 183 14
+a 326 364 7
+a 447 222 20
+a 762 796 80
+a 858 943 68
+a 423 811 17
+a 189 268 56
+a 49 451 45
+a 732 322 71
+a 15 2 56
+a 103 2 18
+a 435 48 8
+a 470 983 58
+a 945 582 31
+a 16 85 25
+a 94 7 52
+a 128 816 50
+a 594 51 12
+a 21 198 38
+a 13 725 37
+a 100 798 47
+a 121 950 7
+a 49 995 74
+a 22 660 17
+a 27 182 90
+a 476 751 24
+a 497 752 22
+a 725 580 18
+a 157 833 85
+a 294 178 26
+a 340 315 20
+a 43 320 11
+a 166 12 30
+a 51 324 23
+a 808 870 83
+a 28 104 12
+a 372 610 62
+a 216 174 26
+a 549 63 51
+a 670 166 87
+a 73 229 58
+a 284 372 21
+a 901 924 56
+a 398 385 66
+a 467 812 7
+a 124 798 34
+a 7 24 65
+a 961 153 24
+a 113 198 98
+a 288 55 23
+a 832 169 30
+a 857 517 17
+a 273 497 92
+a 61 101 63
+a 154 51 77
+a 407 508 52
+a 648 656 85
+a 969 328 1
+a 641 464 86
+a 669 692 91
+a 111 322 22
+a 6 252 10
+a 1 200 42
+a 319 91 18
+a 545 499 62
+a 333 64 15
+a 11 791 77
+a 65 347 39
+a 450 743 10
+a 28 26 64
+a 353 654 84
+a 247 330 95
+a 594 927 23
+a 343 146 95
+a 143 181 33
+a 219 220 53
+a 867 659 95
+a 219 624 71
+a 567 579 65
+a 631 70 37
+a 810 468 24
+a 437 620 87
+a 401 488 100
+a 17 483 97
+a 47 103 72
+a 477 147 23
+a 898 182 15
+a 74 168 22
+a 128 29 32
+a 211 54 58
+a 636 22 61
+a 31 39 67
+a 240 87 71
+a 4 100 77
+a 422 180 73
+a 38 639 89
+a 563 519 64
+a 784 302 27
+a 939 358 8
+a 848 776 90
+a 22 49 27
+a 272 24 47
+a 210 604 64
+a 977 581 68
+a 514 51 45
+a 8 120 89
+a 269 319 84
+a 784 963 44
+a 157 80 72
+a 427 574 56
+a 644 897 13
+a 55 39 19
+a 59 86 48
+a 286 448 42
+a 693 47 64
+a 163 239 44
+a 338 441 77
+a 216 331 1
+a 872 403 69
+a 152 159 34
+a 104 51 77
+a 200 342 76
+a 957 313 37
+a 459 479 25
+a 71 70 27
+a 787 94 35
+a 588 428 68
+a 14 95 87
+a 14 111 46
+a 748 332 62
+a 294 77 100
+a 292 710 7
+a 52 153 12
+a 220 85 64
+a 582 841 8
+a 789 759 74
+a 696 545 85
+a 477 971 69
+a 646 209 97
+a 203 222 22
+a 438 63 52
+a 224 817 31
+a 93 299 36
+a 676 837 78
+a 58 414 49
+a 73 122 9
+a 977 956 24
+a 131 355 95
+a 361 989 37
+a 447 540 87
+a 30 120 15
+a 9 26 73
+a 177 641 97
+a 283 190 2
+a 4 472 22
+a 76 114 100
+a 15 44 96
+a 18 697 41
+a 15 23 64
+a 182 250 52
+a 76 238 15
+a 489 564 70
+a 803 118 55
+a 849 776 86
+a 935 23 55
+a 148 292 87
+a 637 824 94
+a 878 325 75
+a 123 747 34
+a 424 583 52
+a 797 20 21
+a 637 237 82
+a 386 805 98
+a 91 236 76
+a 390 61 41
+a 554 780 97
+a 84 189 28
+a 1 187 87
+a 206 216 3
+a 796 434 75
+a 185 701 13
+a 696 813 54
+a 23 39 5
+a 59 251 1
+a 324 41 63
+a 102 321 21
+a 270 637 12
+a 390 212 17
+a 140 227 59
+a 179 430 82
+a 249 36 36
+a 941 419 27
+a 40 126 63
+a 238 255 61
+a 483 155 17
+a 65 35 7
+a 435 774 74
+a 878 967 19
+a 1 36 14
+a 68 418 53
+a 258 317 74
+a 349 423 12
+a 663 299 84
+a 79 129 21
+a 139 951 68
+a 8 4 86
+a 19 315 89
+a 275 723 48
+a 367 753 15
+a 824 523 92
+a 31 33 82
+a 196 184 85
+a 666 381 15
+a 938 215 86
+a 811 430 46
+a 513 227 21
+a 984 661 25
+a 3 19 84
+a 252 16 65
+a 95 318 24
+a 95 243 93
+a 938 400 26
+a 134 216 80
+a 74 243 88
+a 787 456 44
+a 33 53 35
+a 178 365 78
+a 490 644 16
+a 299 315 43
+a 650 65 28
+a 17 5 82
+a 26 150 46
+a 13 4 14
+a 80 93 42
+a 294 529 3
+a 927 663 62
+a 19 20 54
+a 263 170 46
+a 103 236 73
+a 118 988 52
+a 959 183 9
+a 52 25 43
+a 55 724 71
+a 849 569 5
+a 509 442 49
+a 684 785 32
+a 220 224 21
+a 153 364 20
+a 26 38 81
+a 750 189 26
+a 882 564 78
+a 667 32 25
+a 23 61 4
+a 45 8 37
+a 109 885 80
+a 72 313 65
+a 500 259 88
+a 189 837 46
+a 533 617 71
+a 435 407 29
+a 69 41 99
+a 137 655 11
+a 793 293 33
+a 352 341 8
+a 192 386 48
+a 200 360 78
+a 123 474 4
+a 177 43 65
+a 667 87 10
+a 656 15 24
+a 77 147 37
+a 974 758 50
+a 185 143 96
+a 555 690 33
+a 94 272 82
+a 363 102 30
+a 982 261 36
+a 752 318 64
+a 893 532 30
+a 37 285 44
+a 493 238 39
+a 807 532 82
+a 591 276 30
+a 604 792 28
+a 66 485 35
+a 13 197 93
+a 573 46 11
+a 698 334 52
+a 839 826 5
+a 412 839 82
+a 209 321 65
+a 770 374 7
+a 212 263 16
+a 524 575 52
+a 52 449 24
+a 153 605 100
+a 615 548 78
+a 397 650 21
+a 447 79 78
+a 160 189 62
+a 499 327 58
+a 935 309 42
+a 593 718 40
+a 877 398 44
+a 191 650 57
+a 95 245 34
+a 83 57 26
+a 453 63 91
+a 598 338 41
+a 551 273 26
+a 590 327 84
+a 599 280 2
+a 551 267 76
+a 799 334 48
+a 31 351 78
+a 411 62 84
+a 88 599 2
+a 122 690 19
+a 955 213 69
+a 11 225 18
+a 8 686 19
+a 578 283 21
+a 8 68 72
+a 80 305 13
+a 357 432 13
+a 442 690 97
+a 366 867 73
+a 24 34 88
+a 69 61 13
+a 86 968 23
+a 854 305 45
+a 38 421 41
+a 114 823 18
+a 790 632 51
+a 74 130 79
+a 110 421 51
+a 251 203 81
+a 361 239 50
+a 772 929 28
+a 818 915 36
+a 20 91 27
+a 733 250 38
+a 20 41 54
+a 158 501 44
+a 404 990 88
+a 445 559 8
+a 406 388 94
+a 84 3 54
+a 95 24 46
+a 20 11 95
+a 819 578 87
+a 856 586 38
+a 393 691 31
+a 8 745 48
+a 271 127 56
+a 385 844 55
+a 529 372 50
+a 309 657 82
+a 65 253 23
+a 464 89 30
+a 395 839 51
+a 86 819 82
+a 107 921 71
+a 61 255 18
+a 182 841 84
+a 305 411 42
+a 9 207 60
+a 645 358 88
+a 681 606 35
+a 119 868 93
+a 153 222 8
+a 791 666 48
+a 181 202 28
+a 22 6 49
+a 474 116 23
+a 206 881 37
+a 886 481 65
+a 937 609 60
+a 132 235 60
+a 438 231 4
+a 332 902 63
+a 34 26 71
+a 61 276 30
+a 118 979 56
+a 438 923 90
+a 732 839 59
+a 318 131 2
+a 402 315 37
+a 42 86 50
+a 328 75 67
+a 342 293 81
+a 808 754 20
+a 242 342 44
+a 105 244 60
+a 458 127 4
+a 660 142 84
+a 708 602 49
+a 16 8 51
+a 85 128 99
+a 647 302 88
+a 122 483 35
+a 690 17 91
+a 969 18 14
+a 252 971 52
+a 641 408 56
+a 362 422 90
+a 613 277 48
+a 940 611 100
+a 597 178 71
+a 764 929 67
+a 417 137 1
+a 97 958 34
+a 5 318 21
+a 391 93 16
+a 334 352 47
+a 620 123 55
+a 713 995 4
+a 191 294 76
+a 416 86 47
+a 723 672 59
+a 83 223 20
+a 655 637 16
+a 24 521 72
+a 2 46 38
+a 87 169 89
+a 310 798 90
+a 503 367 75
+a 195 399 79
+a 467 628 98
+a 660 489 50
+a 919 935 100
+a 179 866 98
+a 281 324 32
+a 19 42 82
+a 212 6 46
+a 738 332 61
+a 949 169 80
+a 16 94 65
+a 80 167 98
+a 36 135 25
+a 180 441 89
+a 583 602 92
+a 800 289 45
+a 824 677 98
+a 41 386 53
+a 1 684 30
+a 677 732 46
+a 679 550 68
+a 318 584 56
+a 106 288 11
+a 249 520 41
+a 489 614 64
+a 16 39 43
+a 3 8 37
+a 38 682 86
+a 43 706 17
+a 791 225 58
+a 610 835 30
+a 180 268 68
+a 164 966 100
+a 190 450 35
+a 604 436 47
+a 99 981 14
+a 755 533 25
+a 854 29 18
+a 9 173 51
+a 707 784 21
+a 679 403 36
+a 45 67 82
+a 72 245 98
+a 94 767 9
+a 680 658 86
+a 121 752 7
+a 48 4 57
+a 61 894 88
+a 336 907 85
+a 684 217 40
+a 20 35 48
+a 162 710 69
+a 68 36 12
+a 155 206 3
+a 474 963 28
+a 739 394 16
+a 590 580 7
+a 554 21 71
+a 6 116 28
+a 265 84 19
+a 140 17 56
+a 626 820 11
+a 12 118 12
+a 126 55 90
+a 274 482 68
+a 604 101 31
+a 305 398 69
+a 11 51 81
+a 147 56 44
+a 623 293 37
+a 178 732 56
+a 267 730 76
+a 615 325 38
+a 24 387 53
+a 207 431 32
+a 579 100 93
+a 568 242 53
+a 30 141 89
+a 51 377 20
+a 983 56 33
+a 9 77 11
+a 105 683 14
+a 553 94 95
+a 803 195 18
+a 25 77 97
+a 118 257 71
+a 258 8 36
+a 319 109 78
+a 899 96 73
+a 137 589 8
+a 93 15 58
+a 15 24 20
+a 358 24 7
+a 642 65 22
+a 59 379 79
+a 100 609 76
+a 5 149 71
+a 312 37 61
+a 710 438 88
+a 476 828 67
+a 94 216 55
+a 1000 704 2
+a 489 258 47
+a 48 20 75
+a 80 329 18
+a 3 216 84
+a 180 220 20
+a 201 91 28
+a 584 334 50
+a 531 63 20
+a 604 716 64
+a 1 189 27
+a 309 70 46
+a 336 829 74
+a 349 470 97
+a 11 29 46
+a 35 455 46
+a 533 174 35
+a 509 98 48
+a 7 110 82
+a 16 201 37
+a 237 779 9
+a 963 712 42
+a 86 172 62
+a 67 660 55
+a 668 428 37
+a 783 890 99
+a 874 805 58
+a 358 160 84
+a 706 471 75
+a 12 18 38
+a 303 173 69
+a 521 127 24
+a 424 291 35
+a 249 634 77
+a 13 56 82
+a 117 21 23
+a 281 929 22
+a 680 652 88
+a 733 491 85
+a 744 511 40
+a 15 562 76
+a 204 655 92
+a 51 88 53
+a 473 226 32
+a 835 262 56
+a 476 277 74
+a 17 22 33
+a 176 451 56
+a 86 541 6
+a 124 15 27
+a 49 616 6
+a 628 718 60
+a 355 62 59
+a 297 480 92
+a 596 84 32
+a 511 47 87
+a 26 189 3
+a 90 31 47
+a 93 362 96
+a 675 424 43
+a 491 58 52
+a 368 218 43
+a 131 246 26
+a 369 50 90
+a 414 156 47
+a 263 712 22
+a 31 37 66
+a 128 468 10
+a 107 222 97
+a 243 41 86
+a 752 462 91
+a 800 57 89
+a 486 576 65
+a 199 295 21
+a 513 138 8
+a 405 748 99
+a 56 379 41
+a 431 4 95
+a 645 588 81
+a 476 177 44
+a 30 202 65
+a 198 32 96
+a 520 317 78
+a 913 476 22
+a 721 571 29
+a 161 227 40
+a 269 454 44
+a 43 909 86
+a 11 188 1
+a 987 623 15
+a 678 330 26
+a 675 119 56
+a 41 15 6
+a 44 267 15
+a 212 971 1
+a 308 638 25
+a 66 21 33
+a 63 635 20
+a 290 601 97
+a 926 491 86
+a 35 71 2
+a 49 138 47
+a 151 642 40
+a 286 642 70
+a 428 801 59
+a 75 253 30
+a 200 239 52
+a 40 70 69
+a 124 171 86
+a 955 770 66
+a 986 343 5
+a 737 931 88
+a 88 176 19
+a 192 426 82
+a 134 974 73
+a 92 314 82
+a 425 165 41
+a 741 309 82
+a 449 250 42
+a 181 266 86
+a 18 34 64
+a 298 344 61
+a 300 880 100
+a 371 542 34
+a 54 137 31
+a 51 896 90
+a 11 25 62
+a 79 109 23
+a 692 200 21
+a 650 579 83
+a 421 150 67
+a 146 604 55
+a 301 831 38
+a 328 281 81
+a 372 496 74
+a 363 49 28
+a 571 587 83
+a 787 300 21
+a 93 89 36
+a 23 189 33
+a 119 369 35
+a 657 426 64
+a 149 584 38
+a 36 43 95
+a 318 312 37
+a 24 1 96
+a 285 273 40
+a 798 538 14
+a 43 636 38
+a 442 350 45
+a 147 77 51
+a 236 324 99
+a 688 916 43
+a 807 12 63
+a 615 442 58
+a 23 4 95
+a 42 4 80
+a 953 264 15
+a 8 3 16
+a 57 5 37
+a 205 114 94
+a 899 411 95
+a 639 321 35
+a 89 99 11
+a 43 579 7
+a 107 179 16
+a 281 60 82
+a 168 576 48
+a 600 124 5
+a 182 827 75
+a 11 220 9
+a 670 31 24
+a 847 39 56
+a 396 623 1
+a 548 749 67
+a 23 720 16
+a 24 751 18
+a 467 12 26
+a 17 11 88
+a 76 184 11
+a 222 259 98
+a 269 279 57
+a 311 18 41
+a 97 60 21
+a 467 646 63
+a 312 350 4
+a 652 867 88
+a 959 948 12
+a 488 355 43
+a 590 149 74
+a 115 128 2
+a 51 274 51
+a 432 612 19
+a 602 27 35
+a 835 944 10
+a 225 216 20
+a 424 572 64
+a 737 857 74
+a 2 37 98
+a 17 150 61
+a 417 70 53
+a 971 78 12
+a 383 259 18
+a 96 293 88
+a 174 12 97
+a 276 163 35
+a 81 290 75
+a 93 500 57
+a 49 687 55
+a 781 261 71
+a 252 396 69
+a 2 237 4
+a 720 681 22
+a 8 35 17
+a 546 424 94
+a 40 63 15
+a 438 47 5
+a 25 892 12
+a 972 559 22
+a 227 324 69
+a 41 653 40
+a 25 523 65
+a 12 81 28
+a 548 204 85
+a 958 75 100
+a 11 6 7
+a 191 293 37
+a 631 523 44
+a 608 185 27
+a 949 295 29
+a 127 250 24
+a 400 405 93
+a 69 125 14
+a 49 5 30
+a 510 965 44
+a 4 813 93
+a 219 930 32
+a 966 834 90
+a 952 917 98
+a 451 724 69
+a 59 127 99
+a 332 24 15
+a 125 414 12
+a 13 16 8
+a 301 216 42
+a 347 822 9
+a 996 273 100
+a 68 121 67
+a 11 372 37
+a 266 403 54
+a 800 283 100
+a 181 17 32
+a 74 375 34
+a 381 984 24
+a 152 189 1
+a 311 446 62
+a 143 138 75
+a 705 138 63
+a 913 968 6
+a 949 377 95
+a 88 112 98
+a 609 110 20
+a 860 227 15
+a 823 548 40
+a 132 330 8
+a 69 326 24
+a 974 126 80
+a 99 475 11
+a 618 45 11
+a 182 203 97
+a 710 91 18
+a 169 473 89
+a 834 679 31
+a 331 387 52
+a 565 980 22
+a 689 210 9
+a 153 197 76
+a 54 21 98
+a 258 217 95
+a 235 943 96
+a 469 170 83
+a 458 359 9
+a 57 31 43
+a 468 659 64
+a 273 262 6
+a 36 6 25
+a 290 579 78
+a 115 311 80
+a 301 904 96
+a 314 136 40
+a 119 247 77
+a 56 129 63
+a 25 881 50
+a 248 820 73
+a 474 49 74
+a 12 610 58
+a 833 73 100
+a 77 278 37
+a 488 363 99
+a 153 958 22
+a 316 70 78
+a 520 625 96
+a 127 538 63
+a 19 28 85
+a 121 11 35
+a 781 557 12
+a 151 622 31
+a 981 925 35
+a 132 196 28
+a 771 111 15
+a 681 322 21
+a 952 102 16
+a 8 48 96
+a 392 497 96
+a 969 650 55
+a 858 432 14
+a 349 984 60
+a 278 395 99
+a 441 567 83
+a 847 943 35
+a 248 642 30
+a 37 143 45
+a 939 364 28
+a 27 43 85
+a 2 49 9
+a 812 186 30
+a 400 37 92
+a 138 175 88
+a 404 143 37
+a 338 808 62
+a 346 278 11
+a 185 101 67
+a 770 207 80
+a 588 667 60
+a 1 34 49
+a 26 134 23
+a 392 44 85
+a 702 57 61
+a 74 868 99
+a 934 252 58
+a 188 125 17
+a 690 374 69
+a 305 430 63
+a 547 784 53
+a 108 601 44
+a 983 890 18
+a 791 27 27
+a 45 2 52
+a 94 111 4
+a 556 576 71
+a 230 171 99
+a 103 129 76
+a 193 695 96
+a 574 937 36
+a 82 85 97
+a 11 18 42
+a 34 47 91
+a 497 222 74
+a 666 196 72
+a 6 25 16
+a 115 175 1
+a 18 106 25
+a 151 162 49
+a 306 896 17
+a 568 526 17
+a 519 99 97
+a 136 646 80
+a 789 747 82
+a 43 18 45
+a 72 83 16
+a 440 317 2
+a 577 419 16
+a 972 31 27
+a 351 415 78
+a 107 141 52
+a 884 178 93
+a 906 430 57
+a 890 360 70
+a 383 562 52
+a 228 81 99
+a 36 150 65
+a 611 192 53
+a 699 464 70
+a 745 286 8
+a 102 258 40
+a 3 38 32
+a 183 422 70
+a 383 695 26
+a 701 376 13
+a 911 957 21
+a 942 406 86
+a 887 525 61
+a 79 81 47
+a 156 218 19
+a 107 82 51
+a 167 297 69
+a 936 625 2
+a 73 149 95
+a 26 55 89
+a 635 253 4
+a 241 227 100
+a 265 284 82
+a 244 617 95
+a 85 163 61
+a 26 12 31
+a 657 700 26
+a 343 620 4
+a 216 151 29
+a 487 614 59
+a 877 246 6
+a 47 83 3
+a 121 132 22
+a 451 357 40
+a 243 332 51
+a 593 220 55
+a 20 42 35
+a 98 94 71
+a 6 269 88
+a 92 984 98
+a 612 267 71
+a 804 349 53
+a 836 98 74
+a 22 472 73
+a 6 82 18
+a 176 149 99
+a 364 149 100
+a 939 277 72
+a 31 34 41
+a 79 101 99
+a 542 851 59
+a 47 59 19
+a 80 672 95
+a 282 534 60
+a 622 905 90
+a 620 428 4
+a 96 97 21
+a 269 522 67
+a 990 151 77
+a 112 827 63
+a 728 429 84
+a 311 39 10
+a 5 207 16
+a 558 331 24
+a 561 95 54
+a 61 391 81
+a 559 532 4
+a 58 102 86
+a 197 626 40
+a 488 279 16
+a 38 261 30
+a 357 1 69
+a 786 353 88
+a 423 2 59
+a 441 830 30
+a 31 32 63
+a 54 277 10
+a 310 694 74
+a 667 175 61
+a 4 69 53
+a 398 304 52
+a 553 326 85
+a 937 968 29
+a 184 533 21
+a 617 636 89
+a 5 50 31
+a 19 486 25
+a 859 861 43
+a 68 78 78
+a 455 363 23
+a 682 939 24
+a 220 650 96
+a 70 222 75
+a 16 97 69
+a 140 60 53
+a 838 166 90
+a 134 131 73
+a 33 86 26
+a 480 809 100
+a 986 213 14
+a 11 3 39
+a 17 43 67
+a 545 217 64
+a 682 421 63
+a 206 464 27
+a 497 62 34
+a 392 99 92
+a 609 51 90
+a 87 158 40
+a 211 224 16
+a 291 26 62
+a 31 84 59
+a 8 39 91
+a 263 179 88
+a 276 192 87
+a 678 254 32
+a 25 6 87
+a 258 40 31
+a 885 977 81
+a 199 51 29
+a 238 312 60
+a 171 145 38
+a 849 245 64
+a 196 636 4
+a 26 27 32
+a 71 99 34
+a 334 622 44
+a 446 572 90
+a 538 278 42
+a 682 519 65
+a 45 44 36
+a 426 463 68
+a 57 81 4
+a 48 77 95
+a 195 918 99
+a 751 370 38
+a 602 887 90
+a 150 297 48
+a 526 735 55
+a 12 22 72
+a 68 395 72
+a 559 233 99
+a 122 464 71
+a 25 207 13
+a 449 53 28
+a 273 630 84
+a 963 657 21
+a 32 13 59
+a 47 129 70
+a 197 615 3
+a 492 565 58
+a 82 70 57
+a 639 801 89
+a 35 15 83
+a 61 118 34
+a 590 929 1
+a 24 9 20
+a 57 138 2
+a 722 862 28
+a 12 41 38
+a 38 11 5
+a 208 376 41
+a 387 417 77
+a 978 530 74
+a 85 591 74
+a 35 65 1
+a 448 221 86
+a 67 567 46
+a 908 49 46
+a 122 44 77
+a 39 161 11
+a 162 390 72
+a 41 225 24
+a 571 876 32
+a 293 848 44
+a 13 3 92
+a 102 632 16
+a 373 746 26
+a 44 76 85
+a 52 948 80
+a 15 670 75
+a 730 886 62
+a 276 243 34
+a 12 331 66
+a 754 901 87
+a 448 310 67
+a 18 26 53
+a 264 322 45
+a 591 537 62
+a 716 767 71
+a 478 5 96
+a 68 9 25
+a 163 181 13
+a 334 491 39
+a 182 467 33
+a 6 30 9
+a 461 377 82
+a 34 48 78
+a 564 519 1
+a 731 76 25
+a 957 651 50
+a 896 418 34
+a 177 322 62
+a 594 30 54
+a 338 198 45
+a 93 732 14
+a 136 135 14
+a 844 487 9
+a 426 353 91
+a 115 89 44
+a 30 73 4
+a 200 345 82
+a 269 385 25
+a 110 418 51
+a 117 136 100
+a 107 41 35
+a 109 176 26
+a 288 297 86
+a 557 503 43
+a 349 182 72
+a 271 840 23
+a 82 72 100
+a 725 829 70
+a 54 68 79
+a 846 490 57
+a 105 199 87
+a 456 138 40
+a 575 838 20
+a 759 516 24
+a 949 816 57
+a 41 83 12
+a 126 12 61
+a 273 38 41
+a 96 375 79
+a 39 22 54
+a 28 266 92
+a 263 342 98
+a 457 32 67
+a 54 443 64
+a 613 336 44
+a 294 699 70
+a 676 896 56
+a 23 111 85
+a 166 573 63
+a 217 292 4
+a 446 950 96
+a 77 230 97
+a 152 231 22
+a 95 438 59
+a 79 839 64
+a 373 479 38
+a 517 1000 11
+a 34 428 53
+a 224 346 53
+a 31 85 68
+a 27 435 96
+a 38 966 51
+a 874 236 82
+a 21 18 85
+a 83 103 96
+a 72 930 30
+a 650 853 54
+a 64 35 58
+a 496 444 51
+a 372 74 79
+a 847 215 67
+a 933 595 91
+a 5 310 16
+a 10 119 28
+a 553 516 70
+a 4 199 77
+a 518 910 79
+a 476 488 23
+a 124 330 8
+a 83 5 94
+a 533 186 89
+a 81 751 57
+a 63 42 85
+a 37 187 31
+a 140 418 6
+a 319 897 77
+a 280 115 40
+a 2 76 2
+a 584 797 90
+a 786 680 75
+a 800 396 64
+a 36 16 14
+a 604 637 55
+a 220 346 31
+a 332 237 20
+a 850 21 77
+a 333 471 28
+a 281 192 20
+a 645 549 82
+a 109 501 89
+a 306 946 23
+a 155 713 80
+a 54 25 33
+a 86 33 91
+a 836 785 42
+a 990 470 92
+a 641 717 22
+a 24 397 85
+a 670 423 34
+a 476 172 9
+a 309 430 79
+a 223 84 4
+a 602 306 85
+a 513 974 90
+a 746 10 6
+a 20 52 89
+a 507 219 60
+a 800 401 99
+a 505 27 58
+a 951 305 29
+a 637 908 70
+a 82 73 57
+a 328 462 75
+a 12 510 95
+a 13 703 16
+a 808 266 89
+a 923 200 4
+a 95 615 70
+a 781 191 55
+a 535 255 49
+a 6 143 61
+a 19 113 91
+a 151 325 93
+a 134 488 62
+a 998 504 15
+a 13 12 93
+a 51 376 22
+a 338 647 60
+a 607 371 88
+a 635 592 100
+a 928 740 88
+a 38 72 64
+a 17 3 55
+a 739 570 6
+a 553 510 31
+a 488 500 40
+a 45 337 52
+a 139 589 93
+a 15 72 22
+a 530 648 9
+a 742 452 12
+a 626 718 77
+a 182 581 89
+a 153 535 58
+a 640 375 50
+a 427 46 53
+a 299 11 69
+a 884 262 13
+a 641 779 35
+a 35 41 13
+a 120 89 60
+a 226 23 70
+a 294 754 12
+a 767 502 91
+a 52 56 30
+a 192 321 75
+a 255 367 34
+a 2 9 28
+a 47 174 18
+a 347 201 53
+a 952 839 85
+a 342 926 25
+a 48 64 35
+a 254 228 70
+a 351 424 65
+a 571 769 39
+a 5 143 15
+a 174 594 30
+a 39 33 91
+a 84 420 92
+a 426 475 12
+a 532 663 67
+a 37 147 43
+a 238 156 94
+a 508 863 20
+a 14 152 93
+a 354 454 38
+a 495 518 76
+a 699 711 70
+a 322 664 28
+a 613 841 35
+a 135 482 39
+a 662 57 92
+a 690 103 4
+a 436 276 27
+a 42 33 30
+a 124 281 30
+a 51 62 38
+a 237 377 6
+a 111 232 3
+a 345 546 53
+a 42 24 37
+a 350 673 39
+a 28 51 48
+a 29 17 29
+a 252 68 79
+a 971 540 35
+a 31 45 15
+a 273 564 96
+a 660 749 91
+a 452 564 38
+a 294 944 63
+a 196 110 25
+a 358 552 43
+a 536 463 45
+a 222 841 31
+a 345 748 7
+a 814 561 91
+a 20 120 61
+a 10 59 34
+a 190 268 53
+a 373 8 20
+a 542 586 69
+a 885 798 63
+a 35 303 92
+a 563 428 2
+a 627 261 90
+a 218 96 44
+a 22 41 33
+a 121 253 68
+a 177 372 70
+a 830 564 87
+a 300 798 77
+a 22 93 53
+a 470 26 48
+a 399 987 6
+a 31 58 5
+a 119 204 46
+a 457 74 41
+a 15 9 35
+a 387 412 23
+a 193 36 1
+a 524 50 15
+a 712 880 38
+a 75 131 51
+a 714 708 96
+a 872 965 23
+a 57 108 41
+a 133 331 41
+a 2 915 89
+a 218 339 90
+a 81 604 93
+a 277 724 73
+a 2 819 8
+a 4 454 51
+a 345 578 17
+a 43 20 96
+a 56 110 4
+a 177 257 53
+a 418 692 15
+a 686 467 9
+a 164 188 58
+a 239 761 38
+a 27 6 50
+a 590 987 98
+a 49 232 33
+a 249 513 100
+a 792 928 52
+a 28 29 68
+a 92 400 93
+a 11 450 20
+a 253 505 38
+a 592 65 76
+a 488 568 69
+a 609 29 82
+a 234 826 77
+a 1000 803 29
+a 4 72 54
+a 29 603 22
+a 35 520 23
+a 493 324 75
+a 621 514 51
+a 618 238 3
+a 618 998 67
+a 979 34 70
+a 173 222 99
+a 403 350 82
+a 6 50 99
+a 39 184 83
+a 83 163 16
+a 373 56 18
+a 212 553 91
+a 14 25 67
+a 19 147 60
+a 222 226 80
+a 37 157 83
+a 430 11 31
+a 647 816 32
+a 580 562 61
+a 675 232 47
+a 547 78 84
+a 713 882 43
+a 398 462 77
+a 336 430 24
+a 998 154 51
+a 296 539 35
+a 13 45 2
+a 955 111 24
+a 129 114 13
+a 458 824 6
+a 891 667 88
+a 87 101 2
+a 211 824 18
+a 387 813 3
+a 406 102 63
+a 473 786 80
+a 663 539 45
+a 87 130 84
+a 29 175 98
+a 132 144 52
+a 571 254 36
+a 840 713 32
+a 27 109 44
+a 671 42 40
+a 362 1 75
+a 47 49 84
+a 105 160 83
+a 414 956 40
+a 501 816 84
+a 242 761 78
+a 1 58 70
+a 69 423 53
+a 590 530 81
+a 963 13 20
+a 496 317 14
+a 211 540 25
+a 45 366 27
+a 101 58 60
+a 370 58 26
+a 702 732 91
+a 95 267 58
+a 103 188 28
+a 92 122 50
+a 24 7 60
+a 79 454 62
+a 243 647 24
+a 401 318 44
+a 840 691 64
+a 594 489 83
+a 6 282 93
+a 58 801 92
+a 456 58 36
+a 57 114 71
+a 90 208 9
+a 454 294 88
+a 61 209 7
+a 43 164 47
+a 383 57 31
+a 132 361 23
+a 147 393 72
+a 939 44 37
+a 37 109 85
+a 207 32 24
+a 293 395 4
+a 105 278 5
+a 706 972 58
+a 944 683 83
+a 937 976 95
+a 922 215 89
+a 844 648 6
+a 37 488 27
+a 765 55 3
+a 860 803 68
+a 32 401 96
+a 430 474 40
+a 242 896 43
+a 732 944 3
+a 326 385 96
+a 222 708 21
+a 519 914 65
+a 20 119 1
+a 680 749 9
+a 643 113 90
+a 891 119 90
+a 713 439 3
+a 263 365 32
+a 109 132 59
+a 757 19 42
+a 892 335 10
+a 1 364 43
+a 18 54 50
+a 210 850 73
+a 63 70 49
+a 86 428 44
+a 988 804 48
+a 137 302 52
+a 953 336 84
+a 391 416 71
+a 116 208 9
+a 451 696 7
+a 683 579 24
+a 562 538 7
+a 292 594 48
+a 666 605 48
+a 986 586 61
+a 33 95 20
+a 273 332 79
+a 29 11 41
+a 194 180 73
+a 491 857 9
+a 59 995 99
+a 470 523 38
+a 491 274 42
+a 8 322 48
+a 525 666 26
+a 333 227 89
+a 599 982 90
+a 223 988 93
+a 5 332 2
+a 608 209 94
+a 698 378 90
+a 768 138 89
+a 251 465 17
+a 699 742 44
+a 35 232 9
+a 728 801 3
+a 257 656 52
+a 375 286 23
+a 14 181 31
+a 218 424 71
+a 954 977 1
+a 71 259 63
+a 789 618 6
+a 610 456 83
+a 21 27 87
+a 47 38 35
+a 162 219 4
+a 671 407 66
+a 830 729 36
+a 311 345 60
+a 16 46 81
+a 355 322 75
+a 758 393 32
+a 675 140 18
+a 141 258 82
+a 51 11 77
+a 247 473 9
+a 741 672 3
+a 400 238 98
+a 100 120 59
+a 194 217 20
+a 9 307 86
+a 613 54 56
+a 772 161 49
+a 623 719 90
+a 838 868 94
+a 84 28 2
+a 565 145 97
+a 40 12 13
+a 274 84 96
+a 551 39 43
+a 387 186 66
+a 124 131 23
+a 548 1 54
+a 150 241 6
+a 313 364 41
+a 298 942 2
+a 268 292 73
+a 80 230 64
+a 400 739 12
+a 45 41 23
+a 346 623 57
+a 734 700 47
+a 607 563 91
+a 401 55 74
+a 58 89 67
+a 150 236 22
+a 487 348 4
+a 337 258 51
+a 180 459 84
+a 660 294 66
+a 476 491 72
+a 14 7 38
+a 642 23 63
+a 447 263 39
+a 63 57 81
+a 458 115 4
+a 607 490 87
+a 29 10 77
+a 798 869 49
+a 282 806 83
+a 60 473 75
+a 60 642 59
+a 729 285 30
+a 998 208 57
+a 3 287 94
+a 685 281 91
+a 445 766 12
+a 401 234 37
+a 224 305 29
+a 464 476 28
+a 33 190 55
+a 3 113 34
+a 11 28 2
+a 333 133 86
+a 817 438 85
+a 198 261 11
+a 118 226 12
+a 128 302 75
+a 21 57 15
+a 233 34 75
+a 271 365 25
+a 198 8 48
+a 544 308 77
+a 67 419 10
+a 690 260 93
+a 903 619 31
+a 837 255 67
+a 267 365 45
+a 753 339 38
+a 429 558 70
+a 36 101 63
+a 462 211 77
+a 243 46 93
+a 113 88 79
+a 528 249 73
+a 220 257 68
+a 16 13 61
+a 362 740 63
+a 75 82 24
+a 204 790 93
+a 385 933 8
+a 260 767 50
+a 446 782 14
+a 109 437 16
+a 127 795 22
+a 43 85 63
+a 734 729 63
+a 102 289 24
+a 70 859 22
+a 19 69 5
+a 35 244 4
+a 325 669 1
+a 949 204 32
+a 521 120 28
+a 11 34 40
+a 415 4 59
+a 632 959 65
+a 235 839 67
+a 688 904 59
+a 521 136 39
+a 19 38 86
+a 15 39 40
+a 695 54 59
+a 751 365 86
+a 36 228 41
+a 598 483 74
+a 887 665 58
+a 867 291 15
+a 74 96 73
+a 264 100 82
+a 457 184 88
+a 611 631 57
+a 852 922 85
+a 49 106 83
+a 149 109 74
+a 477 154 74
+a 367 215 15
+a 504 486 54
+a 151 241 92
+a 227 313 31
+a 460 237 37
+a 357 18 61
+a 437 146 12
+a 81 399 71
+a 397 470 3
+a 3 307 62
+a 419 753 37
+a 166 145 89
+a 284 20 16
+a 196 385 65
+a 518 590 69
+a 837 612 60
+a 125 138 57
+a 184 249 25
+a 777 55 93
+a 341 285 86
+a 43 587 65
+a 715 59 47
+a 53 26 11
+a 27 406 76
+a 99 55 3
+a 109 281 72
+a 650 346 18
+a 236 15 42
+a 26 24 59
+a 196 270 78
+a 153 670 79
+a 123 15 60
+a 168 318 68
+a 885 790 85
+a 386 647 60
+a 158 638 100
+a 7 68 38
+a 225 376 78
+a 906 984 6
+a 177 20 7
+a 504 378 22
+a 449 459 32
+a 67 678 34
+a 461 110 98
+a 721 399 45
+a 123 940 21
+a 85 213 79
+a 522 104 54
+a 288 192 4
+a 84 104 40
+a 289 393 67
+a 374 440 77
+a 96 613 68
+a 176 666 40
+a 81 127 84
+a 183 443 10
+a 253 534 50
+a 831 276 39
+a 64 149 75
+a 764 1 87
+a 13 376 10
+a 430 192 29
+a 803 177 44
+a 683 200 58
+a 852 193 4
+a 93 182 3
+a 291 37 18
+a 122 93 52
+a 167 72 2
+a 1 18 99
+a 25 473 40
+a 39 557 44
+a 787 572 14
+a 607 406 68
+a 20 5 72
+a 25 26 74
+a 67 510 27
+a 322 785 31
+a 73 80 47
+a 653 67 49
+a 162 200 84
+a 612 397 44
+a 45 219 68
+a 721 498 20
+a 18 16 85
+a 41 170 53
+a 389 504 66
+a 7 392 79
+a 892 62 25
+a 61 75 86
+a 114 2 14
+a 470 323 93
+a 814 274 27
+a 380 591 27
+a 42 89 16
+a 137 131 71
+a 52 843 24
+a 843 794 54
+a 212 901 60
+a 5 44 11
+a 630 994 91
+a 364 832 54
+a 37 498 18
+a 813 920 88
+a 17 34 76
+a 45 692 63
+a 420 806 25
+a 37 21 6
+a 465 28 88
+a 475 157 19
+a 801 294 60
+a 93 104 29
+a 409 325 42
+a 77 173 81
+a 402 179 41
+a 663 320 83
+a 328 38 96
+a 120 561 39
+a 360 822 60
+a 22 42 24
+a 214 12 73
+a 430 687 84
+a 602 15 30
+a 8 106 39
+a 255 105 94
+a 871 424 11
+a 291 211 45
+a 123 25 23
+a 168 841 22
+a 927 506 3
+a 35 88 9
+a 17 200 92
+a 119 395 16
+a 155 534 26
+a 808 469 38
+a 71 114 83
+a 350 322 34
+a 36 57 33
+a 430 2 30
+a 591 286 9
+a 264 827 64
+a 207 366 58
+a 17 74 54
+a 101 151 62
+a 159 581 20
+a 935 585 45
+a 430 623 44
+a 414 452 33
+a 562 188 26
+a 29 120 97
+a 272 329 43
+a 169 780 81
+a 554 731 69
+a 304 577 74
+a 27 237 33
+a 104 280 45
+a 988 291 34
+a 313 428 68
+a 576 899 7
+a 873 273 73
+a 88 147 24
+a 8 6 48
+a 300 21 78
+a 749 42 61
+a 37 15 47
+a 835 274 8
+a 331 73 93
+a 710 750 59
+a 724 983 48
+a 64 83 41
+a 88 186 26
+a 492 151 55
+a 913 787 92
+a 628 533 67
+a 309 112 19
+a 218 410 24
+a 245 906 77
+a 442 249 8
+a 52 2 99
+a 125 296 6
+a 67 593 87
+a 948 850 99
+a 595 683 52
+a 22 84 26
+a 286 542 66
+a 649 417 83
+a 77 113 47
+a 118 472 5
+a 186 544 7
+a 337 498 86
+a 169 345 8
+a 79 85 19
+a 148 16 40
+a 913 499 75
+a 576 681 88
+a 74 12 3
+a 161 33 6
+a 261 132 41
+a 109 449 46
+a 112 8 4
+a 453 691 10
+a 233 793 43
+a 11 42 64
+a 97 452 32
+a 891 888 73
+a 199 4 28
+a 310 473 16
+a 491 496 39
+a 333 644 12
+a 206 645 40
+a 239 259 53
+a 278 461 14
+a 439 598 72
+a 214 843 14
+a 58 16 13
+a 82 894 42
+a 51 30 90
+a 55 323 9
+a 601 883 10
+a 197 668 53
+a 237 917 13
+a 37 59 6
+a 155 435 58
+a 134 453 37
+a 66 424 90
+a 366 184 62
+a 685 739 69
+a 192 756 45
+a 124 243 85
+a 32 56 42
+a 173 514 32
+a 770 929 84
+a 256 116 59
+a 91 128 58
+a 91 8 7
+a 20 73 28
+a 129 489 9
+a 262 602 33
+a 572 300 87
+a 651 473 83
+a 230 363 38
+a 496 473 27
+a 137 138 2
+a 787 351 72
+a 110 431 57
+a 150 758 14
+a 268 314 48
+a 40 19 48
+a 36 222 63
+a 241 703 44
+a 316 724 77
+a 448 248 29
+a 105 119 66
+a 76 949 24
+a 19 3 60
+a 92 484 1
+a 360 767 42
+a 768 609 80
+a 164 844 59
+a 77 203 5
+a 286 615 71
+a 413 868 5
+a 226 85 90
+a 917 50 75
+a 42 619 90
+a 700 914 94
+a 28 25 76
+a 1 490 47
+a 34 289 59
+a 439 481 37
+a 944 488 5
+a 76 458 56
+a 9 199 39
+a 805 373 61
+a 258 949 79
+a 48 547 41
+a 98 673 1
+a 778 638 9
+a 727 619 11
+a 553 614 86
+a 141 215 48
+a 412 585 18
+a 141 374 51
+a 109 70 7
+a 207 281 42
+a 462 621 96
+a 558 686 100
+a 981 251 60
+a 789 547 52
+a 282 323 24
+a 28 247 83
+a 392 310 60
+a 108 50 16
+a 19 8 59
+a 418 785 65
+a 939 742 39
+a 43 61 74
+a 298 439 28
+a 66 35 87
+a 995 562 36
+a 941 903 92
+a 204 235 75
+a 183 39 60
+a 366 20 99
+a 64 159 49
+a 169 589 15
+a 329 988 58
+a 379 469 46
+a 171 669 67
+a 61 100 48
+a 367 139 16
+a 483 182 67
+a 128 123 71
+a 2 20 63
+a 865 767 93
+a 70 454 33
+a 878 128 17
+a 810 55 27
+a 952 798 25
+a 263 281 7
+a 344 35 6
+a 756 267 41
+a 129 37 7
+a 809 837 15
+a 26 231 86
+a 910 283 46
+a 989 637 40
+a 310 521 23
+a 418 241 25
+a 390 675 64
+a 698 100 66
+a 137 21 70
+a 277 302 3
+a 998 107 93
+a 751 165 92
+a 60 62 52
+a 544 3 67
+a 66 15 27
+a 325 350 35
+a 354 780 50
+a 26 49 60
+a 101 282 96
+a 326 412 87
+a 64 48 42
+a 231 93 80
+a 243 107 76
+a 67 793 51
+a 268 807 68
+a 41 38 29
+a 124 283 22
+a 534 311 20
+a 857 636 29
+a 24 88 80
+a 741 366 34
+a 714 637 10
+a 474 71 11
+a 457 288 58
+a 618 887 92
+a 795 369 100
+a 46 298 100
+a 486 356 77
+a 479 707 89
+a 275 316 63
+a 371 410 19
+a 404 965 25
+a 391 52 65
+a 299 571 84
+a 1 21 44
+a 27 59 68
+a 545 274 34
+a 469 614 23
+a 13 164 13
+a 647 983 30
+a 6 16 9
+a 159 72 28
+a 494 889 17
+a 801 455 40
+a 65 861 62
+a 247 357 87
+a 430 792 6
+a 52 634 90
+a 355 115 1
+a 152 253 10
+a 303 2 82
+a 936 2 11
+a 948 670 10
+a 132 417 70
+a 135 142 21
+a 220 107 99
+a 841 553 54
+a 741 516 53
+a 10 223 82
+a 689 834 17
+a 339 154 48
+a 26 80 94
+a 628 175 52
+a 695 205 56
+a 179 71 59
+a 116 335 68
+a 386 685 33
+a 461 348 73
+a 496 366 96
+a 313 973 16
+a 33 225 9
+a 146 238 59
+a 464 358 33
+a 194 929 25
+a 926 335 70
+a 140 120 40
+a 106 473 91
+a 656 780 55
+a 8 418 56
+a 54 956 45
+a 101 237 71
+a 452 475 41
+a 25 97 45
+a 211 841 4
+a 8 751 87
+a 108 933 23
+a 916 380 35
+a 378 312 47
+a 308 124 19
+a 320 218 46
+a 829 488 44
+a 156 176 14
+a 84 163 45
+a 32 148 66
+a 304 153 57
+a 225 600 22
+a 458 995 63
+a 876 145 22
+a 670 929 40
+a 497 459 10
+a 27 16 44
+a 4 808 61
+a 55 484 41
+a 831 296 92
+a 472 692 48
+a 41 168 30
+a 69 72 98
+a 147 262 3
+a 77 111 99
+a 364 2 7
+a 515 298 89
+a 670 371 80
+a 31 590 72
+a 64 101 78
+a 185 257 3
+a 852 741 53
+a 509 569 84
+a 99 631 86
+a 321 592 42
+a 16 98 49
+a 66 241 69
+a 739 462 18
+a 452 614 55
+a 411 764 62
+a 2 26 73
+a 316 384 45
+a 19 37 63
+a 19 43 10
+a 47 74 12
+a 262 508 37
+a 148 217 20
+a 110 877 24
+a 533 86 75
+a 212 19 47
+a 313 37 56
+a 31 618 75
+a 253 290 54
+a 41 5 17
+a 451 82 37
+a 144 56 68
+a 50 19 66
+a 20 403 30
+a 4 59 53
+a 836 478 77
+a 163 422 44
+a 200 175 3
+a 256 929 92
+a 358 640 20
+a 509 923 100
+a 481 511 28
+a 688 676 94
+a 719 713 23
+a 54 145 77
+a 431 19 1
+a 481 994 11
+a 33 63 69
+a 69 453 76
+a 100 581 28
+a 160 933 6
+a 17 41 71
+a 184 241 3
+a 10 274 78
+a 16 403 37
+a 995 318 49
+a 492 474 75
+a 71 13 48
+a 352 144 44
+a 20 552 81
+a 139 691 54
+a 310 6 86
+a 701 39 93
+a 593 64 98
+a 137 238 52
+a 19 243 12
+a 440 46 18
+a 983 83 77
+a 245 19 99
+a 926 38 38
+a 10 554 66
+a 21 15 80
+a 199 362 18
+a 307 446 8
+a 627 484 30
+a 90 274 34
+a 348 592 93
+a 196 734 78
+a 167 224 73
+a 610 800 54
+a 908 575 31
+a 695 883 25
+a 158 781 88
+a 19 63 8
+a 665 511 40
+a 990 165 81
+a 612 729 64
+a 232 743 58
+a 238 53 11
+a 165 197 56
+a 225 429 61
+a 407 11 95
+a 666 361 31
+a 316 633 8
+a 7 6 89
+a 661 358 50
+a 29 87 57
+a 143 947 94
+a 117 201 62
+a 455 507 37
+a 608 957 69
+a 849 514 66
+a 494 943 13
+a 47 7 20
+a 161 535 72
+a 743 500 77
+a 517 423 50
+a 504 391 81
+a 744 650 22
+a 59 66 72
+a 107 383 19
+a 73 114 92
+a 477 625 80
+a 101 28 45
+a 641 776 37
+a 721 663 49
+a 231 244 53
+a 426 261 69
+a 453 558 6
+a 355 777 10
+a 25 638 96
+a 69 227 81
+a 317 354 76
+a 336 928 32
+a 221 735 98
+a 205 324 84
+a 753 229 38
+a 38 144 24
+a 336 28 28
+a 405 535 72
+a 416 31 60
+a 704 606 39
+a 67 82 23
+a 82 207 32
+a 448 902 47
+a 389 128 88
+a 439 442 2
+a 455 578 61
+a 468 83 55
+a 53 314 53
+a 63 253 53
+a 69 52 2
+a 135 826 73
+a 569 345 15
+a 28 30 95
+a 339 598 56
+a 714 6 4
+a 123 415 83
+a 985 910 60
+a 850 163 84
+a 234 135 4
+a 699 700 38
+a 843 120 74
+a 946 353 79
+a 770 526 83
+a 166 587 98
+a 187 724 87
+a 556 569 13
+a 780 602 65
+a 42 53 38
+a 135 167 4
+a 507 298 30
+a 510 325 95
+a 294 747 94
+a 71 799 36
+a 174 331 24
+a 30 14 96
+a 508 40 100
+a 670 695 88
+a 620 849 70
+a 693 519 34
+a 28 18 67
+a 68 277 28
+a 78 19 64
+a 84 874 87
+a 765 538 38
+a 978 867 41
+a 409 924 90
+a 302 747 87
+a 20 44 48
+a 38 101 56
+a 397 717 57
+a 604 408 29
+a 3 37 80
+a 70 15 52
+a 26 43 76
+a 158 27 95
+a 312 46 5
+a 39 180 15
+a 508 32 38
+a 655 100 45
+a 696 234 66
+a 201 330 15
+a 73 96 97
+a 87 639 40
+a 456 783 42
+a 215 576 33
+a 31 46 42
+a 30 192 43
+a 797 84 68
+a 823 544 23
+a 246 701 62
+a 12 766 34
+a 372 316 68
+a 197 277 17
+a 320 244 3
+a 494 657 89
+a 569 465 100
+a 585 481 98
+a 40 215 20
+a 267 205 48
+a 394 279 75
+a 757 270 27
+a 466 580 74
+a 256 68 39
+a 915 828 56
+a 13 6 2
+a 160 63 10
+a 56 353 71
+a 397 747 87
+a 868 398 62
+a 100 112 83
+a 158 630 93
+a 765 601 94
+a 298 376 89
+a 942 577 77
+a 853 326 57
+a 713 431 92
+a 37 124 76
+a 23 184 86
+a 37 252 90
+a 44 129 6
+a 943 150 50
+a 394 316 11
+a 853 863 90
+a 714 611 50
+a 86 194 37
+a 10 120 79
+a 574 48 25
+a 800 99 91
+a 564 254 69
+a 67 149 76
+a 153 276 94
+a 48 45 74
+a 109 74 10
+a 122 103 42
+a 232 981 17
+a 543 508 44
+a 113 26 13
+a 16 141 44
+a 59 852 94
+a 672 111 86
+a 339 451 8
+a 87 66 37
+a 212 194 7
+a 659 932 38
+a 698 798 25
+a 91 119 32
+a 212 242 11
+a 290 392 50
+a 722 725 42
+a 174 925 3
+a 361 29 94
+a 548 521 41
+a 8 1 2
+a 44 456 27
+a 525 572 26
+a 149 533 9
+a 30 265 27
+a 315 161 36
+a 761 630 100
+a 188 234 54
+a 633 967 59
+a 968 922 21
+a 3 96 65
+a 524 547 22
+a 359 245 34
+a 65 288 53
+a 40 85 15
+a 219 306 36
+a 134 729 64
+a 607 335 12
+a 718 942 35
+a 700 331 7
+a 362 139 70
+a 644 100 94
+a 503 386 46
+a 87 625 96
+a 740 589 3
+a 398 467 58
+a 32 527 70
+a 92 707 77
+a 977 311 76
+a 39 79 35
+a 804 468 12
+a 200 745 57
+a 868 486 79
+a 111 185 83
+a 26 9 45
+a 200 94 55
+a 127 508 63
+a 656 54 98
+a 520 848 22
+a 490 971 1
+a 26 46 50
+a 438 209 53
+a 99 421 87
+a 883 594 33
+a 25 118 88
+a 964 782 25
+a 688 159 72
+a 13 11 43
+a 23 20 45
+a 490 122 40
+a 491 724 50
+a 460 278 55
+a 122 125 7
+a 175 125 22
+a 378 341 11
+a 355 89 10
+a 148 400 33
+a 406 991 59
+a 100 215 35
+a 638 56 67
+a 281 214 9
+a 682 447 32
+a 72 804 1
+a 10 40 35
+a 250 13 64
+a 12 980 25
+a 439 565 42
+a 367 415 70
+a 931 12 29
+a 998 140 30
+a 601 627 68
+a 979 487 50
+a 63 127 90
+a 171 168 90
+a 398 771 10
+a 231 772 78
+a 111 10 100
+a 789 780 60
+a 73 63 82
+a 384 268 14
+a 990 920 18
+a 731 367 16
+a 55 692 21
+a 77 329 18
+a 819 777 60
+a 717 574 37
+a 344 537 58
+a 139 417 43
+a 558 210 46
+a 189 788 37
+a 626 215 40
+a 401 820 93
+a 175 177 55
+a 182 564 51
+a 230 252 92
+a 505 963 86
+a 402 625 52
+a 64 690 62
+a 8 41 18
+a 226 481 43
+a 119 58 90
+a 305 733 20
+a 165 837 91
+a 140 177 58
+a 87 333 26
+a 181 428 44
+a 948 337 25
+a 19 550 66
+a 185 869 58
+a 127 603 15
+a 341 643 41
+a 978 544 84
+a 309 751 5
+a 74 546 84
+a 89 380 53
+a 29 27 32
+a 415 296 98
+a 494 959 78
+a 715 710 91
+a 179 12 3
+a 9 23 30
+a 489 920 32
+a 213 919 35
+a 22 373 95
+a 591 564 81
+a 907 201 73
+a 129 998 2
+a 31 14 5
+a 713 171 36
+a 416 34 84
+a 220 849 50
+a 346 466 13
+a 24 481 71
+a 9 689 93
+a 324 635 71
+a 42 139 87
+a 159 754 62
+a 682 790 95
+a 319 282 32
+a 419 905 46
+a 59 89 10
+a 247 28 94
+a 408 115 77
+a 458 848 70
+a 20 19 7
+a 30 219 38
+a 489 421 35
+a 568 463 23
+a 24 21 98
+a 30 48 58
+a 487 234 19
+a 622 374 2
+a 995 364 48
+a 246 342 96
+a 421 268 38
+a 268 783 28
+a 220 63 58
+a 687 472 34
+a 193 25 95
+a 503 136 27
+a 19 39 26
+a 79 23 49
+a 220 941 1
diff --git a/src/boost/libs/graph/example/max_flow8.dat b/src/boost/libs/graph/example/max_flow8.dat
new file mode 100644
index 000000000..8da874c2e
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow8.dat
@@ -0,0 +1,8004 @@
+c Random Network
+p max 1000 8000
+n 1 s
+n 1000 t
+a 226 72 94
+a 87 91 91
+a 576 889 96
+a 431 350 94
+a 32 58 81
+a 484 37 21
+a 63 961 24
+a 892 954 23
+a 336 363 93
+a 3 84 53
+a 718 473 83
+a 53 262 86
+a 51 288 46
+a 418 446 48
+a 624 561 12
+a 702 825 38
+a 575 464 79
+a 54 116 59
+a 274 935 74
+a 262 219 97
+a 8 67 85
+a 107 238 84
+a 195 620 77
+a 272 413 19
+a 172 205 64
+a 291 21 31
+a 272 836 86
+a 795 32 8
+a 228 21 95
+a 476 70 23
+a 160 186 77
+a 224 598 4
+a 314 770 72
+a 49 200 40
+a 525 67 17
+a 613 113 47
+a 1 5 54
+a 302 30 48
+a 841 561 48
+a 616 615 18
+a 258 387 13
+a 638 9 28
+a 676 365 67
+a 898 531 77
+a 53 186 59
+a 757 491 64
+a 4 40 73
+a 471 60 46
+a 4 59 76
+a 64 379 62
+a 862 340 45
+a 383 731 67
+a 10 932 69
+a 570 939 91
+a 635 976 94
+a 982 358 84
+a 170 233 1
+a 636 13 1
+a 341 192 65
+a 848 108 88
+a 54 180 86
+a 324 600 12
+a 879 201 52
+a 453 88 80
+a 14 23 69
+a 736 853 99
+a 436 127 69
+a 197 643 63
+a 665 832 9
+a 460 436 88
+a 877 799 85
+a 49 56 24
+a 59 51 43
+a 911 20 95
+a 328 52 46
+a 52 657 80
+a 314 708 42
+a 1 17 86
+a 65 282 63
+a 83 132 19
+a 194 393 8
+a 570 418 62
+a 413 400 74
+a 94 119 22
+a 140 858 36
+a 27 55 69
+a 118 260 48
+a 289 139 65
+a 626 155 56
+a 19 211 1
+a 118 281 49
+a 760 938 65
+a 781 184 83
+a 213 738 88
+a 17 20 68
+a 420 279 15
+a 489 253 56
+a 682 165 93
+a 975 280 94
+a 115 167 55
+a 272 117 62
+a 660 591 58
+a 187 730 63
+a 49 93 45
+a 97 3 77
+a 537 547 74
+a 218 7 86
+a 70 576 73
+a 799 701 36
+a 23 51 7
+a 56 114 22
+a 50 51 77
+a 92 15 82
+a 966 519 71
+a 180 166 40
+a 69 58 42
+a 215 126 84
+a 8 38 35
+a 781 12 54
+a 489 68 58
+a 573 227 52
+a 5 7 25
+a 352 74 53
+a 631 861 33
+a 457 109 35
+a 884 738 40
+a 307 352 24
+a 71 101 81
+a 190 32 75
+a 820 35 67
+a 5 8 100
+a 161 23 80
+a 784 829 21
+a 840 206 38
+a 21 44 83
+a 142 452 50
+a 758 194 92
+a 179 865 38
+a 259 390 22
+a 363 521 94
+a 48 91 56
+a 357 391 44
+a 2 31 38
+a 49 191 48
+a 557 282 68
+a 383 292 63
+a 485 25 73
+a 730 506 22
+a 11 70 76
+a 433 824 28
+a 194 415 13
+a 792 429 19
+a 138 167 5
+a 82 30 8
+a 275 787 89
+a 795 395 53
+a 199 365 88
+a 42 144 56
+a 127 176 77
+a 314 111 39
+a 30 326 92
+a 647 166 60
+a 199 337 80
+a 699 396 42
+a 115 190 45
+a 926 779 31
+a 376 54 93
+a 634 113 12
+a 41 177 78
+a 700 441 96
+a 431 362 11
+a 906 863 24
+a 117 56 65
+a 29 81 49
+a 440 85 71
+a 478 456 79
+a 70 414 67
+a 528 149 96
+a 998 708 3
+a 361 804 23
+a 511 690 96
+a 11 114 33
+a 882 312 92
+a 128 48 71
+a 511 156 55
+a 162 452 83
+a 345 463 86
+a 114 254 4
+a 410 663 81
+a 23 166 80
+a 865 937 49
+a 19 21 13
+a 722 713 78
+a 18 298 52
+a 521 821 92
+a 7 43 19
+a 18 46 29
+a 468 860 42
+a 489 927 66
+a 91 384 31
+a 541 397 23
+a 275 737 11
+a 246 589 29
+a 56 722 65
+a 80 437 79
+a 47 43 59
+a 636 561 91
+a 8 17 95
+a 787 806 8
+a 587 529 60
+a 95 261 46
+a 301 122 76
+a 1 3 51
+a 492 79 51
+a 807 857 79
+a 263 69 18
+a 11 83 29
+a 476 660 77
+a 12 98 43
+a 384 546 5
+a 367 104 51
+a 174 452 58
+a 234 70 91
+a 1 2 12
+a 612 574 83
+a 23 91 56
+a 302 506 71
+a 19 92 40
+a 756 27 60
+a 7 12 58
+a 59 488 73
+a 21 385 23
+a 2 23 16
+a 47 235 2
+a 145 379 90
+a 33 115 13
+a 515 347 37
+a 255 319 8
+a 50 292 72
+a 577 32 84
+a 1 12 13
+a 14 108 48
+a 456 640 77
+a 767 321 87
+a 143 162 18
+a 394 338 77
+a 885 153 5
+a 558 777 32
+a 187 218 21
+a 668 325 86
+a 606 947 75
+a 156 521 2
+a 174 735 69
+a 144 42 45
+a 745 781 83
+a 840 527 78
+a 112 382 4
+a 477 246 76
+a 481 504 70
+a 700 922 1
+a 600 464 82
+a 196 856 43
+a 4 184 11
+a 676 405 72
+a 19 35 77
+a 596 461 32
+a 820 955 8
+a 630 585 99
+a 961 76 30
+a 274 318 38
+a 34 113 27
+a 638 64 68
+a 35 60 96
+a 969 316 100
+a 156 146 62
+a 789 571 92
+a 14 35 30
+a 726 69 97
+a 65 122 72
+a 23 55 78
+a 61 38 40
+a 294 286 21
+a 847 986 17
+a 159 652 17
+a 195 985 85
+a 67 120 22
+a 28 63 72
+a 806 656 64
+a 53 61 5
+a 266 695 13
+a 207 21 81
+a 732 883 62
+a 5 54 50
+a 894 424 22
+a 64 618 35
+a 22 100 18
+a 119 55 54
+a 781 790 66
+a 499 34 27
+a 167 418 83
+a 43 46 59
+a 680 899 80
+a 92 294 23
+a 123 184 10
+a 296 710 87
+a 826 401 58
+a 794 335 81
+a 28 124 70
+a 154 256 4
+a 885 312 4
+a 627 518 65
+a 60 340 27
+a 66 597 39
+a 563 825 25
+a 10 798 78
+a 139 328 8
+a 201 251 70
+a 352 202 97
+a 9 27 86
+a 73 76 69
+a 36 971 18
+a 561 239 47
+a 22 200 44
+a 619 448 14
+a 706 348 17
+a 804 779 68
+a 200 41 8
+a 205 125 65
+a 61 159 25
+a 905 612 96
+a 51 227 3
+a 243 296 83
+a 629 211 81
+a 560 804 96
+a 160 100 38
+a 864 958 74
+a 109 125 100
+a 327 977 20
+a 209 231 95
+a 793 266 74
+a 97 122 53
+a 984 499 52
+a 913 231 80
+a 64 1000 93
+a 21 45 56
+a 127 440 49
+a 495 446 26
+a 101 105 2
+a 319 107 24
+a 817 198 57
+a 274 565 66
+a 291 175 3
+a 6 10 42
+a 140 457 49
+a 986 314 48
+a 135 374 99
+a 134 178 55
+a 418 52 72
+a 15 83 13
+a 694 998 40
+a 847 56 49
+a 261 145 5
+a 42 448 83
+a 59 124 65
+a 7 8 29
+a 453 234 62
+a 10 21 42
+a 684 573 100
+a 392 97 17
+a 910 837 8
+a 159 269 83
+a 925 696 4
+a 429 378 25
+a 4 16 94
+a 119 354 45
+a 17 57 23
+a 67 192 56
+a 252 340 63
+a 15 24 51
+a 953 599 39
+a 150 326 16
+a 437 984 58
+a 119 140 52
+a 120 242 20
+a 44 387 25
+a 119 713 92
+a 22 25 43
+a 385 561 15
+a 462 460 46
+a 817 156 47
+a 230 410 11
+a 754 253 97
+a 564 79 39
+a 996 244 58
+a 384 395 5
+a 196 922 80
+a 696 52 99
+a 686 151 1
+a 554 38 75
+a 46 65 1
+a 942 693 66
+a 318 719 83
+a 685 511 13
+a 21 122 49
+a 86 743 38
+a 210 635 57
+a 445 852 26
+a 819 408 91
+a 384 36 24
+a 578 455 68
+a 10 53 36
+a 351 520 74
+a 695 65 82
+a 614 339 77
+a 334 11 38
+a 3 5 69
+a 365 960 20
+a 176 662 31
+a 126 795 7
+a 110 332 7
+a 947 180 64
+a 6 122 91
+a 599 96 63
+a 158 203 32
+a 860 477 6
+a 70 595 46
+a 473 466 25
+a 94 228 23
+a 414 200 1
+a 367 412 49
+a 832 49 35
+a 251 47 97
+a 60 550 77
+a 18 101 73
+a 503 902 31
+a 121 19 8
+a 3 9 16
+a 31 420 100
+a 718 362 5
+a 348 825 64
+a 286 639 98
+a 184 600 59
+a 80 84 54
+a 181 406 80
+a 72 135 96
+a 798 111 19
+a 86 23 41
+a 286 476 84
+a 101 141 88
+a 998 781 37
+a 503 41 61
+a 66 260 56
+a 950 532 30
+a 715 761 1
+a 736 82 33
+a 852 899 96
+a 2 7 84
+a 291 732 73
+a 188 443 50
+a 37 45 81
+a 96 376 33
+a 654 740 55
+a 384 471 12
+a 52 64 44
+a 213 45 42
+a 226 876 4
+a 483 55 43
+a 258 22 36
+a 653 258 45
+a 513 224 58
+a 41 75 25
+a 140 252 77
+a 234 364 49
+a 762 289 61
+a 4 612 3
+a 89 629 8
+a 2 1 72
+a 681 306 9
+a 509 92 46
+a 524 260 58
+a 32 146 87
+a 601 249 43
+a 32 73 40
+a 887 766 58
+a 20 55 15
+a 21 40 63
+a 50 13 31
+a 118 180 23
+a 11 25 48
+a 8 312 12
+a 305 690 29
+a 464 79 72
+a 58 72 39
+a 2 16 12
+a 447 258 20
+a 499 915 29
+a 4 79 98
+a 306 96 80
+a 394 971 62
+a 476 481 65
+a 28 30 85
+a 237 243 84
+a 323 989 92
+a 192 223 41
+a 50 693 4
+a 625 502 45
+a 522 866 28
+a 112 487 66
+a 45 57 1
+a 803 1000 83
+a 606 431 100
+a 177 686 69
+a 6 35 18
+a 272 990 18
+a 33 73 30
+a 502 561 83
+a 58 649 24
+a 977 496 37
+a 111 475 76
+a 384 142 55
+a 91 239 94
+a 69 845 38
+a 341 368 6
+a 405 62 44
+a 435 128 42
+a 163 8 29
+a 92 205 92
+a 325 358 21
+a 299 30 48
+a 8 9 21
+a 180 40 10
+a 554 814 100
+a 122 775 13
+a 559 766 72
+a 697 915 59
+a 316 616 95
+a 4 43 6
+a 620 901 66
+a 53 247 53
+a 384 86 59
+a 57 34 97
+a 235 857 87
+a 84 93 24
+a 81 652 72
+a 106 62 30
+a 707 850 34
+a 37 614 14
+a 534 233 81
+a 840 220 64
+a 263 483 47
+a 285 533 40
+a 60 154 63
+a 15 19 25
+a 853 825 48
+a 51 59 41
+a 655 998 100
+a 39 142 95
+a 225 765 72
+a 151 160 81
+a 279 597 94
+a 236 913 63
+a 2 207 32
+a 278 456 89
+a 560 184 46
+a 30 451 38
+a 878 437 81
+a 25 176 25
+a 15 26 93
+a 637 594 80
+a 12 22 95
+a 2 874 74
+a 467 26 18
+a 336 917 96
+a 566 32 97
+a 293 831 54
+a 1 753 17
+a 372 685 9
+a 118 244 46
+a 145 277 43
+a 598 558 48
+a 637 297 86
+a 448 444 84
+a 592 72 65
+a 7 16 94
+a 405 210 78
+a 91 111 82
+a 649 568 10
+a 47 14 31
+a 474 124 42
+a 17 134 84
+a 621 937 100
+a 409 291 24
+a 40 304 92
+a 405 95 89
+a 769 856 99
+a 596 862 32
+a 122 126 55
+a 101 699 27
+a 280 11 49
+a 2 17 3
+a 21 138 92
+a 209 456 30
+a 754 175 32
+a 21 163 12
+a 410 146 23
+a 447 917 70
+a 828 437 84
+a 489 612 35
+a 539 824 1
+a 115 273 64
+a 9 511 95
+a 7 34 7
+a 346 36 88
+a 778 879 6
+a 679 99 94
+a 16 20 26
+a 463 84 6
+a 8 15 14
+a 216 619 46
+a 223 21 43
+a 463 108 85
+a 10 32 35
+a 191 463 17
+a 601 544 75
+a 671 910 82
+a 87 97 100
+a 740 185 17
+a 15 35 50
+a 717 555 14
+a 101 169 57
+a 320 552 85
+a 316 438 5
+a 67 105 44
+a 193 865 29
+a 106 853 23
+a 12 21 43
+a 663 612 67
+a 46 85 97
+a 276 564 70
+a 630 560 43
+a 254 478 37
+a 157 230 77
+a 611 752 73
+a 4 76 81
+a 280 426 26
+a 681 151 44
+a 11 52 79
+a 179 98 1
+a 682 716 39
+a 767 640 43
+a 110 348 38
+a 471 363 85
+a 229 540 39
+a 829 569 65
+a 247 155 23
+a 959 911 4
+a 13 48 56
+a 86 167 43
+a 832 602 89
+a 9 51 42
+a 869 791 29
+a 301 176 96
+a 113 356 52
+a 851 94 39
+a 789 122 51
+a 895 316 51
+a 38 112 49
+a 868 421 88
+a 841 402 20
+a 930 918 99
+a 605 27 65
+a 972 554 100
+a 182 216 68
+a 435 355 62
+a 104 111 51
+a 177 587 21
+a 404 46 69
+a 912 589 44
+a 50 156 93
+a 90 201 18
+a 13 40 99
+a 69 690 48
+a 182 667 81
+a 930 921 8
+a 71 122 55
+a 922 767 72
+a 93 276 5
+a 927 544 78
+a 204 437 6
+a 70 78 82
+a 333 245 27
+a 457 388 7
+a 548 424 7
+a 207 42 74
+a 587 335 93
+a 168 195 58
+a 540 332 18
+a 11 465 5
+a 33 931 36
+a 2 3 59
+a 679 638 76
+a 228 997 42
+a 147 168 33
+a 92 507 100
+a 26 38 37
+a 1 45 65
+a 125 39 21
+a 844 395 25
+a 284 201 85
+a 685 57 41
+a 1000 169 66
+a 12 30 59
+a 805 939 23
+a 180 41 21
+a 238 250 70
+a 1 19 73
+a 22 139 77
+a 162 725 24
+a 466 219 56
+a 54 197 29
+a 20 187 89
+a 105 931 71
+a 4 7 48
+a 639 142 91
+a 551 573 43
+a 285 809 31
+a 284 473 15
+a 1 8 23
+a 603 983 22
+a 833 68 80
+a 388 559 84
+a 127 187 15
+a 895 207 56
+a 48 102 80
+a 426 938 99
+a 47 195 53
+a 761 916 88
+a 207 87 92
+a 252 714 71
+a 6 7 23
+a 379 568 43
+a 113 141 2
+a 79 4 85
+a 15 708 36
+a 883 150 73
+a 3 1 11
+a 218 424 75
+a 4 37 22
+a 35 55 34
+a 64 422 44
+a 181 425 17
+a 123 233 54
+a 490 154 91
+a 905 45 54
+a 641 384 82
+a 14 73 76
+a 360 159 92
+a 5 13 2
+a 60 624 70
+a 94 106 84
+a 718 679 40
+a 61 66 61
+a 826 273 52
+a 226 392 24
+a 606 360 8
+a 166 215 29
+a 3 2 2
+a 6 303 54
+a 56 411 10
+a 5 1 60
+a 886 525 9
+a 644 374 71
+a 709 795 84
+a 601 189 20
+a 14 44 66
+a 153 6 77
+a 295 354 11
+a 37 3 54
+a 11 550 100
+a 938 751 20
+a 11 36 22
+a 312 45 99
+a 62 241 90
+a 329 362 75
+a 953 881 63
+a 24 87 87
+a 611 621 92
+a 39 913 19
+a 828 665 56
+a 18 107 9
+a 147 170 84
+a 618 795 36
+a 252 137 15
+a 83 87 40
+a 3 11 65
+a 774 227 83
+a 502 235 87
+a 674 125 1
+a 281 18 97
+a 684 100 99
+a 852 585 11
+a 3 64 67
+a 886 866 64
+a 947 638 29
+a 458 62 42
+a 726 128 91
+a 459 508 97
+a 240 358 34
+a 385 938 40
+a 328 139 12
+a 198 328 40
+a 712 298 60
+a 45 138 48
+a 236 519 17
+a 28 119 98
+a 576 376 23
+a 11 24 14
+a 47 573 8
+a 436 148 83
+a 645 199 6
+a 40 91 29
+a 84 254 26
+a 600 561 45
+a 389 373 40
+a 117 537 17
+a 6 17 1
+a 690 247 55
+a 58 83 87
+a 200 23 26
+a 621 798 4
+a 981 919 37
+a 498 209 7
+a 581 871 65
+a 23 49 97
+a 167 158 70
+a 485 498 92
+a 339 914 78
+a 52 22 49
+a 169 232 36
+a 1 100 4
+a 255 988 87
+a 169 153 69
+a 50 95 16
+a 175 935 69
+a 630 904 52
+a 866 914 89
+a 2 36 15
+a 683 305 64
+a 37 472 20
+a 266 388 49
+a 404 260 93
+a 540 408 100
+a 515 776 27
+a 294 385 74
+a 480 291 96
+a 482 208 85
+a 599 329 58
+a 144 2 21
+a 493 707 2
+a 10 19 40
+a 712 951 10
+a 43 285 86
+a 521 42 58
+a 166 445 92
+a 935 339 91
+a 444 82 94
+a 749 94 57
+a 178 205 38
+a 560 12 46
+a 880 43 13
+a 945 49 59
+a 185 298 13
+a 291 358 12
+a 307 564 100
+a 636 629 21
+a 943 997 57
+a 411 134 90
+a 5 10 99
+a 583 150 71
+a 76 181 100
+a 76 113 24
+a 228 60 65
+a 533 816 15
+a 634 242 31
+a 662 721 19
+a 1 570 61
+a 658 654 82
+a 135 686 73
+a 310 355 12
+a 575 561 13
+a 600 858 58
+a 395 644 99
+a 274 103 33
+a 44 45 73
+a 211 999 26
+a 424 141 53
+a 235 109 48
+a 136 777 14
+a 376 531 36
+a 429 961 19
+a 636 520 43
+a 72 127 27
+a 162 87 24
+a 355 82 58
+a 59 63 83
+a 113 52 38
+a 684 337 11
+a 78 191 82
+a 969 330 69
+a 274 154 18
+a 665 275 6
+a 1 4 38
+a 607 641 60
+a 10 29 21
+a 435 596 6
+a 31 133 26
+a 234 921 88
+a 11 61 4
+a 108 379 81
+a 200 404 78
+a 15 16 57
+a 69 95 92
+a 226 224 82
+a 292 322 16
+a 294 467 51
+a 55 208 40
+a 711 930 29
+a 248 225 73
+a 46 240 56
+a 373 687 28
+a 775 336 31
+a 923 902 88
+a 4 55 16
+a 117 74 72
+a 765 239 47
+a 380 430 34
+a 239 10 14
+a 432 25 51
+a 192 166 13
+a 943 938 82
+a 86 93 6
+a 986 200 82
+a 109 296 82
+a 25 72 53
+a 123 134 9
+a 372 621 71
+a 371 729 1
+a 99 149 55
+a 347 56 46
+a 331 402 16
+a 824 531 98
+a 248 24 64
+a 535 142 43
+a 17 163 52
+a 957 179 85
+a 3 10 23
+a 36 39 16
+a 620 150 100
+a 140 40 63
+a 110 290 4
+a 333 604 56
+a 604 915 61
+a 506 12 30
+a 4 8 84
+a 9 266 80
+a 330 642 99
+a 22 656 3
+a 59 107 47
+a 484 116 61
+a 14 81 25
+a 3 135 13
+a 420 235 18
+a 164 345 86
+a 741 266 61
+a 396 338 78
+a 929 814 70
+a 93 158 2
+a 527 36 63
+a 213 151 16
+a 424 168 70
+a 38 88 28
+a 223 294 73
+a 555 119 80
+a 336 969 30
+a 427 25 99
+a 1 22 75
+a 187 63 70
+a 861 520 34
+a 87 157 55
+a 690 704 45
+a 423 754 83
+a 593 660 81
+a 422 565 9
+a 39 179 80
+a 332 267 2
+a 855 841 43
+a 93 183 10
+a 102 270 65
+a 409 460 40
+a 45 37 62
+a 522 6 18
+a 455 198 24
+a 605 868 88
+a 190 279 60
+a 428 372 26
+a 527 71 59
+a 93 881 27
+a 21 62 5
+a 35 120 46
+a 147 835 97
+a 606 665 92
+a 65 365 24
+a 4 12 92
+a 265 159 25
+a 42 43 88
+a 767 598 44
+a 284 206 16
+a 275 950 34
+a 665 254 99
+a 268 879 92
+a 242 275 15
+a 955 981 95
+a 32 38 17
+a 97 425 33
+a 559 47 9
+a 74 994 40
+a 9 13 51
+a 397 14 71
+a 44 351 69
+a 65 101 95
+a 170 13 97
+a 498 964 87
+a 351 515 44
+a 4 171 40
+a 337 718 32
+a 1 112 66
+a 91 119 5
+a 929 350 59
+a 582 671 23
+a 277 119 19
+a 793 92 7
+a 526 330 45
+a 275 220 75
+a 159 177 9
+a 65 131 51
+a 414 180 97
+a 28 44 19
+a 25 988 5
+a 814 458 1
+a 477 726 52
+a 482 86 79
+a 411 70 36
+a 2 9 32
+a 151 330 14
+a 32 150 70
+a 85 560 65
+a 15 513 62
+a 758 483 17
+a 12 7 67
+a 204 428 73
+a 16 6 97
+a 24 40 68
+a 184 171 93
+a 393 639 43
+a 358 50 26
+a 579 419 21
+a 311 43 18
+a 86 104 58
+a 691 22 87
+a 15 215 40
+a 624 355 23
+a 857 258 75
+a 819 473 84
+a 6 29 3
+a 483 3 73
+a 276 39 85
+a 37 189 18
+a 194 2 11
+a 478 476 4
+a 932 854 22
+a 850 724 22
+a 170 307 60
+a 257 74 35
+a 480 41 82
+a 17 107 1
+a 183 60 62
+a 876 476 76
+a 687 196 61
+a 58 119 33
+a 198 177 36
+a 706 418 73
+a 903 763 73
+a 244 274 80
+a 446 602 56
+a 171 553 90
+a 5 3 47
+a 23 306 83
+a 743 301 53
+a 777 924 88
+a 225 12 33
+a 280 23 37
+a 63 98 27
+a 151 453 2
+a 262 454 5
+a 351 709 34
+a 1 81 52
+a 720 990 11
+a 85 76 24
+a 803 179 71
+a 22 60 28
+a 113 173 93
+a 42 79 55
+a 79 894 61
+a 346 651 21
+a 261 901 96
+a 872 209 14
+a 984 407 61
+a 41 47 98
+a 455 641 53
+a 729 3 11
+a 799 195 38
+a 248 277 43
+a 327 112 63
+a 369 92 32
+a 454 774 59
+a 92 95 56
+a 478 847 33
+a 185 275 21
+a 617 398 65
+a 893 365 18
+a 6 97 43
+a 268 138 5
+a 424 92 49
+a 983 470 50
+a 8 7 14
+a 48 254 7
+a 624 382 54
+a 938 366 45
+a 40 137 89
+a 62 315 21
+a 25 31 99
+a 104 508 62
+a 854 259 76
+a 11 754 72
+a 165 76 86
+a 153 865 89
+a 33 86 20
+a 146 75 13
+a 423 751 77
+a 735 159 58
+a 79 99 9
+a 478 128 76
+a 546 144 48
+a 754 255 32
+a 39 129 84
+a 335 416 97
+a 2 10 92
+a 124 289 13
+a 877 127 14
+a 48 63 77
+a 663 397 34
+a 340 316 48
+a 15 32 7
+a 49 285 45
+a 784 85 50
+a 910 420 4
+a 12 23 14
+a 41 296 72
+a 817 602 36
+a 320 319 54
+a 13 147 83
+a 114 817 29
+a 6 625 27
+a 102 988 93
+a 176 876 3
+a 18 24 47
+a 27 342 66
+a 231 21 8
+a 3 6 8
+a 16 98 57
+a 460 951 66
+a 844 183 10
+a 133 140 96
+a 187 67 57
+a 954 896 35
+a 357 93 82
+a 89 503 63
+a 210 990 50
+a 320 76 55
+a 631 443 11
+a 303 450 1
+a 1 654 30
+a 572 266 32
+a 711 853 53
+a 1 155 85
+a 410 177 18
+a 703 327 65
+a 490 130 4
+a 20 45 34
+a 651 261 89
+a 59 141 77
+a 53 62 49
+a 107 223 94
+a 721 450 68
+a 935 677 95
+a 40 151 40
+a 872 637 6
+a 25 41 78
+a 11 1 50
+a 768 683 46
+a 22 1 5
+a 329 54 67
+a 688 93 42
+a 932 481 48
+a 73 237 72
+a 23 657 73
+a 299 48 49
+a 97 242 69
+a 1 131 2
+a 9 20 75
+a 172 44 2
+a 817 1000 99
+a 72 31 80
+a 176 214 16
+a 845 839 12
+a 5 52 78
+a 638 860 85
+a 691 521 39
+a 842 832 49
+a 30 281 71
+a 52 302 31
+a 141 594 59
+a 649 509 2
+a 17 19 48
+a 311 952 60
+a 967 933 29
+a 534 258 50
+a 265 448 22
+a 463 109 72
+a 97 112 72
+a 285 965 84
+a 161 224 1
+a 12 614 51
+a 216 324 62
+a 196 667 60
+a 278 720 75
+a 73 195 43
+a 8 200 23
+a 360 712 64
+a 14 26 74
+a 617 6 42
+a 949 52 23
+a 143 678 83
+a 394 48 97
+a 22 111 88
+a 896 62 51
+a 22 46 92
+a 341 643 1
+a 124 548 26
+a 162 775 9
+a 70 75 59
+a 411 786 49
+a 79 478 20
+a 16 4 66
+a 63 675 96
+a 148 612 96
+a 396 739 87
+a 787 867 31
+a 71 124 75
+a 491 774 76
+a 19 888 88
+a 576 375 10
+a 30 33 41
+a 686 732 43
+a 631 915 90
+a 394 20 100
+a 16 185 22
+a 466 10 61
+a 658 321 35
+a 96 207 72
+a 270 3 18
+a 893 251 63
+a 985 377 14
+a 834 607 91
+a 497 587 20
+a 737 299 59
+a 87 94 59
+a 361 233 49
+a 528 687 28
+a 357 810 11
+a 315 165 94
+a 755 236 51
+a 16 21 88
+a 107 334 90
+a 242 498 37
+a 25 66 32
+a 106 46 97
+a 240 121 68
+a 754 329 5
+a 8 688 16
+a 98 104 63
+a 343 233 49
+a 240 248 83
+a 56 140 100
+a 154 62 64
+a 835 366 77
+a 573 644 96
+a 9 25 49
+a 552 322 48
+a 496 395 78
+a 736 573 62
+a 468 94 58
+a 541 559 77
+a 54 5 31
+a 734 73 5
+a 51 57 57
+a 481 669 44
+a 123 64 100
+a 36 61 35
+a 120 215 96
+a 866 249 50
+a 141 209 1
+a 142 150 40
+a 264 50 35
+a 536 767 11
+a 435 105 8
+a 308 491 57
+a 308 767 59
+a 10 17 67
+a 253 669 84
+a 40 13 34
+a 415 132 90
+a 243 505 44
+a 928 500 44
+a 59 568 22
+a 59 685 73
+a 11 14 35
+a 737 531 73
+a 268 323 96
+a 280 482 16
+a 56 208 72
+a 279 409 23
+a 856 519 17
+a 318 440 39
+a 154 312 32
+a 173 4 69
+a 342 6 60
+a 2 91 33
+a 841 88 73
+a 191 279 70
+a 777 879 89
+a 91 129 39
+a 180 446 65
+a 69 60 44
+a 427 262 62
+a 47 53 2
+a 25 34 22
+a 987 918 94
+a 3 4 3
+a 940 347 6
+a 652 343 15
+a 252 316 87
+a 831 290 13
+a 96 55 94
+a 14 17 62
+a 427 849 31
+a 38 76 60
+a 599 684 74
+a 27 330 22
+a 211 80 100
+a 1 120 84
+a 503 255 92
+a 236 414 72
+a 8 20 88
+a 143 187 78
+a 7 328 84
+a 54 19 57
+a 57 923 21
+a 5 9 77
+a 687 694 39
+a 592 704 94
+a 569 944 59
+a 155 229 64
+a 63 81 30
+a 611 802 50
+a 107 779 95
+a 420 491 48
+a 20 102 64
+a 335 154 49
+a 75 112 23
+a 54 431 69
+a 84 62 87
+a 661 644 88
+a 687 660 100
+a 100 397 21
+a 7 18 58
+a 354 644 95
+a 36 75 43
+a 308 725 36
+a 38 353 81
+a 516 733 20
+a 16 145 19
+a 535 349 74
+a 278 39 87
+a 45 150 57
+a 423 153 2
+a 241 525 87
+a 141 111 45
+a 173 916 13
+a 256 652 38
+a 111 480 22
+a 141 143 71
+a 285 161 5
+a 50 64 8
+a 820 677 43
+a 191 9 45
+a 184 36 19
+a 264 353 97
+a 196 311 51
+a 417 438 14
+a 15 68 54
+a 103 311 52
+a 571 361 45
+a 196 396 79
+a 166 593 61
+a 994 740 2
+a 104 486 89
+a 2 24 88
+a 62 934 85
+a 246 507 7
+a 23 849 67
+a 78 174 38
+a 456 611 24
+a 912 404 39
+a 376 555 23
+a 6 3 11
+a 823 623 83
+a 169 261 87
+a 307 125 39
+a 381 378 46
+a 482 782 53
+a 57 68 52
+a 141 885 69
+a 80 472 42
+a 909 350 30
+a 60 243 44
+a 21 49 27
+a 778 276 13
+a 787 965 49
+a 105 161 51
+a 17 10 10
+a 184 126 34
+a 61 100 98
+a 176 409 71
+a 51 372 75
+a 29 675 71
+a 708 705 37
+a 2 99 48
+a 16 37 22
+a 24 995 66
+a 572 968 43
+a 8 514 69
+a 88 226 93
+a 758 845 8
+a 584 663 78
+a 332 86 75
+a 5 6 84
+a 929 518 64
+a 8 48 57
+a 524 657 67
+a 326 140 84
+a 996 699 5
+a 112 21 90
+a 18 66 38
+a 222 118 84
+a 101 110 12
+a 372 667 40
+a 124 318 85
+a 280 370 15
+a 477 161 87
+a 190 307 5
+a 236 432 14
+a 994 841 2
+a 7 39 29
+a 396 557 6
+a 681 362 29
+a 998 941 68
+a 501 677 97
+a 795 483 4
+a 2 19 71
+a 793 367 18
+a 29 463 72
+a 139 294 99
+a 83 360 65
+a 853 170 20
+a 774 872 2
+a 505 23 70
+a 27 50 63
+a 832 84 15
+a 25 215 93
+a 834 9 61
+a 79 430 80
+a 186 930 74
+a 41 27 42
+a 24 763 64
+a 459 420 2
+a 12 18 40
+a 648 406 42
+a 765 262 95
+a 146 953 69
+a 179 485 21
+a 865 418 34
+a 556 74 84
+a 55 137 60
+a 1 234 69
+a 65 203 61
+a 827 429 43
+a 84 417 57
+a 92 727 63
+a 53 77 36
+a 55 607 83
+a 161 465 91
+a 682 634 91
+a 97 155 49
+a 48 8 11
+a 772 323 7
+a 595 754 31
+a 721 172 72
+a 29 69 92
+a 65 791 10
+a 458 612 74
+a 245 772 56
+a 858 504 61
+a 1 235 52
+a 8 388 40
+a 576 904 82
+a 539 313 7
+a 426 303 75
+a 483 535 59
+a 59 94 75
+a 11 19 40
+a 276 689 83
+a 329 954 58
+a 120 251 29
+a 365 693 74
+a 314 783 4
+a 924 531 37
+a 81 596 87
+a 25 316 8
+a 5 76 65
+a 621 259 58
+a 897 638 41
+a 936 292 33
+a 24 249 5
+a 563 972 67
+a 1 13 23
+a 1000 456 21
+a 214 19 93
+a 442 30 52
+a 201 90 16
+a 518 116 28
+a 660 708 71
+a 834 656 84
+a 16 62 2
+a 8 46 1
+a 103 72 37
+a 785 288 50
+a 258 143 14
+a 298 62 47
+a 698 384 61
+a 130 147 25
+a 523 150 52
+a 95 29 61
+a 311 338 57
+a 16 30 25
+a 287 413 77
+a 486 194 40
+a 799 978 12
+a 230 134 23
+a 111 278 23
+a 204 549 13
+a 521 588 29
+a 43 116 48
+a 408 598 60
+a 666 824 78
+a 265 688 70
+a 416 229 96
+a 19 58 3
+a 341 839 95
+a 917 205 74
+a 81 308 96
+a 141 318 82
+a 892 501 90
+a 7 70 67
+a 560 188 28
+a 209 140 32
+a 116 903 96
+a 197 33 77
+a 27 142 87
+a 670 857 4
+a 96 118 71
+a 705 448 4
+a 154 199 10
+a 639 793 21
+a 14 60 90
+a 316 339 73
+a 70 355 87
+a 8 10 2
+a 30 45 98
+a 606 469 62
+a 291 482 63
+a 315 494 25
+a 462 554 23
+a 293 406 71
+a 50 130 52
+a 902 827 72
+a 41 25 53
+a 699 972 95
+a 197 981 90
+a 22 315 91
+a 205 381 40
+a 121 482 31
+a 520 789 10
+a 175 849 47
+a 31 14 2
+a 108 386 96
+a 113 410 34
+a 732 248 57
+a 801 858 52
+a 988 986 60
+a 159 80 78
+a 816 832 82
+a 62 126 5
+a 820 378 50
+a 223 107 28
+a 536 488 57
+a 187 199 32
+a 993 429 34
+a 579 599 80
+a 198 56 3
+a 448 378 35
+a 4 3 67
+a 2 154 79
+a 735 451 84
+a 906 759 93
+a 1 590 3
+a 24 256 87
+a 46 263 71
+a 21 10 16
+a 11 228 42
+a 659 140 78
+a 730 338 15
+a 320 348 97
+a 938 890 88
+a 310 314 95
+a 434 803 36
+a 156 26 4
+a 7 181 32
+a 878 933 69
+a 10 130 75
+a 446 744 14
+a 37 484 25
+a 152 188 19
+a 60 87 49
+a 835 365 22
+a 861 135 69
+a 334 976 21
+a 16 280 58
+a 123 616 63
+a 835 330 96
+a 26 31 43
+a 81 275 85
+a 339 340 48
+a 779 283 30
+a 533 606 9
+a 354 542 89
+a 859 732 61
+a 703 64 62
+a 38 814 72
+a 831 129 28
+a 477 831 21
+a 719 177 60
+a 26 51 16
+a 166 9 23
+a 195 219 63
+a 254 506 80
+a 68 30 34
+a 86 542 49
+a 49 330 74
+a 253 100 93
+a 112 191 56
+a 357 426 26
+a 744 20 97
+a 5 11 91
+a 95 151 23
+a 343 337 90
+a 912 49 59
+a 83 96 24
+a 236 329 72
+a 326 756 23
+a 761 416 32
+a 179 76 86
+a 737 334 13
+a 56 177 67
+a 865 738 99
+a 5 152 72
+a 341 40 88
+a 362 788 77
+a 872 601 30
+a 144 640 14
+a 339 658 72
+a 120 260 85
+a 778 542 94
+a 331 612 72
+a 640 343 86
+a 396 954 33
+a 897 552 47
+a 193 476 98
+a 232 653 84
+a 40 48 72
+a 9 52 7
+a 54 49 43
+a 75 636 32
+a 61 184 20
+a 441 262 65
+a 652 267 74
+a 16 38 25
+a 665 7 75
+a 208 424 55
+a 722 741 67
+a 856 224 86
+a 24 534 43
+a 506 102 68
+a 897 113 50
+a 233 268 70
+a 7 47 24
+a 17 27 72
+a 157 2 43
+a 621 749 10
+a 273 334 71
+a 677 285 88
+a 773 871 23
+a 28 62 75
+a 240 750 77
+a 4 281 1
+a 368 407 22
+a 861 191 16
+a 297 347 57
+a 226 20 70
+a 462 76 31
+a 714 939 51
+a 26 37 76
+a 56 24 100
+a 513 268 79
+a 330 326 74
+a 3 83 59
+a 436 327 82
+a 941 61 45
+a 273 184 85
+a 13 67 45
+a 291 239 14
+a 610 671 94
+a 782 916 7
+a 69 326 98
+a 177 821 23
+a 4 6 11
+a 7 83 14
+a 51 54 59
+a 220 278 46
+a 315 242 59
+a 702 564 28
+a 280 164 36
+a 938 396 100
+a 118 122 43
+a 522 300 21
+a 10 7 73
+a 508 895 92
+a 191 818 4
+a 623 857 78
+a 168 142 56
+a 271 255 37
+a 12 122 3
+a 26 338 9
+a 237 635 69
+a 10 98 2
+a 139 828 26
+a 218 74 20
+a 30 59 42
+a 77 83 73
+a 91 651 17
+a 371 75 91
+a 98 181 84
+a 196 140 61
+a 966 455 69
+a 267 141 97
+a 223 3 49
+a 348 113 34
+a 803 982 76
+a 312 102 23
+a 431 354 22
+a 17 252 5
+a 714 283 14
+a 393 38 28
+a 22 37 94
+a 61 185 20
+a 800 886 66
+a 445 52 31
+a 117 162 28
+a 194 533 21
+a 751 358 77
+a 248 778 87
+a 225 118 78
+a 231 156 41
+a 879 549 91
+a 130 741 35
+a 24 2 25
+a 665 802 73
+a 402 477 72
+a 85 150 70
+a 648 769 47
+a 422 112 93
+a 517 733 82
+a 144 239 4
+a 255 5 29
+a 464 894 18
+a 434 577 61
+a 250 2 75
+a 822 12 37
+a 15 128 12
+a 989 3 98
+a 229 308 47
+a 669 102 79
+a 741 55 35
+a 967 770 41
+a 207 166 75
+a 297 166 98
+a 44 21 2
+a 873 711 64
+a 522 78 18
+a 589 78 89
+a 26 421 58
+a 448 6 13
+a 63 602 53
+a 372 361 96
+a 36 77 85
+a 119 479 11
+a 555 893 42
+a 38 111 87
+a 140 516 15
+a 220 576 46
+a 541 466 79
+a 67 88 81
+a 25 28 17
+a 26 704 39
+a 28 865 80
+a 8 1 100
+a 318 694 68
+a 606 685 29
+a 888 228 56
+a 39 417 61
+a 57 534 81
+a 327 151 75
+a 362 181 88
+a 219 274 41
+a 355 70 41
+a 238 36 80
+a 121 76 26
+a 188 20 46
+a 11 27 74
+a 84 29 4
+a 730 239 56
+a 13 38 94
+a 788 2 92
+a 573 928 35
+a 13 734 45
+a 127 150 32
+a 505 959 59
+a 17 2 11
+a 939 462 76
+a 52 532 52
+a 40 145 67
+a 554 376 88
+a 89 44 9
+a 209 875 67
+a 15 20 28
+a 41 671 19
+a 404 725 84
+a 94 914 55
+a 130 190 55
+a 768 304 71
+a 72 121 70
+a 137 784 14
+a 201 346 1
+a 619 8 56
+a 711 480 88
+a 689 218 46
+a 92 161 55
+a 162 601 24
+a 44 67 96
+a 280 39 92
+a 739 171 94
+a 842 792 35
+a 86 180 29
+a 633 960 12
+a 490 262 86
+a 699 905 95
+a 298 96 12
+a 77 156 9
+a 3 8 16
+a 8 16 100
+a 452 584 49
+a 39 496 94
+a 437 117 55
+a 514 344 73
+a 92 349 12
+a 641 429 70
+a 212 48 74
+a 956 49 79
+a 147 167 36
+a 712 723 30
+a 640 425 51
+a 911 496 100
+a 412 186 80
+a 217 244 23
+a 228 3 38
+a 936 280 16
+a 179 188 69
+a 675 615 9
+a 267 64 36
+a 182 144 52
+a 229 22 35
+a 24 113 62
+a 792 22 6
+a 759 495 2
+a 6 5 60
+a 22 64 4
+a 11 796 81
+a 2 739 52
+a 377 850 11
+a 82 945 8
+a 8 64 41
+a 38 651 27
+a 91 70 60
+a 21 25 8
+a 35 277 30
+a 638 844 98
+a 647 498 64
+a 46 108 33
+a 156 71 93
+a 247 662 95
+a 173 144 25
+a 99 361 95
+a 114 507 35
+a 15 41 27
+a 185 976 17
+a 14 135 38
+a 462 662 86
+a 231 864 23
+a 818 711 53
+a 702 73 31
+a 916 337 25
+a 249 390 41
+a 56 272 34
+a 100 894 61
+a 211 901 71
+a 3 22 51
+a 875 275 61
+a 737 267 6
+a 617 518 11
+a 9 731 22
+a 8 587 95
+a 18 671 10
+a 4 1 68
+a 70 757 88
+a 411 614 71
+a 739 129 6
+a 379 509 74
+a 25 148 38
+a 706 890 80
+a 542 864 11
+a 432 813 1
+a 184 214 7
+a 636 15 55
+a 166 192 8
+a 279 664 16
+a 292 76 93
+a 91 38 44
+a 485 105 86
+a 38 41 94
+a 433 263 44
+a 915 731 36
+a 501 611 64
+a 713 182 69
+a 143 361 33
+a 894 473 62
+a 516 730 30
+a 385 121 84
+a 137 534 20
+a 255 450 18
+a 109 363 4
+a 556 23 90
+a 78 114 33
+a 177 45 28
+a 47 795 67
+a 258 655 53
+a 538 181 43
+a 586 815 30
+a 137 151 80
+a 267 192 46
+a 156 91 54
+a 406 586 17
+a 43 49 41
+a 668 280 8
+a 570 850 50
+a 914 178 97
+a 145 203 82
+a 64 130 46
+a 148 625 63
+a 331 679 87
+a 8 11 35
+a 657 886 3
+a 862 365 75
+a 758 642 13
+a 133 284 39
+a 28 53 88
+a 380 396 28
+a 973 187 75
+a 115 80 49
+a 11 30 54
+a 844 896 10
+a 565 338 72
+a 45 461 2
+a 200 530 94
+a 559 394 92
+a 5 34 26
+a 713 651 5
+a 84 173 15
+a 6 53 18
+a 70 567 61
+a 275 745 57
+a 346 205 26
+a 2 20 28
+a 23 364 85
+a 807 311 77
+a 457 677 13
+a 91 244 36
+a 109 460 63
+a 28 47 18
+a 514 185 25
+a 11 17 83
+a 142 257 9
+a 702 26 27
+a 236 669 47
+a 204 556 56
+a 308 961 97
+a 160 178 34
+a 481 655 6
+a 12 40 94
+a 90 161 48
+a 886 180 17
+a 1000 503 16
+a 286 57 30
+a 534 61 11
+a 214 584 98
+a 324 685 5
+a 189 418 68
+a 437 172 74
+a 424 3 24
+a 75 141 77
+a 249 142 20
+a 229 336 69
+a 828 181 63
+a 112 170 36
+a 362 17 10
+a 897 144 88
+a 419 127 64
+a 133 201 16
+a 184 532 62
+a 25 54 57
+a 770 33 96
+a 58 125 53
+a 282 477 61
+a 484 592 69
+a 344 978 60
+a 61 539 11
+a 307 542 73
+a 34 48 51
+a 737 473 18
+a 139 276 34
+a 424 490 48
+a 28 65 58
+a 816 594 15
+a 228 574 16
+a 890 518 13
+a 34 267 84
+a 71 149 27
+a 185 992 68
+a 858 255 55
+a 989 196 100
+a 72 100 83
+a 525 190 94
+a 10 12 12
+a 58 62 87
+a 386 222 46
+a 925 252 43
+a 147 212 44
+a 504 636 4
+a 488 845 63
+a 52 249 95
+a 165 75 11
+a 163 527 60
+a 100 583 3
+a 814 602 90
+a 33 35 6
+a 123 955 51
+a 649 781 46
+a 2 293 68
+a 442 509 70
+a 111 147 34
+a 497 444 58
+a 656 612 32
+a 394 208 78
+a 148 307 52
+a 64 466 7
+a 35 37 66
+a 585 878 73
+a 6 48 33
+a 286 11 77
+a 607 639 55
+a 460 19 70
+a 129 631 51
+a 221 976 81
+a 3 17 70
+a 844 501 61
+a 105 62 24
+a 119 91 60
+a 59 80 86
+a 662 851 56
+a 455 20 38
+a 877 377 43
+a 416 10 9
+a 375 732 81
+a 415 50 88
+a 793 511 83
+a 145 223 1
+a 260 628 42
+a 662 891 8
+a 65 695 3
+a 329 622 65
+a 174 189 42
+a 387 490 52
+a 918 204 44
+a 349 49 20
+a 43 173 64
+a 229 551 28
+a 39 73 97
+a 640 996 69
+a 756 109 74
+a 83 39 40
+a 677 88 99
+a 20 9 68
+a 461 277 66
+a 141 759 95
+a 173 906 97
+a 118 552 30
+a 1 49 71
+a 777 404 96
+a 775 768 51
+a 235 366 54
+a 80 89 12
+a 292 50 37
+a 87 183 90
+a 43 813 31
+a 266 575 77
+a 701 45 79
+a 843 179 23
+a 29 50 33
+a 739 373 82
+a 926 897 31
+a 735 133 8
+a 591 505 8
+a 3 267 87
+a 257 7 92
+a 994 591 28
+a 231 3 55
+a 324 516 83
+a 687 761 72
+a 59 66 33
+a 785 112 16
+a 552 419 84
+a 902 675 78
+a 323 485 64
+a 527 650 88
+a 139 147 18
+a 658 191 19
+a 35 49 58
+a 9 55 21
+a 81 447 57
+a 187 559 57
+a 10 73 66
+a 509 638 12
+a 577 589 18
+a 150 680 83
+a 285 488 27
+a 308 429 14
+a 87 2 39
+a 586 4 35
+a 728 313 40
+a 840 55 73
+a 63 174 90
+a 98 226 53
+a 673 780 38
+a 65 206 58
+a 218 327 70
+a 827 295 70
+a 867 733 89
+a 907 478 19
+a 148 93 67
+a 210 720 53
+a 917 897 87
+a 82 159 28
+a 315 10 83
+a 591 304 58
+a 727 34 66
+a 332 28 3
+a 983 81 20
+a 23 265 34
+a 91 87 6
+a 127 140 26
+a 349 340 93
+a 1 29 19
+a 273 75 53
+a 892 26 63
+a 350 78 65
+a 383 1 49
+a 4 15 79
+a 218 37 6
+a 869 674 99
+a 3 27 46
+a 808 600 49
+a 734 102 1
+a 945 561 45
+a 36 78 96
+a 113 161 97
+a 800 461 98
+a 416 351 91
+a 689 439 31
+a 14 16 92
+a 673 759 85
+a 39 501 19
+a 5 50 26
+a 851 656 34
+a 43 273 65
+a 132 900 74
+a 450 21 69
+a 19 32 55
+a 52 632 43
+a 464 325 61
+a 794 510 5
+a 336 489 44
+a 1 406 56
+a 780 820 82
+a 9 551 11
+a 7 22 24
+a 710 279 75
+a 228 706 40
+a 541 89 34
+a 438 539 90
+a 618 852 70
+a 234 150 64
+a 524 90 81
+a 524 324 64
+a 32 133 84
+a 880 655 30
+a 618 756 67
+a 358 477 77
+a 121 218 85
+a 609 924 41
+a 355 261 66
+a 20 113 80
+a 422 96 28
+a 397 131 70
+a 18 45 19
+a 276 620 82
+a 447 815 36
+a 39 351 29
+a 265 459 34
+a 156 708 15
+a 5 26 51
+a 985 142 20
+a 532 65 80
+a 713 908 85
+a 17 103 64
+a 571 749 31
+a 283 70 53
+a 44 141 90
+a 390 219 1
+a 305 805 85
+a 810 159 94
+a 17 573 18
+a 55 246 56
+a 289 975 1
+a 470 892 17
+a 24 91 94
+a 168 484 11
+a 599 803 62
+a 543 971 74
+a 15 114 66
+a 221 481 57
+a 986 9 25
+a 447 498 18
+a 1 147 33
+a 54 770 54
+a 276 15 8
+a 455 818 58
+a 75 830 56
+a 205 559 90
+a 235 250 96
+a 153 87 8
+a 58 49 75
+a 12 120 72
+a 564 291 57
+a 4 659 16
+a 94 729 30
+a 855 368 87
+a 424 159 6
+a 821 45 9
+a 979 746 64
+a 247 801 34
+a 991 510 44
+a 2 4 55
+a 9 453 85
+a 517 598 98
+a 26 594 8
+a 1 619 63
+a 9 701 22
+a 37 439 84
+a 721 593 9
+a 21 38 3
+a 54 33 85
+a 137 605 29
+a 563 173 28
+a 16 369 43
+a 866 484 4
+a 805 644 52
+a 81 14 1
+a 297 2 80
+a 925 538 49
+a 571 9 31
+a 5 475 85
+a 213 800 48
+a 708 550 37
+a 779 329 31
+a 127 457 45
+a 590 350 84
+a 979 315 12
+a 713 776 19
+a 21 305 96
+a 48 310 98
+a 4 14 91
+a 4 2 20
+a 830 132 80
+a 2 257 56
+a 290 291 19
+a 9 309 40
+a 59 102 70
+a 156 129 40
+a 685 164 15
+a 809 984 70
+a 4 77 96
+a 361 71 29
+a 12 582 30
+a 978 736 67
+a 169 464 83
+a 202 469 57
+a 401 25 54
+a 484 51 47
+a 4 232 97
+a 410 35 40
+a 53 237 69
+a 993 363 58
+a 19 282 22
+a 497 841 98
+a 344 12 49
+a 676 312 17
+a 43 4 3
+a 55 320 2
+a 184 439 69
+a 7 11 21
+a 27 188 73
+a 23 550 78
+a 511 17 82
+a 435 737 41
+a 8 5 67
+a 714 338 58
+a 10 428 33
+a 36 124 41
+a 136 137 51
+a 869 380 100
+a 34 439 35
+a 703 445 40
+a 2 543 40
+a 550 417 27
+a 4 769 23
+a 24 85 25
+a 134 249 99
+a 614 194 85
+a 36 355 24
+a 66 131 62
+a 640 312 88
+a 24 26 43
+a 9 28 32
+a 785 46 46
+a 9 14 75
+a 787 447 45
+a 100 13 70
+a 881 653 18
+a 105 172 75
+a 128 789 69
+a 544 86 39
+a 976 760 53
+a 108 270 86
+a 620 556 14
+a 451 51 89
+a 344 57 52
+a 650 124 57
+a 101 16 29
+a 43 57 45
+a 873 414 9
+a 38 55 27
+a 928 185 88
+a 87 175 76
+a 949 387 49
+a 19 55 57
+a 340 152 46
+a 228 119 1
+a 11 22 33
+a 65 51 42
+a 6 4 64
+a 763 975 51
+a 568 105 29
+a 517 507 58
+a 4 10 72
+a 1 508 22
+a 164 298 53
+a 424 953 11
+a 409 33 4
+a 928 742 85
+a 22 116 35
+a 486 104 97
+a 241 454 59
+a 14 34 1
+a 201 7 47
+a 440 139 56
+a 886 37 48
+a 696 322 16
+a 49 73 85
+a 732 557 48
+a 85 16 40
+a 68 138 3
+a 140 390 3
+a 570 31 74
+a 145 34 42
+a 123 191 66
+a 484 78 34
+a 229 37 83
+a 735 402 66
+a 152 193 100
+a 428 330 12
+a 446 15 61
+a 24 28 53
+a 173 147 53
+a 152 712 42
+a 273 191 95
+a 194 41 41
+a 574 175 52
+a 38 59 35
+a 677 792 48
+a 103 6 65
+a 258 68 60
+a 17 1 95
+a 380 714 40
+a 705 506 39
+a 558 267 36
+a 280 186 67
+a 19 104 38
+a 54 24 13
+a 811 24 59
+a 16 41 32
+a 705 526 61
+a 921 205 30
+a 722 393 68
+a 769 112 36
+a 7 10 62
+a 665 123 13
+a 257 51 75
+a 183 42 58
+a 14 742 93
+a 155 404 7
+a 72 131 1
+a 81 50 69
+a 845 96 47
+a 985 461 53
+a 87 165 31
+a 996 351 56
+a 916 348 13
+a 524 194 80
+a 808 84 22
+a 38 293 8
+a 672 534 72
+a 380 997 52
+a 36 410 36
+a 40 158 10
+a 221 389 60
+a 2 12 5
+a 272 199 28
+a 52 421 35
+a 228 471 61
+a 671 215 83
+a 50 297 62
+a 217 228 10
+a 293 17 59
+a 37 42 15
+a 221 93 1
+a 244 35 29
+a 886 490 17
+a 14 55 52
+a 626 173 9
+a 191 93 70
+a 113 178 84
+a 603 150 32
+a 154 555 49
+a 876 732 56
+a 79 479 69
+a 428 729 86
+a 50 385 47
+a 241 242 91
+a 134 315 57
+a 6 23 30
+a 980 12 4
+a 272 19 9
+a 674 852 11
+a 59 38 47
+a 529 780 21
+a 246 6 23
+a 3 13 34
+a 125 436 48
+a 109 326 73
+a 374 483 18
+a 973 16 14
+a 31 83 83
+a 331 747 35
+a 204 526 89
+a 144 665 52
+a 96 31 93
+a 648 665 23
+a 733 852 22
+a 401 407 65
+a 19 10 22
+a 51 733 9
+a 44 303 48
+a 6 22 93
+a 29 123 40
+a 169 228 98
+a 246 758 96
+a 45 71 92
+a 245 532 27
+a 49 135 11
+a 599 499 26
+a 68 181 3
+a 307 464 61
+a 197 384 25
+a 858 928 52
+a 140 211 28
+a 819 742 2
+a 254 450 61
+a 74 88 93
+a 130 327 14
+a 317 705 92
+a 273 770 100
+a 379 43 5
+a 73 122 52
+a 695 141 80
+a 141 930 84
+a 88 107 54
+a 325 21 80
+a 628 518 99
+a 242 931 28
+a 16 117 11
+a 681 291 44
+a 519 268 22
+a 729 521 67
+a 163 277 70
+a 913 488 41
+a 921 758 9
+a 55 102 81
+a 147 13 44
+a 420 529 93
+a 844 300 44
+a 63 80 88
+a 226 177 95
+a 24 57 86
+a 599 414 14
+a 91 31 53
+a 365 81 100
+a 4 25 89
+a 752 273 80
+a 889 467 60
+a 917 409 12
+a 77 57 10
+a 67 13 25
+a 79 200 65
+a 173 445 88
+a 20 15 46
+a 102 198 14
+a 959 143 66
+a 671 53 97
+a 431 59 17
+a 17 46 30
+a 124 524 34
+a 452 438 95
+a 59 97 54
+a 45 99 87
+a 115 333 85
+a 1 39 26
+a 318 8 44
+a 45 75 10
+a 411 802 60
+a 897 680 73
+a 412 974 23
+a 916 677 51
+a 961 737 16
+a 212 232 5
+a 31 725 55
+a 150 278 3
+a 470 709 94
+a 21 22 19
+a 242 173 42
+a 155 110 25
+a 710 252 15
+a 136 49 31
+a 160 163 81
+a 105 83 73
+a 308 618 81
+a 14 95 28
+a 284 423 43
+a 250 223 7
+a 541 562 69
+a 208 68 94
+a 77 105 15
+a 309 833 10
+a 883 562 53
+a 160 32 72
+a 19 101 51
+a 134 451 86
+a 35 43 97
+a 349 565 83
+a 588 378 13
+a 1 504 90
+a 93 897 2
+a 371 55 41
+a 297 264 99
+a 113 121 1
+a 178 304 50
+a 7 4 51
+a 23 14 25
+a 572 143 90
+a 881 282 33
+a 155 547 12
+a 762 561 31
+a 562 142 88
+a 921 980 11
+a 290 81 23
+a 244 70 32
+a 88 201 64
+a 215 278 52
+a 457 238 30
+a 573 556 10
+a 84 120 28
+a 98 874 22
+a 44 76 29
+a 335 510 57
+a 283 143 2
+a 542 768 100
+a 39 45 19
+a 366 709 81
+a 58 641 56
+a 44 419 73
+a 670 435 7
+a 58 911 43
+a 61 93 23
+a 462 360 54
+a 194 19 21
+a 528 752 25
+a 118 286 39
+a 114 98 78
+a 250 39 30
+a 739 18 89
+a 12 26 98
+a 953 353 77
+a 36 51 44
+a 50 254 85
+a 495 215 93
+a 471 324 19
+a 686 63 80
+a 227 311 99
+a 55 65 4
+a 973 745 73
+a 535 23 80
+a 5 33 75
+a 60 371 90
+a 244 58 27
+a 583 142 89
+a 170 255 75
+a 283 95 63
+a 581 298 70
+a 322 329 80
+a 251 79 28
+a 615 220 54
+a 12 212 66
+a 805 712 54
+a 6 426 56
+a 305 16 84
+a 7 746 3
+a 56 227 61
+a 268 7 8
+a 292 996 1
+a 539 350 40
+a 118 277 78
+a 376 269 34
+a 784 413 5
+a 541 546 35
+a 54 171 31
+a 95 185 90
+a 35 40 37
+a 30 129 2
+a 87 134 58
+a 170 458 5
+a 733 102 40
+a 852 770 36
+a 461 548 63
+a 606 635 44
+a 181 182 76
+a 295 437 21
+a 19 561 83
+a 92 593 22
+a 5 17 65
+a 881 418 64
+a 601 972 73
+a 363 792 91
+a 350 28 76
+a 94 373 44
+a 249 804 99
+a 79 53 98
+a 3 12 57
+a 85 111 41
+a 207 773 45
+a 66 3 32
+a 31 156 14
+a 501 791 66
+a 49 802 96
+a 325 765 70
+a 14 15 26
+a 428 912 73
+a 75 278 68
+a 751 870 22
+a 199 246 47
+a 326 748 66
+a 802 31 60
+a 216 397 86
+a 193 196 57
+a 455 276 26
+a 126 136 34
+a 272 757 56
+a 218 94 77
+a 662 311 20
+a 45 59 64
+a 822 737 74
+a 118 448 98
+a 338 528 18
+a 645 528 21
+a 199 58 27
+a 484 779 7
+a 173 351 9
+a 302 563 90
+a 50 111 74
+a 26 12 54
+a 528 52 37
+a 22 48 9
+a 654 520 3
+a 91 639 51
+a 44 964 15
+a 54 576 29
+a 8 26 79
+a 22 108 89
+a 805 225 79
+a 204 918 96
+a 776 29 31
+a 351 684 44
+a 385 53 34
+a 539 108 53
+a 146 306 77
+a 835 255 64
+a 578 870 25
+a 516 620 70
+a 102 787 92
+a 191 355 37
+a 955 575 22
+a 153 627 37
+a 510 177 34
+a 6 38 27
+a 329 37 2
+a 132 353 44
+a 7 13 37
+a 489 18 64
+a 913 803 33
+a 104 385 87
+a 224 137 59
+a 850 130 72
+a 22 488 30
+a 825 58 12
+a 43 60 13
+a 746 32 41
+a 85 368 10
+a 594 18 48
+a 533 695 45
+a 894 257 16
+a 27 187 94
+a 424 227 65
+a 85 168 71
+a 487 394 32
+a 541 185 44
+a 311 392 75
+a 97 209 90
+a 840 5 16
+a 114 264 72
+a 53 700 69
+a 299 150 70
+a 245 455 63
+a 273 874 75
+a 111 110 81
+a 50 612 62
+a 30 837 24
+a 16 104 35
+a 364 227 10
+a 765 355 87
+a 158 176 97
+a 669 192 16
+a 119 149 23
+a 638 636 59
+a 20 29 25
+a 766 252 84
+a 359 88 1
+a 44 402 87
+a 998 779 38
+a 2 144 46
+a 56 151 51
+a 726 714 52
+a 585 841 64
+a 412 188 39
+a 710 117 92
+a 147 341 13
+a 150 722 98
+a 23 83 84
+a 713 365 91
+a 420 374 10
+a 224 668 91
+a 24 156 24
+a 21 35 28
+a 152 350 93
+a 786 458 91
+a 1 268 77
+a 17 5 66
+a 179 738 86
+a 216 983 43
+a 25 358 87
+a 892 609 41
+a 59 82 57
+a 272 266 57
+a 106 771 74
+a 589 705 36
+a 213 201 34
+a 442 991 45
+a 968 999 77
+a 560 769 27
+a 487 936 100
+a 206 426 96
+a 375 24 77
+a 442 609 83
+a 55 77 79
+a 622 665 6
+a 207 576 74
+a 928 726 29
+a 335 941 11
+a 540 155 27
+a 357 424 38
+a 549 535 87
+a 179 342 91
+a 579 769 87
+a 613 501 44
+a 242 907 13
+a 347 449 31
+a 350 684 92
+a 480 618 86
+a 8 28 50
+a 38 273 94
+a 862 312 48
+a 46 18 2
+a 404 954 16
+a 378 988 46
+a 78 9 10
+a 9 24 7
+a 956 428 71
+a 28 48 13
+a 699 801 6
+a 26 335 88
+a 360 71 57
+a 101 228 79
+a 479 366 13
+a 561 7 23
+a 85 93 77
+a 224 321 19
+a 281 737 94
+a 32 571 32
+a 626 809 47
+a 187 924 55
+a 24 497 69
+a 29 57 89
+a 864 642 86
+a 12 1 54
+a 205 970 92
+a 61 77 35
+a 417 248 86
+a 12 87 21
+a 959 767 5
+a 133 958 86
+a 4 5 47
+a 8 379 18
+a 49 55 83
+a 994 759 14
+a 40 422 66
+a 728 306 90
+a 152 198 22
+a 275 761 30
+a 10 8 47
+a 460 235 7
+a 625 577 91
+a 802 752 1
+a 34 73 67
+a 973 359 81
+a 122 200 98
+a 191 245 18
+a 312 158 55
+a 846 268 14
+a 684 808 90
+a 61 951 88
+a 74 400 6
+a 260 556 61
+a 478 21 76
+a 10 3 14
+a 17 15 71
+a 967 959 27
+a 523 167 3
+a 875 769 72
+a 148 219 18
+a 393 587 1
+a 171 684 56
+a 169 178 51
+a 256 283 79
+a 493 957 2
+a 648 72 85
+a 294 304 82
+a 628 583 59
+a 505 8 11
+a 99 172 78
+a 344 501 87
+a 877 521 72
+a 530 409 60
+a 204 725 39
+a 1 196 2
+a 96 748 57
+a 109 984 36
+a 10 2 92
+a 38 32 49
+a 320 101 36
+a 414 870 69
+a 531 206 92
+a 32 50 11
+a 372 613 26
+a 211 297 95
+a 120 148 3
+a 247 221 22
+a 266 462 28
+a 245 348 52
+a 65 194 69
+a 237 265 41
+a 343 625 87
+a 684 567 34
+a 440 93 66
+a 687 545 63
+a 699 116 53
+a 88 116 81
+a 276 891 42
+a 72 45 40
+a 62 80 2
+a 129 880 27
+a 952 485 9
+a 31 474 99
+a 94 79 23
+a 128 919 53
+a 204 302 65
+a 24 367 13
+a 27 9 78
+a 415 144 42
+a 585 333 36
+a 76 137 44
+a 407 201 94
+a 122 198 4
+a 171 928 11
+a 25 112 92
+a 707 481 47
+a 24 53 44
+a 112 277 96
+a 9 8 13
+a 7 21 35
+a 309 9 15
+a 806 31 56
+a 100 135 41
+a 834 522 76
+a 735 686 59
+a 379 95 33
+a 588 468 8
+a 561 816 53
+a 410 368 52
+a 78 14 76
+a 527 805 46
+a 340 72 3
+a 118 352 80
+a 370 499 31
+a 897 2 42
+a 435 192 92
+a 105 330 28
+a 502 141 89
+a 869 583 65
+a 545 879 98
+a 57 758 29
+a 103 898 10
+a 1 44 20
+a 312 528 99
+a 484 666 66
+a 669 157 84
+a 92 219 39
+a 912 222 33
+a 650 333 74
+a 697 560 63
+a 111 116 95
+a 649 270 93
+a 304 453 34
+a 393 547 13
+a 83 291 13
+a 805 264 41
+a 642 720 44
+a 774 689 7
+a 49 348 47
+a 20 23 83
+a 61 37 35
+a 158 458 16
+a 165 178 3
+a 151 34 48
+a 354 358 81
+a 97 151 81
+a 911 528 62
+a 107 3 50
+a 156 323 13
+a 17 22 7
+a 676 217 12
+a 62 956 2
+a 410 36 74
+a 13 671 6
+a 131 334 3
+a 258 830 40
+a 291 900 63
+a 17 39 22
+a 919 340 25
+a 481 570 57
+a 56 360 48
+a 157 553 90
+a 2 5 71
+a 801 950 29
+a 890 283 79
+a 789 909 52
+a 62 114 57
+a 485 609 80
+a 269 767 34
+a 342 10 65
+a 440 79 34
+a 780 516 26
+a 334 383 33
+a 436 173 94
+a 838 347 35
+a 888 370 82
+a 488 311 87
+a 15 266 34
+a 257 499 99
+a 572 443 81
+a 100 308 24
+a 184 316 99
+a 714 585 52
+a 11 18 24
+a 44 939 87
+a 17 277 94
+a 176 473 95
+a 573 365 86
+a 166 91 26
+a 3 15 30
+a 727 805 29
+a 38 53 38
+a 970 39 85
+a 22 30 96
+a 216 617 1
+a 42 37 90
+a 672 892 16
+a 354 4 20
+a 3 25 43
+a 171 154 91
+a 58 429 31
+a 187 290 31
+a 534 355 59
+a 51 53 23
+a 414 128 10
+a 211 872 59
+a 79 341 63
+a 189 385 54
+a 10 159 65
+a 208 863 90
+a 649 969 3
+a 19 61 76
+a 114 174 24
+a 668 346 75
+a 9 12 77
+a 720 335 64
+a 211 137 28
+a 312 114 97
+a 529 375 7
+a 282 110 72
+a 20 152 31
+a 848 993 69
+a 204 271 79
+a 775 340 49
+a 325 269 99
+a 69 163 41
+a 161 171 55
+a 546 415 33
+a 192 36 58
+a 15 31 10
+a 345 230 88
+a 320 829 61
+a 618 274 50
+a 144 656 42
+a 446 26 50
+a 64 307 22
+a 55 84 61
+a 953 275 70
+a 296 974 82
+a 678 185 13
+a 258 10 23
+a 132 629 14
+a 340 269 15
+a 102 14 86
+a 80 130 31
+a 954 631 72
+a 17 97 3
+a 359 759 76
+a 719 529 46
+a 677 85 43
+a 7 411 54
+a 21 12 78
+a 84 142 39
+a 295 435 75
+a 401 457 16
+a 86 198 8
+a 225 226 73
+a 448 549 38
+a 991 986 51
+a 302 290 98
+a 41 49 17
+a 485 540 53
+a 38 116 27
+a 266 962 45
+a 26 109 78
+a 194 631 66
+a 8 21 44
+a 856 581 9
+a 281 520 38
+a 854 911 5
+a 211 89 82
+a 49 89 65
+a 344 606 18
+a 212 187 7
+a 290 134 53
+a 67 87 72
+a 827 467 41
+a 73 117 31
+a 387 890 4
+a 324 29 73
+a 688 980 87
+a 915 2 39
+a 673 78 95
+a 11 13 43
+a 760 711 99
+a 235 292 39
+a 61 74 16
+a 21 804 94
+a 382 273 59
+a 351 37 51
+a 143 25 48
+a 12 2 98
+a 770 577 83
+a 30 117 24
+a 655 877 90
+a 993 818 67
+a 548 85 52
+a 250 722 41
+a 152 309 89
+a 527 850 91
+a 39 63 46
+a 440 228 69
+a 628 200 23
+a 443 546 54
+a 235 347 52
+a 140 12 61
+a 394 146 51
+a 50 52 33
+a 65 10 58
+a 99 350 2
+a 871 329 13
+a 805 79 24
+a 4 9 55
+a 609 630 97
+a 16 18 67
+a 19 72 30
+a 115 415 2
+a 103 624 19
+a 176 135 56
+a 91 93 41
+a 164 649 18
+a 569 837 58
+a 188 713 74
+a 256 30 76
+a 515 34 42
+a 727 397 84
+a 204 33 62
+a 657 132 58
+a 47 58 72
+a 997 393 17
+a 208 411 97
+a 51 353 6
+a 119 102 63
+a 69 137 71
+a 463 771 57
+a 347 517 64
+a 222 252 22
+a 11 116 64
+a 585 960 3
+a 74 90 33
+a 749 51 69
+a 151 157 80
+a 578 299 99
+a 962 343 46
+a 4 275 52
+a 109 250 29
+a 794 275 51
+a 340 277 3
+a 427 74 58
+a 117 17 89
+a 350 11 79
+a 253 640 91
+a 63 3 18
+a 182 195 11
+a 692 96 24
+a 1 53 44
+a 531 551 87
+a 614 261 96
+a 181 103 23
+a 620 367 71
+a 51 63 88
+a 94 749 1
+a 833 437 30
+a 372 636 45
+a 170 346 51
+a 89 139 11
+a 634 102 92
+a 803 698 46
+a 423 50 60
+a 100 123 82
+a 359 152 35
+a 46 142 18
+a 812 641 54
+a 302 183 16
+a 55 924 37
+a 133 504 24
+a 36 134 99
+a 52 146 2
+a 982 234 49
+a 10 31 38
+a 112 580 84
+a 581 36 49
+a 952 946 80
+a 13 18 3
+a 870 171 30
+a 93 275 23
+a 795 177 33
+a 404 75 53
+a 934 849 49
+a 2 8 57
+a 200 106 48
+a 411 774 3
+a 327 309 46
+a 317 502 83
+a 850 679 97
+a 14 82 72
+a 675 810 55
+a 595 168 56
+a 604 192 62
+a 108 224 99
+a 446 907 72
+a 588 922 99
+a 104 213 95
+a 164 796 27
+a 80 508 63
+a 290 608 43
+a 826 887 15
+a 165 175 58
+a 536 584 45
+a 440 226 98
+a 453 564 9
+a 431 197 81
+a 20 58 94
+a 71 756 73
+a 9 420 84
+a 61 79 56
+a 109 389 75
+a 595 638 95
+a 11 21 74
+a 155 659 23
+a 977 428 100
+a 528 507 35
+a 775 17 27
+a 9 35 98
+a 750 307 28
+a 281 343 75
+a 551 722 2
+a 187 40 21
+a 580 202 53
+a 75 162 94
+a 796 956 26
+a 247 636 64
+a 5 22 75
+a 32 758 35
+a 966 40 63
+a 819 599 37
+a 661 812 32
+a 5 21 2
+a 322 339 72
+a 39 72 79
+a 29 146 23
+a 149 171 13
+a 243 979 69
+a 385 778 89
+a 130 266 64
+a 275 562 80
+a 770 158 57
+a 481 706 70
+a 16 671 31
+a 133 903 20
+a 5 27 84
+a 134 274 88
+a 656 549 54
+a 26 94 90
+a 204 422 2
+a 80 335 74
+a 124 616 44
+a 38 8 63
+a 26 27 95
+a 201 324 5
+a 280 918 4
+a 94 141 10
+a 485 589 22
+a 981 873 64
+a 562 930 32
+a 61 662 41
+a 626 581 3
+a 135 573 83
+a 221 640 35
+a 12 102 37
+a 947 902 25
+a 229 797 71
+a 872 505 77
+a 34 618 55
+a 18 33 95
+a 36 678 15
+a 201 539 36
+a 36 378 22
+a 7 6 86
+a 5 317 50
+a 8 4 99
+a 501 789 72
+a 732 793 51
+a 193 81 16
+a 585 720 89
+a 12 95 2
+a 781 947 84
+a 318 783 4
+a 841 559 48
+a 172 559 37
+a 22 36 96
+a 126 887 34
+a 272 408 39
+a 33 857 23
+a 88 113 35
+a 34 167 8
+a 32 33 80
+a 905 745 37
+a 296 86 39
+a 759 73 71
+a 504 107 13
+a 540 48 78
+a 18 84 77
+a 319 195 72
+a 11 220 55
+a 513 78 21
+a 317 533 64
+a 458 331 37
+a 13 3 4
+a 435 867 23
+a 459 74 8
+a 119 160 41
+a 293 157 37
+a 589 223 4
+a 239 199 17
+a 753 669 13
+a 142 125 19
+a 11 44 31
+a 3 274 60
+a 497 616 97
+a 2 208 14
+a 158 46 41
+a 58 300 1
+a 954 371 57
+a 23 39 59
+a 40 332 2
+a 827 456 39
+a 391 960 61
+a 188 426 58
+a 464 282 84
+a 243 79 25
+a 909 768 98
+a 118 183 76
+a 443 242 73
+a 66 524 69
+a 975 886 50
+a 62 417 3
+a 108 128 79
+a 367 416 94
+a 399 800 35
+a 4 304 44
+a 674 452 78
+a 5 798 18
+a 698 360 4
+a 825 297 46
+a 808 335 48
+a 71 100 55
+a 642 718 40
+a 371 885 30
+a 177 424 13
+a 500 296 26
+a 613 617 82
+a 551 913 59
+a 23 61 42
+a 80 150 51
+a 672 216 29
+a 561 390 97
+a 452 125 66
+a 617 132 44
+a 245 396 64
+a 917 674 83
+a 34 41 94
+a 148 138 53
+a 884 438 84
+a 922 154 31
+a 98 167 2
+a 149 190 31
+a 46 82 25
+a 570 682 81
+a 349 171 97
+a 751 454 66
+a 55 336 45
+a 73 35 55
+a 90 492 8
+a 473 943 6
+a 17 106 42
+a 143 28 10
+a 429 126 92
+a 26 81 43
+a 452 740 58
+a 917 762 64
+a 621 450 31
+a 307 476 56
+a 52 525 93
+a 984 578 12
+a 382 344 46
+a 715 238 28
+a 130 178 72
+a 938 227 13
+a 178 213 78
+a 9 110 24
+a 566 33 80
+a 488 40 70
+a 666 975 54
+a 209 270 34
+a 285 833 8
+a 440 838 62
+a 721 461 59
+a 314 616 72
+a 1 58 3
+a 376 224 23
+a 943 924 62
+a 19 57 62
+a 43 267 98
+a 351 255 58
+a 430 70 66
+a 247 61 32
+a 593 92 20
+a 75 232 74
+a 248 252 75
+a 763 727 48
+a 474 317 47
+a 12 172 75
+a 260 212 39
+a 526 909 23
+a 294 417 35
+a 20 16 46
+a 85 587 40
+a 149 46 14
+a 125 882 28
+a 385 59 2
+a 620 634 16
+a 55 188 24
+a 142 145 59
+a 241 440 57
+a 497 154 50
+a 596 34 21
+a 723 462 15
+a 67 245 9
+a 312 378 62
+a 35 63 61
+a 318 160 19
+a 51 277 41
+a 981 316 18
+a 34 25 56
+a 955 519 57
+a 481 310 80
+a 347 432 61
+a 507 732 79
+a 23 6 53
+a 35 123 34
+a 662 342 30
+a 220 865 91
+a 1 525 10
+a 375 883 61
+a 618 657 83
+a 989 395 14
+a 8 49 34
+a 51 193 38
+a 570 537 84
+a 867 635 71
+a 782 371 37
+a 840 584 65
+a 132 190 96
+a 31 112 20
+a 127 197 79
+a 599 368 56
+a 807 253 3
+a 818 487 12
+a 870 190 99
+a 909 202 85
+a 74 299 40
+a 427 763 78
+a 593 47 97
+a 734 69 2
+a 226 370 80
+a 747 381 71
+a 1000 835 21
+a 138 693 81
+a 121 255 93
+a 160 375 4
+a 286 896 2
+a 114 11 55
+a 365 26 83
+a 511 237 36
+a 958 670 16
+a 450 129 68
+a 60 43 18
+a 540 339 42
+a 767 70 78
+a 132 126 77
+a 108 375 34
+a 397 283 83
+a 13 9 35
+a 166 483 51
+a 335 573 87
+a 396 101 72
+a 509 89 78
+a 240 65 100
+a 55 27 24
+a 529 659 85
+a 21 27 74
+a 996 530 83
+a 114 246 40
+a 28 812 18
+a 9 15 92
+a 74 475 38
+a 319 12 28
+a 37 4 18
+a 42 105 49
+a 8 18 3
+a 9 5 13
+a 223 297 30
+a 485 661 74
+a 949 498 24
+a 334 102 67
+a 689 975 36
+a 8 269 91
+a 387 742 38
+a 54 589 25
+a 307 815 75
+a 30 16 92
+a 911 693 21
+a 599 206 1
+a 139 980 98
+a 20 42 66
+a 4 99 91
+a 191 244 41
+a 254 5 88
+a 843 991 60
+a 285 8 79
+a 23 278 70
+a 114 809 46
+a 11 7 53
+a 552 440 99
+a 417 419 62
+a 984 572 14
+a 4 41 19
+a 769 720 58
+a 740 201 77
+a 887 465 56
+a 50 41 28
+a 118 145 6
+a 46 105 26
+a 197 473 51
+a 717 245 51
+a 251 790 52
+a 507 332 40
+a 528 433 45
+a 252 325 74
+a 886 238 47
+a 578 107 92
+a 747 218 90
+a 66 71 65
+a 512 231 29
+a 5 310 20
+a 791 89 12
+a 5 281 29
+a 20 38 19
+a 131 149 8
+a 408 144 72
+a 445 714 5
+a 446 163 54
+a 549 477 9
+a 552 759 80
+a 68 203 41
+a 287 440 97
+a 116 328 23
+a 295 381 69
+a 3 66 82
+a 210 132 69
+a 191 828 35
+a 251 143 41
+a 600 911 74
+a 824 236 3
+a 111 182 86
+a 641 646 39
+a 198 78 93
+a 42 58 53
+a 80 567 59
+a 492 502 56
+a 349 228 51
+a 45 139 30
+a 284 702 85
+a 844 868 34
+a 568 741 39
+a 536 713 37
+a 780 886 3
+a 786 369 6
+a 747 356 74
+a 436 439 73
+a 17 112 8
+a 563 953 12
+a 145 122 74
+a 135 49 26
+a 389 273 31
+a 727 39 4
+a 971 722 43
+a 12 36 29
+a 108 126 71
+a 766 962 80
+a 117 225 66
+a 326 47 53
+a 573 153 54
+a 3 232 80
+a 730 345 43
+a 15 78 69
+a 849 293 98
+a 34 274 34
+a 277 370 54
+a 562 227 43
+a 978 709 6
+a 126 500 37
+a 202 466 31
+a 471 97 39
+a 191 494 7
+a 747 297 28
+a 420 346 22
+a 427 882 94
+a 18 291 21
+a 24 144 2
+a 37 88 83
+a 233 7 16
+a 129 579 95
+a 913 22 74
+a 426 362 14
+a 654 518 26
+a 271 276 88
+a 812 560 12
+a 310 639 82
+a 341 703 25
+a 45 84 28
+a 511 448 19
+a 777 789 58
+a 579 231 39
+a 32 121 23
+a 737 517 8
+a 367 586 24
+a 31 456 56
+a 44 111 63
+a 172 726 16
+a 1 6 69
+a 605 850 94
+a 468 214 54
+a 357 851 5
+a 25 88 66
+a 291 322 19
+a 164 171 24
+a 11 20 6
+a 80 165 87
+a 721 40 86
+a 594 513 43
+a 439 87 94
+a 177 243 54
+a 423 467 7
+a 353 158 45
+a 173 205 64
+a 303 405 66
+a 578 474 98
+a 460 338 80
+a 281 429 29
+a 476 314 31
+a 285 231 54
+a 814 590 63
+a 326 175 70
+a 671 810 70
+a 153 297 96
+a 58 992 61
+a 250 525 88
+a 4 45 78
+a 14 190 38
+a 50 126 28
+a 545 45 64
+a 11 49 27
+a 767 936 37
+a 455 344 95
+a 934 579 79
+a 873 693 31
+a 224 315 49
+a 210 489 58
+a 427 171 71
+a 161 211 1
+a 700 84 18
+a 52 143 64
+a 244 575 98
+a 171 802 11
+a 86 495 73
+a 24 171 67
+a 18 767 19
+a 13 17 81
+a 916 878 5
+a 285 64 35
+a 120 269 19
+a 16 364 71
+a 588 53 30
+a 378 580 22
+a 15 103 11
+a 222 8 89
+a 199 348 63
+a 697 272 75
+a 459 989 58
+a 151 65 72
+a 28 49 97
+a 762 37 100
+a 58 32 99
+a 87 167 7
+a 87 5 35
+a 929 251 31
+a 25 53 100
+a 225 321 10
+a 58 25 76
+a 21 11 9
+a 22 168 21
+a 1000 918 69
+a 157 34 67
+a 639 378 63
+a 18 8 40
+a 343 666 58
+a 47 136 20
+a 27 21 9
+a 27 553 35
+a 661 759 61
+a 348 312 78
+a 11 8 22
+a 355 293 25
+a 499 474 63
+a 402 297 45
+a 379 281 3
+a 387 856 94
+a 150 831 40
+a 318 414 8
+a 771 42 97
+a 980 29 60
+a 883 163 78
+a 307 15 97
+a 451 16 22
+a 47 281 57
+a 781 627 65
+a 520 462 60
+a 688 521 2
+a 112 132 57
+a 553 90 22
+a 478 165 44
+a 472 636 39
+a 268 89 92
+a 17 232 19
+a 21 652 83
+a 68 799 60
+a 763 596 99
+a 107 233 7
+a 1 25 51
+a 78 28 58
+a 640 840 35
+a 1 129 95
+a 24 56 64
+a 201 32 50
+a 120 981 73
+a 519 38 5
+a 52 185 81
+a 112 465 7
+a 411 460 82
+a 804 447 66
+a 464 707 65
+a 389 444 88
+a 83 149 57
+a 200 233 23
+a 198 102 40
+a 800 530 85
+a 360 151 49
+a 230 823 25
+a 6 21 16
+a 508 1 62
+a 176 451 88
+a 12 76 56
+a 288 1 76
+a 334 123 5
+a 903 383 45
+a 298 152 40
+a 17 3 47
+a 908 634 69
+a 194 48 94
+a 181 387 17
+a 782 82 37
+a 925 263 11
+a 696 57 54
+a 115 172 56
+a 409 612 74
+a 512 575 14
+a 720 875 39
+a 8 479 60
+a 11 995 50
+a 881 593 84
+a 774 229 18
+a 573 957 59
+a 200 738 84
+a 531 665 63
+a 33 37 25
+a 202 602 20
+a 35 130 42
+a 714 926 64
+a 170 257 24
+a 914 247 25
+a 555 202 21
+a 122 170 6
+a 113 87 83
+a 37 684 44
+a 7 24 32
+a 285 873 69
+a 485 981 86
+a 430 865 1
+a 791 627 67
+a 332 270 51
+a 7 82 22
+a 64 902 2
+a 105 125 69
+a 154 944 54
+a 285 271 9
+a 62 974 71
+a 220 818 77
+a 3 322 34
+a 49 79 25
+a 595 844 45
+a 824 191 83
+a 6 32 17
+a 326 580 2
+a 581 15 55
+a 424 588 20
+a 900 65 43
+a 214 287 55
+a 315 290 85
+a 67 123 53
+a 114 654 96
+a 31 42 89
+a 483 487 90
+a 6 12 44
+a 349 516 7
+a 153 628 56
+a 275 394 52
+a 101 34 82
+a 12 20 39
+a 126 82 75
+a 597 179 37
+a 22 7 49
+a 961 929 48
+a 489 148 71
+a 531 861 60
+a 329 3 53
+a 40 69 18
+a 659 139 61
+a 847 678 42
+a 218 125 72
+a 40 235 25
+a 687 595 68
+a 11 41 4
+a 83 413 78
+a 895 521 9
+a 650 367 89
+a 746 515 13
+a 7 5 5
+a 136 240 6
+a 468 541 75
+a 85 951 92
+a 30 265 25
+a 911 263 49
+a 36 49 30
+a 995 224 22
+a 61 569 69
+a 259 401 99
+a 776 41 57
+a 251 459 26
+a 87 365 9
+a 286 346 6
+a 25 114 19
+a 662 594 95
+a 141 128 23
+a 13 212 48
+a 642 394 96
+a 576 180 11
+a 156 332 15
+a 531 201 4
+a 84 406 6
+a 439 620 2
+a 281 430 2
+a 72 95 32
+a 239 601 8
+a 186 791 46
+a 8 12 47
+a 20 62 80
+a 39 46 31
+a 43 203 74
+a 305 27 8
+a 435 47 96
+a 207 282 81
+a 39 60 70
+a 154 557 69
+a 525 867 56
+a 37 38 50
+a 238 906 70
+a 902 146 86
+a 455 430 40
+a 327 51 60
+a 66 96 41
+a 9 17 76
+a 26 281 20
+a 9 2 100
+a 508 546 3
+a 737 700 52
+a 568 40 62
+a 544 540 59
+a 44 144 71
+a 975 175 43
+a 645 6 70
+a 520 18 86
+a 7 336 56
+a 233 665 45
+a 154 276 96
+a 71 227 23
+a 284 276 54
+a 46 238 23
+a 34 52 86
+a 420 978 73
+a 74 728 25
+a 221 251 76
+a 356 195 72
+a 8 974 74
+a 125 914 29
+a 39 151 36
+a 162 17 40
+a 95 878 32
+a 759 92 46
+a 198 60 88
+a 741 322 61
+a 28 111 61
+a 648 892 33
+a 27 60 75
+a 390 70 79
+a 653 456 54
+a 737 286 72
+a 403 33 69
+a 998 744 25
+a 798 682 5
+a 981 190 89
+a 182 185 97
+a 359 265 58
+a 781 130 56
+a 491 314 70
+a 89 57 71
+a 102 169 54
+a 316 837 70
+a 85 140 53
+a 102 128 48
+a 510 787 67
+a 223 44 97
+a 55 143 82
+a 440 26 45
+a 565 209 88
+a 870 99 23
+a 50 215 97
+a 283 7 27
+a 232 906 81
+a 292 14 45
+a 244 355 6
+a 315 676 56
+a 51 166 42
+a 424 189 14
+a 38 87 94
+a 235 11 97
+a 119 8 3
+a 526 404 82
+a 319 240 41
+a 940 496 88
+a 17 153 83
+a 672 963 90
+a 735 729 9
+a 928 951 41
+a 464 678 25
+a 159 338 46
+a 763 423 90
+a 549 900 21
+a 15 28 100
+a 208 355 83
+a 600 636 81
+a 43 146 71
+a 332 864 15
+a 196 935 9
+a 389 70 57
+a 40 44 41
+a 16 17 50
+a 460 562 12
+a 387 472 81
+a 370 440 83
+a 17 28 30
+a 321 888 43
+a 48 86 60
+a 297 255 48
+a 263 357 71
+a 406 265 95
+a 798 581 38
+a 203 145 82
+a 8 31 45
+a 508 25 97
+a 88 109 3
+a 325 719 33
+a 60 161 2
+a 838 633 10
+a 43 156 22
+a 310 381 48
+a 181 314 14
+a 845 227 13
+a 263 210 59
+a 810 721 58
+a 961 394 30
+a 20 22 32
+a 765 248 1
+a 80 79 19
+a 877 726 81
+a 562 232 95
+a 820 45 7
+a 563 83 72
+a 167 992 41
+a 17 64 99
+a 242 548 69
+a 154 31 84
+a 10 11 3
+a 16 129 63
+a 412 612 92
+a 725 379 2
+a 565 130 35
+a 44 118 38
+a 904 667 23
+a 297 64 88
+a 398 560 34
+a 608 400 19
+a 804 409 27
+a 926 72 18
+a 306 405 65
+a 849 394 28
+a 884 931 77
+a 874 618 7
+a 108 536 54
+a 222 538 42
+a 72 39 84
+a 53 205 70
+a 293 59 82
+a 16 19 84
+a 172 721 37
+a 63 615 6
+a 7 48 99
+a 65 110 93
+a 935 706 51
+a 692 664 94
+a 84 234 31
+a 263 275 64
+a 952 146 35
+a 628 649 89
+a 41 123 95
+a 111 849 56
+a 36 2 59
+a 938 404 71
+a 33 36 36
+a 50 538 46
+a 325 229 15
+a 167 937 73
+a 686 27 1
+a 735 108 96
+a 80 559 99
+a 89 355 23
+a 305 31 79
+a 387 138 21
+a 139 188 5
+a 855 483 46
+a 588 415 98
+a 290 712 89
+a 54 252 2
+a 231 320 94
+a 413 41 5
+a 835 940 23
+a 844 93 37
+a 259 575 41
+a 922 720 76
+a 109 132 58
+a 825 607 10
+a 99 269 11
+a 192 477 10
+a 31 25 74
+a 745 748 51
+a 633 533 25
+a 766 198 19
+a 166 345 63
+a 4 62 85
+a 156 703 65
+a 160 801 14
+a 81 106 55
+a 809 683 54
+a 534 195 33
+a 457 979 32
+a 368 81 31
+a 67 8 11
+a 786 309 83
+a 695 627 17
+a 249 306 17
+a 201 246 38
+a 575 699 79
+a 49 109 43
+a 150 132 88
+a 802 787 51
+a 327 807 68
+a 139 547 37
+a 1 52 32
+a 971 859 89
+a 27 119 65
+a 129 700 79
+a 92 73 9
+a 483 839 80
+a 68 89 79
+a 447 901 1
+a 112 558 80
+a 17 24 85
+a 140 606 49
+a 836 807 89
+a 545 853 5
+a 211 720 27
+a 19 28 74
+a 314 52 3
+a 806 70 87
+a 135 158 2
+a 199 23 5
+a 845 148 11
+a 879 79 8
+a 87 166 25
+a 223 598 94
+a 519 221 1
+a 442 692 47
+a 21 73 86
+a 45 155 6
+a 23 20 13
+a 9 11 30
+a 61 402 7
+a 451 538 22
+a 522 725 50
+a 321 286 15
+a 735 657 63
+a 91 172 67
+a 285 132 32
+a 267 10 82
+a 296 36 1
+a 115 154 43
+a 521 63 34
+a 25 67 58
+a 392 629 91
+a 19 36 35
+a 82 160 82
+a 135 547 9
+a 250 645 36
+a 95 110 80
+a 967 494 37
+a 314 933 70
+a 496 808 47
+a 212 241 18
+a 1 18 8
+a 527 659 79
+a 782 161 80
+a 118 426 58
+a 127 133 99
+a 285 446 28
+a 2 100 18
+a 401 206 60
+a 356 568 97
+a 65 260 50
+a 92 283 41
+a 32 19 90
+a 365 16 93
+a 79 245 38
+a 893 634 48
+a 43 65 54
+a 35 76 16
+a 20 43 69
+a 647 109 82
+a 998 634 61
+a 502 304 63
+a 565 505 92
+a 674 719 7
+a 70 144 87
+a 287 139 12
+a 420 592 18
+a 812 412 95
+a 305 727 79
+a 898 758 21
+a 4 490 90
+a 83 555 2
+a 332 619 87
+a 764 443 88
+a 30 82 100
+a 83 427 23
+a 44 359 30
+a 136 889 61
+a 1 729 19
+a 221 995 24
+a 442 920 42
+a 110 770 84
+a 36 152 16
+a 107 46 3
+a 31 46 25
+a 742 347 9
+a 6 8 88
+a 354 405 96
+a 50 561 86
+a 232 860 12
+a 45 142 11
+a 392 421 62
+a 250 380 15
+a 407 36 29
+a 79 401 3
+a 912 498 81
+a 781 620 57
+a 143 245 2
+a 406 316 65
+a 64 87 42
+a 765 619 26
+a 209 426 50
+a 835 421 100
+a 16 397 19
+a 824 406 38
+a 960 814 19
+a 389 357 85
+a 481 671 90
+a 9 16 16
+a 964 189 52
+a 16 26 87
+a 328 97 34
+a 895 466 93
+a 308 76 83
+a 117 23 38
+a 97 144 36
+a 149 963 92
+a 11 26 4
+a 533 764 66
+a 304 230 94
+a 522 724 11
+a 43 42 58
+a 213 49 50
+a 178 67 81
+a 6 11 6
+a 63 32 54
+a 147 640 86
+a 553 356 71
+a 993 145 3
+a 808 547 32
+a 403 96 51
+a 2 114 57
+a 797 287 63
+a 246 320 69
+a 384 591 4
+a 54 375 22
+a 248 192 48
+a 64 126 23
+a 636 325 51
+a 292 489 79
+a 18 43 58
+a 403 290 40
+a 232 146 36
+a 543 147 79
+a 819 479 12
+a 49 82 64
+a 398 593 43
+a 656 165 15
+a 704 847 17
+a 425 477 59
+a 5 16 76
+a 385 143 3
+a 484 624 93
+a 141 174 30
+a 893 774 29
+a 232 759 60
+a 785 692 16
+a 86 612 72
+a 146 32 86
+a 45 72 94
+a 856 722 85
+a 30 22 67
+a 663 392 68
+a 590 390 75
+a 269 705 80
+a 217 245 32
+a 36 86 93
+a 118 282 27
+a 562 525 69
+a 74 100 91
+a 13 63 94
+a 625 46 2
+a 17 18 51
+a 118 979 48
+a 266 188 27
+a 91 147 97
+a 207 668 92
+a 919 17 26
+a 433 767 11
+a 722 136 64
+a 848 217 45
+a 14 122 48
+a 305 584 37
+a 347 102 14
+a 421 303 10
+a 57 65 93
+a 257 950 14
+a 648 534 34
+a 126 854 96
+a 335 129 86
+a 43 322 49
+a 117 280 66
+a 648 342 11
+a 41 65 71
+a 85 300 47
+a 31 727 60
+a 524 603 50
+a 17 621 1
+a 13 20 46
+a 213 43 15
+a 578 913 49
+a 81 2 18
+a 10 5 52
+a 539 547 66
+a 38 21 82
+a 37 699 13
+a 46 48 32
+a 282 415 26
+a 577 501 98
+a 370 148 49
+a 377 438 38
+a 499 601 53
+a 222 336 65
+a 5 2 2
+a 766 215 5
+a 799 222 25
+a 194 257 72
+a 939 698 37
+a 255 732 59
+a 770 381 66
+a 154 431 56
+a 18 243 84
+a 140 90 8
+a 272 119 90
+a 61 110 17
+a 474 208 71
+a 647 261 93
+a 985 327 63
+a 7 154 50
+a 13 5 78
+a 137 10 55
+a 455 108 23
+a 76 38 7
+a 306 746 69
+a 940 957 5
+a 282 594 22
+a 242 577 26
+a 215 643 87
+a 454 914 94
+a 2 173 70
+a 524 600 29
+a 970 982 14
+a 373 670 9
+a 679 102 95
+a 472 707 17
+a 976 340 81
+a 980 746 62
+a 175 322 36
+a 65 261 88
+a 180 478 41
+a 51 99 8
+a 63 530 93
+a 773 298 57
+a 47 550 57
+a 590 837 78
+a 39 18 51
+a 2 6 43
+a 715 153 41
+a 12 8 82
+a 776 207 32
+a 122 12 100
+a 539 159 36
+a 58 76 56
+a 416 350 21
+a 181 69 92
+a 113 257 45
+a 367 200 30
+a 194 302 43
+a 558 42 53
+a 6 691 57
+a 246 243 22
+a 745 849 69
+a 6 69 16
+a 150 123 7
+a 917 587 7
+a 817 934 44
+a 29 10 91
+a 92 139 11
+a 623 384 8
+a 214 162 11
+a 424 20 48
+a 436 413 2
+a 167 182 32
+a 461 450 62
+a 14 48 26
+a 341 112 100
+a 135 736 51
+a 647 449 38
+a 431 284 71
+a 583 932 94
+a 15 169 18
+a 779 213 100
+a 135 22 63
+a 512 92 3
+a 100 113 94
+a 180 967 96
+a 465 49 67
+a 198 863 98
+a 317 7 22
+a 49 35 19
+a 56 79 29
+a 95 844 79
+a 374 348 9
+a 102 900 74
+a 237 581 45
+a 385 622 93
+a 32 104 27
+a 100 1 34
+a 54 391 91
+a 184 519 48
+a 21 39 31
+a 117 109 55
+a 228 578 23
+a 366 699 15
+a 74 421 60
+a 262 273 95
+a 294 334 74
+a 413 436 33
+a 15 193 7
+a 820 340 54
+a 217 912 24
+a 202 30 56
+a 5 77 89
+a 22 43 12
+a 612 676 20
+a 119 47 2
+a 328 244 13
+a 5 4 5
+a 840 411 21
+a 13 73 82
+a 67 529 27
+a 105 360 87
+a 293 812 2
+a 40 84 1
+a 327 131 6
+a 781 355 94
+a 641 964 97
+a 730 125 14
+a 11 85 40
+a 704 229 58
+a 772 11 20
+a 587 112 89
+a 288 455 1
+a 307 184 55
+a 736 440 56
+a 282 11 90
+a 502 327 97
+a 397 93 8
+a 741 201 30
+a 6 65 7
+a 886 245 97
+a 563 69 42
+a 676 678 71
+a 54 27 77
+a 13 21 48
+a 406 579 89
+a 128 618 26
+a 76 471 36
+a 22 34 88
+a 734 706 50
+a 10 71 3
+a 934 388 66
+a 771 810 19
+a 784 211 17
+a 73 788 37
+a 7 15 76
+a 221 774 92
+a 21 72 82
+a 826 620 74
+a 57 508 12
+a 281 417 69
+a 175 231 59
+a 262 826 57
+a 297 207 8
+a 738 696 92
+a 4 120 20
+a 984 914 80
+a 134 613 87
+a 832 266 84
+a 600 893 34
+a 491 81 85
+a 53 64 43
+a 172 443 88
+a 211 474 48
+a 584 580 6
+a 79 683 17
+a 506 839 59
+a 20 116 92
+a 354 515 46
+a 155 214 55
+a 32 35 24
+a 265 163 38
+a 106 669 85
+a 288 21 50
+a 786 104 92
+a 32 128 67
+a 138 745 30
+a 39 737 26
+a 864 487 87
+a 34 631 55
+a 60 174 43
+a 189 23 10
+a 635 40 25
+a 73 172 100
+a 305 297 60
+a 444 586 23
+a 670 486 84
+a 48 367 69
+a 387 38 25
+a 108 255 21
+a 205 582 6
+a 60 70 14
+a 303 34 5
+a 277 484 51
+a 144 987 9
+a 73 223 57
+a 6 2 22
+a 154 474 68
+a 571 383 98
+a 43 83 73
+a 38 70 57
+a 803 77 59
+a 6 9 3
+a 584 790 47
+a 737 272 46
+a 134 39 9
+a 176 843 35
+a 23 65 49
+a 756 759 87
+a 301 727 75
+a 752 434 88
+a 35 178 17
+a 230 267 7
+a 948 252 13
+a 492 401 64
+a 85 46 78
+a 16 5 24
+a 910 473 20
+a 46 59 83
+a 809 596 90
+a 300 557 59
+a 602 949 11
+a 759 521 36
+a 578 473 66
+a 34 474 39
+a 899 945 49
+a 277 350 32
+a 589 621 74
+a 752 386 89
+a 528 313 79
+a 24 45 46
+a 95 793 98
+a 60 106 67
+a 10 45 12
+a 59 279 74
+a 433 419 81
+a 817 796 50
+a 571 422 3
+a 407 163 38
+a 223 645 17
+a 429 173 43
+a 4 13 62
+a 581 540 68
+a 681 236 44
+a 721 145 95
+a 25 181 80
+a 301 151 11
+a 440 108 96
+a 65 116 62
+a 133 90 95
+a 199 760 21
+a 878 249 40
+a 435 732 42
+a 47 78 1
+a 113 449 57
+a 187 135 55
+a 33 43 31
+a 105 345 29
+a 563 470 12
+a 883 629 7
+a 10 13 13
+a 25 89 35
+a 517 567 74
+a 515 527 44
+a 153 457 36
+a 368 848 51
+a 70 732 75
+a 58 61 86
+a 62 108 86
+a 283 586 10
+a 186 322 83
+a 267 118 98
+a 477 781 100
+a 112 217 34
+a 616 134 72
+a 513 35 6
+a 528 150 57
+a 141 200 98
+a 110 653 92
+a 23 237 20
+a 711 803 31
+a 21 78 56
+a 32 36 36
+a 844 99 1
+a 913 178 49
+a 460 587 29
+a 897 765 58
+a 556 260 92
+a 975 35 5
+a 116 190 45
+a 4 17 11
+a 548 958 41
+a 834 804 67
+a 69 473 47
+a 29 42 11
+a 815 418 58
+a 18 12 24
+a 146 159 60
+a 346 667 34
+a 76 538 34
+a 151 451 63
+a 39 441 88
+a 447 41 80
+a 44 70 7
+a 870 26 57
+a 122 499 45
+a 489 499 54
+a 9 33 24
+a 959 759 11
+a 33 2 62
+a 12 175 39
+a 177 391 32
+a 710 512 17
+a 119 141 30
+a 792 572 66
+a 17 21 41
+a 242 356 4
+a 34 511 57
+a 519 918 55
+a 152 112 89
+a 572 34 43
+a 260 604 23
+a 632 873 52
+a 4 63 7
+a 266 832 55
+a 194 5 48
+a 111 112 63
+a 191 43 60
+a 988 946 54
+a 43 125 6
+a 141 628 15
+a 909 626 45
+a 64 325 96
+a 68 189 51
+a 479 885 51
+a 17 52 9
+a 930 542 61
+a 277 382 31
+a 142 516 52
+a 15 37 12
+a 753 679 88
+a 566 317 60
+a 2 45 85
+a 414 255 28
+a 379 588 76
+a 373 895 99
+a 136 456 96
+a 5 14 59
+a 220 764 100
+a 17 51 43
+a 63 76 82
+a 171 180 53
+a 192 313 22
+a 339 59 44
+a 61 107 100
+a 130 76 92
+a 973 124 40
+a 131 184 12
+a 542 51 15
+a 830 102 85
+a 273 222 6
+a 298 656 79
+a 12 33 30
+a 529 213 27
+a 55 123 18
+a 140 511 11
+a 207 160 82
+a 610 49 24
+a 453 220 27
+a 191 306 24
+a 189 434 42
+a 432 588 94
+a 468 19 70
+a 84 114 66
+a 129 117 39
+a 966 234 25
+a 660 187 37
+a 730 45 32
+a 19 59 92
+a 265 948 63
+a 95 77 74
+a 8 32 64
+a 75 557 85
+a 725 384 21
+a 591 125 35
+a 10 44 100
+a 56 29 4
+a 248 323 6
+a 185 75 94
+a 43 167 13
+a 68 566 59
+a 148 387 98
+a 524 83 69
+a 108 115 62
+a 217 407 29
+a 230 666 86
+a 15 7 36
+a 188 344 63
+a 752 875 74
+a 752 820 85
+a 233 803 52
+a 14 252 8
+a 767 138 98
+a 398 648 11
+a 190 447 59
+a 179 70 85
+a 630 865 99
+a 813 342 26
+a 575 694 54
+a 30 156 72
+a 315 166 61
+a 103 124 99
+a 227 114 17
+a 130 307 35
+a 382 828 93
+a 210 848 6
+a 27 538 98
+a 2 72 50
+a 875 358 10
+a 334 489 24
+a 156 174 95
+a 800 157 80
+a 329 697 44
+a 77 567 90
+a 128 585 45
+a 29 51 28
+a 508 279 3
+a 94 393 31
+a 591 995 16
+a 53 121 5
+a 71 265 33
+a 680 298 51
+a 840 184 38
+a 300 144 66
+a 44 1 43
+a 389 436 72
+a 235 238 82
+a 113 636 20
+a 285 484 91
+a 415 878 80
+a 13 430 80
+a 368 854 100
+a 11 5 19
+a 27 602 57
+a 30 161 58
+a 452 237 36
+a 73 470 44
+a 395 404 8
+a 156 178 58
+a 826 411 8
+a 282 70 27
+a 138 284 97
+a 584 165 14
+a 935 178 20
+a 668 536 88
+a 26 75 72
+a 712 467 88
+a 17 11 61
+a 147 336 91
+a 758 665 87
+a 174 16 18
+a 133 568 24
+a 4 97 98
+a 584 158 54
+a 842 201 40
+a 220 366 84
+a 247 803 16
+a 955 607 66
+a 667 633 77
+a 137 178 49
+a 80 196 87
+a 80 401 7
+a 809 695 100
+a 32 10 70
+a 838 166 59
+a 636 377 77
+a 459 731 29
+a 368 330 41
+a 9 83 18
+a 281 650 52
+a 665 425 20
+a 123 3 43
+a 49 149 75
+a 83 527 71
+a 18 44 48
+a 714 829 5
+a 92 120 88
+a 142 559 84
+a 6 28 19
+a 15 879 100
+a 80 519 33
+a 751 914 68
+a 55 156 4
+a 33 12 39
+a 179 87 85
+a 413 190 60
+a 690 903 83
+a 526 186 89
+a 876 124 52
+a 944 572 97
+a 299 531 78
+a 62 674 8
+a 21 17 7
+a 71 277 53
+a 584 243 66
+a 278 598 26
+a 326 367 42
+a 481 541 96
+a 173 202 49
+a 259 940 94
+a 118 123 25
+a 670 285 72
+a 63 65 59
+a 577 108 3
+a 631 388 70
+a 940 330 94
+a 361 928 20
+a 600 72 72
+a 760 170 28
+a 198 479 46
+a 237 234 93
+a 174 116 38
+a 737 686 29
+a 159 9 74
+a 108 142 47
+a 404 595 63
+a 307 221 73
+a 259 255 59
+a 7 136 93
+a 523 603 16
+a 615 180 69
+a 132 374 58
+a 189 200 55
+a 309 228 96
+a 998 228 86
+a 46 60 47
+a 121 113 7
+a 26 800 48
+a 750 958 21
+a 21 199 43
+a 27 53 63
+a 631 394 46
+a 526 864 43
+a 579 277 33
+a 12 10 14
+a 632 220 28
+a 451 556 99
+a 899 313 81
+a 24 37 40
+a 65 88 1
+a 962 930 73
+a 127 216 95
+a 223 439 76
+a 726 458 67
+a 4 24 48
+a 613 327 21
+a 321 601 97
+a 384 726 42
+a 46 17 45
+a 965 955 63
+a 451 138 40
+a 473 820 18
+a 308 65 75
+a 3 357 81
+a 105 104 88
+a 567 399 83
+a 16 65 14
+a 705 420 51
+a 215 481 45
+a 138 469 66
+a 133 479 88
+a 103 208 98
+a 263 10 62
+a 243 177 41
+a 203 4 90
+a 66 108 74
+a 831 709 64
+a 32 79 2
+a 52 843 30
+a 28 703 60
+a 161 175 34
+a 773 237 43
+a 38 91 47
+a 928 635 85
+a 307 160 20
+a 245 510 49
+a 8 69 57
+a 13 22 26
+a 69 217 60
+a 344 662 44
+a 32 34 48
+a 841 888 53
+a 941 124 52
+a 69 381 53
+a 375 35 11
+a 27 92 3
+a 45 143 79
+a 195 623 59
+a 486 586 8
+a 558 906 13
+a 162 121 15
+a 380 980 52
+a 65 128 67
+a 966 610 10
+a 27 162 32
+a 92 989 24
+a 58 906 59
+a 197 98 25
+a 31 77 75
+a 46 446 50
+a 798 650 11
+a 305 213 25
+a 724 416 53
+a 81 68 16
+a 38 123 2
+a 182 851 96
+a 40 49 22
+a 749 134 38
+a 364 94 74
+a 694 534 94
+a 87 193 51
+a 896 42 31
+a 226 25 48
+a 151 223 26
+a 560 8 93
+a 53 478 18
+a 654 195 8
+a 551 560 36
+a 101 522 74
+a 151 117 8
+a 20 2 98
+a 343 298 48
+a 76 91 80
+a 566 404 27
+a 32 4 32
+a 378 823 95
+a 81 85 75
+a 419 585 63
+a 285 146 48
+a 53 125 52
+a 287 248 56
+a 890 95 25
+a 191 472 74
+a 874 977 35
+a 188 206 92
+a 20 86 66
+a 510 744 22
+a 2 43 95
+a 376 148 69
+a 747 171 29
+a 895 671 26
+a 98 12 97
+a 289 685 89
+a 162 138 58
+a 24 39 15
+a 258 563 37
+a 704 92 94
+a 825 158 93
+a 480 453 36
+a 13 44 40
+a 223 860 68
+a 50 15 15
+a 493 803 48
+a 68 770 66
+a 614 993 54
+a 194 796 17
+a 984 776 30
+a 723 193 28
+a 635 110 67
+a 261 578 84
+a 471 78 98
+a 22 198 63
+a 9 30 90
+a 77 176 6
+a 262 128 58
+a 731 714 45
+a 315 215 19
+a 18 438 5
+a 720 689 8
+a 369 184 56
+a 548 639 72
+a 831 498 86
+a 243 14 4
+a 199 726 68
+a 785 121 59
+a 5 48 39
+a 64 187 75
+a 835 207 34
+a 377 435 11
+a 81 897 5
+a 21 24 57
+a 446 379 54
+a 63 647 82
+a 7 31 56
+a 61 94 30
+a 105 347 8
+a 195 997 66
+a 350 468 72
+a 508 16 5
+a 786 332 6
+a 998 512 54
+a 608 106 25
+a 876 492 6
+a 166 284 91
+a 489 58 10
+a 769 164 34
+a 4 27 37
+a 800 273 41
+a 378 461 59
+a 43 296 26
+a 580 177 41
+a 36 415 94
+a 654 958 54
+a 129 159 91
+a 94 218 9
+a 734 703 28
+a 876 116 94
+a 95 307 79
+a 153 312 81
+a 13 76 32
+a 67 880 2
+a 116 178 27
+a 472 1 89
+a 268 813 90
+a 697 6 58
+a 201 3 73
+a 234 292 68
+a 126 172 12
+a 689 105 20
+a 209 137 33
+a 468 139 95
+a 245 755 7
+a 392 361 71
+a 39 246 5
+a 635 278 42
+a 941 92 89
+a 861 902 65
+a 54 87 9
+a 904 761 57
+a 234 620 4
+a 1 9 6
+a 638 21 97
+a 546 862 74
+a 618 825 50
+a 86 157 80
+a 648 283 34
+a 228 221 55
+a 822 331 62
+a 43 191 64
+a 379 722 26
+a 18 98 80
+a 851 439 62
+a 119 237 14
+a 268 781 91
+a 444 677 41
+a 496 789 4
+a 4 234 30
+a 13 762 82
+a 164 862 70
+a 932 311 7
+a 28 312 67
+a 486 108 28
+a 520 739 77
+a 517 152 61
+a 816 73 37
+a 994 804 73
+a 19 22 62
+a 55 62 78
+a 64 346 14
+a 23 399 30
+a 937 437 37
+a 142 3 55
+a 704 9 58
+a 3 23 91
+a 886 889 91
+a 402 350 13
+a 575 630 92
+a 16 214 78
+a 226 869 21
+a 808 665 71
+a 915 739 32
+a 477 589 12
+a 685 715 39
+a 238 255 40
+a 326 614 36
+a 45 144 88
+a 793 287 12
+a 972 234 45
+a 547 270 76
+a 268 8 15
+a 339 443 95
+a 515 556 76
+a 304 278 36
+a 31 294 56
+a 98 228 85
+a 694 113 97
+a 712 173 86
+a 65 550 78
+a 669 11 29
+a 974 20 73
+a 52 17 59
+a 52 287 12
+a 751 441 93
+a 992 106 78
+a 148 27 34
+a 35 347 56
+a 349 863 5
+a 239 273 13
+a 234 592 31
+a 26 14 65
+a 628 1000 46
+a 21 64 29
+a 630 398 83
+a 192 547 37
+a 41 512 64
+a 570 78 17
+a 29 280 44
+a 346 512 4
+a 233 144 2
+a 655 943 14
+a 46 107 57
+a 580 196 41
+a 40 943 6
+a 149 648 14
+a 11 294 100
+a 18 7 49
+a 446 6 11
+a 699 409 8
+a 375 2 32
+a 317 143 77
+a 22 13 62
+a 23 37 16
+a 143 617 52
+a 60 75 35
+a 289 9 98
+a 314 136 2
+a 8 30 57
+a 507 890 23
+a 153 194 78
+a 160 793 34
+a 82 134 13
+a 480 786 25
+a 919 378 91
+a 503 619 49
+a 518 334 77
+a 214 366 54
+a 1 277 39
+a 20 309 71
+a 289 956 28
+a 587 665 74
+a 263 168 19
+a 748 191 17
+a 249 24 62
+a 232 258 65
+a 135 23 3
+a 390 64 65
+a 9 60 10
+a 639 770 52
+a 433 543 68
+a 718 591 30
+a 71 109 55
+a 756 637 70
+a 7 441 10
+a 812 928 46
+a 48 502 14
+a 109 244 68
+a 413 351 87
+a 675 803 29
+a 110 633 51
+a 49 70 35
+a 529 53 61
+a 443 437 90
+a 575 267 23
+a 42 596 48
+a 848 752 94
+a 396 989 78
+a 42 56 41
+a 745 785 53
+a 331 526 46
+a 443 475 43
+a 652 561 31
+a 416 472 91
+a 14 392 54
+a 436 284 57
+a 752 769 32
+a 581 614 76
+a 23 223 50
+a 112 243 85
+a 405 259 72
+a 111 811 63
+a 112 109 46
+a 240 340 59
+a 521 160 62
+a 559 233 53
+a 322 422 49
+a 132 684 84
+a 9 532 77
+a 588 627 77
+a 2 77 2
+a 19 366 16
+a 7 9 99
+a 184 41 83
+a 295 36 81
+a 344 164 95
+a 14 196 55
+a 885 479 58
+a 9 1 69
+a 434 616 61
+a 180 272 73
+a 319 152 93
+a 363 953 12
+a 394 242 88
+a 2 64 43
+a 2 782 34
+a 776 821 99
+a 533 248 84
+a 865 399 71
+a 1 115 42
+a 608 666 73
+a 133 187 27
+a 161 185 90
+a 547 464 33
+a 467 5 92
+a 153 180 87
+a 354 20 99
+a 950 389 33
+a 363 331 76
+a 124 11 41
+a 158 229 92
+a 1 7 15
+a 613 402 16
+a 868 267 80
+a 920 937 13
+a 685 801 98
+a 672 30 6
+a 283 184 50
+a 92 74 28
+a 283 43 37
+a 109 144 75
+a 123 310 80
+a 157 480 76
+a 54 85 25
+a 873 444 48
+a 14 45 52
+a 498 742 31
+a 7 35 94
+a 95 219 43
+a 154 2 54
+a 3 278 58
+a 363 816 28
+a 766 384 54
+a 579 559 99
+a 742 957 11
+a 112 255 23
+a 264 146 48
+a 899 533 28
+a 105 209 42
+a 583 637 62
+a 261 845 85
+a 14 113 70
+a 200 295 9
+a 506 229 11
+a 462 848 92
+a 63 277 46
+a 438 251 26
+a 200 629 43
+a 443 264 10
+a 530 120 96
+a 717 156 87
+a 4 155 11
+a 65 126 89
+a 56 78 65
+a 460 48 3
+a 326 938 30
+a 479 683 80
+a 38 422 26
+a 550 462 7
+a 10 24 49
+a 669 108 41
+a 3 70 45
+a 18 626 41
+a 381 58 89
+a 246 910 70
+a 238 98 27
+a 908 122 13
+a 885 103 95
+a 66 989 8
+a 9 7 45
+a 937 298 94
+a 89 897 20
+a 178 468 49
+a 759 27 30
+a 818 126 67
+a 248 918 94
+a 49 60 56
+a 91 48 57
+a 827 699 70
+a 110 62 85
+a 225 250 32
+a 994 816 37
+a 22 11 9
+a 614 969 96
+a 105 188 7
+a 247 71 53
+a 974 280 10
+a 841 534 67
+a 48 776 9
+a 586 841 87
+a 34 44 65
+a 1 299 29
+a 303 257 32
+a 327 424 100
+a 49 119 33
+a 355 65 63
+a 608 301 20
+a 773 359 6
+a 72 165 75
+a 383 88 54
+a 755 377 46
+a 99 291 11
+a 187 268 32
+a 665 783 64
+a 294 146 45
+a 114 501 54
+a 351 477 40
+a 154 971 12
+a 886 613 83
+a 11 96 30
+a 21 107 30
+a 278 593 89
+a 3 7 6
+a 868 500 99
+a 598 49 8
+a 269 385 10
+a 952 733 26
+a 7 320 1
+a 22 20 34
+a 938 370 83
+a 857 866 100
+a 684 5 71
+a 230 136 18
+a 304 909 31
+a 626 701 55
+a 81 375 77
+a 94 152 73
+a 117 153 24
+a 750 857 45
+a 218 970 49
+a 488 634 14
+a 30 133 58
+a 480 809 60
+a 475 287 2
+a 740 891 76
+a 125 155 62
+a 575 466 88
+a 569 665 83
+a 547 30 50
+a 58 451 82
+a 241 998 31
+a 452 110 15
+a 85 191 85
+a 208 59 81
+a 662 734 66
+a 24 4 70
+a 360 170 96
+a 878 110 85
+a 76 81 99
+a 14 178 67
+a 417 553 2
+a 40 72 78
+a 860 376 12
+a 310 189 43
+a 294 513 58
+a 13 31 36
+a 244 769 55
+a 335 80 97
+a 12 144 23
+a 243 336 83
+a 408 205 80
+a 79 43 73
+a 34 217 38
+a 151 136 70
+a 8 137 50
+a 3 24 40
+a 286 834 40
+a 8 3 36
+a 907 676 18
+a 859 31 62
+a 647 526 57
+a 74 278 29
+a 249 949 80
+a 284 216 58
+a 108 26 71
+a 176 611 64
+a 442 979 23
+a 896 285 22
+a 55 811 39
+a 678 566 38
+a 39 173 36
+a 310 382 8
+a 273 933 2
+a 20 37 30
+a 471 258 56
+a 401 3 66
+a 683 350 49
+a 11 12 59
+a 937 51 13
+a 109 233 88
+a 36 320 63
+a 802 17 95
+a 448 192 35
+a 575 964 40
+a 254 926 1
+a 458 820 88
+a 113 149 37
+a 989 748 84
+a 218 321 99
+a 601 658 98
+a 217 340 40
+a 892 961 96
+a 673 760 38
+a 84 151 59
+a 73 457 86
+a 780 519 92
+a 62 83 62
+a 307 493 96
+a 309 962 86
+a 828 835 18
+a 764 154 67
+a 731 438 75
+a 222 247 47
+a 533 960 16
+a 155 156 62
+a 632 194 56
+a 285 439 80
+a 134 356 37
+a 17 40 19
+a 298 304 37
+a 475 105 10
+a 54 77 4
+a 155 28 84
+a 878 253 29
+a 376 561 99
+a 10 55 64
+a 740 210 5
+a 140 333 98
+a 123 574 85
+a 586 208 39
+a 941 822 65
+a 921 344 66
+a 30 41 9
+a 333 319 49
+a 224 481 9
+a 886 412 3
+a 316 689 80
+a 388 986 49
+a 21 248 2
+a 20 484 51
+a 4 31 76
+a 82 182 54
+a 357 804 46
+a 82 653 98
+a 152 206 44
+a 462 536 22
+a 6 76 79
+a 266 115 5
+a 29 53 71
+a 36 220 10
+a 10 4 26
+a 169 908 39
+a 184 251 100
+a 751 663 52
+a 19 83 8
+a 627 188 67
+a 57 59 93
+a 634 923 51
+a 183 778 64
+a 18 143 16
+a 163 118 34
+a 443 856 89
+a 956 889 76
+a 857 365 98
+a 14 372 76
+a 870 559 58
+a 136 579 20
+a 13 200 66
+a 651 153 8
+a 6 730 14
+a 210 384 53
+a 453 75 9
+a 34 602 71
+a 94 50 35
+a 46 491 51
+a 79 204 58
+a 46 64 59
+a 493 907 37
+a 112 973 92
+a 716 78 28
+a 1 943 84
+a 287 13 62
+a 54 762 5
+a 466 910 4
+a 70 182 54
+a 655 310 25
+a 5 25 57
+a 2 272 50
+a 29 302 86
+a 103 805 77
+a 67 719 86
+a 234 88 82
+a 449 876 20
+a 29 217 6
+a 129 16 60
+a 45 316 93
+a 655 544 85
+a 10 22 53
+a 845 139 57
+a 751 671 26
+a 786 103 38
+a 674 314 60
+a 348 78 10
+a 66 22 16
+a 465 851 60
+a 59 60 100
+a 532 621 65
+a 364 617 76
+a 766 56 22
+a 298 106 36
+a 147 292 10
+a 114 10 6
+a 549 31 53
+a 57 19 73
+a 187 875 98
+a 417 530 41
+a 186 742 73
+a 45 199 64
+a 30 88 93
+a 192 217 79
+a 203 978 93
+a 759 327 84
+a 313 38 68
+a 453 391 95
+a 115 263 64
+a 679 854 26
+a 6 39 68
+a 6 289 91
+a 952 603 98
+a 438 480 12
+a 263 9 88
+a 761 67 72
+a 64 89 26
+a 1 56 51
+a 685 410 71
+a 21 54 37
+a 900 512 37
+a 146 586 93
+a 20 21 83
+a 108 78 74
+a 325 272 72
+a 121 100 50
+a 92 144 46
+a 145 2 68
+a 933 509 76
+a 470 4 87
+a 589 55 63
+a 666 850 42
+a 106 220 32
+a 221 101 66
+a 56 229 43
+a 450 195 1
+a 68 613 86
+a 25 37 90
+a 214 188 81
+a 719 809 59
+a 97 403 27
+a 19 168 64
+a 222 93 87
+a 222 205 96
+a 718 592 67
+a 692 37 39
+a 947 56 6
+a 119 386 89
+a 11 539 66
+a 780 576 85
+a 21 230 12
+a 778 66 74
+a 416 611 42
+a 15 8 66
+a 230 50 56
+a 910 562 19
+a 575 977 57
+a 603 154 4
+a 262 379 93
+a 302 739 18
+a 412 75 75
+a 30 89 63
+a 196 297 34
+a 98 105 25
+a 197 331 2
+a 480 261 72
+a 181 634 18
+a 568 307 49
+a 713 434 56
+a 864 911 2
+a 153 174 80
+a 401 971 88
+a 44 496 82
+a 122 722 74
+a 389 176 73
+a 143 663 16
+a 19 215 71
+a 821 666 95
+a 13 14 37
+a 440 858 92
+a 81 98 82
+a 209 34 25
+a 16 266 54
+a 236 484 75
+a 43 644 14
+a 80 803 63
+a 24 42 65
+a 436 224 73
+a 16 340 35
+a 134 492 65
+a 710 268 56
+a 172 544 10
+a 206 464 41
+a 827 577 18
+a 26 15 84
+a 976 717 40
+a 706 782 86
+a 263 317 31
+a 208 858 7
+a 340 107 24
+a 13 15 49
+a 124 33 46
+a 574 94 12
+a 700 177 59
+a 50 69 98
+a 241 110 49
+a 161 481 2
+a 644 189 29
+a 355 624 66
+a 576 936 82
+a 58 113 19
+a 966 859 53
+a 101 153 9
+a 280 109 1
+a 597 208 4
+a 440 323 36
+a 37 191 82
+a 41 443 66
+a 24 21 39
+a 855 659 87
+a 491 308 68
+a 811 401 69
+a 309 332 88
+a 669 430 86
+a 865 266 92
+a 60 339 91
+a 991 795 25
+a 46 261 23
+a 42 390 19
+a 566 210 29
+a 262 480 13
+a 138 223 29
+a 316 166 10
+a 85 770 75
+a 136 849 21
+a 98 133 8
+a 152 49 57
+a 573 700 10
+a 195 457 85
+a 307 79 97
+a 340 553 47
+a 153 154 11
+a 21 26 69
+a 371 763 37
+a 10 161 45
+a 26 253 49
+a 291 924 70
+a 260 711 97
+a 12 130 33
+a 329 645 94
+a 535 716 39
+a 996 807 51
+a 286 598 62
+a 193 103 98
+a 9 404 84
+a 286 671 47
+a 4 448 32
+a 95 57 74
+a 94 456 69
+a 332 560 34
+a 25 43 33
+a 852 309 30
+a 229 147 28
+a 653 52 20
+a 213 117 71
+a 98 154 46
+a 133 251 63
+a 129 244 68
+a 129 64 18
+a 48 123 4
+a 689 740 13
+a 94 118 56
+a 938 722 95
+a 202 632 31
+a 925 51 41
+a 482 457 55
+a 455 17 16
+a 69 139 66
+a 61 381 32
+a 98 134 81
+a 208 584 85
+a 244 481 32
+a 820 906 34
+a 9 3 84
+a 873 247 72
+a 10 569 52
+a 433 451 97
+a 461 147 52
+a 931 372 11
+a 794 40 67
+a 983 434 13
+a 491 627 56
+a 904 638 2
+a 604 198 63
+a 368 27 8
+a 423 58 73
+a 81 26 32
+a 239 263 4
+a 473 650 36
+a 185 206 58
+a 80 131 63
+a 672 88 46
+a 30 34 8
+a 772 595 87
+a 112 319 96
+a 497 93 50
+a 207 244 21
+a 292 87 73
+a 282 521 39
+a 343 689 7
+a 72 74 10
+a 691 655 23
+a 723 360 91
+a 193 639 99
+a 105 316 64
+a 125 957 43
+a 426 181 68
+a 17 26 6
+a 52 190 38
+a 604 174 63
+a 249 367 30
+a 30 275 7
+a 715 873 31
+a 8 154 13
+a 214 222 19
+a 477 371 72
+a 6 1 44
+a 13 248 16
+a 344 78 14
+a 11 386 62
+a 22 575 8
+a 702 648 90
+a 669 283 95
+a 42 72 31
+a 96 82 8
+a 452 147 31
+a 821 454 85
+a 525 219 6
+a 104 176 74
+a 527 370 13
+a 243 27 43
+a 5 163 89
+a 469 171 97
+a 759 787 59
+a 626 35 14
+a 25 1 43
+a 75 508 24
+a 899 326 86
+a 138 599 14
+a 85 303 18
+a 533 526 47
+a 718 530 50
+a 256 758 82
+a 435 618 15
+a 434 882 15
+a 670 111 13
+a 2 18 36
+a 65 343 48
+a 579 821 68
+a 869 114 14
+a 8 100 46
+a 445 72 76
+a 261 609 44
+a 712 484 36
+a 303 212 64
+a 747 278 35
+a 256 277 7
+a 459 507 85
+a 124 187 31
+a 293 601 4
+a 894 940 66
+a 488 887 72
+a 372 102 39
+a 722 939 31
+a 12 46 65
+a 29 19 46
+a 142 670 91
+a 357 912 43
+a 33 59 60
+a 122 867 86
+a 768 909 62
+a 29 352 64
+a 5 37 55
+a 80 510 12
+a 93 664 26
+a 38 62 90
+a 787 357 48
+a 267 268 87
+a 710 583 84
+a 164 175 100
+a 43 7 88
+a 340 415 4
+a 941 671 14
+a 179 269 96
+a 15 76 17
+a 714 288 93
+a 54 51 22
+a 50 376 43
+a 569 736 93
+a 3 147 4
+a 206 211 77
+a 166 636 59
+a 657 142 32
+a 11 260 99
+a 24 456 43
+a 134 142 100
+a 8 175 71
+a 19 51 71
+a 69 230 11
+a 735 934 99
+a 86 423 98
+a 265 51 46
+a 557 75 48
+a 305 635 24
+a 24 32 73
+a 346 34 83
+a 271 960 15
+a 231 272 58
+a 615 338 13
+a 911 416 21
+a 32 476 81
+a 13 23 2
+a 613 788 60
+a 768 798 3
+a 291 313 56
+a 370 829 27
+a 35 830 7
+a 259 836 40
+a 15 353 21
+a 55 179 67
+a 331 33 31
+a 475 252 8
+a 67 71 15
+a 383 90 22
+a 96 873 57
+a 339 600 49
+a 1 681 25
+a 10 6 8
+a 323 541 47
+a 602 682 62
+a 51 111 82
+a 450 551 84
+a 219 345 49
+a 918 144 68
+a 33 213 8
+a 171 313 18
+a 165 115 95
+a 51 60 40
+a 471 484 91
+a 83 150 42
+a 103 327 67
+a 345 433 58
+a 37 445 91
+a 131 368 40
+a 99 202 10
+a 477 310 40
+a 545 820 63
+a 481 799 32
+a 103 107 38
+a 600 313 16
+a 534 445 22
+a 67 283 91
+a 845 737 10
+a 10 208 97
+a 291 333 19
+a 223 289 12
+a 10 51 19
+a 64 125 13
+a 985 269 2
+a 521 681 61
+a 102 219 91
+a 229 87 49
+a 197 465 22
+a 333 191 42
+a 403 97 74
+a 666 148 60
+a 449 537 47
+a 276 235 63
+a 507 888 1
+a 178 150 24
+a 436 336 60
+a 250 900 87
+a 1 87 94
+a 516 633 77
+a 734 933 51
+a 503 359 35
+a 64 52 33
+a 791 419 96
+a 178 314 17
+a 11 10 52
+a 94 341 47
+a 559 483 92
+a 640 105 51
+a 288 781 38
+a 133 136 56
+a 779 204 97
+a 219 556 43
+a 478 519 66
+a 555 118 91
+a 980 827 69
+a 316 897 15
+a 816 393 85
+a 61 11 22
+a 134 326 32
+a 453 71 68
+a 535 787 79
+a 69 212 45
+a 81 281 51
+a 36 629 71
+a 370 225 6
+a 16 473 43
+a 33 47 35
+a 398 927 14
+a 288 667 51
+a 102 242 76
+a 52 18 2
+a 172 160 39
+a 407 333 83
+a 162 43 59
+a 48 73 6
+a 698 413 30
+a 11 48 75
+a 71 536 74
+a 95 53 76
+a 91 903 91
+a 853 350 61
+a 65 807 69
+a 7 28 45
+a 514 665 35
+a 449 836 37
+a 26 361 24
+a 29 48 16
+a 491 332 24
+a 13 330 79
+a 402 23 87
+a 21 7 5
+a 136 868 69
+a 122 371 29
+a 33 102 12
+a 809 693 55
+a 9 356 39
+a 34 576 40
+a 222 446 11
+a 504 727 40
+a 13 396 95
+a 287 98 91
+a 610 600 25
+a 968 88 39
+a 7 71 29
+a 917 905 57
+a 123 68 5
+a 90 149 8
+a 505 12 67
+a 958 276 18
+a 160 188 16
+a 226 380 91
+a 26 28 72
+a 350 458 15
+a 454 831 73
+a 953 57 28
+a 178 87 65
+a 608 18 9
+a 828 924 76
+a 443 989 99
+a 56 243 57
+a 798 679 23
+a 596 10 45
+a 201 250 65
+a 460 457 57
+a 320 606 94
+a 287 292 86
+a 542 223 19
+a 897 221 25
+a 354 37 29
+a 126 145 13
+a 694 632 74
+a 63 13 39
+a 727 124 82
+a 161 33 81
+a 130 842 53
+a 52 81 15
+a 566 4 66
+a 277 88 64
+a 67 72 7
+a 189 2 34
+a 329 147 38
+a 165 244 18
+a 793 528 47
+a 64 352 42
+a 461 361 46
+a 515 20 26
+a 142 179 98
+a 416 348 80
+a 7 626 21
+a 675 21 89
+a 136 172 9
+a 236 141 57
+a 545 379 64
+a 667 162 74
+a 3 86 16
+a 743 925 80
+a 348 415 33
+a 730 804 31
+a 67 862 6
+a 552 185 81
+a 166 537 32
+a 455 497 13
+a 292 372 56
+a 577 374 49
+a 586 269 1
+a 341 464 8
+a 1 62 11
+a 762 384 86
+a 181 84 63
+a 136 133 5
+a 316 191 21
+a 370 143 58
+a 937 858 46
+a 56 288 64
+a 660 767 55
+a 48 6 53
+a 42 25 95
+a 265 372 77
+a 931 362 66
+a 129 259 99
+a 48 278 29
+a 460 757 2
+a 560 181 63
+a 139 238 6
+a 26 76 87
+a 597 616 33
+a 6 90 40
+a 187 428 7
+a 869 808 100
+a 194 878 48
+a 645 799 96
+a 49 614 100
+a 454 8 99
+a 5 38 11
+a 734 886 37
+a 654 266 85
+a 783 282 51
+a 60 300 80
+a 621 563 40
+a 528 463 29
+a 35 98 47
+a 324 216 91
+a 372 564 79
+a 669 286 22
+a 52 869 43
+a 183 207 95
+a 878 937 99
+a 356 275 6
+a 78 352 75
+a 796 596 34
+a 166 833 25
+a 887 816 91
+a 15 18 93
+a 74 89 49
+a 81 528 96
+a 310 653 27
+a 179 197 11
+a 828 286 74
+a 143 17 21
+a 294 80 66
+a 391 260 36
+a 87 216 37
+a 99 634 18
+a 585 143 62
+a 574 754 89
+a 480 21 67
+a 26 44 31
+a 702 360 26
+a 780 74 64
+a 528 36 30
+a 393 466 41
+a 584 658 42
+a 42 222 5
+a 106 594 15
+a 381 236 80
+a 35 80 91
+a 60 94 37
+a 826 929 45
+a 150 447 84
+a 26 154 72
+a 47 246 63
+a 25 26 6
+a 19 516 18
+a 580 96 31
+a 602 709 47
+a 298 328 46
+a 164 350 97
+a 590 662 58
+a 730 587 59
+a 284 542 29
+a 610 337 52
+a 27 48 93
+a 52 373 4
+a 170 810 5
+a 321 504 42
+a 842 256 2
+a 966 848 8
+a 615 691 97
+a 778 505 39
+a 253 752 81
+a 380 875 15
+a 104 215 76
+a 773 680 96
+a 489 107 35
+a 483 894 73
+a 107 53 25
+a 196 197 32
+a 337 104 10
+a 573 316 3
+a 5 63 95
+a 505 329 67
+a 589 526 36
+a 242 860 74
+a 523 177 49
+a 21 47 83
+a 870 375 78
+a 364 743 65
+a 227 109 91
+a 432 488 41
+a 928 854 87
+a 143 171 9
+a 113 138 1
+a 586 331 93
+a 844 354 40
+a 56 239 26
+a 234 530 92
+a 832 861 96
+a 954 512 71
+a 187 5 76
+a 25 9 93
+a 946 976 10
+a 691 813 37
+a 39 457 20
+a 28 39 73
+a 15 47 9
+a 94 230 26
+a 1 37 76
+a 101 59 82
+a 127 345 28
+a 395 135 66
+a 736 806 33
+a 698 142 91
+a 198 378 47
+a 515 557 46
+a 24 17 83
+a 102 889 5
+a 23 410 62
+a 737 811 15
+a 659 735 16
+a 234 384 12
+a 582 7 15
+a 620 14 67
+a 514 405 93
+a 27 30 23
+a 78 41 72
+a 307 572 63
+a 142 745 6
+a 50 914 75
+a 147 950 93
+a 379 342 25
+a 917 480 41
+a 910 709 36
+a 164 220 62
+a 288 921 36
+a 285 542 85
+a 15 48 87
+a 130 20 78
+a 775 661 34
+a 25 104 79
+a 924 973 94
+a 891 914 49
+a 894 701 87
+a 76 5 15
+a 905 410 59
+a 246 654 11
+a 849 770 21
+a 203 5 72
+a 76 24 8
+a 29 34 74
+a 397 286 10
+a 116 122 94
+a 60 86 76
+a 133 88 17
+a 16 165 5
+a 226 877 31
+a 263 964 83
+a 47 62 70
+a 308 595 51
+a 77 619 51
+a 300 104 14
+a 40 268 54
+a 113 176 60
+a 438 623 90
+a 55 534 51
+a 303 410 75
+a 6 37 54
+a 158 170 27
+a 170 289 44
+a 478 125 61
+a 215 5 11
+a 384 922 56
+a 922 54 86
+a 280 196 38
+a 97 118 43
+a 654 498 20
+a 39 36 44
+a 759 630 3
+a 337 28 57
+a 974 238 99
+a 28 69 1
+a 284 924 81
+a 220 406 89
+a 222 895 56
+a 100 612 53
+a 867 767 19
+a 443 913 82
+a 459 230 22
+a 933 526 34
+a 8 19 44
+a 726 595 87
+a 566 654 43
+a 758 382 46
+a 380 434 86
+a 96 339 30
+a 436 890 54
+a 381 345 60
+a 49 767 46
+a 168 377 18
+a 1 903 29
+a 34 32 100
+a 780 811 32
+a 339 759 45
+a 633 532 46
+a 648 638 67
+a 55 214 71
+a 37 141 84
+a 648 872 80
+a 788 396 90
+a 238 544 16
+a 274 222 34
+a 479 929 52
+a 252 226 86
+a 449 718 52
+a 1 11 68
+a 167 361 71
+a 208 370 56
+a 289 156 25
+a 271 155 39
+a 400 864 88
+a 102 176 16
+a 971 876 76
+a 285 741 84
+a 805 885 33
+a 269 565 59
+a 61 188 26
+a 632 963 97
+a 698 152 4
+a 319 638 25
+a 11 164 38
+a 42 372 91
+a 3 89 43
+a 980 317 31
+a 191 753 68
+a 505 834 55
+a 860 224 80
+a 195 459 47
+a 18 207 11
+a 858 620 91
+a 3 36 96
+a 947 295 10
+a 535 165 50
+a 58 475 30
+a 20 70 14
+a 957 364 38
+a 252 286 38
+a 56 149 37
+a 14 361 82
+a 467 780 39
+a 345 659 55
+a 818 603 75
+a 254 348 56
+a 122 205 11
+a 151 26 3
+a 27 3 7
+a 769 539 5
+a 304 97 28
+a 647 225 15
+a 55 411 63
+a 158 531 56
+a 501 455 98
+a 876 477 9
+a 23 490 49
+a 827 152 4
+a 862 990 50
+a 136 144 50
+a 601 835 100
+a 106 131 9
+a 678 143 8
+a 152 957 40
+a 583 938 19
+a 126 299 12
+a 115 56 62
+a 613 834 31
+a 595 197 92
+a 234 61 76
+a 24 74 76
+a 926 19 38
+a 141 75 99
+a 236 64 87
+a 966 422 46
+a 977 897 82
+a 695 226 37
+a 29 114 61
+a 430 417 81
+a 77 146 21
+a 155 317 26
+a 619 242 33
+a 858 816 12
+a 15 4 6
+a 637 538 82
+a 130 81 21
+a 159 166 50
+a 214 312 96
+a 985 328 74
+a 872 836 22
+a 403 575 80
+a 133 188 72
+a 751 72 100
+a 394 252 89
+a 997 970 87
+a 184 69 40
+a 400 950 100
+a 631 791 60
+a 473 278 20
+a 15 52 51
+a 571 674 83
+a 139 938 65
+a 24 31 54
+a 112 535 26
+a 703 679 80
+a 517 429 83
+a 557 298 66
+a 284 993 100
+a 98 84 15
+a 65 111 59
+a 744 518 69
+a 18 31 34
+a 72 67 62
+a 278 181 30
+a 302 412 61
+a 13 33 7
+a 793 975 21
+a 40 67 4
+a 13 37 73
+a 88 360 73
+a 429 806 64
+a 822 424 73
+a 81 854 39
+a 5 43 67
+a 795 954 75
+a 80 14 75
+a 91 236 54
+a 744 700 65
+a 353 735 93
+a 149 377 47
+a 95 14 42
+a 400 285 28
+a 183 618 4
+a 461 651 46
+a 538 142 40
+a 602 433 100
+a 18 108 1
+a 365 368 14
+a 219 570 16
+a 253 94 83
+a 273 470 28
+a 683 916 11
+a 1 10 15
+a 108 850 36
+a 355 638 62
+a 829 510 77
+a 854 815 48
+a 607 120 82
+a 9 284 45
+a 834 361 91
+a 63 232 31
+a 238 698 46
+a 364 825 51
+a 750 453 88
+a 749 689 93
+a 75 172 56
+a 4 29 2
+a 8 624 24
+a 13 4 34
+a 804 587 53
+a 74 313 57
+a 672 342 51
+a 66 136 98
+a 240 300 35
+a 469 436 97
+a 28 42 15
+a 233 291 84
+a 350 496 73
+a 678 932 93
+a 47 153 100
+a 491 698 91
+a 499 328 48
+a 13 25 56
+a 451 409 15
+a 676 836 59
+a 557 373 39
+a 7 2 30
+a 268 457 94
+a 160 449 88
+a 568 699 17
+a 955 30 44
+a 977 132 7
+a 142 229 90
+a 779 123 85
+a 13 1 80
+a 127 72 83
+a 523 16 65
+a 196 184 28
+a 554 569 18
+a 732 970 44
+a 113 154 1
+a 548 50 54
+a 171 522 4
+a 272 866 100
+a 17 127 37
+a 328 274 20
+a 999 248 36
+a 181 914 38
+a 137 541 66
+a 829 558 71
+a 332 309 45
+a 416 445 13
+a 7 169 22
+a 341 194 96
+a 7 52 49
+a 741 318 15
+a 32 263 39
+a 369 699 79
+a 31 73 35
+a 448 297 62
+a 282 231 92
+a 28 93 78
+a 363 258 82
+a 962 749 64
+a 868 23 77
+a 60 53 87
+a 69 40 98
+a 105 789 47
+a 151 18 79
+a 6 15 39
+a 51 578 25
+a 520 932 32
+a 636 52 96
+a 4 11 62
+a 335 189 10
+a 177 279 13
+a 655 862 84
+a 28 214 48
+a 389 221 46
+a 372 843 21
+a 284 514 11
+a 35 191 39
+a 19 522 13
+a 20 123 100
+a 15 172 78
+a 479 794 4
+a 630 516 80
+a 116 34 64
+a 698 379 14
+a 497 692 9
+a 623 691 83
+a 493 140 9
+a 53 69 61
+a 183 232 10
+a 167 240 55
+a 590 938 94
+a 956 552 65
+a 796 399 30
+a 311 302 32
+a 667 1 50
+a 26 407 19
+a 51 913 71
+a 52 256 64
+a 155 205 35
+a 439 848 25
+a 288 596 1
+a 47 115 87
+a 757 818 97
+a 118 161 63
+a 8 43 5
+a 48 750 23
+a 594 59 68
+a 318 231 38
+a 852 229 56
+a 121 226 43
+a 152 166 7
+a 597 676 11
+a 108 116 4
+a 92 874 5
+a 343 79 7
+a 109 937 71
+a 12 13 54
+a 37 578 21
+a 54 501 20
+a 14 9 23
+a 31 3 92
+a 373 196 65
+a 586 218 50
+a 717 570 40
+a 66 90 91
+a 293 444 44
+a 90 125 30
+a 16 23 20
+a 116 136 4
+a 750 301 85
+a 611 868 25
+a 15 3 35
+a 356 81 31
+a 489 601 52
+a 855 224 87
+a 210 51 79
+a 285 173 76
+a 441 838 99
+a 333 154 39
+a 640 448 59
+a 171 146 54
+a 22 844 16
+a 725 723 36
+a 123 152 7
+a 991 462 31
+a 145 982 20
+a 569 283 33
+a 17 9 84
+a 111 824 82
+a 63 42 16
+a 826 637 24
+a 14 397 74
+a 815 76 93
+a 442 878 91
+a 757 626 90
+a 80 308 62
+a 377 429 55
+a 327 372 27
+a 664 467 82
+a 70 803 12
+a 609 103 29
+a 531 50 40
+a 831 746 37
+a 580 663 41
+a 712 229 5
+a 4 46 95
+a 848 413 78
+a 74 268 33
+a 268 922 37
+a 447 27 4
+a 549 341 68
+a 177 23 33
+a 53 88 91
+a 624 259 3
+a 31 59 90
+a 233 176 83
+a 91 196 98
+a 536 356 90
+a 54 94 27
+a 656 394 96
+a 192 23 22
+a 153 164 45
+a 175 192 34
+a 366 687 72
+a 136 236 96
+a 744 984 89
+a 24 437 25
+a 412 33 74
+a 584 574 90
+a 54 57 98
+a 75 3 76
+a 420 292 45
+a 889 795 2
+a 682 203 85
+a 93 597 68
+a 271 86 72
+a 160 825 3
+a 255 607 32
+a 109 44 81
+a 465 441 46
+a 349 185 83
+a 24 375 59
+a 451 624 94
+a 11 9 77
+a 326 809 58
+a 57 329 60
+a 577 608 91
+a 17 63 3
+a 174 201 70
+a 733 4 74
+a 258 80 46
+a 287 4 75
+a 11 3 40
+a 994 795 62
+a 235 282 87
+a 87 773 30
+a 446 151 70
+a 730 898 4
+a 367 477 27
+a 402 738 21
+a 39 57 78
+a 582 289 50
+a 25 119 68
+a 717 396 30
+a 63 128 98
+a 544 266 29
+a 485 554 41
+a 147 737 19
+a 574 43 18
+a 524 454 64
+a 361 26 70
+a 25 137 42
+a 155 7 3
+a 570 20 50
+a 19 108 45
+a 91 893 95
+a 949 651 54
+a 369 475 34
+a 302 457 71
+a 553 833 84
+a 675 328 30
+a 756 672 34
+a 307 17 89
+a 2 30 76
+a 615 182 76
+a 200 283 87
+a 434 285 45
+a 865 113 73
+a 614 673 75
+a 141 785 20
+a 288 450 61
+a 29 36 71
+a 731 710 20
+a 186 189 41
+a 59 267 61
+a 46 170 75
+a 369 418 43
+a 12 3 59
+a 513 560 53
+a 36 167 6
+a 87 231 37
+a 292 425 58
+a 911 884 16
+a 314 860 26
+a 165 206 50
+a 614 806 94
+a 366 671 23
+a 45 156 87
+a 486 71 44
+a 480 436 45
+a 437 903 68
+a 76 269 56
+a 514 289 13
+a 168 182 39
+a 745 884 23
+a 179 145 31
+a 625 146 47
+a 19 147 56
+a 618 343 6
+a 39 28 53
+a 128 243 66
+a 751 248 95
+a 605 416 49
+a 125 175 43
+a 469 588 47
+a 31 70 70
+a 919 396 28
+a 688 672 16
+a 906 702 83
+a 16 2 76
+a 370 933 24
+a 749 332 36
+a 276 395 51
+a 828 690 52
+a 445 35 23
+a 27 32 52
+a 299 766 72
+a 36 339 34
+a 876 934 72
+a 131 616 52
+a 332 883 67
+a 43 587 49
+a 258 583 41
+a 7 44 36
+a 648 841 51
+a 222 38 6
+a 44 55 63
+a 393 60 70
+a 850 303 24
+a 470 40 21
+a 969 833 95
+a 19 17 48
+a 807 317 44
+a 25 227 61
+a 142 366 15
+a 783 113 47
+a 67 541 71
+a 259 780 16
+a 116 130 60
+a 961 962 94
+a 648 943 68
+a 967 982 84
+a 425 183 61
+a 654 758 56
+a 124 312 23
+a 16 154 16
+a 557 939 29
+a 5 20 97
+a 240 90 31
+a 20 467 7
+a 20 34 89
+a 59 5 42
+a 821 233 36
+a 28 618 16
+a 79 133 42
+a 209 51 96
+a 547 874 33
+a 643 142 80
+a 294 542 60
+a 669 547 74
+a 2 235 77
+a 105 638 94
+a 59 4 38
+a 178 247 77
+a 223 799 54
+a 552 951 40
+a 382 15 54
+a 609 777 75
+a 13 83 19
+a 940 325 23
+a 138 128 31
+a 164 654 47
+a 88 132 78
+a 526 331 71
+a 818 40 21
+a 633 934 51
+a 274 157 94
+a 836 679 50
+a 11 94 74
+a 992 652 33
+a 210 33 65
+a 16 76 48
+a 91 420 69
+a 567 954 77
+a 210 559 4
+a 186 857 49
+a 913 20 78
+a 398 403 28
+a 919 37 29
+a 956 415 29
+a 965 511 28
+a 382 514 36
+a 789 584 76
+a 79 225 15
+a 440 342 69
+a 640 532 35
+a 529 480 24
+a 40 150 17
+a 173 160 80
+a 13 29 51
+a 77 613 75
+a 63 215 31
+a 395 459 57
+a 23 2 74
+a 517 762 19
+a 507 884 5
+a 562 119 25
+a 36 15 62
+a 593 529 36
+a 715 714 39
+a 212 509 57
+a 745 577 48
+a 504 360 80
+a 300 266 37
+a 66 232 14
+a 128 172 88
+a 233 563 2
+a 360 698 91
+a 6 468 78
+a 31 13 44
+a 847 241 29
+a 643 593 67
+a 128 212 16
+a 479 286 32
+a 190 113 9
+a 373 117 81
+a 61 36 86
+a 979 141 54
+a 961 289 84
+a 692 160 87
+a 689 67 48
+a 50 108 84
+a 845 413 72
+a 780 90 1
+a 281 137 6
+a 186 451 61
+a 74 523 89
+a 22 110 15
+a 127 38 82
+a 477 79 21
+a 477 700 4
+a 198 203 61
+a 265 374 36
+a 641 145 44
+a 917 253 69
+a 389 57 78
+a 66 218 1
+a 933 723 5
+a 890 53 19
+a 355 632 5
+a 25 127 90
+a 849 597 29
+a 111 345 2
+a 63 925 4
+a 632 523 81
+a 443 368 19
+a 398 743 32
+a 204 50 61
+a 36 29 99
+a 277 224 29
+a 37 145 59
+a 533 801 29
+a 55 572 64
+a 887 843 2
+a 61 96 72
+a 159 603 14
+a 158 613 91
+a 66 116 68
+a 126 306 54
+a 925 255 89
+a 664 527 47
+a 224 848 54
+a 513 609 45
+a 221 652 98
+a 22 12 39
+a 808 42 54
+a 32 65 75
+a 402 555 33
+a 44 19 92
+a 708 989 39
+a 2 56 47
+a 360 514 93
+a 144 95 46
+a 56 62 81
+a 173 210 24
+a 166 379 11
+a 114 82 92
+a 836 420 35
+a 36 37 25
+a 248 770 95
+a 50 132 58
+a 76 44 55
+a 148 549 14
+a 60 59 37
+a 335 468 63
+a 5 18 47
+a 176 69 22
+a 194 336 7
+a 255 189 55
+a 30 423 75
+a 151 445 86
+a 438 691 34
+a 712 437 45
+a 76 531 68
+a 214 233 28
+a 15 14 3
+a 526 205 17
+a 11 62 77
+a 145 902 45
+a 102 422 71
+a 513 70 100
+a 11 6 89
+a 700 52 54
+a 31 858 49
+a 203 264 88
+a 640 45 79
+a 687 942 81
+a 819 723 54
+a 553 832 56
+a 9 43 51
+a 1 595 16
+a 58 247 86
+a 290 596 49
+a 1 226 34
+a 873 201 66
+a 767 376 8
+a 611 478 93
+a 126 153 60
+a 188 870 27
+a 795 22 4
+a 22 10 34
+a 95 584 55
+a 362 42 31
+a 454 241 12
+a 1000 330 8
+a 46 117 75
+a 1 51 41
+a 541 901 73
+a 27 29 38
+a 767 987 70
+a 2 216 8
+a 457 557 58
+a 189 199 72
+a 943 204 96
+a 547 101 53
+a 399 615 93
+a 774 95 71
+a 15 724 77
+a 50 332 30
+a 579 97 50
+a 723 103 89
+a 304 10 98
+a 83 194 80
+a 269 943 46
+a 255 262 54
+a 384 246 77
+a 231 565 9
+a 542 592 48
+a 665 571 15
+a 67 505 43
+a 82 110 53
+a 307 750 6
+a 14 13 57
+a 288 528 39
+a 123 126 86
+a 501 451 35
+a 863 89 14
+a 764 660 45
+a 344 19 88
+a 898 186 91
+a 113 998 33
+a 997 985 60
+a 95 223 7
+a 415 98 13
+a 870 718 55
+a 467 264 41
+a 46 9 48
+a 66 41 32
+a 23 44 51
+a 43 82 73
+a 47 60 40
+a 362 158 87
+a 248 202 58
+a 503 239 80
+a 333 189 87
+a 905 902 47
+a 188 271 19
+a 565 141 36
+a 12 299 40
+a 55 512 91
+a 441 878 7
+a 713 508 50
+a 28 332 64
+a 65 659 76
+a 13 24 16
+a 503 10 42
+a 731 415 25
+a 14 11 16
+a 326 546 38
+a 19 442 75
+a 37 106 16
+a 295 517 25
+a 421 84 20
+a 96 709 71
+a 83 142 52
+a 313 231 44
+a 513 458 46
+a 423 352 89
+a 814 409 18
+a 882 447 11
+a 97 736 52
+a 707 603 98
+a 148 14 32
+a 57 115 98
+a 729 408 76
+a 61 286 81
+a 188 296 57
+a 336 217 27
+a 145 610 97
+a 501 725 25
+a 66 319 20
+a 351 124 64
+a 786 423 23
+a 680 212 43
+a 559 212 54
+a 675 336 90
+a 642 12 33
+a 936 421 88
+a 271 52 52
+a 805 327 59
+a 314 826 43
+a 889 137 35
+a 58 60 19
+a 741 162 54
+a 377 837 53
+a 720 891 95
+a 1 48 60
+a 359 179 91
+a 375 7 22
+a 21 6 93
+a 67 25 16
+a 938 183 56
+a 458 119 67
+a 549 872 4
+a 26 83 44
+a 809 181 85
+a 114 2 92
+a 38 37 15
+a 50 168 72
+a 413 946 11
+a 248 135 25
+a 213 280 41
+a 336 733 75
+a 428 128 71
+a 429 736 48
+a 391 779 86
+a 850 527 70
+a 257 346 19
+a 35 59 46
+a 108 185 85
+a 921 354 62
+a 532 518 65
+a 204 29 27
+a 293 31 70
+a 3 176 13
+a 352 119 45
+a 58 111 59
+a 491 264 65
+a 49 23 23
+a 347 458 77
+a 244 433 4
+a 136 762 97
+a 419 653 68
+a 76 170 18
+a 496 794 69
+a 15 308 43
+a 912 590 49
+a 472 740 69
+a 79 152 42
+a 405 39 48
+a 541 543 2
+a 804 824 82
+a 66 110 97
+a 396 32 9
+a 155 429 83
+a 886 859 43
+a 634 23 37
+a 901 77 60
+a 762 659 70
+a 5 179 23
+a 5 340 100
+a 402 545 100
+a 8 822 8
+a 404 254 63
+a 507 555 35
+a 63 177 45
+a 19 27 92
+a 132 179 28
+a 893 261 57
+a 65 102 76
+a 982 861 25
+a 342 801 7
+a 74 75 90
+a 332 44 86
+a 75 394 41
+a 904 441 78
+a 991 832 35
+a 59 512 44
+a 699 266 38
+a 415 940 98
+a 836 883 69
+a 68 509 37
+a 132 308 95
+a 338 571 35
+a 872 655 100
+a 14 104 34
+a 684 807 68
+a 411 880 51
+a 575 715 38
+a 328 522 70
+a 668 587 27
+a 2 25 63
+a 49 440 37
+a 864 10 28
+a 865 567 19
+a 5 211 5
+a 31 460 5
+a 660 499 10
+a 720 894 93
+a 225 400 29
+a 571 29 66
+a 777 166 14
+a 781 390 99
+a 180 419 26
+a 306 854 68
+a 28 157 4
+a 92 121 23
+a 263 172 34
+a 10 281 8
+a 274 478 2
+a 90 640 41
+a 17 30 69
+a 43 131 81
+a 524 255 3
+a 29 532 5
+a 118 44 49
+a 135 44 55
+a 647 175 55
+a 305 142 50
+a 95 340 78
+a 304 481 69
+a 73 870 30
+a 553 423 35
+a 223 315 48
+a 500 828 91
+a 508 36 43
+a 3 45 5
+a 491 403 67
+a 610 897 67
+a 914 141 10
+a 87 143 39
+a 253 29 99
+a 928 709 17
+a 650 975 76
+a 343 19 82
+a 537 102 51
+a 73 152 14
+a 1000 115 65
+a 32 88 29
+a 333 257 21
+a 356 760 94
+a 586 531 17
+a 23 806 82
+a 38 951 89
+a 17 4 46
+a 154 606 1
+a 67 5 84
+a 559 193 85
+a 45 47 52
+a 270 328 9
+a 501 15 86
+a 189 166 19
+a 87 93 45
+a 545 83 67
+a 885 336 86
+a 299 306 93
+a 948 144 25
+a 666 685 2
+a 608 692 10
+a 19 483 14
+a 34 70 4
+a 645 266 78
+a 171 127 48
+a 498 22 38
+a 13 16 35
+a 516 484 67
+a 318 427 10
+a 365 442 13
+a 95 3 100
+a 92 112 21
+a 383 397 35
+a 4 39 4
+a 208 32 99
+a 381 207 15
+a 4 374 12
+a 305 1 16
+a 54 84 90
+a 602 139 76
+a 51 920 6
+a 255 85 17
+a 19 20 59
+a 607 394 83
+a 84 218 38
+a 77 352 54
+a 43 115 15
+a 472 146 73
+a 24 124 44
+a 627 454 23
+a 252 44 92
+a 469 241 72
+a 1 159 35
+a 238 667 84
+a 51 145 78
+a 77 387 70
+a 846 266 97
+a 652 430 89
+a 424 160 6
+a 728 615 25
+a 215 217 90
+a 72 136 76
+a 6 33 34
+a 304 291 21
+a 517 265 78
+a 714 466 14
+a 913 73 49
+a 973 394 89
+a 148 733 5
+a 896 140 20
+a 878 344 100
+a 989 469 18
+a 595 720 22
+a 344 655 79
+a 8 416 56
+a 956 837 53
+a 3 202 79
+a 394 38 32
+a 440 63 45
+a 42 45 15
+a 646 709 68
+a 123 91 90
+a 13 109 27
+a 120 203 23
+a 309 489 97
+a 176 525 78
+a 329 339 48
+a 566 473 23
+a 150 107 9
+a 652 572 60
+a 432 106 14
+a 792 342 53
+a 77 121 88
+a 703 373 31
+a 17 34 64
+a 66 188 57
+a 298 893 79
+a 929 519 95
+a 57 784 47
+a 164 808 81
+a 13 36 17
+a 911 519 55
+a 158 7 52
+a 479 74 88
+a 2 137 68
+a 950 911 63
+a 458 605 61
+a 68 783 3
+a 982 906 69
+a 96 321 52
+a 481 345 52
+a 736 534 27
+a 702 778 7
+a 5 497 5
+a 228 579 39
+a 762 388 21
+a 173 234 89
+a 11 204 22
+a 277 219 8
+a 850 537 56
+a 428 256 56
+a 534 116 2
+a 938 390 43
+a 75 99 43
+a 8 203 52
+a 27 36 16
+a 59 480 59
+a 518 594 34
+a 107 962 8
+a 167 62 83
+a 290 235 70
+a 55 66 76
+a 84 85 33
+a 207 81 46
+a 752 151 91
+a 16 15 25
+a 464 682 54
+a 790 393 61
+a 29 574 82
+a 373 112 9
+a 53 30 13
+a 105 72 66
+a 10 43 51
+a 13 876 39
+a 632 687 55
+a 702 980 19
+a 10 563 85
+a 7 120 59
+a 398 33 89
+a 594 642 78
+a 28 45 8
+a 142 386 100
+a 43 63 27
+a 22 751 64
+a 53 1 47
+a 626 36 5
+a 32 37 41
+a 233 103 8
+a 529 989 40
+a 861 588 73
+a 47 507 50
+a 959 774 73
+a 16 43 4
+a 313 406 83
+a 197 54 4
+a 860 357 74
+a 2 15 8
+a 379 844 91
+a 874 246 80
+a 577 897 4
+a 811 738 98
+a 434 312 99
+a 11 683 67
+a 170 951 62
+a 128 953 32
+a 19 91 25
+a 156 416 5
+a 854 668 59
+a 109 152 61
+a 895 457 74
+a 8 257 31
+a 185 852 47
+a 328 691 44
+a 23 27 95
+a 72 223 97
+a 340 184 50
+a 24 81 97
+a 797 500 92
+a 339 435 47
+a 578 222 94
+a 713 43 7
+a 806 704 18
+a 300 136 96
+a 675 872 85
+a 714 813 58
+a 970 563 44
+a 37 255 49
+a 953 689 50
+a 284 93 35
+a 50 207 55
+a 578 293 78
+a 136 590 82
+a 102 107 69
+a 400 139 98
+a 57 406 16
+a 58 31 61
+a 5 12 7
+a 64 228 100
+a 9 32 96
+a 986 246 56
+a 31 338 83
+a 571 185 62
+a 119 293 18
+a 124 553 82
+a 346 169 60
+a 798 376 7
+a 68 15 39
+a 717 587 21
+a 162 602 74
+a 429 836 3
+a 658 677 36
+a 97 293 21
+a 67 74 74
+a 846 844 27
+a 29 65 58
+a 702 141 62
+a 379 108 95
+a 912 388 12
+a 51 124 86
+a 210 277 58
+a 468 105 52
+a 3 20 1
+a 180 39 30
+a 437 743 21
+a 247 518 75
+a 575 614 1
+a 243 153 28
+a 9 10 99
+a 999 768 75
+a 40 63 47
+a 370 978 56
+a 22 2 63
+a 60 766 25
+a 49 126 17
+a 432 826 74
+a 252 30 24
+a 95 147 1
+a 249 653 58
+a 20 675 48
+a 149 36 71
+a 580 91 79
+a 614 996 82
+a 144 90 48
+a 5 249 16
+a 752 206 19
+a 24 129 74
+a 982 59 3
+a 59 675 76
+a 693 264 77
+a 481 654 76
+a 953 352 47
+a 781 16 98
+a 77 188 57
+a 246 324 26
+a 340 274 91
+a 870 51 1
+a 41 153 83
+a 244 748 21
+a 162 355 79
+a 415 876 88
+a 84 223 59
+a 530 88 14
+a 850 530 26
+a 494 482 42
+a 358 366 95
+a 962 869 57
+a 514 62 82
+a 36 212 50
+a 458 123 9
+a 8 483 85
+a 479 677 69
+a 300 156 87
+a 15 13 81
+a 922 139 83
+a 40 225 81
+a 316 413 18
+a 745 93 87
+a 782 136 15
+a 50 358 30
+a 44 59 14
+a 68 407 44
+a 195 932 27
+a 213 523 27
+a 19 922 73
+a 27 994 73
+a 22 19 27
+a 198 349 61
+a 197 349 45
+a 27 214 74
+a 221 287 48
+a 832 248 99
+a 746 789 74
+a 763 151 97
+a 787 11 74
+a 270 787 30
+a 441 777 87
+a 78 346 4
+a 542 661 5
+a 137 847 28
+a 55 68 44
+a 567 81 88
+a 906 102 90
+a 479 997 94
+a 665 75 98
+a 160 995 12
+a 29 84 85
+a 622 910 77
+a 341 627 39
+a 506 76 45
+a 183 35 14
+a 741 724 61
+a 667 668 14
+a 526 675 29
+a 49 40 78
+a 559 449 92
+a 54 470 2
+a 132 797 69
+a 456 489 100
+a 16 642 75
+a 20 762 53
+a 215 996 29
+a 585 532 66
+a 565 638 46
+a 673 687 60
+a 226 486 65
+a 10 15 52
+a 95 176 92
+a 335 546 10
+a 27 45 44
+a 559 21 23
+a 149 709 47
+a 9 345 13
+a 144 531 20
+a 27 558 67
+a 122 261 33
+a 315 282 91
+a 728 486 15
+a 776 410 94
+a 212 277 17
+a 371 304 25
+a 2 59 2
+a 9 95 52
+a 75 2 57
+a 188 27 28
+a 25 52 79
+a 834 953 60
+a 8 777 53
+a 643 123 53
+a 12 16 17
+a 299 333 73
+a 377 319 80
+a 238 503 86
+a 471 756 38
+a 117 107 81
+a 334 587 12
+a 44 117 97
+a 896 106 39
+a 202 4 57
+a 215 6 47
+a 36 72 34
+a 499 587 65
+a 848 673 90
+a 172 677 27
+a 658 418 57
+a 8 6 58
+a 123 181 40
+a 895 679 50
+a 24 52 55
+a 333 658 85
+a 935 890 70
+a 279 792 84
+a 58 122 42
+a 438 604 44
+a 876 390 38
+a 603 25 1
+a 144 193 26
+a 8 45 9
+a 823 768 38
+a 7 61 43
+a 8 708 8
+a 123 59 11
+a 557 386 94
+a 107 1 57
+a 7 95 82
+a 951 511 42
+a 57 87 44
+a 832 790 43
+a 737 72 90
+a 572 906 29
+a 40 620 97
+a 327 421 14
+a 660 353 20
+a 606 228 39
+a 12 399 88
+a 121 184 66
+a 750 744 60
+a 397 771 37
+a 258 913 11
+a 195 25 49
+a 19 29 15
+a 402 565 44
+a 37 6 74
+a 77 309 88
+a 35 21 49
+a 32 841 100
+a 839 96 8
+a 29 90 31
+a 12 174 57
+a 490 530 50
+a 382 919 50
+a 43 48 64
+a 693 520 73
+a 478 336 48
+a 7 26 50
+a 35 512 27
+a 774 21 37
+a 373 829 99
+a 249 6 34
+a 536 430 27
+a 247 42 73
+a 109 504 60
+a 157 41 41
+a 67 101 98
+a 927 465 77
+a 34 157 55
+a 524 897 17
+a 664 594 29
+a 475 552 67
+a 666 161 94
+a 58 520 61
+a 32 123 47
+a 919 905 76
+a 326 30 59
+a 225 435 72
+a 273 244 28
+a 430 669 97
+a 398 326 39
+a 308 244 40
+a 42 112 41
+a 496 876 60
+a 145 248 9
+a 732 854 82
+a 221 134 29
+a 45 315 58
+a 76 590 14
+a 14 30 55
+a 918 430 11
+a 300 467 24
+a 334 455 40
+a 108 422 58
+a 331 436 62
+a 80 760 74
+a 925 636 35
+a 47 202 2
+a 10 20 48
+a 906 456 77
+a 420 713 98
+a 721 423 91
+a 505 332 22
+a 929 153 96
+a 990 168 48
+a 319 730 8
+a 475 98 37
+a 468 327 45
+a 497 641 8
+a 38 137 70
+a 130 303 16
+a 23 200 22
+a 143 486 18
+a 227 868 69
+a 66 366 49
+a 605 702 24
+a 739 939 7
+a 157 194 17
+a 649 480 67
+a 218 268 53
+a 429 377 74
+a 371 399 48
+a 34 20 10
+a 68 269 2
+a 143 149 69
+a 933 991 62
+a 36 71 66
+a 105 287 39
+a 36 488 41
+a 180 600 34
+a 14 656 34
+a 232 794 58
+a 973 853 65
+a 607 300 81
+a 693 841 76
+a 2 37 36
+a 302 362 28
+a 76 556 72
+a 852 643 40
+a 118 311 84
+a 417 471 76
+a 79 658 82
+a 830 37 26
+a 13 165 5
+a 875 421 8
+a 307 245 31
+a 96 501 34
+a 623 91 34
+a 150 153 22
+a 983 152 31
+a 34 54 3
+a 866 520 77
+a 55 275 62
+a 114 184 89
+a 404 122 55
+a 191 178 6
+a 196 851 64
+a 102 12 61
+a 164 127 50
+a 692 908 42
+a 267 238 33
+a 291 5 87
+a 784 102 63
+a 31 56 26
+a 313 424 14
+a 14 250 5
+a 254 234 22
+a 333 616 64
+a 957 315 90
+a 48 356 99
+a 53 624 86
+a 25 33 44
+a 550 878 23
+a 35 125 77
+a 173 400 34
+a 142 838 12
+a 755 474 70
+a 82 416 87
+a 146 995 95
+a 427 510 9
+a 757 364 29
+a 827 133 52
+a 582 107 78
+a 5 19 50
+a 483 787 12
+a 235 403 66
+a 7 404 77
+a 46 242 56
+a 574 998 45
+a 671 581 33
+a 50 311 87
+a 3 342 16
+a 428 660 56
+a 678 523 4
+a 376 316 6
+a 216 358 26
+a 615 172 30
+a 706 182 73
+a 373 403 19
+a 883 151 19
+a 116 811 14
+a 586 992 4
+a 77 592 46
+a 164 239 2
+a 742 465 27
+a 455 510 50
+a 736 148 31
+a 36 52 9
+a 772 763 89
+a 315 658 51
+a 505 799 18
+a 760 253 9
+a 13 78 86
+a 140 184 99
+a 695 652 59
+a 433 973 52
+a 163 10 62
+a 856 16 5
+a 63 157 94
+a 112 192 25
+a 86 184 70
+a 339 925 73
+a 936 856 25
+a 833 667 17
+a 153 36 30
+a 188 89 17
+a 31 130 39
+a 327 527 8
+a 816 157 63
+a 952 883 57
+a 404 60 20
+a 137 32 10
+a 780 218 43
+a 128 236 72
+a 334 631 29
+a 260 339 87
+a 409 619 44
+a 134 123 43
+a 896 310 76
+a 214 334 93
+a 89 106 41
+a 621 30 74
+a 6 73 29
+a 682 288 28
+a 897 546 77
+a 186 238 85
+a 879 801 13
+a 788 920 92
+a 700 68 83
+a 431 537 22
+a 1 113 81
+a 522 930 97
+a 362 796 59
+a 225 859 51
+a 276 317 18
+a 838 701 6
+a 112 222 61
+a 826 203 75
+a 3 206 31
+a 399 700 9
+a 442 874 100
+a 358 599 19
+a 424 495 17
+a 185 380 85
+a 319 336 87
+a 447 214 77
+a 498 136 69
+a 676 138 31
+a 689 152 95
+a 580 106 75
+a 422 42 91
+a 674 211 97
+a 116 486 92
+a 162 61 74
+a 272 75 32
+a 579 880 42
+a 113 33 32
+a 33 136 55
+a 491 342 1
+a 8 47 28
+a 920 363 23
+a 445 46 43
+a 356 225 16
+a 298 303 96
+a 850 560 92
+a 533 12 15
+a 102 134 79
+a 494 460 8
+a 588 446 26
+a 696 96 59
+a 522 375 76
+a 11 34 61
+a 16 404 41
+a 85 317 88
+a 65 531 37
+a 1 89 55
+a 294 137 72
+a 85 558 16
+a 494 618 66
+a 20 73 49
+a 916 233 91
+a 126 89 25
+a 102 465 13
+a 521 20 19
diff --git a/src/boost/libs/graph/example/max_flow9.dat b/src/boost/libs/graph/example/max_flow9.dat
new file mode 100644
index 000000000..19d11ef0c
--- /dev/null
+++ b/src/boost/libs/graph/example/max_flow9.dat
@@ -0,0 +1,10004 @@
+c Random Network
+p max 500 10000
+n 1 s
+n 500 t
+a 417 205 30
+a 71 493 26
+a 97 136 96
+a 317 112 82
+a 214 27 19
+a 285 362 7
+a 37 250 11
+a 74 110 11
+a 76 300 96
+a 463 31 31
+a 439 128 65
+a 489 462 91
+a 447 25 53
+a 54 142 75
+a 13 30 76
+a 93 165 44
+a 128 452 67
+a 72 343 6
+a 32 61 30
+a 297 390 89
+a 443 138 41
+a 8 51 18
+a 61 52 48
+a 155 114 92
+a 171 182 16
+a 493 218 15
+a 1 4 38
+a 5 43 16
+a 369 460 48
+a 313 39 79
+a 260 141 9
+a 448 219 64
+a 17 28 78
+a 250 58 10
+a 86 321 77
+a 21 367 90
+a 468 490 90
+a 8 33 12
+a 6 27 29
+a 17 112 23
+a 497 77 90
+a 7 150 95
+a 165 146 86
+a 440 203 35
+a 458 245 49
+a 208 396 37
+a 2 12 57
+a 12 122 24
+a 67 358 77
+a 251 333 21
+a 43 41 72
+a 252 118 12
+a 44 45 14
+a 18 9 94
+a 49 295 36
+a 166 170 58
+a 293 38 85
+a 5 7 18
+a 117 80 62
+a 1 2 40
+a 7 80 63
+a 106 9 22
+a 236 150 17
+a 65 77 90
+a 469 471 56
+a 177 268 27
+a 294 40 29
+a 315 152 81
+a 352 198 92
+a 17 33 30
+a 236 297 13
+a 216 231 44
+a 231 164 100
+a 109 59 38
+a 417 373 92
+a 13 17 8
+a 21 28 71
+a 276 204 29
+a 266 41 6
+a 9 11 54
+a 24 186 38
+a 191 445 58
+a 333 429 84
+a 413 162 47
+a 17 150 98
+a 178 1 48
+a 196 195 53
+a 340 491 88
+a 6 9 51
+a 496 438 24
+a 9 6 35
+a 118 207 72
+a 314 127 40
+a 145 376 82
+a 499 56 12
+a 128 35 67
+a 14 76 71
+a 322 50 97
+a 15 392 56
+a 6 13 87
+a 21 144 75
+a 177 206 25
+a 393 378 15
+a 198 300 90
+a 57 81 68
+a 173 192 12
+a 210 428 60
+a 456 99 84
+a 203 244 62
+a 449 257 42
+a 95 344 96
+a 400 143 59
+a 135 474 46
+a 409 333 40
+a 26 62 100
+a 75 433 53
+a 323 484 37
+a 17 482 6
+a 19 8 86
+a 217 49 50
+a 417 466 93
+a 6 18 43
+a 52 74 5
+a 21 139 85
+a 48 292 49
+a 240 58 24
+a 5 13 90
+a 189 302 18
+a 3 4 48
+a 31 2 73
+a 63 30 35
+a 282 150 33
+a 363 310 12
+a 8 27 17
+a 30 42 18
+a 483 415 63
+a 2 122 36
+a 482 341 55
+a 184 218 75
+a 377 293 94
+a 4 16 29
+a 117 189 42
+a 30 86 56
+a 365 482 46
+a 361 253 60
+a 52 72 83
+a 197 236 80
+a 260 290 31
+a 15 13 41
+a 111 76 59
+a 378 219 80
+a 2 7 34
+a 40 41 100
+a 233 81 52
+a 186 185 87
+a 44 72 85
+a 433 398 24
+a 44 118 63
+a 96 212 91
+a 122 476 46
+a 9 28 57
+a 3 5 54
+a 157 75 78
+a 210 212 2
+a 90 6 97
+a 21 79 16
+a 267 77 47
+a 3 10 95
+a 14 204 69
+a 220 227 44
+a 229 481 66
+a 34 134 35
+a 19 129 30
+a 234 88 100
+a 313 108 95
+a 452 247 91
+a 463 159 57
+a 8 440 100
+a 487 249 17
+a 4 29 97
+a 4 195 90
+a 55 212 43
+a 2 97 22
+a 26 339 23
+a 211 243 27
+a 76 51 6
+a 283 251 32
+a 364 161 18
+a 10 11 4
+a 41 198 57
+a 409 276 45
+a 491 206 39
+a 212 285 4
+a 377 4 98
+a 252 453 21
+a 40 83 8
+a 334 64 53
+a 474 294 5
+a 386 168 14
+a 92 101 98
+a 21 25 52
+a 32 56 95
+a 287 143 91
+a 357 54 67
+a 2 9 35
+a 26 17 9
+a 6 14 37
+a 106 190 8
+a 246 302 45
+a 146 269 93
+a 45 486 26
+a 43 45 33
+a 163 83 17
+a 476 477 53
+a 422 482 17
+a 300 376 75
+a 18 463 16
+a 65 214 50
+a 5 6 56
+a 6 95 80
+a 6 192 32
+a 151 173 29
+a 341 393 20
+a 1 3 64
+a 10 39 55
+a 14 304 91
+a 296 24 28
+a 14 62 81
+a 334 414 94
+a 94 389 45
+a 1 9 18
+a 64 77 51
+a 85 105 49
+a 40 49 9
+a 13 21 32
+a 7 29 15
+a 61 260 92
+a 126 317 13
+a 470 352 41
+a 413 265 83
+a 23 42 72
+a 61 25 20
+a 337 146 58
+a 146 332 56
+a 13 25 85
+a 119 413 63
+a 100 108 60
+a 188 61 33
+a 193 178 51
+a 193 145 81
+a 300 205 65
+a 9 41 7
+a 44 84 100
+a 490 441 92
+a 87 43 41
+a 2 1 52
+a 3 169 79
+a 339 266 47
+a 19 71 30
+a 448 430 59
+a 21 152 63
+a 213 49 13
+a 344 174 49
+a 275 463 82
+a 15 400 2
+a 181 36 9
+a 29 56 80
+a 122 58 89
+a 347 453 37
+a 343 134 10
+a 6 52 82
+a 106 197 79
+a 218 55 15
+a 154 59 32
+a 66 8 2
+a 91 11 36
+a 383 468 42
+a 22 58 67
+a 60 85 12
+a 68 71 3
+a 119 237 89
+a 384 373 39
+a 6 7 78
+a 153 99 84
+a 2 3 14
+a 89 88 45
+a 124 233 4
+a 125 497 11
+a 113 287 6
+a 63 151 32
+a 294 299 75
+a 395 315 21
+a 435 115 65
+a 243 100 62
+a 220 277 10
+a 78 247 62
+a 57 76 79
+a 195 22 60
+a 80 441 12
+a 455 286 15
+a 214 425 53
+a 95 192 89
+a 61 267 96
+a 137 489 39
+a 163 213 93
+a 171 437 7
+a 497 359 12
+a 46 82 16
+a 6 25 24
+a 95 249 49
+a 292 453 66
+a 10 131 83
+a 360 266 58
+a 37 123 88
+a 136 430 38
+a 214 430 80
+a 234 9 85
+a 390 134 18
+a 7 5 69
+a 41 110 27
+a 497 122 4
+a 105 4 16
+a 36 99 61
+a 288 445 19
+a 109 139 93
+a 284 158 77
+a 46 432 34
+a 384 160 23
+a 115 219 49
+a 101 286 55
+a 45 210 33
+a 75 52 80
+a 167 12 53
+a 7 2 69
+a 24 34 95
+a 330 401 96
+a 205 366 68
+a 305 216 50
+a 24 89 90
+a 129 27 100
+a 129 55 83
+a 80 371 21
+a 31 46 7
+a 400 156 82
+a 12 13 17
+a 24 113 88
+a 378 409 55
+a 290 276 94
+a 154 414 46
+a 7 20 25
+a 354 28 50
+a 296 158 91
+a 337 17 46
+a 29 33 63
+a 59 18 84
+a 59 72 30
+a 125 445 66
+a 321 395 4
+a 381 198 41
+a 9 248 27
+a 336 481 75
+a 302 492 45
+a 17 42 59
+a 490 222 26
+a 431 263 43
+a 1 7 78
+a 449 34 95
+a 59 96 23
+a 70 406 3
+a 267 326 41
+a 55 59 73
+a 14 185 5
+a 162 38 22
+a 297 424 99
+a 4 11 43
+a 16 347 85
+a 161 19 83
+a 37 445 98
+a 485 197 19
+a 3 2 55
+a 39 18 96
+a 249 12 93
+a 367 57 27
+a 332 469 43
+a 134 67 4
+a 3 29 75
+a 123 435 76
+a 88 10 8
+a 227 226 89
+a 68 87 82
+a 187 120 57
+a 393 480 57
+a 259 292 72
+a 409 344 64
+a 75 132 50
+a 173 182 3
+a 397 237 94
+a 342 279 32
+a 127 419 27
+a 150 167 59
+a 255 85 32
+a 235 191 23
+a 5 241 48
+a 16 259 23
+a 83 484 34
+a 4 3 58
+a 15 116 17
+a 28 58 21
+a 480 126 78
+a 493 479 18
+a 11 19 90
+a 6 15 94
+a 230 125 83
+a 1 10 16
+a 190 139 17
+a 69 379 5
+a 397 489 86
+a 152 434 95
+a 7 6 36
+a 56 233 38
+a 355 118 36
+a 1 442 72
+a 53 400 19
+a 473 51 6
+a 3 7 21
+a 20 316 21
+a 31 93 23
+a 317 310 100
+a 473 437 47
+a 238 198 73
+a 18 16 48
+a 61 217 19
+a 32 38 89
+a 125 76 36
+a 39 388 2
+a 382 488 84
+a 220 497 95
+a 3 1 22
+a 8 322 53
+a 145 178 71
+a 66 403 55
+a 163 209 3
+a 222 473 48
+a 480 330 50
+a 90 125 48
+a 47 1 37
+a 134 137 77
+a 431 197 65
+a 422 268 84
+a 29 3 16
+a 124 156 10
+a 172 411 75
+a 75 154 25
+a 252 96 89
+a 465 353 73
+a 266 274 48
+a 180 28 7
+a 221 307 48
+a 18 232 84
+a 88 21 4
+a 300 186 80
+a 6 404 13
+a 26 418 83
+a 88 373 44
+a 102 4 89
+a 2 14 66
+a 95 56 14
+a 492 87 23
+a 13 23 7
+a 2 6 38
+a 18 25 83
+a 179 215 99
+a 258 219 31
+a 242 415 56
+a 272 44 2
+a 337 224 11
+a 54 19 26
+a 213 171 80
+a 434 253 90
+a 9 12 85
+a 447 93 53
+a 155 184 100
+a 8 122 48
+a 271 2 18
+a 429 137 90
+a 32 485 2
+a 483 24 6
+a 39 100 42
+a 25 118 62
+a 82 211 47
+a 76 138 81
+a 213 4 53
+a 296 40 43
+a 172 112 82
+a 382 99 14
+a 57 142 41
+a 216 50 71
+a 354 95 14
+a 291 375 57
+a 11 15 18
+a 220 136 1
+a 25 121 58
+a 299 111 46
+a 54 406 34
+a 460 154 89
+a 25 36 11
+a 44 257 98
+a 83 27 38
+a 194 428 34
+a 87 8 81
+a 452 395 44
+a 260 398 53
+a 72 87 46
+a 22 42 76
+a 115 100 99
+a 150 321 66
+a 244 243 14
+a 17 92 58
+a 292 172 69
+a 3 26 87
+a 47 31 61
+a 102 397 44
+a 463 413 23
+a 322 76 57
+a 278 268 2
+a 20 31 69
+a 48 42 18
+a 449 217 61
+a 306 403 53
+a 72 84 48
+a 420 473 25
+a 22 145 97
+a 17 22 24
+a 48 140 69
+a 64 21 3
+a 66 226 92
+a 233 234 69
+a 3 55 9
+a 280 214 85
+a 40 33 16
+a 5 20 2
+a 484 71 72
+a 27 134 3
+a 128 15 2
+a 348 231 92
+a 24 48 63
+a 356 13 76
+a 260 19 44
+a 454 78 80
+a 98 175 87
+a 314 12 10
+a 306 395 27
+a 319 43 46
+a 167 379 55
+a 23 37 8
+a 240 183 91
+a 279 146 32
+a 149 246 86
+a 24 296 9
+a 130 32 37
+a 12 116 35
+a 6 228 97
+a 225 25 97
+a 451 115 14
+a 500 275 23
+a 332 147 15
+a 18 153 34
+a 22 84 73
+a 208 77 55
+a 57 58 16
+a 105 11 78
+a 1 330 43
+a 472 31 45
+a 386 136 29
+a 373 269 24
+a 1 57 28
+a 286 123 70
+a 61 466 7
+a 249 65 87
+a 250 402 79
+a 206 27 44
+a 118 148 64
+a 20 25 36
+a 74 469 99
+a 226 223 70
+a 69 382 63
+a 206 10 10
+a 163 18 72
+a 6 102 22
+a 251 171 36
+a 334 407 65
+a 314 233 53
+a 108 149 39
+a 81 121 67
+a 297 71 30
+a 185 273 32
+a 245 305 70
+a 92 255 6
+a 430 106 79
+a 56 72 96
+a 6 65 16
+a 94 139 35
+a 143 351 94
+a 322 442 48
+a 4 5 90
+a 72 266 51
+a 21 22 50
+a 168 404 13
+a 117 239 53
+a 376 130 12
+a 63 225 40
+a 404 419 68
+a 107 125 76
+a 114 283 78
+a 62 69 10
+a 51 95 79
+a 126 411 34
+a 377 122 80
+a 407 172 44
+a 187 299 46
+a 187 326 68
+a 2 16 56
+a 138 304 4
+a 481 28 31
+a 70 12 20
+a 19 25 100
+a 422 421 56
+a 66 400 86
+a 8 50 19
+a 412 79 64
+a 142 356 77
+a 328 58 38
+a 490 143 23
+a 6 148 38
+a 28 24 49
+a 386 397 25
+a 38 87 87
+a 40 199 25
+a 271 246 30
+a 14 20 19
+a 11 27 21
+a 62 10 55
+a 264 11 81
+a 474 142 86
+a 54 56 94
+a 265 237 89
+a 192 404 51
+a 257 449 82
+a 11 18 3
+a 27 92 63
+a 233 164 87
+a 305 326 28
+a 437 162 27
+a 5 3 74
+a 46 118 82
+a 40 172 44
+a 14 209 73
+a 23 232 53
+a 46 326 61
+a 9 10 30
+a 25 30 24
+a 208 26 44
+a 448 114 10
+a 238 382 64
+a 10 79 69
+a 20 38 31
+a 174 15 52
+a 231 371 4
+a 70 76 95
+a 151 1 97
+a 83 15 75
+a 259 492 55
+a 294 351 22
+a 26 92 14
+a 206 197 29
+a 180 188 81
+a 219 51 87
+a 259 186 74
+a 253 115 2
+a 20 60 51
+a 17 21 46
+a 27 29 17
+a 87 353 77
+a 421 473 25
+a 12 14 72
+a 349 212 4
+a 451 373 19
+a 15 73 41
+a 97 29 47
+a 170 95 81
+a 339 123 7
+a 87 430 54
+a 4 9 73
+a 65 82 14
+a 390 227 3
+a 161 56 64
+a 3 176 76
+a 489 291 61
+a 308 319 45
+a 2 84 29
+a 390 166 91
+a 483 150 30
+a 453 441 43
+a 191 133 37
+a 85 56 76
+a 314 69 90
+a 271 37 41
+a 8 19 30
+a 44 51 78
+a 44 120 44
+a 430 282 24
+a 447 408 11
+a 26 39 27
+a 106 35 57
+a 67 344 2
+a 73 219 15
+a 125 325 80
+a 220 146 93
+a 23 45 80
+a 13 5 65
+a 197 127 69
+a 250 139 19
+a 157 390 3
+a 59 119 26
+a 427 15 81
+a 445 500 21
+a 45 272 100
+a 311 84 70
+a 353 409 50
+a 326 215 92
+a 310 441 49
+a 84 90 64
+a 99 16 37
+a 259 340 84
+a 481 469 82
+a 343 91 53
+a 444 7 62
+a 7 33 39
+a 73 38 3
+a 55 221 49
+a 105 81 10
+a 228 129 47
+a 22 74 29
+a 84 104 46
+a 479 37 16
+a 14 17 55
+a 75 21 67
+a 403 451 95
+a 129 124 92
+a 372 198 43
+a 2 18 41
+a 20 318 53
+a 352 214 86
+a 398 3 12
+a 231 34 84
+a 91 96 98
+a 1 20 83
+a 45 18 55
+a 27 132 68
+a 334 439 73
+a 475 187 21
+a 26 3 18
+a 323 415 37
+a 20 22 2
+a 397 497 81
+a 4 44 12
+a 14 164 56
+a 370 443 10
+a 183 44 58
+a 9 180 27
+a 54 123 63
+a 360 30 25
+a 350 183 59
+a 16 231 7
+a 496 80 80
+a 311 421 75
+a 7 37 72
+a 94 20 45
+a 57 63 22
+a 448 392 55
+a 26 66 14
+a 345 399 49
+a 192 184 66
+a 143 10 37
+a 145 446 76
+a 9 34 52
+a 107 8 44
+a 102 460 89
+a 13 253 74
+a 136 413 87
+a 32 59 5
+a 13 170 35
+a 200 460 1
+a 152 246 52
+a 483 391 23
+a 420 462 69
+a 12 25 18
+a 4 1 65
+a 322 120 21
+a 390 249 64
+a 34 484 84
+a 82 227 9
+a 470 273 14
+a 435 433 4
+a 1 5 78
+a 130 221 21
+a 121 228 29
+a 215 289 57
+a 193 389 93
+a 21 63 41
+a 88 194 11
+a 425 212 53
+a 107 324 97
+a 456 461 52
+a 280 119 6
+a 29 215 50
+a 134 195 35
+a 244 133 16
+a 156 276 76
+a 36 130 65
+a 34 353 30
+a 8 20 70
+a 36 69 23
+a 103 18 99
+a 226 82 93
+a 59 311 85
+a 398 99 87
+a 387 128 17
+a 59 253 99
+a 348 343 73
+a 118 215 1
+a 4 13 54
+a 491 49 94
+a 139 376 37
+a 6 26 89
+a 365 39 84
+a 81 46 25
+a 407 87 28
+a 360 84 2
+a 28 111 29
+a 376 39 53
+a 26 318 4
+a 1 35 11
+a 68 165 35
+a 492 206 15
+a 199 432 81
+a 113 312 98
+a 71 117 69
+a 390 200 64
+a 423 234 64
+a 164 476 14
+a 119 227 54
+a 68 336 54
+a 28 89 27
+a 90 43 5
+a 183 122 38
+a 129 45 71
+a 51 109 54
+a 142 21 71
+a 438 343 40
+a 44 1 8
+a 77 154 65
+a 205 3 40
+a 434 8 84
+a 427 490 64
+a 262 86 25
+a 264 467 93
+a 61 222 80
+a 75 311 17
+a 362 446 3
+a 49 53 75
+a 480 338 17
+a 419 421 49
+a 56 121 87
+a 316 84 33
+a 359 227 94
+a 130 160 80
+a 176 123 15
+a 205 312 100
+a 2 38 57
+a 97 15 94
+a 374 240 7
+a 14 32 51
+a 33 226 37
+a 371 274 72
+a 36 240 46
+a 408 170 58
+a 2 4 18
+a 31 67 73
+a 272 234 26
+a 4 124 13
+a 18 368 72
+a 347 175 74
+a 20 14 91
+a 12 168 36
+a 12 70 49
+a 167 412 67
+a 189 158 1
+a 46 43 8
+a 196 325 3
+a 145 352 73
+a 175 497 4
+a 2 285 11
+a 37 310 64
+a 28 389 9
+a 489 389 61
+a 190 175 17
+a 2 30 78
+a 209 90 19
+a 147 8 56
+a 18 62 86
+a 86 137 51
+a 91 402 36
+a 5 10 9
+a 8 189 73
+a 83 60 61
+a 157 237 25
+a 398 433 40
+a 36 54 63
+a 21 29 75
+a 184 126 47
+a 35 48 1
+a 57 175 77
+a 77 374 51
+a 91 263 13
+a 216 16 70
+a 7 15 34
+a 40 360 77
+a 365 437 77
+a 65 288 64
+a 497 133 38
+a 4 262 93
+a 97 234 67
+a 383 63 94
+a 242 412 85
+a 258 180 53
+a 82 307 69
+a 488 391 9
+a 15 51 68
+a 164 31 81
+a 254 209 2
+a 200 413 47
+a 88 162 91
+a 5 1 43
+a 30 355 30
+a 100 372 38
+a 301 325 51
+a 4 30 92
+a 11 1 64
+a 327 97 24
+a 8 340 61
+a 8 470 27
+a 71 119 49
+a 258 195 86
+a 35 321 29
+a 58 61 51
+a 68 1 91
+a 73 338 70
+a 20 18 71
+a 354 256 82
+a 10 38 51
+a 38 446 18
+a 85 299 34
+a 499 78 73
+a 236 377 21
+a 2 10 98
+a 53 166 100
+a 155 189 19
+a 19 319 59
+a 498 57 19
+a 404 208 93
+a 4 2 8
+a 24 29 88
+a 39 84 72
+a 395 429 97
+a 224 28 53
+a 177 219 24
+a 230 236 27
+a 238 398 12
+a 95 136 66
+a 154 68 16
+a 143 3 66
+a 168 108 33
+a 69 375 4
+a 3 48 52
+a 126 3 60
+a 161 371 96
+a 89 351 80
+a 381 181 35
+a 124 186 86
+a 1 47 21
+a 158 42 40
+a 75 142 1
+a 453 313 63
+a 146 78 49
+a 19 153 77
+a 152 57 60
+a 17 85 41
+a 4 35 31
+a 95 52 76
+a 457 285 20
+a 75 114 18
+a 12 11 99
+a 79 21 38
+a 279 276 88
+a 447 479 61
+a 90 474 54
+a 7 21 50
+a 77 116 59
+a 121 81 87
+a 123 3 8
+a 141 452 13
+a 153 17 22
+a 18 63 3
+a 82 32 98
+a 182 99 7
+a 19 240 34
+a 21 53 97
+a 68 84 72
+a 442 84 76
+a 28 268 90
+a 94 330 89
+a 4 8 76
+a 12 78 11
+a 90 155 86
+a 411 447 70
+a 15 34 82
+a 368 60 52
+a 44 60 38
+a 68 113 85
+a 479 382 40
+a 128 430 57
+a 58 376 45
+a 155 271 41
+a 364 153 91
+a 401 485 32
+a 64 13 32
+a 41 22 57
+a 9 55 55
+a 62 86 25
+a 252 84 77
+a 472 137 5
+a 15 83 6
+a 22 20 59
+a 32 23 45
+a 347 493 31
+a 5 453 7
+a 313 294 94
+a 211 200 22
+a 15 49 90
+a 38 73 8
+a 113 476 28
+a 350 120 22
+a 4 12 49
+a 12 138 89
+a 142 28 54
+a 75 325 45
+a 2 55 15
+a 207 460 57
+a 362 331 2
+a 428 483 53
+a 478 291 89
+a 202 251 27
+a 285 84 24
+a 204 188 27
+a 453 361 26
+a 392 301 23
+a 397 80 37
+a 27 103 7
+a 144 272 57
+a 164 109 11
+a 311 42 86
+a 78 315 91
+a 12 19 29
+a 294 19 10
+a 12 30 15
+a 8 29 12
+a 123 76 82
+a 222 183 96
+a 293 8 96
+a 409 126 24
+a 52 82 25
+a 134 146 7
+a 343 158 19
+a 59 231 78
+a 80 287 12
+a 165 387 35
+a 238 460 41
+a 50 212 16
+a 67 20 31
+a 151 451 24
+a 206 49 95
+a 9 51 59
+a 289 264 55
+a 477 119 48
+a 428 1 81
+a 335 198 82
+a 25 43 79
+a 147 1 16
+a 45 209 59
+a 296 357 70
+a 166 335 47
+a 29 38 39
+a 158 256 24
+a 104 433 26
+a 18 20 4
+a 368 32 75
+a 221 425 38
+a 169 13 27
+a 1 6 33
+a 327 453 89
+a 131 10 94
+a 256 164 83
+a 177 170 15
+a 266 362 89
+a 56 39 99
+a 107 45 99
+a 396 340 71
+a 1 14 48
+a 34 44 23
+a 38 68 99
+a 51 444 97
+a 40 482 100
+a 6 21 82
+a 164 66 77
+a 40 47 50
+a 135 351 56
+a 215 483 50
+a 287 341 3
+a 112 171 67
+a 70 1 70
+a 190 354 94
+a 11 65 98
+a 149 236 65
+a 396 94 100
+a 92 236 83
+a 69 82 80
+a 85 88 37
+a 147 322 88
+a 13 454 90
+a 376 313 47
+a 25 32 73
+a 2 189 56
+a 313 376 18
+a 56 148 84
+a 327 15 88
+a 477 343 6
+a 37 308 97
+a 182 142 3
+a 8 11 54
+a 28 246 48
+a 116 294 58
+a 246 319 98
+a 41 370 82
+a 420 301 67
+a 124 301 63
+a 16 40 62
+a 100 69 77
+a 143 93 98
+a 102 320 85
+a 46 435 74
+a 33 73 49
+a 71 250 23
+a 386 267 9
+a 87 25 42
+a 153 106 90
+a 441 4 69
+a 5 11 31
+a 5 34 19
+a 383 167 55
+a 401 49 77
+a 311 47 29
+a 276 112 28
+a 147 344 54
+a 106 128 45
+a 4 15 68
+a 30 38 72
+a 39 17 46
+a 164 221 67
+a 52 85 38
+a 7 9 23
+a 85 154 58
+a 124 322 46
+a 254 58 1
+a 488 283 49
+a 250 190 30
+a 39 68 42
+a 53 62 23
+a 45 29 32
+a 361 269 46
+a 330 9 25
+a 3 33 21
+a 68 195 31
+a 44 307 80
+a 5 9 11
+a 18 99 28
+a 157 427 65
+a 73 279 35
+a 187 500 98
+a 19 39 37
+a 127 218 90
+a 113 17 57
+a 402 348 72
+a 45 474 42
+a 147 5 4
+a 15 38 21
+a 30 301 32
+a 46 17 86
+a 29 112 30
+a 6 5 35
+a 377 433 67
+a 207 264 25
+a 7 3 32
+a 18 97 62
+a 155 148 6
+a 6 242 17
+a 127 112 24
+a 2 25 80
+a 54 278 80
+a 239 453 22
+a 59 32 45
+a 35 60 83
+a 62 259 63
+a 478 25 34
+a 180 11 34
+a 30 91 80
+a 181 23 60
+a 269 287 18
+a 173 286 10
+a 8 30 84
+a 238 218 17
+a 183 173 68
+a 6 2 89
+a 12 345 42
+a 212 473 27
+a 220 436 4
+a 91 65 53
+a 57 208 75
+a 1 75 91
+a 105 93 27
+a 304 106 40
+a 28 45 40
+a 411 229 64
+a 23 15 30
+a 16 2 32
+a 243 77 94
+a 234 99 45
+a 75 170 43
+a 86 62 51
+a 261 22 37
+a 57 42 6
+a 17 126 33
+a 191 57 57
+a 56 101 77
+a 9 4 67
+a 157 171 55
+a 311 404 36
+a 11 100 43
+a 1 8 16
+a 209 125 88
+a 458 398 27
+a 99 6 96
+a 106 26 77
+a 93 287 18
+a 5 8 63
+a 172 209 60
+a 38 16 59
+a 260 46 8
+a 189 99 89
+a 4 26 30
+a 236 97 83
+a 194 19 59
+a 31 37 93
+a 43 2 71
+a 324 347 11
+a 44 17 22
+a 185 59 75
+a 34 59 48
+a 268 197 85
+a 99 135 76
+a 46 5 86
+a 27 180 85
+a 36 327 27
+a 98 295 62
+a 11 24 6
+a 51 40 24
+a 341 47 81
+a 374 432 68
+a 352 476 67
+a 63 87 98
+a 14 6 17
+a 289 14 19
+a 138 342 6
+a 46 71 42
+a 262 10 92
+a 119 110 90
+a 150 453 43
+a 437 83 12
+a 238 247 98
+a 105 110 2
+a 164 173 82
+a 42 103 18
+a 103 416 33
+a 56 247 32
+a 36 42 25
+a 52 87 53
+a 279 89 35
+a 334 178 92
+a 92 43 17
+a 28 9 88
+a 98 289 44
+a 319 455 29
+a 8 101 81
+a 11 14 12
+a 66 348 99
+a 212 123 9
+a 33 39 49
+a 377 85 73
+a 219 260 70
+a 11 4 26
+a 367 360 96
+a 104 268 40
+a 4 164 59
+a 4 481 27
+a 370 63 3
+a 353 152 1
+a 44 54 25
+a 76 48 17
+a 465 304 85
+a 37 192 47
+a 2 24 47
+a 97 375 13
+a 229 412 56
+a 192 400 68
+a 14 482 69
+a 215 120 87
+a 3 52 88
+a 7 114 38
+a 208 281 46
+a 130 157 29
+a 7 364 7
+a 222 440 98
+a 296 250 64
+a 3 6 75
+a 22 8 88
+a 213 203 30
+a 437 301 71
+a 117 50 52
+a 13 32 22
+a 166 122 67
+a 490 88 5
+a 84 196 27
+a 236 31 64
+a 297 149 60
+a 438 234 24
+a 128 487 23
+a 84 105 46
+a 118 83 9
+a 62 72 17
+a 164 202 40
+a 41 442 11
+a 95 447 2
+a 165 256 99
+a 6 36 21
+a 7 42 52
+a 27 246 3
+a 5 76 28
+a 5 183 90
+a 318 346 87
+a 400 117 24
+a 406 396 59
+a 50 54 15
+a 207 25 34
+a 78 203 19
+a 412 16 21
+a 478 153 33
+a 94 167 89
+a 161 1 17
+a 189 272 33
+a 134 59 63
+a 461 347 4
+a 292 318 6
+a 41 88 91
+a 37 79 49
+a 18 118 17
+a 97 306 42
+a 130 90 26
+a 25 394 94
+a 197 101 13
+a 359 151 73
+a 453 149 71
+a 8 12 79
+a 103 115 90
+a 14 103 80
+a 205 239 36
+a 306 251 53
+a 445 119 74
+a 36 43 11
+a 354 183 26
+a 20 62 42
+a 97 51 25
+a 235 80 7
+a 353 335 47
+a 216 424 8
+a 297 465 70
+a 56 452 62
+a 285 185 42
+a 392 217 91
+a 4 247 83
+a 8 491 2
+a 320 93 41
+a 148 44 37
+a 23 76 55
+a 60 95 14
+a 137 62 75
+a 459 114 98
+a 296 500 6
+a 54 203 47
+a 245 262 96
+a 2 60 99
+a 216 186 61
+a 445 437 15
+a 288 404 57
+a 310 51 43
+a 13 193 97
+a 239 414 23
+a 242 193 6
+a 428 464 59
+a 22 32 3
+a 23 90 82
+a 43 231 3
+a 7 4 12
+a 99 117 89
+a 124 48 86
+a 158 389 93
+a 267 499 92
+a 10 23 57
+a 144 24 4
+a 185 172 50
+a 8 316 54
+a 25 464 19
+a 146 213 67
+a 13 64 11
+a 11 20 55
+a 28 127 34
+a 116 90 2
+a 4 7 32
+a 6 3 57
+a 9 413 45
+a 50 467 79
+a 352 109 23
+a 24 35 80
+a 8 10 29
+a 21 341 23
+a 373 392 93
+a 75 402 51
+a 148 178 78
+a 433 376 56
+a 467 372 24
+a 119 95 30
+a 326 145 14
+a 265 150 95
+a 253 104 100
+a 234 98 35
+a 210 296 5
+a 145 42 13
+a 239 246 36
+a 19 24 89
+a 88 3 90
+a 224 3 25
+a 350 450 55
+a 93 34 11
+a 496 429 26
+a 12 133 26
+a 23 173 3
+a 78 450 58
+a 24 81 69
+a 36 442 36
+a 190 297 48
+a 25 27 49
+a 23 238 51
+a 48 211 100
+a 175 452 54
+a 156 450 24
+a 156 174 13
+a 22 105 69
+a 187 131 62
+a 159 304 83
+a 51 121 58
+a 125 71 57
+a 224 249 87
+a 427 101 30
+a 440 487 76
+a 41 58 28
+a 208 45 73
+a 320 256 47
+a 23 138 66
+a 36 152 62
+a 59 372 75
+a 86 313 84
+a 77 189 13
+a 97 157 32
+a 423 64 17
+a 476 119 25
+a 38 397 88
+a 248 269 61
+a 492 148 67
+a 210 202 40
+a 23 13 80
+a 8 23 44
+a 147 173 1
+a 52 30 27
+a 71 34 42
+a 160 14 20
+a 2 44 75
+a 213 273 78
+a 38 91 31
+a 91 10 40
+a 202 10 2
+a 115 341 78
+a 151 490 32
+a 264 92 77
+a 485 116 6
+a 23 63 43
+a 1 38 35
+a 154 252 27
+a 330 494 22
+a 69 110 20
+a 80 89 44
+a 131 70 4
+a 9 169 1
+a 78 297 71
+a 131 56 37
+a 115 160 89
+a 349 71 3
+a 476 360 88
+a 88 148 4
+a 253 100 49
+a 337 227 78
+a 270 180 23
+a 161 53 70
+a 21 30 60
+a 46 4 4
+a 49 150 12
+a 437 127 5
+a 178 2 19
+a 376 12 76
+a 29 296 17
+a 12 134 56
+a 23 28 70
+a 47 74 68
+a 402 152 81
+a 199 239 72
+a 11 47 80
+a 29 150 21
+a 2 8 93
+a 14 83 23
+a 67 83 56
+a 397 273 56
+a 127 296 4
+a 307 164 62
+a 398 195 68
+a 192 285 33
+a 25 482 70
+a 158 106 77
+a 10 13 42
+a 51 204 14
+a 62 436 67
+a 241 308 7
+a 399 190 10
+a 458 224 79
+a 48 30 26
+a 4 142 52
+a 384 394 98
+a 8 4 41
+a 13 136 48
+a 219 318 72
+a 47 113 18
+a 326 83 54
+a 91 131 33
+a 392 144 36
+a 453 229 71
+a 10 394 19
+a 16 20 3
+a 92 179 71
+a 230 119 55
+a 32 37 99
+a 37 93 1
+a 281 362 11
+a 15 6 20
+a 245 12 57
+a 236 477 80
+a 13 14 52
+a 471 394 36
+a 7 1 70
+a 8 168 81
+a 221 282 37
+a 290 368 68
+a 76 436 95
+a 8 149 78
+a 103 292 97
+a 105 112 58
+a 60 19 80
+a 20 44 20
+a 84 55 30
+a 140 122 83
+a 220 170 95
+a 51 71 81
+a 15 18 40
+a 158 11 75
+a 165 375 45
+a 219 344 36
+a 84 199 68
+a 235 199 70
+a 24 28 17
+a 82 393 62
+a 70 376 80
+a 83 402 40
+a 143 184 84
+a 19 42 4
+a 70 366 67
+a 290 58 10
+a 170 452 24
+a 10 3 61
+a 26 218 27
+a 248 357 28
+a 203 35 65
+a 471 292 46
+a 216 230 32
+a 352 144 73
+a 499 339 26
+a 63 52 71
+a 4 27 5
+a 310 456 90
+a 285 391 53
+a 84 379 22
+a 220 345 8
+a 208 417 85
+a 295 98 64
+a 9 1 85
+a 97 206 33
+a 359 90 6
+a 273 11 32
+a 499 434 46
+a 7 86 15
+a 175 5 39
+a 126 21 58
+a 30 371 54
+a 22 176 60
+a 117 129 95
+a 4 291 65
+a 258 25 41
+a 31 159 53
+a 88 157 71
+a 159 357 69
+a 321 303 44
+a 303 68 8
+a 125 149 77
+a 254 477 51
+a 13 141 95
+a 84 145 7
+a 160 253 6
+a 194 111 90
+a 10 12 72
+a 20 212 59
+a 459 167 24
+a 273 286 23
+a 153 192 90
+a 150 187 31
+a 290 90 1
+a 69 434 60
+a 39 51 84
+a 138 11 77
+a 191 304 27
+a 23 43 14
+a 94 4 69
+a 50 296 35
+a 154 269 25
+a 15 42 70
+a 494 43 66
+a 33 184 73
+a 4 106 88
+a 209 78 11
+a 307 86 43
+a 346 264 77
+a 421 229 42
+a 44 97 14
+a 101 242 69
+a 167 486 95
+a 247 395 2
+a 32 162 25
+a 270 39 26
+a 322 310 72
+a 13 238 4
+a 16 22 44
+a 141 396 15
+a 153 305 47
+a 500 435 53
+a 344 131 37
+a 33 77 99
+a 477 10 64
+a 176 271 28
+a 19 106 84
+a 132 310 53
+a 293 191 55
+a 417 397 39
+a 421 177 94
+a 3 34 52
+a 44 134 70
+a 217 164 18
+a 298 138 100
+a 385 446 95
+a 289 396 14
+a 2 11 11
+a 174 30 92
+a 127 134 38
+a 5 115 26
+a 97 142 8
+a 477 308 79
+a 229 464 32
+a 2 39 36
+a 95 373 84
+a 424 39 12
+a 453 82 30
+a 14 283 24
+a 13 55 85
+a 102 74 66
+a 492 303 15
+a 16 312 36
+a 463 346 29
+a 31 226 87
+a 16 294 26
+a 405 389 15
+a 34 267 99
+a 450 426 75
+a 162 39 66
+a 5 4 39
+a 5 90 83
+a 388 448 26
+a 324 265 5
+a 43 17 62
+a 333 44 89
+a 62 480 56
+a 18 35 7
+a 9 24 71
+a 4 74 14
+a 59 129 95
+a 472 93 47
+a 493 234 20
+a 89 374 55
+a 367 361 4
+a 4 10 82
+a 10 274 88
+a 164 55 6
+a 32 291 49
+a 23 65 92
+a 70 41 82
+a 180 300 63
+a 19 325 71
+a 285 214 6
+a 438 306 88
+a 453 69 87
+a 50 92 79
+a 43 79 49
+a 156 41 63
+a 185 87 69
+a 495 248 68
+a 52 73 28
+a 133 66 39
+a 207 53 14
+a 3 64 16
+a 11 142 53
+a 54 483 33
+a 384 248 83
+a 49 153 37
+a 7 11 24
+a 15 404 22
+a 419 266 38
+a 402 106 30
+a 136 221 41
+a 477 401 24
+a 229 407 83
+a 41 108 52
+a 8 18 97
+a 304 155 8
+a 472 250 84
+a 24 474 99
+a 9 39 72
+a 222 195 75
+a 11 95 55
+a 251 65 79
+a 372 114 55
+a 359 323 99
+a 373 107 5
+a 53 205 6
+a 476 393 40
+a 47 49 58
+a 418 93 60
+a 239 301 9
+a 388 314 17
+a 225 334 72
+a 49 97 71
+a 12 183 68
+a 125 28 42
+a 284 383 41
+a 38 52 26
+a 6 39 9
+a 287 75 99
+a 51 73 65
+a 80 65 68
+a 471 154 34
+a 184 16 97
+a 219 196 70
+a 76 93 54
+a 94 126 66
+a 334 137 3
+a 5 362 76
+a 375 119 14
+a 12 4 26
+a 328 160 22
+a 412 48 88
+a 304 213 85
+a 33 332 48
+a 414 134 25
+a 11 34 73
+a 36 46 8
+a 173 448 16
+a 177 364 12
+a 459 34 62
+a 257 21 14
+a 7 16 81
+a 220 24 75
+a 139 71 46
+a 94 385 71
+a 64 141 46
+a 160 274 54
+a 317 129 87
+a 3 25 54
+a 252 177 9
+a 263 473 15
+a 371 24 41
+a 483 14 68
+a 34 40 89
+a 66 2 10
+a 151 108 80
+a 133 482 19
+a 15 22 27
+a 90 48 51
+a 4 66 100
+a 220 34 79
+a 45 322 78
+a 359 136 86
+a 193 321 19
+a 66 490 65
+a 1 102 82
+a 13 89 55
+a 96 12 91
+a 410 21 44
+a 9 124 10
+a 258 393 55
+a 127 285 38
+a 457 493 56
+a 367 320 41
+a 399 154 15
+a 13 117 6
+a 142 121 24
+a 65 284 86
+a 15 19 53
+a 21 173 90
+a 331 128 20
+a 4 14 57
+a 43 95 48
+a 181 187 41
+a 192 386 73
+a 77 153 68
+a 157 22 8
+a 307 176 38
+a 136 467 40
+a 35 132 83
+a 37 158 33
+a 263 106 97
+a 108 165 89
+a 313 169 56
+a 154 256 51
+a 208 56 79
+a 475 500 19
+a 476 137 26
+a 61 65 45
+a 83 94 29
+a 344 300 100
+a 168 143 100
+a 429 136 60
+a 472 128 100
+a 22 270 96
+a 141 83 100
+a 305 483 9
+a 3 13 36
+a 84 150 44
+a 139 179 72
+a 379 182 17
+a 312 480 19
+a 256 158 23
+a 39 4 59
+a 306 62 15
+a 463 272 33
+a 11 7 16
+a 386 235 93
+a 99 172 40
+a 226 233 49
+a 245 91 96
+a 259 67 58
+a 415 165 61
+a 334 198 86
+a 23 112 69
+a 143 287 2
+a 97 2 62
+a 441 12 30
+a 6 29 50
+a 74 75 45
+a 56 314 61
+a 413 194 76
+a 478 61 65
+a 391 24 15
+a 5 77 25
+a 371 11 35
+a 416 143 33
+a 10 32 67
+a 25 222 58
+a 227 456 62
+a 6 8 5
+a 38 49 60
+a 159 11 94
+a 422 38 51
+a 440 352 84
+a 41 132 85
+a 82 100 61
+a 13 436 45
+a 58 131 70
+a 135 134 55
+a 375 41 67
+a 491 226 85
+a 252 188 88
+a 29 142 62
+a 313 35 60
+a 173 494 60
+a 128 58 91
+a 31 465 25
+a 168 381 40
+a 3 11 65
+a 19 373 46
+a 23 108 61
+a 131 429 50
+a 232 156 19
+a 129 301 88
+a 175 8 73
+a 226 487 10
+a 443 30 6
+a 2 58 28
+a 123 283 65
+a 206 169 35
+a 281 98 7
+a 396 363 44
+a 323 85 35
+a 32 280 70
+a 402 198 94
+a 275 57 11
+a 354 39 24
+a 363 52 62
+a 316 467 46
+a 18 483 99
+a 449 38 81
+a 67 128 93
+a 152 346 33
+a 338 123 66
+a 180 268 12
+a 145 19 21
+a 181 63 81
+a 313 350 77
+a 22 75 71
+a 3 12 77
+a 109 29 65
+a 110 121 54
+a 17 97 22
+a 211 340 80
+a 177 1 37
+a 297 139 62
+a 10 18 1
+a 247 2 28
+a 255 281 29
+a 357 186 93
+a 27 35 100
+a 65 109 68
+a 308 118 11
+a 13 40 23
+a 127 379 55
+a 223 499 94
+a 25 157 96
+a 54 96 79
+a 33 37 82
+a 74 119 92
+a 136 422 9
+a 384 218 57
+a 11 21 38
+a 356 75 89
+a 28 37 77
+a 56 20 69
+a 190 45 58
+a 51 303 38
+a 198 81 81
+a 420 130 23
+a 44 180 17
+a 244 232 17
+a 26 108 55
+a 489 270 16
+a 214 168 74
+a 287 462 43
+a 393 220 92
+a 51 168 92
+a 17 14 49
+a 95 9 71
+a 201 309 47
+a 281 136 22
+a 34 38 76
+a 26 52 17
+a 66 73 63
+a 84 296 30
+a 264 304 95
+a 359 218 8
+a 136 216 88
+a 314 9 60
+a 368 284 49
+a 59 188 84
+a 181 204 53
+a 8 6 26
+a 11 113 15
+a 66 162 76
+a 175 229 86
+a 104 40 70
+a 4 17 66
+a 43 72 5
+a 125 73 38
+a 118 86 67
+a 43 59 39
+a 436 335 66
+a 71 190 79
+a 223 270 63
+a 189 137 83
+a 361 277 62
+a 96 290 94
+a 9 26 4
+a 43 92 64
+a 214 162 68
+a 278 297 64
+a 15 25 12
+a 124 172 10
+a 275 277 63
+a 498 329 57
+a 243 195 9
+a 171 37 82
+a 166 289 47
+a 174 477 13
+a 380 488 44
+a 57 86 91
+a 20 123 17
+a 67 227 73
+a 483 204 90
+a 2 13 47
+a 169 426 72
+a 418 103 78
+a 458 346 66
+a 363 43 70
+a 466 400 22
+a 237 440 76
+a 32 10 18
+a 55 49 98
+a 195 252 49
+a 129 101 43
+a 244 46 97
+a 9 7 24
+a 20 97 50
+a 462 82 13
+a 315 434 95
+a 389 418 2
+a 13 209 46
+a 87 88 43
+a 292 84 59
+a 200 11 56
+a 131 232 40
+a 289 169 71
+a 82 52 2
+a 49 78 87
+a 87 97 78
+a 20 1 49
+a 130 147 89
+a 471 164 75
+a 44 188 50
+a 14 347 32
+a 101 122 9
+a 163 154 94
+a 227 337 95
+a 123 294 47
+a 5 19 56
+a 295 155 33
+a 16 63 84
+a 90 33 1
+a 436 362 20
+a 372 438 59
+a 32 35 71
+a 113 83 6
+a 121 40 14
+a 20 191 38
+a 254 16 80
+a 34 25 34
+a 5 62 67
+a 171 14 15
+a 236 186 25
+a 350 284 82
+a 1 363 39
+a 18 145 80
+a 25 8 54
+a 326 495 94
+a 391 202 22
+a 392 469 81
+a 73 289 9
+a 149 200 84
+a 17 19 64
+a 158 150 18
+a 268 158 47
+a 71 308 36
+a 20 45 1
+a 78 50 69
+a 374 254 99
+a 397 385 52
+a 46 244 95
+a 270 154 79
+a 258 439 51
+a 291 255 37
+a 138 160 31
+a 60 71 14
+a 287 115 81
+a 81 90 97
+a 240 35 24
+a 433 44 39
+a 225 480 60
+a 426 85 63
+a 48 101 53
+a 147 178 27
+a 421 315 65
+a 45 50 12
+a 368 297 92
+a 148 283 98
+a 413 359 61
+a 31 43 47
+a 66 225 32
+a 120 200 44
+a 123 161 43
+a 200 280 2
+a 1 21 24
+a 14 2 78
+a 144 243 61
+a 3 15 31
+a 55 2 28
+a 119 12 75
+a 110 2 32
+a 56 30 82
+a 18 15 28
+a 88 211 52
+a 165 237 78
+a 3 405 21
+a 142 97 1
+a 134 348 40
+a 197 385 90
+a 79 8 9
+a 15 7 77
+a 26 16 22
+a 187 427 99
+a 267 498 55
+a 468 139 3
+a 11 169 71
+a 227 370 43
+a 16 17 61
+a 28 439 65
+a 256 486 17
+a 205 284 29
+a 468 412 54
+a 151 54 53
+a 272 103 32
+a 11 76 44
+a 275 38 56
+a 106 53 10
+a 81 222 88
+a 322 86 66
+a 434 178 6
+a 500 324 75
+a 34 197 96
+a 35 47 42
+a 108 19 59
+a 487 149 40
+a 30 255 28
+a 344 228 77
+a 203 273 92
+a 16 37 53
+a 327 205 51
+a 57 9 37
+a 461 387 51
+a 448 420 14
+a 112 188 29
+a 175 384 43
+a 164 335 45
+a 26 71 21
+a 82 128 34
+a 195 375 83
+a 500 112 16
+a 109 442 84
+a 166 171 61
+a 209 477 5
+a 283 490 8
+a 430 266 29
+a 5 121 63
+a 4 113 86
+a 3 22 64
+a 45 192 21
+a 279 500 54
+a 118 335 3
+a 95 129 80
+a 159 100 64
+a 455 138 45
+a 346 44 8
+a 254 56 31
+a 395 100 83
+a 118 27 1
+a 105 138 74
+a 92 94 19
+a 102 48 92
+a 305 82 19
+a 191 333 61
+a 465 40 59
+a 116 216 49
+a 67 16 46
+a 276 497 25
+a 15 98 24
+a 52 2 69
+a 15 194 44
+a 365 372 34
+a 254 180 31
+a 17 34 73
+a 135 242 28
+a 286 285 69
+a 8 9 25
+a 26 148 65
+a 37 471 2
+a 323 482 33
+a 122 440 46
+a 103 113 1
+a 151 81 68
+a 176 90 25
+a 229 308 94
+a 37 77 59
+a 114 358 49
+a 133 448 94
+a 26 6 96
+a 78 314 68
+a 77 6 87
+a 452 408 73
+a 7 13 57
+a 42 397 51
+a 375 358 59
+a 232 122 2
+a 39 212 43
+a 219 37 18
+a 87 22 78
+a 327 95 68
+a 98 432 1
+a 11 12 81
+a 22 15 82
+a 414 338 44
+a 73 346 34
+a 117 268 63
+a 377 267 52
+a 20 29 84
+a 39 230 37
+a 65 314 27
+a 329 354 35
+a 10 137 47
+a 27 36 9
+a 55 165 100
+a 10 2 11
+a 411 433 83
+a 35 78 98
+a 35 102 33
+a 131 355 79
+a 452 425 38
+a 383 123 32
+a 2 15 40
+a 31 119 90
+a 76 216 37
+a 10 22 3
+a 404 423 15
+a 32 458 49
+a 17 44 27
+a 224 71 11
+a 54 64 96
+a 355 126 45
+a 35 54 71
+a 86 411 48
+a 21 295 46
+a 123 171 50
+a 5 85 53
+a 376 300 66
+a 176 6 92
+a 402 184 51
+a 330 21 6
+a 30 73 55
+a 124 1 98
+a 379 300 62
+a 10 26 61
+a 482 277 65
+a 387 362 35
+a 63 111 14
+a 372 52 31
+a 212 51 74
+a 30 202 23
+a 422 122 45
+a 64 327 92
+a 13 168 10
+a 28 87 37
+a 247 406 37
+a 8 42 27
+a 26 292 57
+a 355 35 25
+a 435 222 74
+a 409 70 48
+a 69 89 44
+a 115 35 75
+a 407 145 50
+a 2 5 8
+a 292 259 92
+a 246 457 14
+a 13 29 68
+a 213 66 80
+a 127 50 22
+a 381 463 71
+a 135 148 57
+a 437 392 53
+a 309 485 26
+a 9 311 32
+a 10 483 8
+a 191 204 77
+a 164 194 74
+a 5 16 90
+a 39 69 31
+a 129 15 17
+a 187 198 29
+a 381 435 87
+a 26 7 42
+a 386 34 87
+a 31 54 67
+a 162 415 22
+a 30 426 94
+a 321 498 78
+a 288 210 46
+a 13 10 34
+a 23 269 100
+a 434 181 78
+a 167 105 22
+a 58 83 70
+a 145 247 78
+a 431 34 75
+a 7 30 32
+a 85 208 54
+a 125 120 35
+a 153 287 62
+a 277 290 1
+a 12 16 16
+a 394 97 4
+a 36 75 30
+a 106 117 64
+a 125 209 69
+a 9 496 39
+a 56 370 64
+a 21 125 5
+a 208 220 54
+a 6 12 10
+a 294 344 40
+a 378 386 35
+a 257 33 40
+a 168 188 34
+a 32 383 72
+a 281 247 37
+a 320 34 8
+a 201 47 15
+a 10 5 24
+a 72 28 14
+a 396 303 3
+a 73 57 43
+a 92 250 25
+a 499 473 78
+a 360 292 63
+a 12 41 100
+a 12 6 81
+a 288 39 77
+a 406 157 89
+a 355 246 42
+a 62 297 57
+a 20 245 41
+a 307 207 87
+a 25 39 80
+a 18 207 88
+a 71 79 41
+a 208 29 3
+a 420 98 26
+a 352 237 36
+a 18 6 92
+a 232 198 51
+a 212 40 52
+a 153 361 84
+a 210 375 3
+a 118 373 94
+a 364 177 2
+a 3 23 91
+a 74 188 99
+a 118 278 42
+a 420 194 7
+a 302 126 82
+a 50 113 3
+a 130 5 89
+a 63 45 88
+a 457 15 36
+a 391 295 37
+a 24 371 70
+a 20 39 33
+a 319 173 9
+a 140 482 93
+a 187 34 56
+a 226 132 72
+a 349 169 24
+a 60 90 44
+a 240 241 14
+a 150 27 50
+a 292 73 24
+a 333 380 95
+a 22 125 79
+a 28 23 6
+a 79 429 73
+a 104 223 24
+a 337 12 1
+a 29 364 38
+a 376 201 51
+a 158 43 3
+a 454 191 94
+a 27 239 22
+a 29 9 98
+a 27 231 59
+a 277 382 38
+a 340 497 34
+a 449 45 23
+a 46 70 83
+a 26 4 11
+a 280 257 7
+a 26 210 56
+a 93 80 35
+a 460 28 28
+a 290 386 37
+a 9 50 87
+a 68 52 42
+a 102 287 47
+a 300 361 28
+a 143 102 84
+a 4 54 18
+a 54 67 95
+a 240 93 60
+a 459 228 65
+a 35 142 19
+a 154 392 26
+a 137 203 65
+a 138 12 57
+a 232 10 60
+a 153 160 10
+a 247 250 88
+a 80 271 63
+a 45 103 24
+a 35 92 93
+a 100 154 6
+a 16 7 37
+a 302 128 50
+a 66 423 86
+a 356 420 32
+a 213 67 33
+a 44 233 9
+a 15 81 70
+a 172 18 6
+a 288 238 25
+a 131 289 40
+a 372 350 32
+a 339 303 91
+a 35 65 32
+a 67 90 74
+a 389 137 9
+a 463 462 81
+a 79 87 5
+a 104 175 45
+a 71 15 28
+a 120 17 100
+a 373 146 31
+a 12 44 100
+a 39 70 75
+a 35 263 31
+a 36 355 90
+a 391 364 100
+a 1 109 88
+a 73 15 81
+a 81 363 75
+a 59 131 77
+a 194 9 92
+a 34 248 26
+a 402 15 98
+a 28 171 2
+a 2 20 76
+a 34 156 98
+a 489 154 20
+a 126 85 76
+a 305 42 70
+a 493 142 62
+a 162 148 31
+a 26 54 40
+a 73 269 26
+a 118 2 86
+a 226 490 18
+a 309 443 20
+a 68 90 57
+a 359 4 71
+a 115 334 68
+a 248 421 36
+a 28 320 42
+a 84 136 14
+a 119 354 32
+a 315 237 58
+a 474 177 1
+a 7 72 56
+a 149 105 88
+a 317 188 40
+a 249 404 41
+a 21 7 94
+a 69 32 98
+a 166 320 63
+a 138 167 48
+a 206 496 6
+a 45 80 21
+a 127 99 48
+a 209 60 73
+a 285 182 93
+a 226 248 84
+a 415 145 56
+a 29 103 20
+a 176 234 65
+a 44 183 81
+a 204 447 67
+a 375 424 99
+a 110 69 71
+a 162 42 64
+a 71 120 76
+a 7 10 94
+a 29 132 5
+a 31 139 78
+a 319 367 98
+a 260 28 83
+a 95 425 28
+a 72 129 68
+a 108 318 29
+a 187 248 62
+a 29 67 87
+a 362 195 19
+a 448 291 49
+a 447 46 7
+a 90 131 17
+a 30 221 79
+a 190 351 79
+a 25 97 39
+a 153 38 87
+a 15 33 30
+a 127 84 56
+a 362 345 29
+a 293 483 57
+a 32 34 4
+a 34 10 18
+a 21 13 16
+a 80 177 95
+a 486 489 48
+a 4 6 50
+a 341 14 25
+a 126 274 5
+a 301 306 94
+a 484 418 62
+a 347 101 4
+a 468 110 52
+a 13 16 25
+a 50 22 97
+a 165 236 71
+a 458 399 83
+a 283 212 8
+a 195 404 55
+a 49 96 48
+a 54 92 78
+a 137 126 73
+a 313 2 74
+a 441 417 57
+a 416 135 10
+a 19 107 89
+a 25 377 70
+a 399 2 96
+a 111 12 58
+a 146 99 76
+a 137 362 80
+a 264 341 73
+a 7 12 99
+a 29 97 84
+a 427 339 22
+a 453 344 87
+a 103 121 37
+a 163 141 99
+a 3 31 91
+a 124 31 16
+a 78 291 23
+a 400 136 63
+a 491 316 64
+a 459 474 10
+a 77 23 51
+a 473 203 24
+a 37 31 45
+a 81 15 10
+a 162 80 72
+a 444 352 13
+a 8 14 62
+a 166 377 48
+a 153 29 99
+a 181 85 100
+a 33 381 25
+a 53 107 79
+a 248 84 61
+a 472 209 2
+a 4 19 45
+a 98 37 15
+a 387 325 12
+a 174 147 84
+a 11 147 17
+a 8 1 58
+a 89 118 65
+a 355 185 89
+a 8 145 98
+a 15 418 66
+a 226 180 11
+a 156 172 73
+a 11 350 20
+a 180 133 96
+a 339 241 90
+a 25 101 29
+a 136 212 30
+a 118 303 87
+a 54 33 2
+a 75 60 24
+a 64 321 63
+a 335 490 69
+a 127 151 61
+a 104 209 20
+a 35 240 39
+a 500 418 93
+a 159 475 71
+a 347 255 27
+a 48 472 98
+a 75 166 77
+a 341 155 39
+a 198 297 40
+a 438 157 3
+a 279 468 13
+a 273 356 55
+a 7 213 27
+a 16 168 65
+a 454 448 46
+a 378 337 2
+a 60 290 56
+a 261 470 74
+a 100 375 90
+a 486 317 40
+a 475 170 28
+a 5 2 69
+a 85 289 91
+a 463 30 82
+a 5 14 32
+a 197 119 27
+a 136 378 85
+a 19 359 43
+a 30 105 65
+a 364 28 88
+a 450 367 50
+a 361 193 73
+a 431 38 92
+a 167 460 1
+a 253 47 49
+a 483 11 84
+a 31 132 30
+a 131 18 81
+a 87 281 14
+a 261 342 2
+a 55 453 24
+a 97 129 30
+a 126 143 27
+a 12 302 37
+a 20 2 42
+a 147 20 48
+a 315 38 83
+a 191 113 41
+a 421 264 98
+a 19 22 51
+a 119 7 35
+a 164 18 77
+a 333 178 61
+a 315 431 74
+a 96 245 80
+a 349 406 42
+a 42 139 49
+a 67 134 90
+a 427 48 39
+a 44 302 27
+a 465 404 4
+a 14 43 7
+a 4 244 100
+a 481 438 28
+a 26 28 92
+a 34 52 36
+a 68 352 15
+a 383 291 50
+a 266 54 77
+a 48 29 54
+a 176 39 10
+a 43 23 26
+a 84 132 15
+a 222 32 40
+a 477 458 59
+a 109 320 29
+a 27 123 34
+a 17 32 74
+a 23 318 53
+a 297 498 36
+a 400 468 77
+a 92 26 73
+a 109 33 56
+a 41 156 63
+a 269 233 9
+a 8 58 92
+a 8 24 67
+a 34 187 15
+a 365 141 83
+a 129 11 81
+a 399 196 1
+a 379 500 79
+a 215 73 27
+a 126 120 80
+a 485 409 10
+a 252 337 31
+a 64 69 35
+a 197 212 11
+a 65 80 81
+a 162 161 15
+a 229 10 81
+a 266 10 20
+a 229 190 52
+a 448 354 17
+a 25 2 58
+a 140 53 35
+a 189 378 20
+a 483 337 85
+a 10 20 100
+a 66 223 47
+a 389 208 93
+a 82 185 58
+a 302 112 91
+a 392 493 17
+a 412 38 29
+a 36 25 22
+a 18 10 55
+a 1 267 11
+a 30 297 12
+a 304 386 58
+a 384 315 25
+a 179 208 18
+a 122 113 79
+a 19 43 56
+a 74 174 51
+a 207 329 68
+a 252 418 34
+a 54 254 66
+a 14 1 65
+a 53 106 58
+a 277 53 28
+a 229 277 59
+a 31 304 90
+a 261 450 55
+a 202 437 96
+a 445 263 26
+a 117 246 78
+a 1 31 78
+a 36 39 80
+a 277 250 29
+a 322 300 49
+a 271 15 57
+a 485 425 29
+a 8 17 2
+a 52 172 52
+a 272 279 51
+a 165 232 54
+a 125 82 63
+a 224 135 38
+a 487 126 19
+a 365 335 3
+a 24 88 74
+a 131 52 68
+a 448 29 45
+a 257 361 25
+a 19 34 76
+a 26 94 42
+a 21 244 24
+a 49 340 26
+a 134 88 77
+a 89 147 32
+a 116 189 5
+a 171 210 7
+a 9 66 22
+a 80 84 95
+a 70 6 40
+a 190 312 84
+a 201 458 90
+a 85 290 95
+a 163 186 21
+a 207 419 74
+a 484 269 19
+a 14 13 28
+a 19 362 69
+a 1 259 84
+a 196 412 89
+a 261 19 23
+a 207 208 57
+a 1 112 88
+a 223 5 46
+a 483 54 60
+a 69 151 86
+a 367 189 94
+a 410 421 69
+a 26 65 76
+a 37 173 65
+a 146 285 95
+a 138 331 26
+a 137 249 61
+a 27 226 32
+a 8 366 83
+a 470 449 88
+a 31 60 62
+a 2 225 50
+a 61 4 45
+a 238 156 72
+a 304 164 20
+a 36 455 39
+a 136 60 78
+a 193 80 54
+a 318 162 60
+a 48 218 91
+a 439 106 7
+a 441 482 39
+a 442 401 5
+a 258 407 60
+a 461 430 12
+a 297 125 72
+a 118 387 38
+a 85 175 42
+a 309 7 38
+a 395 203 97
+a 21 342 68
+a 130 4 71
+a 31 474 2
+a 207 300 50
+a 30 2 73
+a 40 72 71
+a 69 292 65
+a 436 367 79
+a 30 122 23
+a 34 132 66
+a 300 318 53
+a 20 27 82
+a 23 25 19
+a 470 80 49
+a 265 179 37
+a 193 31 85
+a 75 119 100
+a 457 247 29
+a 53 200 31
+a 12 79 7
+a 143 208 33
+a 119 219 90
+a 271 477 74
+a 215 194 27
+a 3 76 72
+a 223 168 30
+a 365 224 75
+a 185 75 46
+a 383 227 56
+a 282 481 73
+a 36 53 57
+a 29 117 41
+a 54 261 26
+a 348 426 3
+a 464 328 28
+a 16 13 6
+a 338 187 24
+a 304 234 35
+a 489 285 55
+a 20 26 96
+a 39 27 65
+a 64 26 71
+a 411 3 92
+a 395 271 66
+a 2 19 47
+a 136 1 86
+a 151 360 40
+a 187 8 33
+a 418 111 22
+a 469 45 84
+a 121 150 5
+a 10 65 84
+a 51 306 31
+a 229 382 9
+a 103 1 94
+a 19 139 28
+a 144 290 97
+a 153 275 22
+a 5 135 32
+a 55 157 20
+a 32 135 60
+a 226 120 3
+a 225 341 61
+a 27 11 7
+a 62 5 42
+a 167 121 65
+a 16 24 100
+a 41 137 75
+a 157 316 6
+a 164 79 51
+a 43 206 7
+a 22 69 16
+a 179 269 48
+a 303 280 63
+a 203 387 17
+a 434 13 35
+a 468 388 90
+a 271 42 57
+a 146 253 54
+a 83 223 2
+a 363 27 40
+a 106 246 92
+a 192 495 35
+a 51 9 94
+a 18 210 14
+a 458 107 83
+a 249 20 2
+a 257 29 59
+a 478 135 55
+a 59 86 45
+a 13 12 23
+a 109 210 48
+a 172 287 5
+a 40 130 78
+a 157 77 46
+a 23 75 30
+a 115 452 60
+a 364 376 35
+a 19 15 92
+a 39 46 13
+a 6 60 54
+a 57 89 3
+a 67 246 29
+a 384 465 98
+a 224 1 58
+a 261 494 34
+a 136 486 42
+a 8 124 10
+a 84 19 90
+a 264 406 26
+a 403 253 56
+a 358 71 12
+a 49 55 22
+a 70 98 67
+a 419 7 66
+a 361 317 30
+a 1 42 86
+a 12 65 43
+a 243 29 96
+a 190 347 37
+a 96 202 26
+a 24 8 66
+a 38 19 67
+a 351 92 17
+a 11 9 62
+a 338 469 75
+a 346 380 11
+a 19 11 17
+a 202 266 3
+a 295 78 78
+a 418 434 93
+a 8 16 28
+a 414 96 20
+a 85 400 13
+a 64 7 80
+a 100 93 19
+a 280 302 46
+a 13 47 76
+a 400 300 30
+a 21 40 93
+a 75 109 16
+a 9 193 80
+a 210 174 2
+a 303 214 73
+a 218 415 2
+a 51 56 3
+a 271 51 15
+a 81 232 93
+a 276 269 35
+a 344 472 89
+a 8 25 68
+a 33 180 52
+a 136 54 33
+a 13 3 93
+a 27 69 12
+a 87 247 78
+a 228 426 71
+a 283 78 20
+a 402 470 87
+a 29 13 29
+a 80 16 48
+a 186 146 38
+a 294 209 89
+a 1 53 46
+a 41 141 6
+a 29 209 70
+a 319 78 49
+a 388 416 45
+a 371 117 56
+a 86 100 17
+a 132 147 55
+a 280 440 78
+a 9 30 73
+a 353 260 71
+a 144 452 13
+a 11 2 95
+a 290 4 76
+a 2 78 50
+a 105 307 88
+a 243 477 92
+a 77 80 32
+a 30 94 76
+a 48 383 89
+a 14 21 73
+a 478 55 98
+a 66 409 50
+a 243 157 58
+a 20 23 13
+a 143 181 43
+a 466 1 67
+a 480 20 97
+a 37 229 78
+a 1 12 7
+a 25 257 38
+a 292 449 51
+a 197 431 56
+a 427 347 82
+a 4 108 83
+a 247 172 11
+a 189 70 2
+a 243 495 56
+a 353 258 100
+a 12 223 36
+a 455 340 37
+a 415 422 35
+a 16 33 79
+a 175 200 5
+a 109 241 56
+a 36 418 65
+a 8 153 13
+a 456 113 72
+a 66 230 44
+a 232 16 93
+a 38 364 87
+a 88 449 83
+a 448 369 65
+a 307 465 88
+a 117 296 99
+a 69 170 40
+a 256 274 87
+a 91 418 83
+a 26 20 9
+a 254 153 94
+a 346 253 60
+a 229 41 42
+a 459 347 24
+a 3 70 35
+a 52 65 21
+a 96 453 29
+a 96 477 69
+a 18 356 54
+a 44 85 40
+a 87 104 20
+a 55 464 99
+a 49 95 38
+a 51 88 21
+a 168 451 62
+a 79 336 35
+a 423 453 9
+a 27 8 55
+a 2 263 98
+a 323 485 92
+a 26 289 90
+a 33 23 86
+a 479 41 79
+a 361 114 29
+a 378 150 18
+a 39 56 33
+a 114 38 59
+a 354 470 99
+a 426 97 57
+a 4 31 9
+a 172 255 32
+a 339 12 63
+a 100 271 68
+a 11 42 32
+a 19 32 86
+a 76 208 25
+a 82 341 73
+a 151 442 86
+a 43 334 76
+a 339 86 89
+a 182 58 81
+a 5 97 58
+a 92 2 9
+a 108 300 44
+a 303 430 9
+a 453 392 13
+a 47 77 72
+a 263 11 16
+a 126 390 35
+a 326 386 60
+a 28 123 28
+a 150 98 12
+a 195 134 20
+a 285 135 20
+a 444 325 35
+a 11 87 59
+a 99 91 83
+a 377 40 82
+a 32 238 27
+a 101 309 87
+a 29 194 55
+a 50 127 31
+a 93 296 53
+a 205 32 46
+a 15 2 64
+a 247 5 70
+a 226 19 39
+a 447 6 36
+a 218 425 36
+a 206 278 56
+a 383 4 17
+a 478 4 72
+a 198 405 56
+a 111 500 6
+a 34 19 48
+a 70 299 58
+a 474 321 90
+a 402 357 45
+a 217 57 49
+a 265 365 63
+a 186 190 45
+a 127 197 68
+a 288 192 66
+a 256 165 63
+a 153 488 44
+a 21 17 97
+a 218 120 8
+a 96 81 29
+a 321 444 64
+a 133 252 86
+a 286 52 16
+a 314 93 76
+a 101 341 16
+a 254 410 45
+a 94 255 30
+a 313 202 89
+a 435 403 16
+a 396 420 60
+a 7 70 27
+a 52 424 23
+a 289 132 94
+a 15 35 6
+a 45 38 93
+a 162 288 92
+a 79 84 10
+a 20 11 69
+a 219 458 93
+a 14 8 31
+a 424 215 19
+a 16 78 37
+a 92 259 94
+a 34 42 47
+a 187 335 12
+a 92 364 62
+a 453 317 26
+a 2 35 36
+a 45 253 21
+a 448 373 46
+a 174 14 73
+a 262 57 16
+a 379 389 50
+a 21 47 85
+a 41 12 37
+a 35 389 76
+a 274 499 90
+a 423 445 80
+a 13 2 35
+a 23 3 17
+a 447 231 77
+a 437 344 48
+a 182 118 57
+a 350 214 19
+a 235 234 23
+a 423 47 45
+a 229 112 1
+a 152 324 52
+a 34 13 77
+a 375 359 28
+a 96 356 47
+a 467 18 45
+a 478 63 78
+a 143 375 19
+a 139 82 91
+a 178 174 51
+a 397 459 27
+a 7 24 11
+a 196 436 5
+a 5 39 19
+a 8 64 26
+a 406 344 22
+a 335 58 79
+a 5 305 50
+a 405 477 15
+a 69 107 26
+a 90 148 54
+a 234 381 94
+a 16 486 96
+a 298 143 82
+a 192 163 50
+a 13 71 78
+a 107 66 91
+a 89 225 89
+a 119 214 70
+a 332 57 2
+a 43 85 4
+a 69 61 4
+a 437 98 35
+a 103 126 77
+a 169 203 49
+a 197 290 11
+a 198 372 21
+a 152 476 69
+a 110 183 28
+a 27 51 4
+a 58 214 47
+a 24 393 31
+a 30 41 32
+a 204 180 26
+a 225 180 22
+a 192 438 95
+a 67 88 31
+a 23 387 35
+a 354 44 6
+a 492 126 69
+a 69 124 23
+a 23 308 77
+a 16 31 86
+a 53 204 69
+a 227 389 2
+a 45 71 45
+a 30 468 23
+a 42 62 43
+a 152 12 64
+a 175 45 19
+a 174 397 24
+a 33 29 82
+a 243 447 15
+a 367 490 61
+a 12 373 24
+a 136 382 47
+a 167 392 79
+a 98 139 72
+a 212 17 92
+a 9 78 54
+a 29 46 67
+a 46 12 32
+a 279 394 61
+a 494 46 49
+a 91 94 69
+a 116 79 17
+a 259 269 76
+a 262 315 4
+a 365 323 46
+a 344 214 19
+a 88 115 13
+a 427 408 81
+a 22 38 71
+a 80 5 11
+a 117 14 77
+a 31 24 74
+a 113 354 45
+a 294 391 13
+a 345 470 47
+a 27 71 88
+a 299 15 31
+a 452 338 95
+a 287 431 67
+a 8 32 39
+a 401 28 8
+a 49 105 97
+a 490 349 61
+a 31 225 1
+a 46 68 41
+a 293 40 75
+a 415 213 58
+a 60 126 34
+a 95 168 88
+a 430 352 49
+a 1 16 55
+a 97 122 67
+a 26 90 63
+a 42 155 89
+a 400 137 38
+a 227 482 50
+a 411 335 55
+a 130 106 17
+a 193 232 70
+a 341 91 6
+a 19 26 89
+a 130 40 6
+a 246 9 54
+a 478 22 2
+a 43 90 88
+a 80 103 17
+a 61 151 28
+a 4 173 12
+a 173 170 91
+a 276 245 76
+a 118 394 93
+a 341 429 16
+a 29 66 2
+a 163 185 4
+a 388 255 91
+a 132 62 62
+a 46 96 76
+a 42 22 79
+a 96 185 37
+a 246 184 73
+a 220 462 98
+a 84 131 59
+a 118 327 68
+a 49 82 51
+a 15 24 87
+a 403 70 89
+a 97 349 99
+a 17 48 99
+a 325 169 22
+a 321 19 83
+a 217 172 41
+a 48 158 45
+a 196 469 38
+a 15 14 19
+a 2 77 26
+a 5 73 48
+a 111 212 61
+a 25 12 31
+a 105 10 74
+a 365 392 62
+a 288 49 85
+a 225 135 32
+a 26 10 8
+a 58 26 26
+a 238 297 20
+a 422 438 9
+a 87 382 28
+a 183 497 17
+a 14 34 50
+a 14 357 62
+a 71 171 17
+a 76 258 2
+a 429 441 47
+a 68 227 95
+a 111 468 53
+a 407 169 40
+a 14 24 56
+a 97 41 8
+a 473 382 48
+a 100 190 33
+a 343 145 9
+a 24 9 23
+a 34 367 97
+a 493 350 54
+a 109 93 44
+a 120 463 90
+a 286 450 83
+a 152 273 24
+a 67 247 59
+a 306 91 26
+a 416 257 41
+a 341 68 13
+a 37 56 1
+a 310 209 56
+a 4 63 65
+a 268 321 97
+a 84 297 6
+a 399 364 69
+a 207 168 94
+a 370 153 18
+a 279 282 39
+a 288 441 6
+a 2 157 97
+a 182 51 31
+a 87 308 19
+a 177 254 77
+a 315 435 94
+a 256 262 58
+a 8 151 42
+a 34 145 42
+a 186 215 6
+a 70 348 40
+a 56 186 52
+a 93 426 91
+a 205 378 62
+a 20 16 39
+a 163 79 96
+a 171 152 54
+a 72 370 66
+a 424 446 70
+a 476 428 63
+a 59 13 26
+a 58 19 49
+a 121 140 6
+a 293 453 81
+a 381 469 8
+a 240 23 60
+a 81 161 70
+a 55 9 34
+a 4 23 63
+a 13 114 13
+a 376 226 49
+a 395 187 58
+a 302 45 74
+a 277 399 21
+a 277 196 61
+a 47 103 54
+a 158 257 73
+a 108 1 12
+a 440 462 45
+a 14 107 9
+a 16 4 76
+a 232 128 29
+a 113 241 4
+a 309 66 17
+a 484 380 37
+a 169 277 84
+a 7 27 18
+a 10 4 28
+a 90 65 86
+a 354 364 66
+a 14 10 96
+a 362 281 54
+a 272 165 100
+a 297 198 92
+a 147 301 35
+a 149 146 62
+a 307 42 39
+a 207 180 53
+a 255 135 35
+a 59 103 59
+a 128 116 13
+a 334 444 91
+a 22 353 78
+a 91 400 53
+a 386 314 27
+a 19 4 73
+a 7 82 47
+a 139 44 7
+a 482 233 87
+a 238 352 71
+a 79 12 27
+a 372 216 35
+a 315 476 62
+a 145 253 3
+a 272 133 79
+a 329 476 98
+a 273 154 64
+a 225 454 49
+a 413 487 26
+a 215 360 22
+a 99 209 33
+a 119 179 33
+a 121 7 21
+a 336 24 64
+a 58 174 43
+a 36 65 2
+a 52 90 46
+a 337 401 1
+a 150 452 74
+a 5 58 71
+a 174 122 7
+a 13 19 87
+a 105 22 22
+a 46 283 22
+a 80 443 95
+a 34 64 12
+a 18 57 5
+a 136 153 4
+a 137 197 86
+a 66 7 14
+a 1 11 80
+a 485 371 73
+a 10 14 64
+a 198 95 9
+a 343 289 76
+a 418 474 92
+a 402 411 1
+a 1 23 89
+a 72 35 85
+a 212 113 25
+a 45 83 68
+a 9 181 25
+a 25 234 79
+a 233 420 23
+a 259 155 11
+a 9 37 13
+a 33 16 43
+a 41 105 65
+a 241 394 47
+a 106 318 55
+a 79 71 10
+a 64 216 26
+a 11 3 84
+a 32 183 69
+a 121 11 61
+a 72 377 35
+a 15 4 49
+a 16 8 8
+a 55 129 60
+a 387 139 38
+a 9 267 70
+a 406 12 80
+a 462 15 48
+a 220 163 94
+a 381 26 57
+a 451 76 49
+a 128 47 55
+a 302 47 46
+a 362 484 21
+a 108 33 82
+a 398 105 62
+a 404 221 59
+a 24 55 100
+a 225 40 80
+a 91 395 37
+a 81 210 57
+a 214 478 88
+a 266 158 29
+a 15 57 24
+a 133 51 38
+a 350 119 55
+a 114 278 10
+a 26 69 90
+a 308 57 80
+a 187 452 64
+a 171 237 41
+a 194 413 98
+a 397 18 94
+a 50 56 17
+a 172 391 13
+a 28 29 22
+a 390 124 94
+a 405 282 35
+a 265 259 56
+a 325 235 70
+a 113 1 57
+a 185 1 69
+a 48 77 23
+a 28 32 45
+a 69 103 85
+a 119 79 90
+a 225 104 93
+a 447 64 9
+a 274 482 49
+a 419 204 7
+a 5 22 90
+a 17 225 85
+a 413 170 35
+a 1 40 62
+a 95 21 35
+a 434 467 79
+a 2 17 38
+a 92 11 35
+a 54 140 34
+a 312 88 94
+a 328 84 4
+a 16 44 78
+a 261 46 85
+a 93 13 73
+a 56 57 85
+a 280 278 86
+a 284 404 6
+a 464 372 64
+a 52 445 25
+a 27 62 1
+a 92 12 51
+a 94 50 90
+a 395 499 63
+a 22 130 20
+a 87 364 69
+a 343 126 15
+a 47 67 82
+a 57 149 29
+a 456 172 52
+a 80 195 67
+a 33 8 64
+a 117 17 84
+a 403 18 77
+a 1 19 55
+a 30 89 64
+a 75 218 78
+a 3 89 24
+a 54 81 12
+a 26 27 86
+a 36 315 28
+a 298 348 1
+a 155 251 73
+a 18 48 52
+a 375 321 36
+a 93 150 1
+a 190 160 78
+a 375 379 20
+a 435 450 9
+a 96 174 73
+a 97 184 44
+a 229 69 58
+a 187 95 12
+a 52 14 17
+a 1 123 54
+a 1 404 70
+a 464 252 33
+a 464 490 53
+a 43 63 9
+a 32 323 23
+a 343 76 73
+a 422 77 45
+a 343 408 34
+a 118 52 64
+a 494 124 71
+a 10 66 53
+a 329 160 44
+a 282 14 73
+a 475 207 66
+a 12 10 94
+a 256 8 49
+a 69 329 100
+a 456 350 35
+a 278 196 55
+a 146 235 43
+a 325 7 76
+a 101 469 86
+a 7 419 74
+a 186 165 41
+a 9 16 2
+a 26 431 63
+a 456 178 98
+a 484 101 29
+a 302 104 44
+a 114 120 16
+a 223 265 51
+a 182 24 42
+a 404 20 68
+a 356 273 96
+a 449 348 93
+a 39 156 52
+a 260 261 54
+a 11 13 36
+a 19 17 33
+a 33 146 10
+a 70 202 41
+a 413 85 81
+a 228 95 50
+a 56 86 92
+a 138 162 38
+a 152 303 58
+a 124 239 48
+a 8 84 3
+a 329 436 19
+a 38 108 50
+a 129 80 9
+a 388 492 7
+a 155 165 63
+a 60 247 89
+a 343 60 87
+a 192 399 97
+a 173 101 63
+a 175 439 52
+a 180 474 17
+a 264 405 55
+a 34 47 63
+a 179 219 76
+a 271 189 21
+a 474 302 45
+a 155 247 3
+a 111 415 15
+a 289 304 16
+a 202 223 36
+a 24 19 4
+a 43 14 88
+a 175 188 21
+a 118 164 47
+a 297 253 89
+a 205 204 21
+a 35 9 85
+a 205 98 27
+a 482 437 54
+a 460 254 17
+a 130 148 49
+a 192 142 26
+a 446 156 20
+a 346 342 80
+a 18 143 30
+a 26 48 51
+a 143 79 43
+a 450 494 49
+a 221 466 72
+a 24 2 94
+a 335 429 47
+a 415 32 16
+a 169 179 87
+a 46 376 93
+a 26 165 11
+a 71 208 42
+a 6 1 85
+a 40 58 69
+a 393 130 35
+a 410 369 25
+a 38 199 10
+a 75 230 80
+a 5 212 27
+a 115 110 100
+a 188 450 84
+a 281 8 88
+a 462 145 14
+a 293 41 57
+a 169 164 53
+a 31 32 12
+a 35 116 21
+a 476 374 49
+a 35 414 84
+a 412 328 33
+a 24 294 79
+a 323 334 16
+a 421 487 20
+a 380 111 82
+a 46 79 86
+a 229 153 32
+a 236 166 85
+a 14 16 15
+a 35 1 53
+a 62 7 27
+a 130 30 15
+a 89 146 78
+a 482 220 19
+a 305 484 64
+a 45 31 59
+a 80 86 92
+a 304 265 23
+a 471 351 73
+a 404 446 8
+a 271 279 96
+a 93 102 100
+a 115 197 100
+a 414 172 5
+a 116 153 42
+a 3 9 95
+a 16 41 92
+a 44 56 74
+a 299 288 38
+a 467 399 58
+a 354 246 68
+a 14 100 31
+a 24 102 40
+a 191 262 20
+a 127 204 72
+a 472 117 82
+a 271 158 17
+a 10 1 46
+a 300 59 30
+a 27 193 44
+a 211 355 4
+a 141 31 90
+a 132 218 53
+a 30 239 62
+a 257 28 80
+a 492 311 68
+a 41 76 9
+a 92 187 50
+a 8 252 6
+a 195 303 46
+a 452 252 52
+a 393 33 100
+a 1 93 24
+a 6 202 52
+a 420 144 85
+a 389 12 21
+a 232 6 29
+a 262 265 62
+a 116 145 60
+a 14 395 24
+a 308 127 70
+a 49 2 70
+a 423 184 89
+a 91 342 100
+a 109 27 86
+a 22 95 13
+a 275 252 39
+a 490 310 100
+a 329 391 87
+a 440 3 65
+a 349 195 32
+a 46 28 40
+a 389 2 67
+a 237 148 3
+a 317 137 13
+a 414 239 92
+a 305 262 42
+a 54 4 55
+a 11 270 99
+a 145 197 96
+a 190 269 99
+a 427 133 58
+a 24 33 31
+a 22 60 91
+a 288 116 1
+a 76 155 19
+a 436 2 93
+a 207 213 8
+a 472 3 21
+a 350 393 83
+a 42 17 19
+a 96 177 90
+a 258 121 72
+a 152 289 51
+a 18 460 56
+a 490 181 80
+a 27 79 41
+a 9 382 84
+a 240 52 2
+a 435 379 87
+a 392 477 23
+a 63 287 16
+a 286 57 21
+a 316 452 1
+a 116 125 9
+a 6 28 62
+a 117 275 3
+a 90 222 30
+a 104 429 52
+a 29 26 88
+a 38 93 40
+a 87 267 78
+a 112 243 37
+a 298 194 28
+a 370 353 15
+a 87 370 93
+a 123 271 48
+a 7 40 1
+a 60 409 58
+a 332 475 14
+a 72 304 54
+a 43 379 49
+a 360 177 31
+a 495 407 49
+a 16 408 59
+a 35 49 63
+a 466 65 94
+a 104 29 63
+a 207 323 63
+a 365 230 17
+a 55 217 58
+a 48 90 14
+a 196 89 30
+a 141 348 11
+a 204 389 51
+a 482 468 73
+a 20 50 45
+a 28 61 45
+a 383 9 99
+a 252 275 41
+a 353 8 86
+a 403 171 83
+a 154 205 61
+a 253 448 61
+a 263 450 49
+a 489 428 7
+a 294 96 24
+a 21 11 99
+a 96 119 16
+a 237 466 82
+a 247 331 6
+a 1 95 67
+a 438 27 13
+a 8 82 64
+a 142 50 44
+a 452 208 92
+a 282 51 21
+a 485 375 9
+a 73 202 49
+a 422 57 51
+a 276 56 66
+a 179 371 1
+a 63 18 55
+a 69 67 48
+a 382 18 66
+a 287 371 45
+a 10 19 71
+a 30 186 27
+a 238 387 58
+a 472 402 9
+a 323 4 30
+a 275 51 93
+a 169 101 47
+a 402 433 84
+a 10 163 58
+a 130 51 13
+a 209 14 12
+a 311 389 85
+a 20 8 16
+a 465 37 98
+a 148 190 89
+a 70 116 95
+a 212 3 23
+a 311 5 96
+a 408 89 39
+a 2 109 89
+a 34 5 83
+a 45 171 17
+a 366 346 58
+a 192 193 21
+a 42 158 19
+a 95 493 94
+a 50 425 17
+a 109 110 60
+a 12 64 33
+a 247 440 8
+a 60 209 59
+a 225 82 87
+a 339 256 12
+a 31 87 67
+a 345 27 62
+a 206 90 33
+a 118 236 14
+a 329 38 89
+a 8 34 80
+a 330 174 22
+a 103 114 69
+a 203 160 50
+a 425 74 42
+a 427 279 39
+a 219 303 10
+a 178 164 5
+a 40 63 21
+a 254 258 87
+a 156 165 86
+a 362 332 15
+a 35 110 88
+a 133 122 80
+a 244 67 9
+a 72 74 20
+a 40 133 12
+a 166 440 54
+a 357 498 18
+a 406 248 72
+a 16 82 70
+a 192 219 26
+a 341 8 42
+a 389 8 11
+a 170 405 68
+a 47 224 27
+a 425 64 1
+a 58 28 47
+a 177 44 3
+a 48 373 57
+a 181 303 24
+a 369 208 69
+a 496 401 43
+a 12 285 57
+a 346 75 83
+a 315 328 39
+a 378 246 16
+a 62 36 64
+a 230 129 19
+a 38 480 13
+a 287 311 21
+a 281 235 75
+a 1 318 13
+a 17 366 53
+a 259 16 83
+a 47 275 98
+a 395 213 13
+a 41 28 44
+a 173 181 73
+a 193 139 86
+a 90 174 51
+a 11 101 42
+a 105 78 91
+a 457 237 19
+a 342 444 40
+a 148 6 79
+a 53 278 45
+a 109 456 41
+a 28 443 37
+a 8 2 59
+a 25 48 56
+a 199 19 25
+a 454 203 56
+a 457 236 9
+a 49 19 64
+a 242 72 50
+a 360 352 9
+a 173 52 26
+a 30 4 68
+a 278 222 68
+a 278 361 48
+a 13 438 99
+a 9 13 21
+a 73 215 51
+a 343 36 79
+a 454 391 31
+a 381 398 9
+a 22 127 71
+a 148 207 22
+a 43 311 90
+a 218 102 7
+a 308 184 46
+a 377 221 97
+a 32 122 74
+a 275 283 60
+a 285 350 67
+a 24 142 35
+a 50 466 55
+a 5 385 54
+a 65 400 83
+a 19 380 32
+a 4 191 26
+a 490 335 34
+a 454 274 68
+a 49 17 62
+a 151 68 47
+a 441 500 54
+a 10 43 37
+a 231 233 79
+a 62 171 99
+a 77 292 92
+a 133 403 4
+a 17 18 91
+a 330 41 1
+a 54 103 21
+a 105 32 17
+a 291 37 3
+a 261 230 76
+a 492 108 38
+a 47 68 89
+a 419 70 70
+a 464 377 53
+a 3 160 4
+a 456 155 31
+a 363 108 71
+a 493 165 55
+a 160 190 3
+a 19 28 69
+a 3 376 77
+a 50 374 97
+a 244 415 27
+a 364 30 57
+a 17 43 94
+a 44 397 16
+a 478 473 72
+a 2 192 24
+a 114 225 84
+a 177 357 89
+a 111 162 45
+a 49 61 82
+a 95 123 67
+a 357 206 76
+a 215 126 60
+a 282 93 15
+a 381 430 51
+a 150 334 100
+a 27 25 72
+a 19 21 65
+a 25 200 75
+a 37 243 20
+a 125 178 77
+a 6 20 4
+a 110 41 34
+a 141 324 5
+a 6 42 59
+a 7 180 27
+a 65 211 91
+a 137 117 37
+a 101 14 23
+a 21 27 99
+a 36 64 38
+a 90 417 69
+a 89 434 68
+a 171 69 22
+a 191 160 25
+a 212 452 42
+a 39 118 22
+a 19 30 2
+a 118 9 24
+a 441 274 1
+a 288 62 93
+a 14 11 100
+a 32 127 44
+a 20 5 29
+a 29 253 58
+a 147 463 29
+a 168 459 6
+a 445 190 84
+a 116 3 92
+a 321 14 77
+a 71 112 3
+a 50 65 98
+a 18 2 74
+a 148 7 89
+a 223 71 97
+a 72 312 18
+a 129 188 14
+a 14 137 69
+a 8 44 19
+a 56 75 55
+a 483 18 34
+a 7 64 83
+a 293 396 65
+a 494 479 84
+a 122 222 10
+a 103 74 49
+a 384 14 56
+a 165 337 36
+a 312 348 84
+a 396 492 80
+a 22 21 71
+a 91 71 51
+a 347 16 65
+a 393 63 3
+a 313 419 43
+a 31 327 9
+a 58 50 26
+a 127 114 2
+a 205 325 82
+a 388 93 42
+a 117 71 64
+a 340 284 31
+a 92 139 57
+a 325 311 87
+a 407 411 37
+a 185 39 47
+a 490 39 68
+a 295 145 65
+a 349 268 75
+a 256 154 11
+a 448 177 98
+a 54 201 78
+a 328 382 72
+a 32 14 33
+a 31 63 61
+a 255 5 58
+a 249 146 86
+a 7 154 27
+a 6 11 4
+a 217 126 9
+a 283 28 29
+a 190 54 48
+a 270 427 29
+a 309 486 58
+a 82 498 30
+a 21 160 90
+a 18 39 69
+a 44 75 89
+a 199 105 27
+a 357 459 36
+a 385 39 89
+a 108 457 15
+a 227 6 42
+a 33 51 45
+a 75 357 79
+a 167 158 20
+a 317 172 3
+a 386 255 94
+a 36 47 10
+a 249 171 28
+a 302 194 58
+a 64 9 21
+a 469 263 10
+a 245 101 56
+a 18 8 28
+a 161 190 37
+a 352 149 13
+a 75 121 94
+a 176 99 72
+a 144 136 2
+a 310 23 47
+a 271 370 92
+a 40 34 82
+a 51 6 100
+a 472 173 31
+a 190 480 20
+a 60 404 45
+a 16 1 62
+a 90 358 57
+a 228 98 46
+a 53 51 71
+a 447 154 21
+a 102 495 56
+a 9 27 36
+a 40 59 34
+a 5 12 54
+a 6 412 89
+a 244 157 68
+a 88 317 67
+a 405 100 11
+a 133 195 62
+a 430 290 8
+a 26 9 51
+a 119 153 23
+a 41 126 66
+a 210 309 22
+a 114 400 83
+a 22 118 9
+a 200 38 8
+a 52 469 48
+a 40 19 14
+a 110 220 62
+a 137 267 67
+a 353 340 24
+a 167 169 8
+a 42 63 57
+a 91 299 53
+a 200 187 11
+a 253 73 79
+a 20 13 21
+a 73 97 25
+a 273 10 35
+a 464 93 48
+a 53 92 17
+a 15 37 15
+a 77 90 62
+a 163 318 90
+a 254 464 29
+a 278 62 61
+a 235 145 39
+a 6 4 97
+a 63 219 77
+a 99 184 80
+a 134 489 2
+a 394 309 15
+a 473 299 37
+a 121 5 39
+a 250 203 51
+a 440 66 97
+a 15 82 77
+a 208 39 74
+a 320 62 85
+a 170 59 35
+a 196 288 14
+a 117 341 78
+a 10 52 64
+a 33 421 67
+a 152 444 18
+a 64 205 29
+a 101 331 46
+a 148 352 60
+a 118 49 55
+a 39 86 38
+a 2 138 92
+a 68 457 87
+a 125 219 44
+a 21 231 52
+a 138 150 56
+a 114 196 25
+a 205 47 98
+a 292 121 11
+a 174 239 11
+a 122 341 5
+a 13 7 7
+a 110 10 51
+a 449 22 61
+a 172 354 83
+a 94 45 28
+a 171 175 58
+a 16 257 16
+a 413 80 69
+a 327 21 91
+a 455 85 54
+a 322 133 52
+a 58 79 42
+a 88 13 95
+a 175 294 4
+a 454 115 40
+a 387 34 47
+a 389 96 26
+a 267 407 30
+a 21 62 33
+a 16 14 9
+a 105 68 80
+a 133 118 63
+a 353 338 12
+a 12 43 33
+a 52 19 22
+a 373 359 72
+a 5 18 64
+a 200 122 11
+a 65 448 4
+a 391 438 64
+a 20 290 21
+a 4 232 100
+a 299 317 94
+a 147 283 97
+a 426 485 18
+a 234 133 59
+a 264 180 45
+a 441 267 48
+a 310 338 53
+a 197 41 93
+a 56 71 10
+a 109 17 37
+a 66 93 22
+a 8 70 5
+a 22 277 63
+a 199 398 56
+a 105 238 94
+a 91 455 29
+a 41 57 5
+a 32 58 54
+a 378 56 17
+a 379 150 57
+a 84 30 75
+a 103 277 36
+a 85 118 96
+a 487 171 30
+a 287 61 78
+a 270 10 68
+a 2 119 13
+a 14 5 83
+a 14 148 16
+a 160 365 11
+a 48 251 17
+a 275 132 13
+a 437 268 19
+a 61 83 37
+a 221 169 23
+a 368 398 36
+a 453 295 75
+a 51 83 74
+a 204 79 98
+a 366 488 20
+a 135 202 29
+a 12 22 93
+a 29 100 4
+a 138 133 86
+a 77 418 73
+a 138 440 62
+a 76 89 64
+a 138 141 6
+a 338 144 94
+a 417 171 33
+a 34 8 34
+a 199 364 63
+a 54 222 39
+a 8 238 71
+a 61 358 28
+a 394 314 1
+a 264 70 69
+a 470 19 38
+a 27 52 94
+a 239 53 87
+a 40 1 96
+a 32 25 86
+a 73 249 13
+a 80 396 81
+a 495 272 50
+a 161 278 25
+a 6 53 4
+a 109 37 15
+a 152 165 27
+a 214 491 64
+a 101 209 91
+a 117 352 42
+a 57 273 67
+a 304 99 65
+a 201 262 47
+a 389 107 17
+a 420 205 75
+a 19 10 87
+a 94 220 27
+a 98 357 5
+a 490 3 43
+a 74 77 30
+a 326 188 46
+a 344 384 37
+a 297 492 43
+a 203 328 71
+a 22 51 43
+a 75 27 20
+a 348 460 18
+a 133 60 88
+a 76 92 32
+a 317 264 16
+a 3 40 28
+a 45 175 86
+a 209 187 71
+a 191 366 76
+a 442 30 36
+a 313 109 63
+a 19 128 12
+a 290 20 46
+a 96 336 16
+a 5 32 26
+a 41 157 38
+a 61 281 35
+a 8 111 37
+a 88 466 76
+a 10 41 14
+a 100 257 61
+a 477 294 72
+a 332 63 81
+a 28 117 34
+a 389 46 42
+a 153 290 94
+a 309 175 10
+a 161 65 60
+a 366 208 1
+a 66 4 90
+a 104 3 74
+a 290 224 7
+a 90 213 72
+a 23 149 91
+a 109 179 5
+a 218 65 55
+a 473 83 24
+a 301 204 78
+a 53 277 14
+a 61 121 53
+a 129 67 37
+a 382 375 1
+a 331 461 84
+a 250 381 6
+a 110 283 47
+a 59 60 68
+a 16 87 80
+a 330 356 51
+a 60 164 3
+a 85 292 25
+a 96 414 87
+a 185 372 100
+a 34 183 64
+a 14 3 67
+a 330 309 39
+a 232 329 92
+a 376 462 28
+a 93 91 1
+a 27 163 42
+a 262 251 74
+a 379 253 71
+a 196 105 24
+a 152 171 80
+a 38 198 39
+a 108 500 96
+a 243 117 82
+a 52 3 51
+a 320 142 28
+a 373 378 13
+a 364 12 23
+a 28 93 15
+a 212 360 70
+a 381 55 71
+a 12 5 84
+a 21 176 45
+a 405 178 55
+a 32 216 1
+a 432 484 61
+a 120 279 25
+a 369 58 94
+a 325 163 90
+a 181 284 100
+a 51 2 84
+a 434 96 42
+a 483 383 39
+a 30 34 61
+a 24 118 90
+a 34 14 8
+a 78 67 78
+a 336 445 16
+a 246 445 13
+a 21 19 26
+a 112 79 12
+a 179 307 69
+a 3 8 17
+a 39 1 70
+a 8 131 88
+a 301 429 19
+a 188 258 74
+a 23 34 73
+a 163 104 17
+a 88 144 70
+a 130 227 78
+a 173 232 95
+a 76 164 40
+a 2 126 2
+a 14 18 57
+a 442 323 9
+a 363 123 31
+a 70 62 59
+a 91 354 15
+a 219 102 41
+a 264 369 14
+a 129 209 62
+a 25 183 28
+a 20 165 77
+a 38 13 6
+a 148 76 84
+a 43 417 39
+a 416 464 72
+a 249 76 40
+a 403 136 27
+a 7 41 2
+a 119 10 53
+a 146 284 29
+a 123 23 2
+a 492 300 9
+a 12 3 33
+a 31 109 93
+a 241 405 79
+a 446 308 64
+a 181 2 21
+a 374 5 65
+a 473 130 76
+a 82 87 21
+a 40 88 29
+a 128 176 51
+a 225 377 56
+a 43 386 75
+a 17 2 20
+a 198 123 60
+a 338 168 33
+a 9 337 18
+a 156 342 5
+a 159 133 78
+a 329 478 5
+a 14 23 79
+a 27 91 53
+a 52 128 6
+a 128 172 26
+a 1 22 42
+a 33 28 44
+a 325 439 41
+a 301 126 67
+a 17 13 56
+a 9 3 12
+a 54 309 64
+a 54 374 84
+a 490 175 62
+a 84 66 62
+a 406 447 47
+a 5 70 47
+a 182 102 51
+a 6 34 9
+a 295 496 67
+a 219 232 74
+a 500 452 89
+a 219 492 37
+a 16 95 27
+a 154 102 45
+a 473 54 25
+a 22 28 58
+a 134 45 94
+a 13 229 54
+a 158 379 99
+a 374 20 65
+a 221 322 73
+a 6 58 42
+a 343 6 74
+a 84 315 29
+a 138 49 88
+a 477 97 79
+a 488 163 86
+a 106 123 84
+a 17 222 15
+a 354 345 95
+a 242 467 99
+a 54 32 91
+a 55 66 71
+a 321 77 70
+a 9 241 8
+a 100 11 7
+a 112 11 47
+a 118 114 49
+a 66 147 54
+a 128 360 53
+a 24 73 44
+a 34 92 61
+a 147 409 4
+a 6 85 57
+a 120 144 9
+a 168 309 76
+a 343 348 91
+a 400 150 44
+a 25 21 47
+a 51 45 43
+a 186 45 27
+a 342 52 93
+a 231 285 94
+a 271 461 55
+a 386 298 91
+a 34 6 81
+a 65 296 13
+a 57 251 94
+a 116 166 56
+a 159 252 59
+a 476 409 66
+a 134 445 67
+a 249 470 32
+a 363 395 12
+a 387 390 43
+a 51 72 17
+a 211 141 73
+a 273 367 88
+a 146 345 9
+a 37 68 56
+a 126 459 29
+a 28 39 85
+a 471 491 77
+a 81 54 97
+a 155 325 69
+a 275 408 97
+a 178 218 17
+a 270 446 87
+a 37 28 72
+a 264 138 59
+a 96 78 44
+a 13 60 42
+a 28 2 45
+a 254 2 5
+a 473 462 79
+a 442 85 30
+a 2 68 80
+a 487 303 35
+a 3 115 92
+a 3 175 39
+a 385 368 57
+a 87 55 69
+a 95 148 8
+a 413 354 34
+a 199 127 9
+a 14 65 11
+a 92 76 95
+a 140 33 86
+a 488 53 2
+a 323 329 61
+a 24 44 15
+a 310 314 35
+a 142 260 31
+a 381 272 18
+a 422 309 11
+a 379 385 55
+a 166 157 22
+a 5 57 51
+a 107 146 100
+a 70 284 59
+a 241 494 59
+a 335 203 34
+a 145 61 77
+a 54 82 20
+a 117 203 58
+a 176 167 31
+a 119 489 21
+a 472 42 45
+a 60 79 46
+a 3 100 21
+a 327 211 72
+a 140 212 27
+a 29 239 51
+a 91 494 71
+a 402 131 52
+a 203 386 40
+a 376 30 30
+a 46 166 57
+a 367 1 64
+a 409 134 32
+a 26 343 45
+a 112 149 89
+a 7 256 68
+a 64 323 10
+a 439 196 12
+a 420 148 51
+a 480 213 65
+a 104 106 3
+a 203 175 99
+a 33 259 91
+a 15 53 63
+a 195 106 47
+a 389 268 88
+a 444 6 84
+a 98 177 96
+a 25 113 51
+a 396 321 33
+a 124 458 47
+a 370 6 67
+a 38 44 29
+a 145 360 68
+a 309 491 56
+a 464 13 36
+a 81 97 52
+a 100 55 69
+a 293 62 57
+a 486 99 10
+a 111 277 50
+a 54 245 41
+a 300 243 9
+a 12 1 1
+a 17 3 41
+a 89 24 32
+a 98 35 4
+a 313 223 95
+a 222 439 96
+a 108 26 90
+a 346 113 6
+a 46 478 67
+a 31 49 9
+a 154 112 31
+a 433 266 65
+a 392 40 22
+a 91 137 35
+a 7 8 39
+a 111 3 14
+a 399 264 85
+a 215 79 1
+a 8 22 9
+a 18 246 14
+a 11 71 64
+a 74 179 99
+a 76 276 11
+a 439 234 81
+a 406 465 67
+a 451 141 73
+a 479 151 56
+a 86 111 27
+a 289 99 99
+a 20 303 42
+a 91 6 90
+a 345 143 72
+a 334 269 4
+a 251 455 60
+a 115 29 81
+a 2 33 50
+a 108 176 25
+a 478 131 1
+a 4 46 53
+a 43 489 92
+a 36 262 93
+a 213 299 18
+a 22 174 27
+a 369 31 80
+a 444 19 83
+a 484 283 93
+a 421 220 44
+a 27 37 85
+a 265 72 72
+a 443 6 93
+a 237 32 23
+a 6 106 46
+a 65 2 42
+a 109 230 86
+a 120 476 42
+a 265 407 87
+a 1 13 23
+a 31 12 19
+a 427 312 58
+a 121 120 96
+a 273 128 86
+a 286 62 74
+a 6 16 44
+a 10 8 98
+a 110 482 74
+a 192 498 17
+a 79 173 49
+a 480 122 35
+a 20 364 20
+a 288 465 58
+a 61 219 34
+a 301 298 93
+a 75 1 76
+a 65 84 58
+a 111 173 62
+a 162 231 77
+a 133 46 77
+a 33 288 55
+a 365 398 71
+a 148 186 20
+a 9 265 43
+a 118 68 49
+a 16 459 51
+a 228 494 94
+a 11 135 36
+a 12 7 91
+a 123 345 16
+a 305 58 76
+a 229 421 76
+a 17 24 17
+a 117 467 34
+a 454 32 12
+a 128 289 69
+a 274 315 37
+a 80 90 10
+a 95 8 70
+a 419 226 40
+a 45 109 81
+a 296 72 13
+a 245 84 49
+a 35 147 97
+a 185 60 65
+a 315 178 47
+a 467 346 95
+a 51 8 82
+a 157 249 49
+a 298 129 81
+a 8 7 57
+a 17 40 29
+a 208 102 15
+a 240 447 81
+a 195 74 84
+a 156 298 48
+a 6 206 42
+a 436 425 18
+a 393 386 42
+a 5 278 45
+a 89 28 57
+a 451 69 22
+a 16 56 28
+a 17 15 33
+a 87 385 69
+a 22 39 49
+a 36 45 66
+a 72 348 70
+a 73 20 92
+a 76 355 100
+a 312 290 25
+a 150 500 37
+a 69 127 43
+a 159 198 28
+a 365 105 90
+a 336 490 19
+a 179 214 60
+a 30 71 62
+a 226 329 1
+a 408 205 11
+a 26 443 41
+a 491 126 57
+a 497 294 88
+a 133 346 63
+a 333 263 52
+a 65 51 35
+a 113 95 70
+a 41 7 22
+a 364 184 46
+a 149 71 75
+a 383 473 92
+a 281 140 11
+a 72 117 31
+a 15 123 19
+a 40 190 85
+a 215 260 46
+a 6 91 60
+a 4 34 59
+a 49 141 55
+a 92 114 46
+a 32 237 68
+a 493 106 67
+a 358 212 36
+a 371 352 5
+a 446 184 24
+a 51 79 7
+a 265 210 76
+a 227 345 36
+a 242 73 9
+a 4 258 83
+a 131 346 86
+a 12 254 74
+a 282 151 8
+a 83 147 48
+a 28 17 59
+a 46 2 61
+a 138 4 35
+a 215 335 23
+a 210 261 83
+a 23 342 26
+a 486 475 11
+a 2 88 7
+a 14 40 62
+a 10 469 67
+a 149 348 10
+a 13 4 5
+a 390 433 28
+a 15 17 12
+a 477 376 97
+a 6 23 17
+a 323 55 29
+a 224 484 75
+a 409 112 34
+a 315 213 9
+a 64 70 79
+a 155 335 41
+a 330 86 20
+a 406 108 2
+a 437 224 85
+a 286 232 58
+a 39 6 52
+a 63 146 100
+a 137 23 86
+a 137 284 34
+a 343 437 74
+a 5 30 20
+a 60 112 77
+a 60 6 84
+a 194 124 57
+a 36 135 23
+a 270 221 79
+a 471 325 44
+a 300 473 94
+a 340 386 86
+a 417 374 27
+a 278 44 42
+a 264 227 75
+a 128 157 21
+a 158 447 31
+a 428 493 65
+a 267 309 29
+a 32 69 96
+a 11 30 60
+a 18 312 42
+a 355 173 89
+a 15 286 27
+a 234 130 24
+a 171 200 84
+a 346 421 24
+a 44 47 90
+a 31 50 33
+a 54 6 72
+a 323 57 65
+a 497 180 35
+a 25 15 75
+a 235 22 94
+a 352 7 43
+a 63 122 69
+a 399 176 37
+a 440 306 30
+a 14 25 63
+a 137 175 95
+a 259 1 77
+a 2 296 82
+a 99 86 24
+a 80 305 32
+a 228 77 82
+a 200 52 1
+a 289 89 33
+a 115 465 66
+a 22 45 7
+a 21 157 1
+a 45 21 76
+a 71 24 91
+a 245 177 79
+a 7 17 37
+a 74 166 90
+a 23 40 91
+a 90 130 28
+a 122 144 39
+a 97 140 26
+a 416 34 74
+a 235 21 30
+a 250 365 77
+a 135 142 26
+a 189 405 87
+a 10 256 71
+a 17 51 74
+a 148 244 72
+a 395 490 33
+a 490 345 65
+a 202 338 83
+a 66 71 60
+a 392 64 83
+a 327 139 42
+a 15 308 31
+a 392 485 47
+a 499 409 28
+a 22 10 35
+a 300 379 73
+a 61 38 14
+a 190 448 39
+a 370 463 98
+a 18 86 90
+a 145 341 73
+a 55 88 62
+a 22 30 10
+a 35 127 63
+a 58 463 58
+a 233 364 25
+a 86 392 90
+a 77 81 96
+a 111 1 59
+a 148 1 85
+a 420 126 85
+a 71 68 61
+a 159 372 1
+a 22 59 42
+a 91 77 62
+a 197 345 70
+a 422 349 15
+a 224 262 54
+a 15 32 33
+a 138 228 66
+a 231 422 60
+a 102 452 4
+a 218 113 34
+a 38 32 77
+a 172 24 52
+a 376 141 71
+a 225 402 43
+a 337 1 91
+a 186 326 2
+a 345 1 11
+a 447 238 90
+a 103 81 65
+a 208 42 88
+a 461 286 29
+a 7 14 19
+a 13 11 59
+a 22 13 52
+a 179 145 57
+a 382 227 28
+a 42 497 95
+a 69 247 8
+a 13 249 12
+a 385 466 79
+a 176 33 19
+a 26 50 17
+a 181 146 48
+a 55 68 71
+a 272 378 48
+a 259 294 31
+a 3 78 10
+a 72 247 97
+a 304 137 58
+a 114 5 30
+a 454 93 98
+a 251 8 36
+a 51 97 41
+a 1 69 74
+a 463 348 40
+a 457 210 75
+a 100 274 13
+a 399 472 77
+a 30 163 46
+a 167 184 34
+a 17 7 9
+a 23 109 18
+a 40 95 43
+a 378 51 95
+a 477 316 94
+a 450 486 71
+a 62 149 94
+a 57 133 93
+a 14 307 92
+a 357 310 10
+a 367 386 12
+a 348 72 40
+a 373 73 22
+a 39 85 81
+a 222 290 66
+a 467 447 81
+a 489 484 83
+a 105 297 7
+a 12 206 74
+a 68 124 27
+a 89 137 44
+a 340 62 87
+a 193 231 83
+a 4 42 42
+a 63 81 69
+a 244 98 46
+a 415 362 23
+a 499 343 61
+a 320 1 19
+a 1 36 55
+a 91 9 40
+a 134 211 2
+a 415 31 38
+a 3 54 3
+a 71 23 99
+a 353 428 21
+a 21 82 82
+a 41 348 58
+a 499 470 35
+a 358 388 11
+a 32 31 91
+a 20 10 23
+a 73 329 43
+a 220 376 43
+a 289 282 98
+a 445 299 77
+a 62 131 69
+a 453 424 90
+a 62 88 28
+a 102 5 41
+a 462 88 21
+a 133 207 51
+a 258 247 16
+a 72 94 52
+a 340 79 9
+a 133 266 9
+a 114 286 84
+a 231 112 23
+a 318 466 30
+a 232 489 69
+a 1 83 40
+a 42 7 27
+a 8 254 17
+a 70 380 58
+a 145 102 68
+a 421 321 55
+a 46 80 85
+a 451 221 44
+a 49 161 1
+a 181 103 45
+a 436 174 48
+a 361 232 55
+a 25 37 17
+a 205 20 57
+a 327 273 56
+a 478 120 100
+a 49 4 77
+a 61 115 84
+a 124 360 43
+a 23 14 58
+a 30 98 54
+a 112 356 90
+a 249 476 20
+a 394 381 41
+a 75 71 39
+a 367 268 50
+a 497 267 18
+a 3 27 18
+a 36 124 59
+a 446 77 16
+a 370 499 70
+a 223 246 44
+a 135 175 15
+a 379 17 95
+a 336 53 5
+a 4 92 17
+a 109 46 67
+a 429 62 30
+a 174 22 70
+a 5 78 4
+a 9 29 18
+a 3 421 24
+a 4 476 81
+a 465 52 67
+a 63 218 23
+a 35 25 58
+a 388 113 89
+a 9 19 5
+a 117 298 98
+a 75 98 31
+a 143 323 54
+a 20 7 45
+a 41 78 26
+a 67 485 20
+a 237 3 86
+a 4 32 41
+a 74 436 12
+a 76 443 39
+a 331 8 37
+a 278 280 5
+a 46 29 42
+a 139 103 4
+a 164 251 58
+a 100 500 2
+a 18 68 22
+a 15 468 43
+a 8 5 16
+a 107 19 52
+a 36 422 9
+a 138 306 92
+a 463 357 98
+a 14 4 16
+a 14 334 11
+a 226 286 75
+a 184 416 61
+a 25 102 51
+a 182 85 48
+a 364 402 43
+a 372 105 90
+a 111 363 73
+a 64 162 44
+a 167 151 10
+a 303 206 79
+a 34 405 35
+a 100 134 34
+a 303 352 21
+a 140 238 62
+a 238 21 72
+a 224 448 25
+a 481 31 36
+a 285 167 46
+a 74 391 48
+a 129 19 40
+a 271 7 59
+a 474 88 48
+a 337 265 65
+a 49 52 14
+a 395 31 86
+a 391 52 18
+a 463 247 65
+a 424 463 87
+a 22 379 59
+a 384 159 29
+a 424 391 33
+a 53 266 66
+a 307 402 10
+a 433 311 80
+a 32 51 19
+a 60 62 59
+a 19 46 9
+a 429 70 59
+a 136 272 37
+a 469 95 69
+a 355 439 40
+a 204 30 50
+a 336 180 99
+a 457 329 78
+a 133 154 96
+a 134 100 28
+a 85 402 20
+a 10 139 32
+a 320 339 46
+a 418 143 1
+a 195 484 38
+a 99 210 15
+a 356 465 35
+a 32 79 68
+a 65 193 32
+a 105 52 49
+a 98 421 55
+a 23 59 36
+a 214 5 15
+a 14 110 12
+a 368 264 60
+a 146 305 6
+a 233 441 15
+a 462 439 53
+a 240 477 99
+a 183 365 11
+a 76 125 6
+a 288 360 28
+a 380 34 58
+a 91 98 43
+a 120 90 69
+a 395 309 73
+a 9 395 42
+a 109 117 87
+a 172 12 94
+a 40 144 80
+a 98 419 85
+a 477 68 74
+a 1 25 60
+a 148 4 99
+a 158 156 70
+a 129 226 57
+a 180 114 50
+a 117 152 40
+a 255 177 92
+a 450 73 71
+a 414 339 7
+a 27 9 57
+a 320 60 79
+a 93 183 3
+a 473 486 74
+a 45 20 74
+a 53 209 37
+a 254 292 76
+a 332 79 23
+a 57 67 72
+a 207 174 35
+a 252 473 89
+a 19 1 56
+a 120 148 34
+a 193 235 30
+a 349 297 29
+a 376 342 22
+a 5 64 49
+a 58 86 45
+a 98 59 67
+a 334 401 7
+a 180 174 78
+a 74 93 89
+a 291 99 98
+a 87 16 59
+a 376 417 87
+a 158 499 9
+a 407 456 49
+a 51 44 79
+a 3 19 96
+a 47 427 9
+a 200 171 5
+a 481 130 37
+a 16 27 58
+a 34 95 99
+a 277 109 96
+a 143 422 63
+a 383 467 92
+a 184 80 35
+a 2 27 97
+a 10 178 71
+a 166 348 38
+a 3 14 18
+a 242 45 87
+a 382 74 16
+a 401 406 52
+a 114 341 6
+a 115 180 84
+a 178 137 91
+a 203 257 74
+a 282 261 81
+a 26 38 59
+a 22 3 22
+a 97 128 88
+a 190 148 17
+a 210 59 43
+a 7 85 30
+a 15 58 26
+a 283 270 38
+a 463 315 67
+a 449 479 66
+a 135 44 50
+a 60 55 69
+a 53 6 6
+a 206 58 64
+a 493 77 91
+a 491 122 21
+a 255 19 8
+a 2 389 99
+a 432 76 21
+a 118 380 18
+a 237 111 96
+a 7 251 57
+a 145 267 11
+a 7 113 64
+a 180 111 41
+a 51 70 31
+a 256 445 3
+a 4 239 74
+a 4 443 94
+a 74 202 39
+a 93 83 22
+a 1 204 85
+a 435 404 74
+a 33 7 17
+a 31 1 74
+a 45 202 79
+a 322 491 66
+a 90 62 26
+a 269 247 56
+a 51 157 5
+a 117 221 42
+a 152 288 27
+a 346 266 5
+a 88 94 34
+a 26 45 10
+a 32 252 75
+a 41 285 100
+a 316 103 17
+a 364 124 27
+a 368 71 86
+a 469 458 70
+a 27 40 18
+a 132 70 47
+a 384 259 2
+a 327 196 70
+a 273 3 54
+a 148 155 75
+a 194 140 91
+a 51 430 46
+a 329 123 71
+a 354 278 43
+a 381 317 14
+a 173 80 99
+a 220 234 65
+a 32 13 99
+a 142 172 55
+a 215 291 87
+a 238 318 93
+a 6 121 95
+a 34 113 40
+a 84 311 21
+a 80 106 96
+a 428 440 33
+a 51 314 80
+a 447 491 2
+a 366 165 56
+a 32 294 90
+a 368 162 17
+a 145 175 26
+a 12 28 89
+a 201 19 60
+a 216 173 49
+a 24 432 90
+a 179 256 35
+a 39 49 25
+a 130 3 51
+a 160 39 5
+a 416 106 99
+a 13 1 34
+a 326 18 85
+a 7 35 87
+a 63 427 85
+a 451 262 74
+a 65 455 9
+a 260 478 5
+a 168 204 86
+a 333 62 68
+a 351 396 77
+a 53 113 77
+a 24 105 66
+a 34 225 16
+a 126 472 46
+a 13 9 76
+a 20 73 97
+a 11 409 96
+a 20 462 89
+a 86 412 7
+a 444 408 79
+a 116 386 17
+a 359 203 59
+a 52 97 19
+a 99 103 86
+a 81 465 80
+a 265 193 44
+a 10 36 82
+a 63 286 100
+a 477 113 49
+a 155 237 60
+a 196 499 6
+a 64 82 63
+a 102 270 32
+a 439 255 20
+a 282 435 66
+a 428 128 61
+a 254 350 43
+a 430 80 14
+a 105 264 5
+a 109 150 31
+a 79 439 53
+a 493 439 87
+a 3 24 46
+a 62 413 65
+a 52 102 16
+a 477 115 82
+a 254 8 52
+a 39 26 40
+a 382 33 85
+a 20 106 5
+a 5 24 78
+a 77 74 18
+a 110 296 69
+a 71 167 67
+a 340 1 41
+a 101 87 19
+a 1 436 79
+a 112 487 46
+a 28 263 6
+a 192 319 50
+a 347 180 67
+a 370 388 68
+a 148 181 39
+a 55 172 71
+a 26 12 95
+a 39 47 51
+a 302 187 12
+a 25 34 37
+a 119 70 19
+a 73 84 38
+a 368 94 74
+a 11 52 69
+a 39 19 64
+a 56 98 63
+a 374 65 4
+a 487 103 28
+a 36 115 84
+a 141 213 68
+a 458 142 84
+a 41 129 38
+a 172 334 31
+a 209 404 9
+a 81 86 60
+a 182 10 36
+a 38 171 53
+a 187 1 75
+a 422 129 74
+a 495 329 20
+a 148 168 5
+a 110 35 44
+a 235 312 93
+a 16 193 32
+a 31 99 19
+a 386 80 54
+a 141 5 19
+a 163 48 6
+a 267 216 67
+a 2 74 35
+a 93 472 17
+a 463 441 61
+a 6 145 66
+a 58 304 15
+a 159 23 6
+a 408 163 100
+a 39 2 37
+a 73 17 75
+a 130 117 76
+a 359 147 97
+a 77 376 86
+a 24 256 60
+a 41 418 54
+a 15 60 21
+a 60 320 66
+a 75 192 13
+a 150 311 21
+a 4 37 4
+a 74 73 52
+a 141 212 62
+a 479 20 36
+a 72 201 48
+a 389 244 30
+a 335 373 84
+a 56 353 74
+a 294 185 27
+a 13 49 84
+a 283 304 13
+a 486 476 29
+a 355 9 69
+a 25 88 11
+a 161 131 34
+a 182 333 89
+a 198 58 47
+a 39 115 19
+a 239 63 39
+a 84 213 31
+a 443 273 75
+a 287 363 46
+a 153 87 92
+a 494 275 8
+a 264 421 18
+a 25 45 44
+a 435 272 54
+a 283 162 93
+a 346 232 33
+a 41 72 49
+a 90 369 30
+a 356 22 36
+a 39 60 42
+a 68 65 53
+a 352 159 81
+a 385 138 30
+a 297 409 10
+a 11 138 47
+a 165 160 36
+a 134 11 22
+a 76 3 38
+a 29 7 69
+a 34 106 46
+a 241 46 93
+a 340 395 17
+a 260 108 89
+a 163 259 14
+a 241 230 20
+a 127 22 81
+a 59 476 58
+a 326 394 50
+a 32 210 29
+a 61 49 37
+a 141 388 29
+a 404 291 82
+a 14 31 86
+a 68 110 98
+a 190 121 78
+a 341 276 24
+a 302 172 10
+a 42 117 8
+a 238 237 96
+a 289 179 82
+a 36 4 66
+a 124 19 99
+a 453 107 70
+a 279 475 8
+a 14 19 29
+a 90 97 24
+a 227 118 19
+a 49 57 99
+a 231 289 46
+a 445 438 48
+a 311 280 38
+a 94 188 84
+a 45 70 70
+a 25 18 17
+a 68 403 55
+a 464 380 92
+a 492 82 20
+a 79 25 98
+a 442 382 11
+a 212 197 88
+a 3 263 26
+a 331 103 59
+a 139 488 85
+a 395 400 28
+a 441 179 76
+a 209 228 81
+a 158 67 22
+a 139 61 30
+a 60 152 98
+a 241 37 90
+a 356 288 5
+a 386 481 59
+a 365 127 5
+a 74 118 21
+a 124 41 14
+a 272 76 87
+a 34 493 49
+a 61 135 55
+a 169 148 90
+a 302 268 67
+a 85 89 79
+a 71 46 8
+a 407 154 24
+a 171 353 5
+a 331 439 17
+a 22 37 20
+a 134 227 86
+a 421 32 31
+a 455 169 60
+a 41 30 77
+a 149 77 6
+a 158 432 40
+a 123 339 35
+a 386 263 75
+a 46 49 33
+a 77 86 61
+a 393 186 37
+a 477 273 71
+a 299 281 86
+a 373 375 62
+a 220 351 76
+a 143 298 62
+a 47 174 65
+a 97 62 18
+a 344 217 47
+a 482 440 75
+a 305 392 8
+a 55 69 82
+a 151 488 63
+a 334 387 83
+a 1 183 87
+a 44 175 42
+a 264 89 69
+a 310 108 1
+a 398 110 75
+a 22 31 62
+a 218 34 47
+a 488 168 1
+a 258 173 44
+a 472 443 54
+a 333 142 83
+a 95 100 30
+a 58 101 28
+a 334 318 14
+a 384 390 82
+a 257 212 92
+a 24 52 100
+a 417 280 76
+a 405 103 26
+a 99 144 68
+a 252 141 45
+a 207 62 11
+a 499 4 10
+a 58 224 19
+a 107 214 31
+a 295 2 35
+a 263 162 68
+a 217 2 73
+a 297 62 12
+a 433 484 71
+a 47 154 99
+a 66 89 19
+a 249 178 79
+a 285 269 78
+a 29 268 74
+a 117 206 42
+a 425 435 56
+a 304 191 40
+a 107 143 88
+a 312 273 1
+a 317 395 3
+a 321 442 49
+a 262 399 20
+a 57 101 83
+a 293 387 24
+a 278 52 33
+a 399 356 1
+a 418 430 85
+a 104 245 64
+a 18 66 78
+a 173 285 10
+a 176 11 14
+a 395 476 54
+a 237 205 87
+a 200 456 34
+a 131 174 84
+a 240 372 13
+a 67 118 4
+a 140 22 90
+a 452 282 48
+a 224 52 51
+a 323 287 46
+a 28 12 7
+a 41 153 78
+a 331 337 53
+a 454 179 37
+a 155 32 8
+a 478 352 12
+a 21 44 7
+a 69 15 38
+a 330 90 14
+a 150 176 31
+a 175 182 22
+a 227 212 83
+a 93 120 84
+a 109 23 43
+a 203 41 74
+a 58 357 39
+a 41 37 12
+a 192 27 81
+a 95 79 77
+a 441 141 14
+a 60 233 99
+a 15 44 28
+a 327 35 51
+a 57 435 28
+a 262 68 24
+a 316 87 30
+a 234 242 19
+a 58 195 28
+a 131 294 6
+a 410 270 63
+a 368 80 41
+a 32 145 3
+a 90 247 45
+a 35 364 28
+a 11 158 56
+a 126 238 75
+a 117 184 46
+a 274 16 68
+a 16 290 77
+a 202 426 66
+a 100 77 44
+a 14 175 86
+a 49 51 88
+a 10 46 95
+a 87 10 39
+a 257 73 4
+a 261 219 12
+a 118 308 37
+a 28 30 68
+a 57 219 25
+a 101 228 88
+a 44 403 52
+a 90 34 25
+a 462 335 3
+a 151 62 59
+a 47 141 93
+a 441 137 92
+a 167 88 63
+a 402 196 8
+a 232 313 67
+a 56 138 35
+a 25 29 30
+a 355 452 2
+a 11 6 81
+a 92 184 34
+a 151 224 68
+a 433 288 61
+a 203 466 97
+a 72 4 51
+a 233 25 47
+a 43 49 93
+a 363 157 54
+a 284 385 39
+a 109 137 59
+a 316 341 50
+a 150 290 81
+a 2 163 63
+a 409 493 17
+a 6 17 12
+a 102 21 11
+a 172 229 74
+a 486 219 3
+a 453 421 42
+a 392 80 19
+a 41 43 2
+a 199 408 4
+a 50 95 9
+a 93 441 33
+a 295 4 49
+a 82 90 76
+a 2 362 52
+a 478 209 27
+a 391 329 12
+a 16 9 65
+a 30 164 83
+a 7 295 66
+a 71 390 31
+a 416 160 8
+a 29 236 48
+a 2 207 2
+a 200 87 4
+a 368 446 90
+a 67 78 52
+a 102 128 15
+a 115 277 3
+a 34 41 81
+a 136 141 58
+a 280 363 58
+a 242 489 17
+a 37 1 18
+a 140 70 61
+a 134 44 54
+a 53 169 7
+a 78 147 92
+a 42 1 37
+a 184 324 36
+a 38 1 19
+a 1 274 84
+a 35 498 54
+a 63 33 90
+a 239 465 18
+a 488 12 75
+a 58 91 95
+a 120 134 76
+a 287 319 18
+a 165 457 46
+a 190 338 40
+a 1 154 24
+a 262 184 17
+a 373 484 93
+a 174 257 21
+a 259 138 65
+a 314 274 4
+a 433 416 70
+a 29 82 14
+a 201 214 66
+a 39 120 37
+a 435 315 36
+a 68 115 28
+a 179 337 2
+a 312 109 44
+a 259 417 56
+a 56 63 18
+a 91 21 31
+a 297 150 50
+a 193 257 34
+a 23 10 78
+a 50 87 8
+a 239 193 99
+a 37 15 30
+a 20 277 23
+a 247 421 62
+a 484 370 7
+a 145 160 64
+a 15 30 36
+a 384 332 81
+a 21 57 9
+a 198 296 87
+a 115 470 16
+a 66 337 57
+a 295 435 94
+a 345 415 90
+a 34 50 41
+a 100 48 83
+a 65 45 32
+a 343 272 77
+a 151 176 33
+a 35 44 16
+a 330 87 18
+a 282 373 31
+a 19 2 99
+a 61 32 24
+a 36 77 85
+a 242 235 20
+a 209 163 96
+a 42 47 89
+a 151 8 31
+a 224 68 18
+a 341 13 90
+a 172 246 73
+a 299 483 55
+a 279 275 58
+a 20 43 2
+a 42 151 59
+a 93 256 58
+a 412 184 72
+a 62 361 13
+a 81 95 66
+a 121 301 100
+a 318 334 58
+a 99 221 85
+a 221 21 12
+a 319 257 36
+a 241 77 72
+a 249 433 68
+a 42 96 30
+a 208 198 76
+a 21 483 66
+a 223 248 62
+a 53 12 70
+a 278 33 97
+a 396 431 73
+a 302 291 92
+a 1 309 48
+a 274 77 11
+a 139 196 100
+a 405 144 93
+a 243 7 71
+a 31 52 96
+a 256 44 27
+a 1 58 23
+a 85 251 62
+a 51 479 83
+a 402 65 73
+a 417 125 88
+a 117 400 68
+a 43 466 63
+a 106 87 38
+a 17 105 27
+a 112 202 28
+a 141 351 66
+a 433 24 65
+a 460 37 59
+a 96 104 6
+a 165 251 24
+a 226 25 46
+a 2 200 7
+a 366 106 26
+a 347 257 85
+a 5 152 51
+a 249 233 85
+a 294 131 32
+a 378 397 98
+a 268 482 57
+a 40 100 44
+a 124 131 19
+a 472 352 49
+a 180 146 75
+a 370 147 37
+a 348 266 7
+a 105 249 74
+a 192 81 87
+a 274 69 14
+a 223 58 98
+a 309 138 51
+a 138 81 94
+a 29 128 73
+a 1 165 92
+a 268 457 1
+a 35 39 8
+a 114 36 100
+a 202 420 5
+a 245 393 54
+a 484 258 67
+a 31 14 88
+a 85 385 73
+a 323 26 1
+a 53 377 44
+a 217 161 8
+a 347 27 12
+a 43 60 45
+a 187 36 73
+a 87 1 45
+a 41 221 74
+a 11 28 27
+a 456 269 25
+a 327 359 84
+a 18 278 12
+a 191 427 54
+a 171 90 55
+a 49 27 1
+a 25 24 13
+a 238 337 98
+a 15 43 24
+a 131 95 52
+a 376 433 85
+a 195 52 57
+a 96 110 7
+a 109 217 72
+a 284 426 7
+a 37 48 85
+a 81 96 18
+a 142 54 93
+a 331 484 64
+a 75 84 8
+a 109 133 6
+a 442 231 37
+a 230 140 30
+a 418 235 86
+a 9 2 64
+a 199 113 54
+a 349 3 18
+a 206 38 40
+a 123 434 3
+a 13 188 57
+a 37 340 76
+a 474 410 48
+a 216 21 72
+a 20 89 38
+a 250 35 20
+a 119 360 69
+a 492 113 55
+a 37 42 99
+a 79 205 18
+a 202 364 17
+a 88 176 87
+a 326 85 2
+a 356 177 92
+a 395 384 78
+a 165 326 38
+a 198 256 56
+a 11 227 53
+a 222 328 79
+a 481 356 37
+a 6 10 38
+a 321 394 2
+a 284 217 30
+a 22 166 33
+a 247 209 36
+a 226 49 35
+a 449 31 15
+a 261 244 17
+a 372 5 76
+a 160 8 41
+a 92 124 1
+a 474 427 9
+a 17 82 72
+a 313 266 70
+a 480 273 94
+a 397 137 98
+a 320 163 32
+a 22 1 38
+a 129 93 1
+a 256 188 71
+a 225 240 8
+a 52 81 28
+a 311 442 47
+a 3 72 14
+a 77 28 76
+a 212 462 76
+a 249 235 97
+a 439 331 12
+a 17 241 60
+a 346 37 23
+a 21 81 29
+a 13 78 64
+a 203 78 57
+a 78 285 67
+a 309 250 24
+a 482 499 58
+a 26 365 12
+a 379 143 7
+a 433 202 94
+a 373 137 70
+a 166 464 4
+a 254 173 49
+a 8 3 83
+a 18 36 47
+a 83 112 95
+a 107 191 70
+a 149 257 39
+a 18 29 7
+a 55 26 63
+a 209 365 77
+a 446 183 16
+a 28 126 41
+a 133 135 57
+a 267 169 38
+a 18 335 31
+a 219 269 52
+a 42 11 20
+a 51 249 14
+a 102 257 5
+a 314 301 3
+a 196 123 90
+a 462 377 59
+a 42 188 8
+a 260 30 76
+a 79 499 69
+a 464 442 85
+a 50 26 54
+a 56 283 42
+a 497 210 33
+a 74 98 98
+a 259 296 92
+a 10 81 36
+a 76 152 13
+a 140 490 52
+a 403 327 33
+a 335 145 88
+a 11 25 51
+a 74 245 37
+a 120 472 9
+a 54 189 15
+a 1 43 70
+a 121 30 82
+a 230 188 20
+a 121 278 48
+a 468 480 79
+a 498 212 68
+a 10 57 45
+a 265 115 42
+a 195 35 39
+a 417 247 67
+a 184 48 8
+a 229 224 19
+a 210 427 13
+a 45 145 82
+a 7 127 12
+a 87 12 21
+a 158 129 96
+a 206 378 18
+a 10 56 79
+a 146 8 13
+a 133 137 12
+a 169 19 31
+a 269 248 40
+a 222 112 4
+a 203 185 42
+a 8 194 97
+a 24 279 71
+a 306 5 21
+a 274 32 7
+a 18 34 29
+a 31 124 7
+a 169 83 83
+a 391 194 32
+a 407 237 54
+a 43 15 38
+a 320 141 55
+a 339 233 47
+a 242 184 68
+a 23 46 36
+a 61 363 45
+a 370 424 43
+a 17 109 87
+a 12 29 31
+a 108 161 8
+a 15 56 13
+a 112 23 20
+a 387 299 55
+a 12 8 85
+a 140 273 81
+a 270 132 11
+a 10 35 2
+a 43 217 71
+a 344 221 4
+a 228 346 1
+a 226 260 49
+a 32 55 1
+a 152 219 92
+a 298 392 56
+a 132 78 37
+a 483 58 22
+a 347 264 75
+a 54 136 39
+a 273 12 39
+a 191 111 14
+a 63 367 78
+a 196 213 45
+a 280 117 64
+a 180 389 7
+a 44 92 51
+a 205 362 63
+a 274 381 92
+a 185 499 78
+a 322 115 4
+a 127 162 52
+a 359 242 40
+a 412 267 70
+a 127 276 42
+a 50 8 20
+a 30 322 56
+a 40 124 66
+a 29 79 66
+a 6 316 78
+a 82 355 14
+a 253 249 33
+a 306 372 85
+a 39 179 85
+a 88 129 2
+a 79 93 28
+a 9 349 75
+a 12 15 2
+a 119 121 13
+a 19 207 41
+a 280 252 21
+a 395 303 20
+a 168 276 66
+a 8 136 50
+a 353 51 73
+a 485 313 61
+a 174 353 76
+a 398 391 39
+a 59 280 60
+a 108 148 60
+a 164 195 23
+a 176 119 84
+a 47 380 31
+a 52 106 59
+a 68 367 71
+a 441 338 99
+a 309 289 56
+a 457 369 100
+a 235 252 93
+a 267 290 25
+a 134 142 61
+a 235 195 70
+a 80 41 38
+a 11 74 97
+a 15 197 3
+a 69 243 48
+a 169 331 61
+a 280 170 19
+a 8 13 8
+a 11 5 71
+a 81 77 30
+a 404 298 54
+a 198 142 38
+a 1 26 20
+a 229 390 91
+a 305 442 46
+a 12 21 58
+a 24 288 54
+a 405 225 62
+a 397 378 88
+a 244 183 77
+a 118 74 16
+a 130 146 39
+a 376 33 92
+a 342 243 77
+a 187 466 93
+a 308 18 91
+a 317 342 12
+a 144 339 3
+a 370 18 28
+a 402 151 7
+a 172 486 74
+a 34 62 14
+a 185 70 100
+a 149 382 91
+a 442 41 60
+a 28 22 76
+a 78 116 46
+a 34 85 8
+a 184 247 14
+a 99 442 54
+a 132 129 26
+a 20 3 16
+a 26 314 50
+a 180 289 46
+a 231 16 71
+a 359 226 72
+a 43 288 33
+a 40 76 21
+a 11 8 75
+a 5 42 65
+a 167 128 38
+a 241 96 60
+a 441 89 57
+a 32 19 31
+a 369 458 62
+a 181 402 80
+a 184 187 11
+a 240 83 37
+a 227 66 8
+a 333 170 35
+a 53 250 77
+a 67 209 80
+a 199 81 90
+a 239 73 59
+a 110 49 55
+a 140 81 47
+a 413 308 14
+a 64 74 25
+a 4 21 61
+a 211 118 31
+a 215 433 58
+a 35 24 42
+a 61 72 71
+a 208 415 78
+a 2 117 89
+a 249 412 92
+a 71 340 60
+a 121 148 28
+a 331 68 27
+a 30 33 47
+a 54 79 50
+a 263 240 33
+a 41 276 14
+a 137 364 91
+a 51 147 24
+a 87 79 34
+a 1 141 74
+a 176 182 76
+a 31 6 66
+a 318 6 63
+a 420 376 74
+a 7 18 78
+a 253 392 20
+a 78 231 33
+a 162 228 58
+a 274 3 31
+a 303 240 62
+a 414 8 93
+a 331 315 59
+a 55 101 60
+a 122 47 33
+a 422 479 46
+a 78 340 85
+a 174 426 98
+a 181 277 59
+a 126 190 21
+a 50 68 28
+a 410 194 80
+a 328 105 47
+a 271 84 35
+a 61 342 16
+a 74 283 83
+a 113 175 73
+a 498 481 54
+a 291 307 7
+a 20 28 92
+a 27 73 47
+a 19 199 8
+a 163 368 85
+a 91 28 52
+a 451 383 32
+a 81 226 43
+a 6 51 9
+a 13 87 10
+a 109 264 24
+a 68 15 47
+a 126 355 16
+a 28 91 30
+a 377 147 1
+a 51 195 70
+a 268 245 15
+a 222 287 46
+a 215 219 55
+a 418 185 42
+a 22 80 86
+a 41 10 68
+a 209 31 30
+a 355 218 16
+a 46 18 91
+a 399 363 36
+a 133 224 25
+a 370 236 68
+a 416 307 100
+a 352 148 62
+a 48 98 86
+a 80 289 26
+a 105 42 69
+a 98 8 1
+a 68 160 77
+a 53 5 14
+a 205 51 21
+a 469 265 30
+a 122 210 15
+a 208 293 1
+a 353 477 5
+a 420 344 2
+a 57 374 81
+a 35 155 81
+a 162 427 2
+a 139 272 77
+a 73 115 31
+a 4 146 11
+a 315 384 87
+a 398 205 6
+a 405 20 98
+a 51 60 82
+a 173 188 99
+a 262 67 58
+a 325 269 58
+a 163 6 74
+a 156 347 15
+a 257 153 22
+a 276 131 65
+a 34 35 81
+a 164 15 58
+a 92 166 59
+a 258 294 73
+a 89 167 24
+a 34 17 96
+a 132 140 43
+a 105 390 15
+a 177 38 87
+a 459 215 98
+a 394 371 75
+a 83 122 19
+a 15 16 73
+a 42 100 94
+a 37 186 94
+a 472 186 64
+a 332 3 73
+a 125 225 11
+a 316 423 66
+a 383 493 16
+a 350 141 98
+a 491 120 22
+a 35 97 42
+a 239 200 15
+a 341 465 65
+a 190 106 38
+a 32 4 8
+a 302 246 65
+a 286 281 18
+a 139 280 9
+a 278 14 38
+a 336 349 99
+a 7 181 31
+a 180 311 17
+a 45 219 36
+a 6 87 68
+a 126 215 55
+a 33 31 76
+a 140 216 72
+a 222 50 1
+a 137 178 58
+a 435 335 92
+a 418 206 58
+a 34 4 6
+a 42 21 70
+a 450 40 75
+a 128 305 44
+a 168 453 81
+a 261 16 50
+a 61 146 83
+a 165 318 99
+a 437 25 34
+a 329 459 10
+a 6 59 22
+a 7 446 60
+a 2 21 56
+a 408 247 13
+a 121 439 37
+a 51 57 17
+a 260 117 43
+a 81 71 18
+a 442 261 54
+a 135 179 32
+a 19 227 51
+a 164 193 55
+a 454 124 5
+a 14 15 26
+a 363 125 38
+a 453 189 66
+a 122 473 59
+a 415 286 59
+a 391 229 9
+a 66 50 49
+a 180 357 44
+a 4 198 92
+a 107 76 51
+a 469 500 43
+a 368 323 41
+a 13 433 92
+a 349 143 45
+a 219 84 90
+a 107 163 70
+a 110 209 87
+a 98 121 70
+a 97 119 21
+a 3 155 40
+a 172 324 28
+a 382 388 81
+a 409 149 78
+a 125 222 79
+a 33 35 43
+a 3 333 50
+a 4 347 23
+a 406 438 69
+a 1 271 5
+a 167 102 43
+a 190 337 71
+a 144 393 91
+a 24 108 36
+a 50 72 99
+a 149 5 68
+a 494 90 33
+a 21 56 52
+a 8 95 12
+a 236 199 79
+a 39 153 64
+a 340 74 98
+a 445 98 89
+a 9 233 89
+a 422 410 28
+a 134 371 43
+a 23 208 67
+a 47 225 71
+a 176 89 89
+a 241 274 43
+a 213 244 26
+a 431 62 68
+a 498 100 29
+a 37 219 9
+a 203 445 84
+a 210 114 83
+a 386 185 85
+a 349 1 14
+a 33 9 61
+a 43 22 39
+a 125 163 96
+a 239 350 80
+a 110 157 46
+a 14 47 32
+a 11 23 81
+a 352 224 64
+a 214 48 30
+a 31 47 5
+a 438 337 48
+a 313 193 56
+a 258 49 74
+a 42 110 6
+a 264 17 41
+a 148 12 6
+a 236 145 29
+a 230 432 65
+a 86 203 15
+a 95 39 11
+a 154 210 45
+a 87 94 11
+a 193 239 5
+a 204 360 73
+a 139 117 72
+a 483 424 72
+a 180 206 70
+a 242 273 67
+a 470 388 66
+a 29 473 64
+a 45 68 66
+a 6 19 45
+a 146 101 29
+a 167 476 58
+a 217 297 76
+a 217 208 72
+a 443 91 37
+a 455 314 12
+a 31 340 72
+a 109 279 64
+a 40 11 69
+a 56 179 25
+a 244 363 74
+a 33 3 63
+a 21 33 38
+a 26 40 49
+a 113 162 64
+a 154 215 73
+a 57 127 65
+a 20 338 90
+a 214 488 76
+a 189 365 52
+a 71 27 10
+a 162 401 33
+a 98 5 29
+a 186 298 46
+a 335 399 52
+a 37 118 71
+a 186 285 29
+a 219 153 17
+a 193 384 24
+a 7 34 36
+a 43 83 31
+a 351 142 66
+a 469 49 46
+a 289 281 34
+a 374 198 28
+a 58 4 43
+a 36 257 14
+a 74 221 46
+a 175 487 1
+a 96 173 72
+a 205 79 27
+a 497 465 49
+a 306 227 44
+a 446 21 19
+a 4 62 87
+a 270 33 75
+a 422 199 50
+a 264 464 59
+a 142 195 80
+a 2 281 45
+a 55 146 52
+a 61 50 42
+a 161 112 87
+a 380 130 2
+a 28 44 77
+a 225 103 84
+a 155 343 68
+a 33 247 57
+a 204 259 93
+a 406 256 25
+a 77 11 50
+a 409 268 12
+a 58 243 67
+a 107 222 82
+a 28 8 80
+a 6 224 100
+a 200 256 32
+a 32 67 52
+a 179 1 2
+a 255 1 2
+a 474 29 98
+a 497 222 12
+a 153 56 71
+a 107 16 98
+a 198 129 44
+a 365 493 90
+a 35 77 42
+a 156 239 27
+a 203 251 1
+a 429 118 19
+a 22 16 37
+a 14 130 56
+a 188 2 6
+a 224 8 22
+a 283 229 10
+a 14 79 62
+a 315 48 52
+a 456 187 86
+a 20 168 15
+a 355 340 67
+a 24 213 69
+a 64 437 40
+a 296 356 56
+a 7 161 42
+a 64 303 91
+a 199 85 30
+a 71 12 17
+a 23 50 88
+a 72 268 93
+a 441 48 100
+a 187 442 93
+a 340 263 67
+a 418 495 82
+a 434 29 9
+a 92 215 43
+a 450 352 74
+a 294 62 28
+a 334 181 51
+a 296 225 49
+a 54 230 19
+a 1 55 59
+a 16 25 13
+a 138 1 31
+a 202 446 85
+a 270 398 83
+a 58 188 100
+a 105 62 1
+a 356 229 82
+a 41 163 24
+a 37 54 54
+a 16 115 9
+a 38 494 66
+a 41 496 33
+a 264 275 9
+a 18 21 43
+a 130 165 5
+a 114 154 72
+a 242 1 71
+a 440 207 18
+a 464 224 11
+a 198 138 5
+a 393 30 84
+a 448 50 39
+a 128 226 32
+a 9 149 2
+a 116 59 19
+a 174 300 69
+a 23 92 97
+a 83 21 10
+a 40 108 33
+a 389 131 41
+a 244 371 95
+a 45 78 48
+a 34 11 45
+a 136 80 27
+a 14 123 34
+a 209 232 16
+a 377 326 76
+a 7 278 45
+a 165 247 9
+a 69 138 45
+a 430 220 64
+a 430 444 66
+a 32 205 68
+a 136 82 12
+a 70 323 73
+a 358 179 17
+a 19 41 58
+a 60 159 14
+a 42 67 32
+a 234 420 22
+a 168 184 42
+a 43 19 61
+a 110 264 64
+a 52 369 90
+a 69 236 7
+a 430 250 70
+a 430 61 76
+a 21 23 18
+a 1 51 100
+a 50 410 95
+a 41 40 13
+a 16 382 8
+a 229 158 44
+a 433 13 66
+a 490 25 78
+a 386 85 85
+a 301 342 87
+a 118 11 64
+a 105 83 11
+a 198 312 73
+a 145 233 21
+a 38 58 86
+a 165 119 67
+a 8 79 5
+a 82 89 49
+a 131 439 26
+a 234 389 28
+a 246 304 11
+a 22 81 43
+a 82 17 7
+a 356 467 66
+a 57 12 15
+a 133 473 87
+a 253 124 25
+a 491 235 66
+a 311 129 70
+a 111 204 31
+a 65 10 13
+a 3 157 40
+a 8 420 81
+a 385 477 53
+a 416 458 48
+a 72 223 11
+a 40 128 12
+a 22 24 5
+a 56 48 61
+a 311 15 85
+a 178 96 65
+a 15 11 8
+a 17 1 100
+a 479 333 60
+a 181 99 25
+a 14 48 97
+a 49 25 82
+a 181 33 91
+a 155 147 88
+a 399 355 49
+a 50 120 99
+a 187 39 76
+a 400 376 79
+a 85 75 81
+a 62 4 1
+a 415 149 8
+a 276 127 96
+a 333 157 45
+a 305 255 16
+a 440 273 38
+a 174 470 24
+a 118 85 56
+a 231 6 10
+a 136 41 91
+a 419 8 3
+a 106 145 51
+a 20 385 76
+a 170 433 88
+a 372 9 71
+a 42 360 9
+a 480 190 92
+a 5 104 76
+a 129 3 64
+a 292 282 24
+a 2 31 75
+a 31 407 83
+a 46 457 14
+a 347 227 36
+a 237 287 29
+a 18 130 68
+a 229 126 91
+a 86 38 58
+a 175 39 87
+a 462 66 24
+a 86 120 33
+a 146 38 31
+a 136 281 39
+a 124 132 6
+a 191 140 46
+a 23 4 50
+a 125 19 17
+a 163 463 55
+a 421 97 41
+a 12 127 22
+a 383 409 43
+a 9 15 86
+a 60 61 4
+a 379 84 35
+a 60 121 4
+a 149 488 72
+a 170 57 49
+a 79 56 1
+a 148 236 98
+a 132 24 13
+a 31 172 57
+a 347 54 45
+a 351 126 97
+a 394 17 1
+a 463 248 8
+a 5 80 29
+a 177 309 24
+a 418 423 88
+a 432 445 42
+a 26 67 43
+a 156 486 88
+a 132 165 53
+a 345 98 32
+a 174 371 1
+a 389 176 22
+a 5 23 32
+a 110 168 55
+a 469 26 54
+a 283 357 5
+a 436 72 4
+a 353 19 26
+a 3 131 2
+a 446 311 28
+a 4 202 96
+a 56 79 54
+a 95 3 34
+a 205 33 7
+a 324 360 78
+a 123 197 18
+a 215 75 5
+a 54 50 38
+a 67 10 99
+a 324 307 84
+a 268 25 40
+a 64 471 79
+a 48 157 99
+a 190 40 38
+a 398 489 57
+a 8 221 97
+a 5 478 8
+a 9 63 11
+a 85 150 59
+a 173 415 45
+a 16 275 79
+a 162 359 2
+a 71 56 95
+a 102 258 68
+a 265 55 15
+a 314 110 12
+a 159 194 5
+a 424 247 94
+a 70 81 4
+a 15 121 27
+a 110 19 23
+a 26 55 16
+a 133 33 75
+a 101 146 10
+a 27 43 44
+a 113 289 3
+a 110 84 13
+a 389 408 100
+a 42 152 58
+a 91 93 67
+a 30 5 23
+a 52 149 22
+a 339 276 48
+a 263 347 27
+a 25 47 26
+a 157 28 44
+a 60 189 77
+a 227 84 36
+a 480 436 43
+a 371 96 31
+a 163 253 6
+a 166 168 6
+a 309 355 40
+a 371 444 83
+a 12 200 16
+a 59 164 95
+a 207 362 61
+a 400 433 95
+a 47 88 8
+a 170 243 86
+a 166 239 66
+a 306 386 58
+a 37 148 25
+a 10 165 73
+a 31 281 50
+a 221 284 14
+a 38 84 85
+a 84 69 67
+a 125 70 3
+a 296 117 75
+a 55 284 15
+a 16 456 69
+a 190 472 89
+a 200 155 79
+a 10 225 33
+a 497 446 49
+a 1 28 28
+a 137 110 99
+a 440 43 39
+a 253 280 100
+a 315 212 86
+a 21 14 73
+a 167 29 67
+a 330 304 50
+a 41 74 62
+a 351 114 5
+a 377 473 31
+a 28 19 44
+a 271 105 64
+a 128 215 36
+a 463 482 45
+a 81 434 100
+a 137 169 54
+a 159 237 60
+a 109 153 21
+a 28 79 3
+a 186 240 71
+a 392 390 3
+a 207 336 17
+a 209 406 79
+a 25 50 69
+a 69 62 85
+a 108 110 79
+a 18 425 36
+a 31 83 78
+a 134 71 84
+a 22 188 73
+a 322 150 94
+a 343 295 5
+a 452 500 45
+a 134 208 26
+a 276 176 66
+a 12 400 41
+a 159 407 77
+a 31 129 50
+a 49 235 11
+a 138 190 67
+a 411 278 44
+a 35 33 97
+a 1 27 41
+a 37 153 58
+a 114 201 10
+a 358 253 57
+a 67 33 38
+a 457 296 44
+a 171 328 1
+a 21 73 90
+a 108 285 36
+a 400 292 15
+a 331 365 39
+a 424 408 83
+a 30 58 7
+a 237 222 26
+a 220 55 15
+a 370 156 78
+a 489 355 41
+a 56 15 36
+a 123 15 44
+a 176 52 56
+a 218 11 37
+a 63 401 20
+a 25 83 73
+a 347 382 54
+a 90 153 29
+a 26 18 3
+a 57 34 35
+a 72 216 88
+a 81 230 86
+a 132 449 27
+a 87 121 19
+a 99 196 49
+a 41 62 32
+a 43 10 100
+a 110 217 45
+a 157 158 60
+a 162 256 99
+a 424 50 94
+a 172 422 25
+a 445 29 67
+a 18 28 77
+a 274 17 32
+a 123 273 77
+a 3 148 9
+a 331 189 61
+a 335 255 79
+a 73 144 58
+a 136 151 52
+a 39 20 92
+a 23 203 38
+a 48 294 72
+a 397 263 80
+a 10 7 53
+a 5 197 91
+a 34 175 4
+a 103 262 84
+a 15 63 85
+a 24 100 22
+a 354 342 54
+a 133 70 90
+a 152 122 17
+a 462 28 67
+a 5 74 72
+a 121 402 83
+a 10 9 66
+a 58 92 80
+a 477 137 93
+a 268 436 72
+a 203 500 25
+a 399 29 81
+a 453 187 65
+a 42 312 95
+a 7 481 21
+a 77 30 98
+a 310 109 76
+a 2 49 86
+a 280 241 2
+a 254 36 2
+a 296 214 53
+a 142 333 25
+a 399 443 65
+a 141 177 5
+a 489 169 91
+a 113 61 88
+a 362 232 4
+a 10 29 39
+a 98 44 50
+a 88 87 35
+a 233 481 31
+a 416 412 84
+a 36 10 100
+a 171 103 30
+a 341 272 63
+a 31 20 5
+a 76 239 63
+a 404 248 87
+a 359 267 93
+a 61 426 31
+a 4 285 67
+a 86 10 69
+a 483 38 36
+a 26 114 13
+a 32 76 85
+a 151 21 76
+a 319 34 25
+a 241 56 78
+a 111 63 99
+a 7 103 10
+a 46 175 84
+a 113 272 26
+a 34 144 21
+a 311 146 36
+a 281 163 95
+a 59 53 98
+a 189 85 82
+a 151 112 9
+a 489 96 18
+a 167 60 4
+a 489 82 8
+a 38 22 30
+a 136 30 17
+a 2 53 3
+a 4 69 36
+a 85 94 79
+a 256 298 55
+a 308 5 3
+a 393 122 51
+a 449 438 18
+a 126 197 56
+a 282 243 95
+a 102 52 75
+a 422 61 70
+a 248 93 56
+a 2 73 58
+a 115 3 65
+a 89 108 17
+a 210 194 62
+a 443 155 7
+a 403 316 32
+a 27 6 4
+a 197 103 3
+a 42 43 22
+a 247 176 100
+a 484 193 24
+a 226 292 9
+a 95 162 23
+a 79 155 70
+a 370 163 47
+a 173 497 84
+a 85 93 95
+a 371 10 19
+a 117 36 30
+a 365 202 66
+a 366 182 86
+a 7 26 28
+a 37 21 87
+a 148 58 82
+a 320 173 58
+a 461 275 24
+a 6 62 36
+a 248 489 51
+a 91 39 39
+a 45 99 21
+a 136 277 80
+a 239 38 37
+a 451 73 16
+a 471 232 42
+a 366 31 11
+a 19 12 49
+a 42 193 7
+a 30 48 3
+a 471 175 45
+a 253 310 91
+a 24 18 99
+a 244 5 38
+a 29 69 38
+a 273 490 41
+a 101 343 96
+a 28 38 48
+a 212 27 55
+a 251 349 49
+a 216 53 89
+a 438 69 7
+a 54 133 37
+a 153 207 43
+a 144 174 50
+a 118 166 80
+a 435 7 24
+a 129 117 76
+a 21 188 14
+a 452 110 2
+a 17 401 99
+a 337 162 76
+a 134 25 14
+a 313 56 18
+a 106 89 88
+a 368 203 52
+a 19 56 33
+a 10 53 80
+a 126 154 73
+a 49 30 7
+a 45 82 76
+a 359 306 52
+a 354 148 56
+a 295 348 17
+a 440 228 7
+a 46 282 15
+a 289 16 6
+a 161 396 14
+a 297 7 15
+a 288 71 42
+a 489 236 57
+a 461 30 88
+a 116 35 47
+a 104 117 7
+a 294 393 2
+a 81 49 97
+a 176 88 71
+a 45 86 92
+a 117 19 40
+a 12 85 52
+a 100 76 56
+a 364 358 91
+a 432 150 59
+a 152 378 23
+a 97 348 2
+a 181 396 29
+a 24 75 41
+a 352 212 95
+a 422 408 56
+a 164 472 35
+a 39 50 16
+a 259 390 50
+a 56 19 77
+a 166 252 39
+a 325 369 53
+a 84 186 43
+a 38 9 59
+a 34 71 50
+a 233 231 7
+a 341 280 5
+a 20 154 31
+a 19 182 16
+a 21 18 25
+a 79 279 91
+a 107 341 6
+a 60 230 90
+a 11 48 65
+a 60 86 39
+a 128 7 87
+a 13 37 38
+a 85 201 97
+a 362 252 22
+a 315 391 45
+a 47 211 53
+a 27 4 30
+a 158 218 97
+a 73 5 33
+a 479 3 15
+a 76 213 2
+a 88 260 89
+a 31 42 70
+a 16 36 42
+a 7 22 76
+a 166 246 42
+a 82 174 89
+a 123 14 44
+a 323 412 68
+a 13 75 7
+a 280 67 45
+a 447 368 14
+a 358 360 98
+a 480 291 34
+a 87 166 42
+a 264 331 36
+a 299 445 25
+a 425 1 78
+a 40 24 61
+a 454 347 82
+a 14 126 51
+a 6 290 65
+a 373 343 91
+a 26 364 91
+a 140 240 22
+a 262 326 2
+a 96 149 36
+a 131 59 21
+a 59 97 7
+a 97 379 4
+a 251 165 14
+a 391 40 42
+a 297 438 11
+a 459 132 81
+a 408 256 63
+a 24 79 96
+a 127 48 85
+a 21 41 84
+a 66 33 1
+a 289 7 9
+a 15 294 40
+a 213 381 60
+a 5 88 61
+a 307 143 17
+a 320 450 7
+a 1 33 53
+a 1 179 40
+a 40 302 5
+a 67 75 75
+a 83 359 40
+a 436 494 17
+a 485 335 18
+a 62 373 33
+a 23 1 43
+a 73 256 20
+a 424 386 77
+a 113 179 76
+a 8 36 9
+a 364 303 78
+a 2 56 51
+a 89 134 45
+a 443 224 27
+a 182 225 99
+a 403 32 8
+a 244 300 23
+a 365 168 27
+a 271 136 38
+a 52 1 71
+a 36 29 23
+a 189 114 13
+a 290 343 52
+a 18 24 42
+a 38 89 76
+a 123 16 85
+a 488 136 70
+a 342 415 60
+a 7 57 60
+a 216 120 79
+a 27 46 57
+a 422 141 8
+a 458 232 64
+a 27 377 84
+a 360 257 1
+a 165 37 83
+a 225 152 64
+a 12 9 30
+a 23 62 25
+a 363 394 34
+a 454 302 48
+a 1 219 47
+a 147 268 96
+a 22 279 10
+a 470 108 72
+a 229 135 19
+a 99 114 19
+a 205 106 48
+a 172 244 75
+a 196 362 71
+a 381 449 13
+a 338 348 4
+a 66 101 43
+a 65 181 18
+a 99 139 52
+a 208 239 80
+a 33 318 92
+a 72 76 69
+a 226 33 45
+a 459 30 47
+a 28 31 94
+a 164 183 9
+a 479 28 8
+a 226 389 68
+a 407 79 45
+a 195 228 30
+a 31 231 44
+a 42 73 17
+a 347 51 4
+a 20 6 50
+a 148 256 16
+a 203 335 43
+a 15 69 73
+a 268 118 71
+a 217 328 28
+a 288 340 1
+a 42 207 87
+a 65 466 25
+a 125 66 86
+a 12 354 6
+a 126 225 13
+a 40 60 100
+a 388 5 53
+a 459 217 28
+a 139 452 66
+a 10 28 28
+a 448 78 85
+a 497 5 43
+a 387 130 62
+a 472 139 44
+a 21 67 53
+a 6 37 47
+a 91 101 60
+a 229 94 64
+a 258 300 65
+a 242 176 28
+a 99 155 67
+a 295 8 58
+a 60 186 100
+a 298 179 30
+a 4 407 14
+a 81 138 74
+a 5 468 21
+a 39 78 90
+a 81 105 57
+a 115 229 85
+a 420 138 48
+a 344 66 99
+a 453 211 35
+a 60 108 77
+a 117 12 84
+a 242 41 62
+a 251 34 83
+a 3 30 3
+a 78 18 26
+a 22 302 51
+a 224 447 14
+a 284 238 21
+a 226 267 69
+a 33 425 14
+a 43 215 92
+a 142 439 15
+a 459 169 17
+a 66 186 65
+a 21 6 60
+a 330 28 50
+a 440 149 57
+a 291 10 18
+a 444 32 64
+a 121 243 62
+a 62 128 48
+a 86 132 66
+a 72 159 19
+a 122 249 73
+a 400 105 74
+a 11 53 37
+a 8 286 46
+a 91 195 93
+a 240 443 15
+a 119 32 4
+a 22 133 65
+a 136 58 40
+a 98 1 65
+a 126 7 70
+a 216 23 17
+a 28 35 55
+a 255 394 9
+a 66 106 34
+a 152 41 79
+a 255 194 86
+a 126 183 86
+a 455 109 68
+a 15 5 93
+a 5 15 88
+a 321 297 40
+a 126 292 23
+a 4 18 46
+a 45 47 56
+a 429 210 21
+a 432 17 96
+a 76 411 83
+a 70 362 73
+a 302 190 26
+a 321 482 97
+a 255 312 26
+a 101 222 98
+a 491 265 71
+a 230 8 5
+a 12 27 85
+a 374 109 77
+a 137 248 98
+a 132 425 86
+a 75 480 97
+a 91 167 62
+a 41 170 32
+a 225 435 39
+a 464 17 22
+a 360 65 66
+a 191 312 31
+a 1 138 99
+a 194 389 12
+a 372 64 93
+a 381 188 45
+a 272 200 47
+a 77 99 29
+a 331 10 51
+a 40 7 32
+a 84 115 91
+a 464 128 32
+a 21 222 72
+a 184 263 17
+a 14 121 69
+a 35 443 17
+a 188 472 60
+a 195 196 64
+a 155 67 65
+a 177 98 32
+a 186 1 2
+a 47 21 80
+a 65 6 38
+a 174 160 17
+a 322 224 6
+a 28 203 83
+a 29 8 45
+a 66 51 57
+a 123 71 93
+a 104 10 39
+a 202 97 34
+a 280 290 66
+a 90 51 61
+a 417 222 22
+a 6 116 3
+a 130 169 7
+a 327 207 23
+a 133 456 19
+a 97 71 78
+a 484 218 62
+a 308 139 62
+a 60 39 69
+a 38 54 27
+a 80 239 67
+a 89 325 6
+a 193 459 44
+a 489 362 27
+a 184 153 87
+a 65 353 30
+a 28 64 82
+a 185 97 25
+a 166 108 33
+a 285 179 87
+a 134 350 24
+a 9 8 84
+a 47 100 18
+a 424 134 76
+a 57 141 1
+a 38 43 16
+a 62 280 90
+a 192 443 51
+a 420 243 72
+a 432 87 44
+a 223 391 17
+a 343 434 67
+a 248 5 35
+a 191 177 51
+a 29 151 24
+a 145 190 49
+a 301 256 46
+a 128 308 18
+a 38 94 93
+a 33 24 44
+a 115 195 5
+a 314 436 13
+a 392 54 11
+a 9 88 44
+a 330 109 92
+a 56 428 41
+a 91 117 21
+a 244 202 65
+a 475 274 85
+a 447 219 47
+a 194 294 73
+a 120 272 29
+a 305 161 17
+a 178 434 100
+a 74 216 59
+a 121 340 71
+a 367 162 84
+a 56 97 68
+a 39 117 21
+a 111 147 58
+a 268 39 21
+a 18 5 52
+a 253 75 82
+a 143 127 71
+a 97 169 48
+a 261 347 43
+a 349 347 94
+a 6 93 51
+a 159 93 3
+a 108 61 9
+a 460 125 80
+a 92 460 15
+a 107 390 94
+a 245 449 77
+a 293 261 44
+a 255 403 88
+a 98 155 17
+a 35 90 9
+a 199 317 32
+a 35 64 30
+a 53 489 55
+a 274 408 86
+a 1 29 72
+a 454 80 76
+a 238 83 33
+a 179 246 20
+a 37 272 14
+a 139 22 41
+a 41 311 46
+a 260 32 87
+a 1 426 1
+a 31 111 69
+a 186 32 14
+a 273 327 1
+a 243 10 91
+a 346 12 55
+a 287 429 91
+a 139 211 61
+a 36 186 72
+a 417 191 6
+a 296 87 77
+a 274 85 71
+a 73 56 17
+a 262 225 76
+a 27 190 67
+a 93 1 84
+a 371 219 32
+a 208 217 52
+a 73 138 58
+a 324 456 8
+a 332 467 43
+a 122 406 27
+a 72 227 5
+a 345 163 76
+a 371 379 10
+a 63 217 28
+a 174 23 29
+a 177 362 82
+a 399 280 38
+a 438 342 4
+a 33 52 43
+a 156 26 4
+a 209 247 76
+a 61 46 31
+a 23 174 48
+a 224 243 83
+a 263 122 25
+a 79 220 89
+a 88 226 45
+a 92 77 45
+a 173 20 31
+a 10 193 90
+a 46 85 72
+a 63 23 91
+a 153 261 40
+a 188 372 11
+a 247 431 26
+a 476 138 2
+a 37 6 53
+a 6 176 12
+a 467 449 19
+a 387 300 65
+a 99 488 2
+a 43 47 51
+a 335 164 78
+a 297 46 87
+a 410 489 52
+a 86 258 16
+a 409 73 100
+a 115 22 23
+a 79 186 32
+a 331 442 92
+a 91 1 50
+a 113 14 18
+a 327 301 31
+a 37 9 29
+a 52 26 86
+a 11 105 100
+a 118 310 91
+a 139 232 18
+a 105 91 8
+a 3 16 39
+a 313 442 71
+a 273 226 76
+a 347 283 63
+a 81 196 20
+a 119 3 41
+a 61 390 42
+a 494 50 15
+a 127 12 14
+a 31 381 98
+a 164 145 69
+a 379 162 56
+a 90 121 34
+a 175 222 71
+a 264 246 59
+a 146 36 83
+a 56 50 98
+a 157 59 18
+a 257 382 9
+a 58 84 4
+a 324 160 88
+a 379 303 91
+a 187 349 90
+a 40 46 75
+a 88 2 27
+a 31 8 92
+a 67 436 60
+a 407 71 80
+a 4 22 29
+a 11 118 16
+a 33 210 52
+a 62 114 49
+a 475 385 100
+a 98 472 64
+a 46 472 45
+a 444 464 24
+a 15 436 67
+a 45 55 26
+a 205 115 48
+a 144 91 79
+a 347 231 66
+a 118 39 51
+a 51 188 95
+a 177 406 47
+a 377 352 78
+a 173 142 53
+a 34 23 13
+a 163 67 54
+a 453 281 5
+a 194 164 70
+a 55 41 70
+a 445 124 68
+a 117 317 86
+a 4 48 92
+a 387 107 71
+a 154 268 73
+a 318 107 90
+a 85 134 87
+a 346 467 21
+a 197 225 83
+a 362 436 35
+a 434 238 12
+a 66 26 10
+a 61 104 76
+a 128 16 96
+a 484 292 50
+a 357 155 97
+a 17 4 60
+a 240 155 95
+a 390 154 86
+a 24 54 78
+a 367 16 9
+a 306 179 28
+a 305 108 98
+a 1 171 45
+a 228 256 55
+a 276 116 27
+a 37 258 85
+a 184 83 72
+a 100 88 54
+a 257 430 17
+a 391 293 44
+a 10 69 93
+a 24 3 51
+a 99 193 23
+a 164 294 28
+a 363 42 72
+a 30 67 38
+a 33 156 13
+a 8 37 9
+a 58 27 18
+a 117 47 65
+a 143 67 45
+a 319 229 72
+a 191 16 55
+a 403 63 16
+a 21 83 76
+a 1 85 96
+a 151 234 47
+a 175 455 30
+a 242 395 32
+a 15 76 23
+a 2 304 70
+a 96 42 56
+a 459 297 54
+a 135 252 50
+a 10 77 1
+a 6 305 26
+a 15 423 56
+a 17 35 59
+a 33 71 17
+a 436 456 71
+a 417 433 24
+a 472 348 77
+a 95 124 82
+a 172 251 30
+a 309 257 30
+a 195 68 4
+a 139 33 85
+a 229 123 74
+a 51 225 75
+a 10 54 49
+a 20 24 66
+a 93 217 44
+a 94 275 78
+a 484 402 7
+a 36 67 81
+a 86 208 41
+a 10 30 17
+a 50 23 57
+a 84 375 48
+a 132 389 77
+a 155 122 40
+a 189 46 16
+a 278 324 13
+a 49 70 1
+a 387 452 6
+a 53 2 4
+a 119 6 95
+a 449 498 26
+a 113 231 64
+a 64 83 14
+a 170 199 88
+a 434 339 30
+a 498 377 52
+a 259 139 29
+a 493 360 1
+a 228 461 82
+a 87 108 48
+a 258 42 56
+a 112 128 98
+a 113 346 34
+a 45 58 82
+a 198 65 3
+a 482 361 33
+a 38 15 86
+a 204 39 60
+a 388 270 16
+a 131 167 10
+a 311 10 74
+a 398 33 4
+a 446 399 63
+a 488 400 45
+a 26 49 40
+a 162 20 81
+a 123 410 13
+a 3 46 53
+a 337 319 73
+a 378 381 97
+a 142 435 90
+a 27 108 20
+a 35 30 10
+a 180 79 38
+a 82 460 57
+a 103 68 18
+a 3 110 77
+a 403 478 75
+a 42 15 92
+a 62 205 20
+a 291 352 19
+a 477 306 38
+a 342 90 89
+a 19 77 74
+a 112 40 19
+a 234 296 56
+a 396 299 58
+a 161 417 25
+a 478 330 46
+a 58 105 27
+a 74 165 8
+a 131 66 31
+a 255 349 5
+a 376 331 51
+a 51 52 56
+a 61 188 15
+a 7 31 83
+a 416 7 74
+a 40 335 44
+a 418 43 56
+a 74 84 33
+a 458 100 30
+a 381 482 67
+a 23 5 34
+a 72 40 81
+a 172 432 45
+a 308 154 61
+a 480 82 12
+a 302 107 30
+a 27 39 99
+a 351 59 69
+a 105 226 65
+a 36 11 20
+a 30 220 29
+a 137 373 46
+a 69 126 96
+a 488 406 69
+a 86 146 66
+a 160 189 9
+a 410 425 85
+a 495 294 43
+a 477 122 87
+a 38 55 27
+a 217 291 93
+a 348 459 7
+a 16 465 47
+a 448 27 18
+a 354 16 94
+a 83 179 87
+a 114 17 25
+a 345 25 91
+a 263 282 26
+a 171 390 61
+a 9 21 37
+a 80 161 25
+a 16 12 78
+a 33 147 77
+a 210 7 98
+a 482 97 56
+a 23 426 21
+a 104 337 33
+a 145 163 27
+a 292 231 45
+a 485 489 78
+a 169 388 30
+a 38 47 33
+a 134 12 59
+a 14 44 24
+a 48 370 80
+a 380 353 71
+a 423 388 83
+a 90 256 22
+a 264 316 67
+a 220 364 85
+a 32 8 49
+a 44 485 99
+a 18 19 23
+a 220 38 37
+a 11 300 34
+a 238 209 95
+a 337 282 68
+a 318 166 21
+a 10 147 22
+a 180 252 93
+a 127 452 23
+a 3 53 93
+a 18 65 97
+a 200 250 57
+a 422 192 49
+a 52 38 82
+a 131 178 46
+a 254 414 46
+a 346 455 58
+a 247 37 6
+a 326 262 53
+a 416 152 65
+a 402 377 52
+a 80 91 77
+a 281 93 41
+a 315 129 56
+a 353 34 77
+a 14 63 51
+a 16 118 23
+a 44 5 60
+a 316 207 27
+a 95 134 35
+a 214 62 29
+a 414 377 81
+a 372 104 29
+a 100 205 63
+a 44 7 94
+a 81 10 60
+a 154 158 72
+a 112 489 41
+a 78 121 87
+a 163 281 100
+a 326 33 97
+a 67 54 56
+a 17 55 52
+a 50 66 11
+a 286 426 71
+a 344 434 1
+a 301 249 81
+a 260 142 93
+a 366 439 6
+a 76 94 69
+a 117 65 10
+a 29 18 96
+a 227 362 77
+a 89 15 85
+a 119 167 30
+a 233 347 91
+a 43 62 7
+a 381 335 41
+a 252 142 20
+a 12 31 24
+a 102 393 100
+a 351 62 1
+a 251 477 92
+a 236 378 58
+a 211 137 23
+a 74 30 23
+a 20 249 41
+a 447 394 81
+a 15 62 11
+a 64 49 60
+a 225 146 10
+a 262 499 51
+a 470 238 95
+a 283 423 69
+a 70 3 99
+a 137 300 93
+a 441 336 3
+a 340 59 62
+a 3 20 47
+a 194 220 23
+a 383 315 7
+a 272 399 93
+a 149 81 53
+a 27 272 45
+a 330 107 65
+a 265 262 22
+a 7 63 17
+a 346 31 88
+a 72 398 20
+a 66 79 30
+a 99 26 66
+a 168 163 43
+a 484 186 72
+a 147 37 9
+a 61 70 64
+a 26 23 61
+a 135 92 66
+a 282 498 33
+a 393 15 26
+a 93 11 55
+a 120 77 84
+a 336 106 46
+a 211 331 80
+a 441 39 82
+a 456 67 39
+a 318 344 31
+a 21 84 58
+a 122 491 81
+a 24 151 88
+a 194 43 60
+a 439 6 91
+a 450 297 59
+a 9 155 61
+a 219 5 38
+a 431 67 33
+a 168 93 85
+a 278 357 65
+a 35 461 11
+a 11 325 76
+a 224 56 99
+a 54 380 77
+a 276 137 36
+a 80 29 57
+a 50 210 16
+a 67 53 16
+a 470 465 17
+a 292 104 9
+a 25 140 19
+a 448 304 45
+a 335 126 44
+a 252 23 65
+a 82 454 40
+a 284 54 13
+a 97 48 77
+a 302 22 27
+a 3 112 99
+a 343 439 92
+a 273 393 66
+a 16 79 59
+a 232 367 99
+a 104 304 16
+a 13 496 60
+a 64 334 67
+a 207 211 36
+a 5 226 100
+a 108 260 53
+a 55 417 70
+a 164 211 79
+a 282 331 12
+a 90 361 74
+a 358 114 82
+a 326 1 85
+a 9 234 14
+a 12 215 86
+a 336 345 32
+a 281 144 71
+a 51 103 2
+a 158 41 15
+a 289 355 78
+a 254 182 77
+a 474 468 54
+a 24 119 13
+a 209 285 36
+a 334 362 80
+a 343 271 38
+a 115 413 87
+a 138 43 38
+a 51 74 94
+a 95 77 88
+a 82 95 3
+a 50 270 53
+a 141 493 89
+a 59 89 75
+a 108 79 73
+a 10 62 55
+a 41 66 53
+a 75 102 70
+a 345 152 50
+a 37 375 50
+a 50 288 3
+a 76 374 16
+a 2 42 61
+a 131 180 89
+a 452 419 38
+a 7 28 50
+a 171 11 91
+a 296 418 22
+a 149 318 3
+a 65 96 75
+a 28 418 58
+a 379 234 3
+a 210 463 88
+a 175 7 30
+a 104 51 64
+a 402 393 51
+a 487 269 65
+a 19 18 17
+a 192 153 69
+a 146 22 76
+a 184 344 22
+a 332 124 80
+a 71 125 91
+a 288 33 39
+a 183 81 62
+a 32 60 93
+a 127 72 74
+a 466 224 31
+a 309 148 80
+a 348 436 94
+a 370 385 52
+a 182 73 83
+a 200 84 80
+a 430 56 23
+a 30 138 18
+a 49 489 26
+a 12 17 58
+a 26 104 18
+a 498 56 18
+a 381 488 10
+a 383 122 26
+a 180 41 9
+a 261 49 84
+a 141 71 27
+a 63 292 26
+a 5 274 97
+a 20 377 41
+a 284 273 17
+a 180 157 21
+a 39 40 20
+a 85 131 80
+a 170 17 62
+a 215 429 8
+a 116 78 50
+a 204 326 73
+a 14 27 86
+a 32 187 3
+a 212 286 10
+a 287 469 90
+a 199 82 5
+a 26 78 50
+a 247 41 21
+a 313 135 59
+a 83 479 93
+a 12 201 93
+a 372 429 8
+a 100 40 25
+a 137 210 77
+a 135 199 87
+a 159 291 59
+a 188 20 80
+a 267 313 25
+a 41 53 41
+a 107 127 37
+a 191 230 94
+a 64 254 29
+a 18 17 70
+a 24 277 61
+a 248 194 21
+a 179 365 6
+a 419 159 37
+a 30 399 17
+a 62 15 70
+a 15 52 94
+a 380 90 75
+a 325 28 15
+a 393 176 57
+a 375 273 96
+a 153 255 47
+a 432 213 90
+a 411 242 57
+a 103 451 86
+a 13 128 78
+a 376 334 50
+a 57 16 87
+a 232 362 98
+a 60 29 51
+a 285 21 42
+a 36 16 95
+a 203 298 45
+a 327 81 38
+a 456 246 11
+a 193 487 83
+a 250 8 67
+a 288 354 73
+a 4 40 31
+a 42 88 77
+a 101 197 19
+a 194 107 95
+a 182 212 34
+a 420 117 96
+a 32 191 86
+a 28 125 38
+a 347 76 32
+a 240 107 97
+a 32 119 57
+a 333 102 99
+a 120 47 58
+a 333 435 100
+a 500 33 22
+a 16 19 79
+a 49 31 91
+a 242 68 82
+a 234 447 47
+a 37 172 87
+a 448 449 2
+a 158 473 91
+a 47 458 11
+a 53 25 47
+a 55 13 67
+a 375 61 2
+a 350 106 74
+a 119 350 37
+a 31 125 99
+a 325 4 56
+a 325 155 79
+a 361 64 25
+a 447 442 31
+a 18 106 37
+a 212 230 37
+a 386 406 75
+a 115 93 49
+a 20 126 78
+a 116 277 96
+a 422 425 19
+a 205 119 85
+a 43 78 3
+a 269 267 47
+a 109 3 85
+a 479 122 16
+a 75 485 69
+a 281 26 83
+a 23 193 29
+a 40 42 47
+a 175 123 99
+a 91 116 2
+a 10 17 93
+a 307 319 77
+a 30 159 18
+a 74 407 100
+a 158 141 89
+a 19 20 16
+a 417 390 74
+a 162 203 61
+a 255 27 64
+a 461 66 51
+a 445 117 36
+a 139 145 46
+a 237 76 81
+a 490 83 12
+a 127 7 91
+a 300 18 63
+a 6 46 67
+a 94 88 1
+a 162 237 81
+a 308 347 51
+a 130 257 28
+a 417 208 93
+a 2 153 78
+a 35 186 12
+a 221 420 71
+a 114 140 75
+a 284 292 61
+a 127 447 90
+a 41 99 34
+a 128 73 11
+a 129 21 79
+a 175 427 8
+a 132 160 4
+a 1 76 30
+a 4 351 52
+a 164 327 24
+a 416 297 23
+a 63 251 72
+a 449 102 83
+a 174 400 91
+a 488 465 93
+a 116 51 81
+a 19 50 76
+a 120 305 84
+a 128 382 7
+a 373 362 76
+a 331 372 24
+a 231 50 19
+a 69 26 86
+a 319 45 52
+a 108 241 46
+a 165 384 42
+a 72 197 9
+a 19 166 36
+a 168 373 47
+a 57 277 4
+a 371 292 33
+a 399 226 98
+a 7 197 84
+a 259 140 43
+a 161 216 1
+a 184 111 4
+a 186 274 56
+a 94 29 25
+a 484 209 67
+a 430 88 28
+a 126 424 76
+a 22 4 35
+a 34 380 6
+a 68 24 89
+a 307 458 30
+a 247 475 16
+a 19 137 48
+a 91 322 54
+a 13 22 55
+a 24 37 16
+a 61 30 79
+a 73 306 73
+a 305 66 40
+a 326 399 31
+a 128 152 40
+a 10 110 24
+a 31 354 70
+a 99 83 56
+a 77 47 69
+a 150 234 69
+a 359 431 97
+a 163 353 84
+a 4 86 73
+a 36 7 9
+a 163 489 52
+a 410 442 60
+a 4 193 90
+a 155 454 75
+a 1 88 86
+a 1 307 70
+a 341 93 93
+a 102 387 33
+a 21 4 74
+a 17 50 73
+a 90 69 22
+a 233 328 6
+a 254 277 10
+a 38 6 32
+a 420 23 62
+a 31 202 38
+a 204 98 15
+a 187 224 44
+a 430 304 50
+a 267 82 56
+a 6 107 24
+a 164 160 9
+a 208 445 20
+a 62 24 55
+a 201 79 84
+a 327 200 19
+a 117 470 67
+a 37 63 41
+a 74 123 10
+a 85 27 70
+a 229 105 50
+a 238 118 90
+a 314 25 38
+a 129 354 71
+a 462 263 91
+a 310 499 94
+a 19 68 13
+a 377 146 20
+a 69 200 22
+a 12 82 88
+a 21 186 84
+a 197 334 1
+a 370 306 52
+a 80 121 67
+a 181 114 98
+a 361 382 7
+a 254 396 33
+a 85 342 94
+a 97 88 14
+a 44 385 40
+a 64 429 99
+a 426 473 8
+a 87 154 14
+a 482 259 69
+a 147 86 29
+a 86 197 77
+a 276 63 69
+a 314 46 54
+a 87 48 25
+a 205 221 27
+a 121 15 62
+a 63 5 21
+a 162 37 51
+a 420 15 23
+a 331 307 92
+a 10 87 76
+a 10 104 47
+a 71 338 51
+a 440 102 59
+a 277 423 47
+a 21 9 44
+a 347 12 35
+a 51 190 23
+a 31 183 72
+a 495 240 51
+a 272 229 66
+a 13 28 25
+a 212 298 85
+a 483 224 35
+a 18 165 56
+a 238 210 69
+a 51 117 52
+a 451 169 75
+a 2 369 23
+a 472 401 35
+a 21 227 92
+a 44 155 94
+a 313 311 30
+a 477 460 39
+a 4 204 33
+a 42 249 48
+a 24 36 56
+a 20 256 16
+a 6 383 80
+a 161 383 12
+a 313 408 29
+a 110 331 19
+a 180 164 92
+a 133 462 42
+a 73 91 20
+a 163 113 96
+a 42 186 15
+a 208 223 38
+a 55 105 9
+a 85 219 22
+a 464 228 68
+a 86 18 35
+a 190 101 73
+a 9 14 59
+a 435 159 46
+a 231 110 7
+a 49 64 100
+a 110 109 15
+a 338 429 6
+a 220 138 57
+a 48 104 25
+a 3 80 9
+a 70 346 94
+a 460 111 38
+a 39 52 13
+a 303 383 35
+a 341 309 60
+a 16 38 60
+a 182 124 64
+a 378 172 21
+a 259 149 98
+a 233 115 51
+a 150 249 18
+a 261 108 69
+a 116 390 30
+a 483 48 68
+a 87 69 46
+a 171 75 32
+a 445 286 75
+a 137 397 99
+a 207 2 50
+a 419 270 59
+a 2 404 77
+a 4 452 66
+a 177 274 33
+a 1 18 83
+a 91 108 83
+a 303 48 59
+a 493 223 20
+a 283 303 79
+a 466 358 87
+a 269 156 88
+a 306 267 85
+a 22 165 26
+a 28 26 9
+a 39 116 13
+a 17 38 90
+a 102 23 26
+a 130 376 86
+a 298 376 20
+a 361 247 1
+a 379 48 82
+a 459 54 22
+a 96 232 12
+a 454 108 82
+a 56 206 28
+a 349 234 30
+a 355 460 74
+a 56 10 79
+a 17 6 2
+a 214 101 85
+a 264 106 12
+a 41 378 41
+a 13 77 55
+a 118 25 19
+a 22 117 73
+a 156 402 1
+a 274 427 23
+a 432 121 44
+a 439 91 20
+a 183 137 37
+a 125 24 13
+a 231 35 98
+a 266 115 12
+a 178 480 4
+a 26 37 38
+a 374 145 70
+a 439 346 12
+a 352 44 49
+a 44 93 24
+a 155 367 42
+a 77 92 17
+a 168 132 64
+a 50 119 26
+a 139 19 72
+a 259 267 74
+a 349 495 78
+a 47 398 79
+a 28 158 34
+a 14 92 5
+a 323 229 38
+a 87 63 31
+a 228 67 88
+a 237 88 71
+a 265 484 71
+a 158 228 56
+a 290 73 97
+a 475 363 58
+a 443 117 29
+a 269 381 83
+a 11 224 79
+a 332 347 2
+a 36 388 3
+a 343 351 16
+a 174 59 26
+a 375 362 56
+a 376 486 20
+a 46 65 57
+a 6 108 27
+a 161 369 91
+a 291 387 20
+a 448 312 43
+a 27 88 23
+a 54 94 38
+a 260 367 64
+a 59 78 4
+a 132 27 50
+a 135 476 50
+a 240 45 33
+a 492 166 66
+a 63 14 10
+a 63 313 50
+a 147 311 32
+a 132 142 58
+a 159 3 28
+a 177 291 58
+a 13 296 95
+a 41 56 74
+a 89 141 15
+a 170 61 100
+a 70 476 21
+a 167 20 41
+a 19 69 59
+a 32 338 88
+a 28 227 91
+a 284 263 82
+a 28 277 30
+a 430 157 17
+a 469 52 97
+a 101 53 12
+a 12 26 4
+a 111 47 27
+a 76 32 43
+a 65 322 5
+a 83 74 82
+a 241 255 63
+a 448 418 44
+a 83 101 17
+a 169 140 32
+a 44 71 72
+a 270 400 94
+a 355 373 89
+a 199 72 22
+a 279 28 16
+a 368 86 96
+a 337 9 17
+a 181 9 35
+a 27 56 67
+a 73 30 29
+a 212 148 76
+a 355 238 46
+a 3 17 100
+a 132 327 76
+a 170 397 81
+a 82 365 7
+a 428 367 60
+a 350 491 93
+a 440 248 17
+a 101 291 5
+a 320 20 51
+a 40 135 14
+a 239 159 89
+a 147 249 8
+a 292 425 99
+a 151 69 52
+a 112 135 95
+a 10 33 85
+a 193 81 84
+a 257 165 40
+a 410 308 99
+a 43 77 57
+a 80 223 37
+a 116 118 77
+a 38 293 86
+a 499 266 68
+a 482 304 22
+a 492 36 8
+a 33 36 19
+a 133 129 60
+a 310 308 63
+a 238 229 90
+a 437 401 39
+a 54 23 49
+a 204 434 69
+a 79 80 93
+a 31 17 42
+a 193 427 27
+a 307 124 3
+a 398 251 60
+a 29 30 63
+a 229 90 48
+a 477 240 66
+a 25 56 46
+a 159 190 91
+a 446 456 82
+a 80 37 33
+a 82 481 67
+a 235 190 5
+a 300 480 91
+a 34 75 26
+a 412 148 82
+a 97 1 70
+a 172 1 80
+a 442 254 55
+a 129 352 72
+a 17 63 21
+a 22 7 68
+a 200 153 56
+a 283 276 42
+a 268 131 69
+a 153 70 20
+a 185 90 70
+a 44 292 64
+a 312 59 1
+a 8 216 53
+a 468 289 43
+a 403 276 80
+a 1 491 100
+a 5 71 24
+a 241 231 61
+a 347 74 46
+a 29 36 71
+a 172 276 49
+a 435 462 43
+a 78 139 75
+a 331 3 74
+a 71 180 31
+a 61 148 45
+a 84 374 12
+a 147 117 76
+a 209 227 33
+a 458 23 18
+a 24 31 38
+a 57 118 92
+a 65 83 71
+a 25 6 79
+a 365 40 16
+a 8 68 65
+a 10 263 1
+a 113 263 18
+a 230 344 16
+a 15 12 38
+a 73 55 83
+a 430 119 39
+a 437 65 35
+a 396 159 24
+a 194 274 95
+a 388 110 61
+a 273 254 81
+a 86 205 31
+a 170 280 27
+a 263 356 20
+a 71 80 51
+a 166 41 90
+a 144 122 61
+a 343 92 63
+a 278 254 88
+a 13 165 5
+a 303 5 90
+a 10 240 84
+a 436 286 71
+a 15 21 93
+a 49 73 54
+a 462 201 56
+a 326 243 56
+a 96 450 76
+a 34 53 23
+a 115 184 88
+a 147 455 35
+a 332 160 90
+a 271 333 28
+a 298 340 23
+a 24 74 89
+a 120 52 83
+a 135 372 81
+a 343 317 89
+a 48 102 34
+a 142 398 28
+a 107 156 99
+a 176 190 3
+a 429 114 11
+a 492 205 85
+a 158 250 47
+a 330 462 60
+a 348 413 90
+a 193 158 82
+a 424 309 48
+a 306 216 81
+a 6 198 85
+a 481 12 78
+a 355 401 72
+a 2 65 75
+a 451 9 57
+a 263 72 52
+a 72 427 5
+a 118 73 20
+a 58 65 86
+a 51 205 68
+a 11 486 4
+a 91 352 93
+a 30 43 93
+a 385 44 94
+a 265 341 87
+a 101 450 9
+a 50 314 48
+a 280 108 85
+a 24 331 52
+a 52 31 91
+a 104 32 46
+a 56 69 14
+a 101 119 40
+a 261 309 49
+a 439 22 92
+a 312 302 41
+a 247 304 75
+a 348 11 69
+a 484 47 41
+a 103 181 17
+a 398 288 51
+a 385 358 30
+a 276 55 77
+a 468 72 8
+a 374 460 50
+a 10 80 56
+a 371 74 54
+a 179 259 13
+a 336 209 79
+a 92 430 56
+a 155 266 32
+a 303 260 90
+a 488 451 66
+a 64 28 14
+a 107 301 40
+a 64 406 86
+a 21 26 52
+a 90 70 45
+a 152 221 8
+a 272 32 28
+a 378 307 11
+a 73 498 83
+a 409 465 83
+a 70 82 21
+a 54 384 28
+a 90 118 14
+a 47 200 66
+a 129 262 7
+a 61 77 99
+a 285 286 13
+a 103 243 29
+a 60 21 6
+a 106 21 30
+a 347 69 90
+a 22 41 16
+a 46 6 5
+a 141 57 61
+a 450 420 24
+a 21 31 41
+a 167 82 41
+a 265 25 56
+a 377 321 12
+a 177 425 35
+a 35 38 29
+a 57 71 28
+a 164 30 41
+a 396 131 66
+a 181 411 12
+a 79 126 63
+a 101 142 75
+a 265 20 98
+a 24 17 30
+a 111 403 60
+a 479 8 32
+a 316 356 42
+a 302 181 81
+a 66 88 6
+a 127 3 65
+a 31 343 9
+a 220 169 57
+a 127 348 23
+a 31 21 23
+a 28 178 25
+a 30 115 72
+a 288 6 4
+a 132 102 59
+a 141 88 48
+a 34 24 12
+a 122 53 13
+a 11 338 95
+a 469 473 65
+a 50 31 31
+a 387 163 58
+a 463 117 6
+a 2 71 65
+a 25 265 82
+a 23 104 4
+a 376 284 39
+a 163 495 31
+a 183 366 86
+a 40 12 34
+a 244 72 84
+a 428 363 83
+a 45 197 79
+a 142 214 8
+a 190 290 67
+a 393 180 35
+a 418 130 91
+a 34 39 55
+a 289 136 75
+a 379 317 66
+a 1 108 26
+a 41 120 26
+a 415 13 54
+a 154 31 44
+a 185 381 36
+a 18 30 61
+a 122 132 36
+a 94 227 44
+a 266 278 1
+a 49 415 2
+a 159 182 90
+a 49 216 49
+a 405 31 21
+a 124 117 30
+a 489 5 36
+a 36 6 28
+a 45 62 50
+a 415 430 92
+a 16 215 36
+a 161 5 8
+a 272 179 91
+a 75 14 69
+a 276 412 85
+a 44 300 78
+a 18 1 62
+a 414 110 46
+a 259 131 79
+a 12 20 46
+a 32 136 77
+a 194 414 88
+a 270 122 87
+a 426 382 98
+a 410 364 43
+a 111 65 55
+a 164 431 66
+a 142 118 33
+a 2 188 48
+a 229 195 42
+a 453 414 29
+a 4 25 84
+a 196 32 62
+a 84 112 20
+a 19 53 62
+a 284 66 71
+a 72 5 7
+a 58 122 45
+a 4 316 24
+a 71 373 32
+a 294 432 54
+a 40 3 54
+a 61 289 78
+a 111 42 27
+a 221 50 85
+a 423 107 61
+a 112 259 33
+a 24 160 60
+a 244 61 56
+a 86 162 59
+a 171 99 50
+a 307 292 12
+a 463 470 9
+a 178 82 62
+a 114 179 3
+a 494 290 97
+a 9 82 46
+a 201 290 85
+a 104 180 94
+a 354 201 83
+a 29 499 5
+a 34 48 65
+a 18 227 93
+a 39 75 65
+a 464 111 52
+a 171 447 15
+a 463 336 91
+a 25 420 60
+a 254 370 50
+a 43 128 21
+a 268 179 80
+a 487 440 53
+a 345 362 41
+a 309 190 8
+a 451 399 24
+a 159 45 7
+a 206 1 86
+a 224 449 28
+a 38 35 55
+a 57 30 17
+a 280 59 3
+a 172 441 100
+a 424 126 31
+a 37 73 61
+a 84 334 47
+a 152 345 91
+a 122 350 85
+a 100 185 76
+a 421 204 15
+a 60 235 55
+a 255 190 57
+a 76 462 83
+a 425 262 17
+a 19 13 65
+a 26 59 73
+a 406 83 80
+a 34 81 58
+a 406 132 59
+a 63 4 56
+a 142 324 15
+a 242 128 53
+a 94 349 55
+a 5 198 40
+a 7 287 39
+a 302 280 28
+a 30 120 37
+a 5 164 11
+a 230 161 70
+a 42 34 5
+a 136 3 63
+a 217 335 81
+a 370 454 47
+a 310 483 48
+a 48 59 19
+a 143 100 40
+a 223 269 31
+a 224 122 47
+a 428 292 97
+a 477 399 68
+a 82 45 11
+a 176 186 37
+a 24 30 41
+a 56 294 49
+a 139 323 93
+a 394 255 42
+a 16 23 49
+a 41 246 52
+a 53 54 48
+a 96 11 66
+a 137 78 36
+a 234 385 31
+a 82 170 63
+a 193 192 73
+a 285 202 55
+a 100 192 73
+a 401 394 99
+a 377 182 71
+a 70 31 88
+a 73 128 8
+a 93 85 57
+a 192 173 70
+a 198 80 98
+a 364 336 55
+a 386 141 99
+a 40 62 99
+a 446 322 63
+a 18 54 66
+a 95 6 20
+a 338 27 88
+a 286 19 7
+a 147 237 63
+a 448 141 39
+a 112 68 21
+a 424 148 46
+a 171 45 42
+a 236 392 91
+a 7 200 18
+a 50 142 95
+a 154 431 72
+a 7 207 90
+a 18 14 99
+a 257 20 12
+a 70 471 55
+a 5 150 1
+a 133 16 82
+a 56 27 57
+a 319 37 100
+a 366 296 73
+a 53 326 46
+a 109 282 27
+a 10 84 16
+a 11 487 80
+a 381 93 97
+a 10 93 93
+a 465 338 67
+a 314 317 2
+a 310 221 24
+a 115 84 91
+a 158 110 41
+a 160 326 99
+a 497 183 32
+a 228 148 62
+a 9 112 27
+a 61 343 21
+a 321 307 66
+a 294 256 8
+a 31 22 1
+a 157 221 6
+a 478 164 5
+a 418 91 18
+a 98 60 50
+a 81 183 25
+a 188 149 79
+a 200 267 78
+a 10 15 69
+a 172 243 45
+a 406 278 18
+a 211 372 98
+a 44 8 35
+a 15 40 46
+a 79 151 75
+a 165 476 41
+a 266 409 9
+a 128 196 74
+a 45 126 53
+a 262 29 8
+a 332 485 88
+a 33 68 49
+a 27 14 99
+a 69 84 88
+a 354 389 62
+a 152 81 10
+a 182 86 39
+a 36 449 41
+a 338 71 62
+a 119 181 48
+a 277 260 50
+a 58 413 83
+a 370 349 50
+a 198 292 74
+a 450 189 60
+a 48 396 82
+a 78 282 98
+a 343 239 4
+a 251 178 1
+a 369 347 44
+a 88 131 23
+a 116 151 33
+a 43 31 70
+a 21 146 50
+a 50 197 67
+a 379 72 21
+a 320 356 44
+a 52 11 34
+a 308 181 87
+a 368 243 76
+a 291 160 55
+a 19 65 73
+a 12 197 22
+a 35 2 78
+a 51 435 38
+a 475 45 39
+a 391 420 36
+a 152 439 35
+a 340 433 87
+a 369 148 15
+a 57 61 27
+a 41 391 19
+a 63 71 33
+a 70 169 83
+a 117 63 71
+a 58 62 25
+a 412 490 12
+a 477 377 47
+a 87 318 90
+a 56 74 53
+a 399 100 19
+a 137 131 15
+a 332 94 98
+a 14 353 11
+a 28 78 14
+a 77 78 64
+a 271 283 91
+a 355 74 51
+a 104 372 7
+a 70 304 35
+a 36 122 97
+a 50 53 63
+a 289 8 85
+a 482 184 89
+a 80 363 32
+a 97 217 46
+a 347 233 93
+a 190 69 63
+a 340 86 64
+a 186 119 82
+a 50 189 71
+a 11 220 52
+a 15 222 84
+a 222 77 11
+a 326 159 55
+a 296 332 14
+a 93 464 20
+a 236 217 93
+a 114 131 83
+a 77 243 51
+a 493 446 74
+a 433 177 55
+a 143 163 20
+a 368 345 55
+a 147 126 69
+a 38 28 57
+a 434 364 73
+a 367 172 28
+a 7 77 60
+a 48 66 13
+a 306 260 4
+a 186 105 55
+a 227 111 77
+a 74 363 83
+a 28 81 42
+a 46 11 42
+a 5 72 42
+a 298 152 90
+a 301 260 96
+a 86 382 74
+a 151 364 50
+a 44 35 93
+a 407 38 69
+a 457 182 73
+a 89 47 60
+a 67 28 14
+a 211 16 87
+a 95 302 53
+a 82 140 97
+a 72 137 56
+a 282 339 70
+a 487 31 21
+a 20 12 14
+a 173 84 90
+a 56 498 31
+a 428 416 30
+a 402 43 62
+a 160 120 9
+a 265 298 52
+a 291 34 91
+a 470 38 24
+a 129 449 13
+a 1 60 70
+a 293 208 55
+a 224 59 89
+a 48 95 29
+a 234 186 1
+a 72 92 18
+a 30 35 46
+a 93 110 69
+a 283 153 39
+a 289 186 62
+a 182 216 73
+a 188 262 28
+a 306 74 71
+a 288 422 41
+a 117 56 94
+a 257 166 56
+a 233 348 44
+a 113 475 55
+a 163 63 26
+a 47 45 1
+a 163 182 21
+a 37 299 51
+a 331 160 69
+a 57 62 98
+a 190 222 59
+a 304 291 66
+a 129 450 98
+a 346 186 40
+a 55 32 93
+a 74 286 14
+a 141 352 40
+a 31 51 78
+a 19 116 72
+a 423 485 86
+a 146 307 26
+a 113 92 9
+a 242 374 70
+a 463 150 33
+a 383 135 7
+a 117 254 26
+a 32 113 91
+a 359 492 22
+a 433 88 81
+a 479 33 75
+a 45 131 34
+a 326 43 65
+a 311 120 91
+a 81 190 52
+a 271 263 58
+a 226 234 15
+a 79 83 90
+a 434 310 46
+a 61 317 92
+a 39 29 91
+a 337 52 53
+a 105 262 20
+a 99 136 36
+a 284 221 79
+a 34 37 4
+a 46 210 98
+a 136 123 10
+a 287 307 56
+a 284 85 9
+a 12 105 93
+a 120 173 77
+a 354 365 25
+a 224 66 88
+a 262 218 81
+a 104 196 83
+a 273 361 30
+a 458 479 27
+a 29 95 30
+a 167 484 23
+a 387 20 14
+a 114 311 17
+a 115 264 19
+a 380 278 81
+a 46 269 33
+a 52 76 53
+a 349 324 33
+a 134 28 92
+a 65 295 50
+a 109 138 32
+a 329 101 8
+a 38 105 20
+a 452 127 58
+a 479 315 46
+a 494 466 19
+a 11 36 2
+a 473 276 21
+a 126 38 56
+a 103 88 46
+a 129 127 11
+a 332 296 73
+a 10 40 86
+a 365 414 89
+a 262 37 8
+a 326 158 17
+a 485 432 62
+a 2 113 81
+a 8 188 45
+a 44 20 43
+a 146 6 33
+a 10 64 60
+a 44 249 83
+a 446 286 3
+a 175 365 77
+a 346 17 22
+a 399 17 78
+a 1 284 7
+a 437 64 44
+a 305 187 95
+a 338 441 100
+a 68 2 1
+a 91 119 14
+a 1 193 91
+a 483 25 81
+a 496 326 9
+a 8 414 36
+a 322 278 96
+a 366 158 63
+a 48 180 48
+a 185 21 56
+a 316 24 56
+a 256 308 25
+a 231 297 64
+a 63 108 17
+a 164 24 87
+a 113 27 70
+a 320 213 3
+a 121 265 71
+a 166 313 79
+a 181 98 27
+a 92 23 83
+a 42 18 90
+a 8 454 37
+a 114 497 27
+a 307 264 95
+a 498 178 48
+a 9 20 86
+a 288 104 52
+a 462 251 60
+a 31 38 15
+a 60 22 10
+a 115 112 36
+a 169 147 30
+a 266 346 15
+a 321 472 31
+a 65 442 93
+a 307 309 18
+a 224 136 35
+a 206 102 20
+a 1 278 21
+a 208 8 37
+a 1 384 42
+a 248 10 81
+a 18 134 37
+a 179 144 7
+a 39 5 43
+a 235 180 62
+a 22 109 78
+a 275 264 51
+a 57 92 73
+a 428 296 89
+a 305 69 77
+a 362 227 78
+a 272 202 59
+a 113 163 30
+a 142 312 97
+a 392 487 24
+a 3 136 50
+a 35 265 82
+a 43 330 48
+a 300 31 74
+a 181 31 32
+a 123 309 85
+a 17 125 90
+a 163 16 22
+a 77 142 8
+a 330 122 7
+a 11 31 23
+a 258 76 11
+a 32 465 84
+a 301 316 34
+a 446 387 16
+a 81 433 87
+a 26 319 58
+a 186 249 25
+a 27 101 34
+a 34 381 70
+a 113 383 45
+a 399 200 97
+a 304 238 60
+a 107 164 57
+a 436 27 14
+a 7 228 55
+a 89 409 58
+a 114 178 95
+a 142 71 75
+a 110 192 52
+a 28 122 98
+a 311 250 50
+a 353 249 88
+a 325 348 15
+a 156 421 36
+a 18 59 93
+a 118 252 22
+a 19 38 49
+a 120 313 4
+a 220 454 6
+a 33 236 59
+a 170 406 27
+a 137 100 51
+a 2 29 36
+a 173 185 60
+a 69 78 62
+a 137 59 41
+a 151 227 85
+a 89 66 76
+a 496 138 83
+a 42 177 89
+a 46 308 73
+a 289 429 41
+a 305 233 83
+a 41 119 72
+a 24 15 9
+a 39 103 88
+a 439 28 69
+a 29 115 21
+a 106 273 98
+a 111 372 58
+a 223 185 78
+a 13 97 77
+a 8 331 16
+a 439 336 8
+a 108 293 80
+a 361 41 22
+a 188 103 21
+a 91 66 2
+a 101 221 16
+a 137 84 2
+a 57 83 29
+a 2 325 99
+a 185 4 90
+a 224 7 80
+a 477 85 72
+a 63 89 49
+a 476 4 23
+a 153 13 70
+a 70 123 27
+a 255 248 43
+a 227 79 13
+a 395 226 87
+a 200 193 95
+a 482 26 31
+a 125 23 42
+a 99 84 66
+a 84 403 40
+a 4 24 28
+a 26 115 94
+a 133 404 30
+a 121 225 57
+a 281 243 12
+a 94 110 88
+a 152 373 54
+a 380 396 69
+a 398 14 65
+a 69 71 82
+a 82 455 24
+a 182 59 27
+a 29 12 42
+a 80 256 42
+a 65 36 37
+a 450 429 77
+a 55 413 93
+a 299 361 58
+a 78 153 70
+a 112 338 20
+a 410 359 98
+a 98 115 12
+a 15 292 14
+a 230 9 99
+a 194 30 4
+a 300 20 68
+a 71 462 52
+a 251 288 97
+a 396 172 48
+a 177 213 52
+a 460 236 62
+a 449 364 21
+a 18 43 81
+a 81 23 23
+a 5 169 8
+a 13 362 65
+a 367 351 24
+a 222 218 66
+a 148 169 36
+a 332 196 51
+a 440 262 13
+a 2 26 88
+a 120 68 12
+a 69 269 28
+a 308 453 92
+a 450 35 19
+a 18 7 77
+a 289 46 48
+a 128 410 24
+a 31 256 44
+a 419 348 15
+a 132 98 38
+a 15 475 88
+a 55 81 2
+a 3 65 90
+a 220 80 6
+a 121 313 2
+a 286 397 46
+a 112 17 50
+a 455 167 64
+a 25 65 88
+a 27 1 74
+a 128 118 99
+a 162 457 52
+a 221 373 11
+a 5 17 100
+a 27 181 81
+a 93 433 79
+a 83 1 74
+a 476 25 76
+a 400 96 89
+a 54 18 27
+a 1 24 82
+a 177 172 88
+a 444 362 80
+a 79 24 57
+a 152 42 4
+a 180 71 2
+a 51 221 28
+a 210 94 9
+a 33 30 95
+a 20 155 88
+a 109 295 36
+a 157 27 25
+a 397 481 61
+a 25 459 52
+a 364 359 76
+a 178 60 21
+a 62 40 64
+a 156 355 45
+a 1 97 13
+a 54 38 64
+a 470 372 8
+a 301 247 7
+a 5 21 57
+a 136 329 74
+a 226 31 93
+a 78 190 91
+a 63 70 25
+a 108 292 48
+a 113 290 11
+a 171 308 16
+a 159 271 100
+a 385 167 75
+a 10 226 96
+a 94 228 36
+a 61 471 64
+a 1 34 86
+a 25 41 66
+a 181 20 36
+a 315 56 3
+a 61 63 99
+a 41 280 36
+a 78 163 68
+a 195 170 100
+a 13 388 94
+a 96 30 30
+a 18 196 79
+a 220 16 11
+a 221 388 35
+a 78 345 31
+a 101 208 55
+a 356 82 14
+a 4 156 14
+a 409 472 4
+a 345 476 69
+a 7 219 64
+a 48 165 7
+a 339 340 80
+a 35 41 5
+a 33 5 19
+a 156 279 89
+a 348 337 61
+a 78 463 7
+a 59 109 77
+a 468 108 67
+a 166 350 80
+a 107 61 88
+a 11 17 89
+a 10 16 41
+a 113 159 45
+a 43 98 55
+a 71 465 71
+a 491 94 69
+a 280 224 4
+a 274 500 55
+a 426 394 58
+a 370 325 4
+a 11 10 44
+a 88 80 61
+a 34 43 3
+a 43 345 67
+a 41 230 27
+a 11 41 61
+a 43 323 74
+a 314 366 76
+a 438 117 28
+a 14 9 5
+a 15 54 10
+a 282 337 58
+a 78 83 41
+a 338 202 44
+a 85 6 84
+a 133 138 19
+a 4 433 99
+a 445 281 86
+a 5 108 56
+a 307 134 11
+a 112 322 23
+a 222 22 92
+a 3 74 9
+a 20 254 57
+a 186 453 45
+a 389 328 59
+a 52 69 71
+a 420 35 61
+a 478 102 9
+a 183 486 7
+a 80 281 50
+a 20 69 15
+a 231 191 40
+a 279 194 41
+a 234 205 83
+a 77 125 78
+a 122 1 30
+a 105 113 94
+a 284 38 32
+a 374 354 35
+a 463 415 67
+a 249 143 86
+a 36 44 95
+a 75 180 18
+a 126 321 5
+a 292 205 52
+a 353 140 8
+a 132 35 70
+a 382 72 30
+a 383 490 35
+a 29 55 48
+a 6 174 58
+a 68 70 73
+a 74 497 60
+a 340 197 12
+a 200 273 87
+a 44 311 65
+a 489 234 35
+a 433 480 62
+a 32 158 91
+a 329 167 6
+a 170 408 89
+a 447 142 48
+a 140 285 67
+a 461 353 91
+a 87 44 29
+a 102 24 23
+a 117 26 64
+a 207 347 85
+a 185 100 57
+a 24 5 47
+a 384 124 9
+a 129 16 8
+a 421 195 43
+a 368 276 9
+a 75 442 40
+a 157 235 39
+a 215 423 89
+a 153 209 98
+a 111 8 76
+a 320 258 71
+a 392 315 34
+a 258 340 18
+a 87 107 38
+a 28 142 82
+a 315 453 17
+a 324 406 5
+a 25 161 50
+a 227 157 3
+a 381 467 46
+a 229 369 22
+a 30 8 39
+a 20 103 32
+a 158 181 70
+a 39 430 11
+a 46 445 56
+a 289 15 34
+a 414 23 12
+a 438 204 77
+a 22 35 19
+a 36 134 73
+a 204 245 92
+a 238 228 95
+a 131 53 23
+a 66 323 47
+a 472 406 59
+a 23 30 34
+a 44 89 36
+a 41 177 63
+a 365 130 7
+a 26 304 78
+a 258 231 93
+a 7 143 61
+a 276 335 27
+a 86 493 95
+a 74 427 12
+a 56 122 41
+a 164 117 46
+a 374 76 20
+a 189 179 72
+a 291 172 83
+a 301 36 28
+a 35 42 27
+a 56 166 53
+a 45 52 83
+a 479 299 93
+a 17 187 72
+a 50 292 69
+a 312 190 63
+a 265 82 99
+a 414 195 41
+a 262 364 12
+a 67 171 94
+a 308 91 5
+a 24 47 85
+a 4 445 70
+a 5 465 42
+a 246 450 64
+a 313 450 15
+a 33 149 76
+a 280 179 61
+a 367 272 19
+a 36 270 52
+a 30 82 52
+a 314 101 49
+a 20 34 81
+a 5 149 43
+a 349 390 8
+a 244 36 78
+a 121 60 36
+a 56 60 24
+a 73 7 48
+a 281 191 77
+a 428 458 67
+a 153 62 3
+a 177 181 16
+a 115 299 20
+a 82 64 90
+a 259 132 26
+a 242 20 71
+a 326 63 29
+a 499 394 80
+a 81 110 48
+a 52 94 93
+a 401 149 95
+a 32 44 17
+a 155 45 78
+a 189 192 26
+a 242 462 4
+a 260 424 77
+a 48 51 48
+a 185 55 11
+a 335 329 83
+a 223 12 17
+a 153 231 63
+a 49 111 54
+a 421 414 25
+a 482 67 19
+a 208 80 90
+a 444 26 81
+a 35 28 38
+a 318 449 5
+a 208 60 4
+a 482 378 20
+a 53 36 89
+a 65 8 27
+a 417 43 14
+a 73 233 95
+a 266 457 79
+a 271 108 73
+a 5 358 48
+a 18 361 29
+a 245 253 32
+a 14 42 64
+a 281 156 83
+a 152 135 47
+a 55 346 16
+a 1 15 47
+a 151 212 40
+a 231 187 89
+a 236 250 53
+a 420 120 42
+a 126 41 9
+a 158 56 20
+a 209 243 79
+a 233 87 74
+a 58 110 87
+a 77 98 69
+a 123 63 78
+a 258 91 35
+a 149 315 71
+a 251 449 86
+a 489 132 20
+a 128 147 29
+a 329 279 8
+a 84 13 8
+a 126 9 73
+a 201 100 85
+a 428 242 10
+a 96 71 5
+a 245 206 19
+a 146 134 76
+a 49 331 87
+a 348 12 38
+a 366 129 62
+a 320 157 81
+a 75 173 6
+a 29 37 13
+a 142 82 75
+a 156 135 17
+a 118 388 59
+a 14 389 12
+a 442 153 100
+a 300 343 42
+a 3 283 98
+a 165 7 63
+a 16 291 5
+a 381 229 62
+a 266 286 79
+a 33 111 29
+a 124 145 75
+a 84 405 58
+a 70 264 82
+a 494 312 38
+a 17 457 52
+a 3 250 47
+a 218 497 22
+a 137 122 52
+a 182 287 34
+a 93 360 16
+a 39 22 63
+a 259 457 57
+a 55 73 59
+a 28 157 48
+a 159 202 87
+a 166 311 93
+a 252 372 25
+a 68 291 18
+a 110 479 64
+a 236 363 46
+a 122 486 35
+a 101 363 23
+a 22 306 21
+a 398 331 5
+a 159 415 92
+a 11 22 9
+a 116 57 13
+a 321 64 59
+a 82 267 37
+a 59 46 94
+a 167 98 78
+a 35 18 52
+a 132 238 49
+a 154 473 44
+a 300 19 50
+a 202 49 69
+a 3 50 98
+a 67 5 40
+a 112 385 29
+a 246 284 18
+a 336 103 76
+a 19 31 98
+a 317 155 10
+a 353 231 98
+a 291 94 70
+a 48 372 22
+a 43 166 60
+a 201 26 3
+a 311 27 1
+a 422 392 16
+a 30 7 41
+a 278 460 57
+a 77 459 11
+a 27 63 4
+a 44 252 44
+a 206 57 7
+a 250 420 16
+a 14 38 8
+a 127 329 26
+a 22 29 23
+a 233 194 70
+a 77 2 67
+a 97 55 14
+a 339 90 49
+a 259 332 32
+a 68 226 84
+a 94 114 51
+a 161 59 54
+a 213 247 76
+a 307 284 93
+a 55 135 22
+a 60 475 26
+a 483 412 89
+a 317 322 82
+a 48 193 36
+a 427 61 54
+a 31 19 60
+a 137 49 95
+a 277 134 96
+a 22 72 78
+a 89 264 63
+a 297 497 38
+a 215 38 38
+a 347 166 9
+a 3 36 93
+a 12 35 60
+a 97 265 1
+a 153 392 37
+a 44 59 92
+a 86 5 65
+a 440 143 8
+a 38 181 75
+a 248 251 30
+a 197 232 26
+a 422 301 58
+a 318 300 50
+a 1 192 68
+a 273 313 52
+a 119 62 25
+a 58 70 46
+a 184 24 80
+a 225 281 27
+a 74 67 95
+a 128 185 24
+a 26 53 6
+a 72 198 49
+a 174 270 52
+a 373 474 93
+a 34 15 69
+a 382 243 18
+a 68 55 68
+a 118 4 10
+a 305 34 86
+a 317 160 11
+a 298 290 29
+a 62 60 54
+a 100 25 28
+a 222 34 14
+a 118 158 99
+a 95 205 26
+a 9 224 26
+a 31 229 13
+a 236 440 90
+a 145 276 59
+a 211 29 42
+a 70 72 9
+a 225 158 17
+a 431 231 59
+a 29 20 9
+a 142 171 47
+a 149 485 31
+a 67 391 77
+a 121 110 66
+a 192 157 62
+a 482 372 91
+a 22 312 19
+a 237 368 40
diff --git a/src/boost/libs/graph/example/mcgregor_subgraphs_example.cpp b/src/boost/libs/graph/example/mcgregor_subgraphs_example.cpp
new file mode 100644
index 000000000..f0b74fc99
--- /dev/null
+++ b/src/boost/libs/graph/example/mcgregor_subgraphs_example.cpp
@@ -0,0 +1,152 @@
+//=======================================================================
+// Copyright 2009 Trustees of Indiana University.
+// Authors: Michael Hansen
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <fstream>
+#include <iostream>
+#include <string>
+
+#include <boost/lexical_cast.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/filtered_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/iteration_macros.hpp>
+#include <boost/graph/mcgregor_common_subgraphs.hpp>
+#include <boost/property_map/shared_array_property_map.hpp>
+
+using namespace boost;
+
+// Callback that looks for the first common subgraph whose size
+// matches the user's preference.
+template < typename Graph > struct example_callback
+{
+
+ typedef typename graph_traits< Graph >::vertices_size_type VertexSizeFirst;
+
+ example_callback(const Graph& graph1) : m_graph1(graph1) {}
+
+ template < typename CorrespondenceMapFirstToSecond,
+ typename CorrespondenceMapSecondToFirst >
+ bool operator()(CorrespondenceMapFirstToSecond correspondence_map_1_to_2,
+ CorrespondenceMapSecondToFirst correspondence_map_2_to_1,
+ VertexSizeFirst subgraph_size)
+ {
+
+ // Fill membership map for first graph
+ typedef
+ typename property_map< Graph, vertex_index_t >::type VertexIndexMap;
+ typedef shared_array_property_map< bool, VertexIndexMap > MembershipMap;
+
+ MembershipMap membership_map1(
+ num_vertices(m_graph1), get(vertex_index, m_graph1));
+
+ fill_membership_map< Graph >(
+ m_graph1, correspondence_map_1_to_2, membership_map1);
+
+ // Generate filtered graphs using membership map
+ typedef typename membership_filtered_graph_traits< Graph,
+ MembershipMap >::graph_type MembershipFilteredGraph;
+
+ MembershipFilteredGraph subgraph1
+ = make_membership_filtered_graph(m_graph1, membership_map1);
+
+ // Print the graph out to the console
+ std::cout << "Found common subgraph (size " << subgraph_size << ")"
+ << std::endl;
+ print_graph(subgraph1);
+ std::cout << std::endl;
+
+ // Explore the entire space
+ return (true);
+ }
+
+private:
+ const Graph& m_graph1;
+ VertexSizeFirst m_max_subgraph_size;
+};
+
+int main(int argc, char* argv[])
+{
+
+ // Using a vecS graph here so that we don't have to mess around with
+ // a vertex index map; it will be implicit.
+ typedef adjacency_list< listS, vecS, directedS,
+ property< vertex_name_t, unsigned int,
+ property< vertex_index_t, unsigned int > >,
+ property< edge_name_t, unsigned int > >
+ Graph;
+
+ typedef property_map< Graph, vertex_name_t >::type VertexNameMap;
+
+ // Test maximum and unique variants on known graphs
+ Graph graph_simple1, graph_simple2;
+ example_callback< Graph > user_callback(graph_simple1);
+
+ VertexNameMap vname_map_simple1 = get(vertex_name, graph_simple1);
+ VertexNameMap vname_map_simple2 = get(vertex_name, graph_simple2);
+
+ // Graph that looks like a triangle
+ put(vname_map_simple1, add_vertex(graph_simple1), 1);
+ put(vname_map_simple1, add_vertex(graph_simple1), 2);
+ put(vname_map_simple1, add_vertex(graph_simple1), 3);
+
+ add_edge(0, 1, graph_simple1);
+ add_edge(0, 2, graph_simple1);
+ add_edge(1, 2, graph_simple1);
+
+ std::cout << "First graph:" << std::endl;
+ print_graph(graph_simple1);
+ std::cout << std::endl;
+
+ // Triangle with an extra vertex
+ put(vname_map_simple2, add_vertex(graph_simple2), 1);
+ put(vname_map_simple2, add_vertex(graph_simple2), 2);
+ put(vname_map_simple2, add_vertex(graph_simple2), 3);
+ put(vname_map_simple2, add_vertex(graph_simple2), 4);
+
+ add_edge(0, 1, graph_simple2);
+ add_edge(0, 2, graph_simple2);
+ add_edge(1, 2, graph_simple2);
+ add_edge(1, 3, graph_simple2);
+
+ std::cout << "Second graph:" << std::endl;
+ print_graph(graph_simple2);
+ std::cout << std::endl;
+
+ // All subgraphs
+ std::cout << "mcgregor_common_subgraphs:" << std::endl;
+ mcgregor_common_subgraphs(graph_simple1, graph_simple2, true, user_callback,
+ vertices_equivalent(make_property_map_equivalent(
+ vname_map_simple1, vname_map_simple2)));
+ std::cout << std::endl;
+
+ // Unique subgraphs
+ std::cout << "mcgregor_common_subgraphs_unique:" << std::endl;
+ mcgregor_common_subgraphs_unique(graph_simple1, graph_simple2, true,
+ user_callback,
+ vertices_equivalent(make_property_map_equivalent(
+ vname_map_simple1, vname_map_simple2)));
+ std::cout << std::endl;
+
+ // Maximum subgraphs
+ std::cout << "mcgregor_common_subgraphs_maximum:" << std::endl;
+ mcgregor_common_subgraphs_maximum(graph_simple1, graph_simple2, true,
+ user_callback,
+ vertices_equivalent(make_property_map_equivalent(
+ vname_map_simple1, vname_map_simple2)));
+ std::cout << std::endl;
+
+ // Maximum, unique subgraphs
+ std::cout << "mcgregor_common_subgraphs_maximum_unique:" << std::endl;
+ mcgregor_common_subgraphs_maximum_unique(graph_simple1, graph_simple2, true,
+ user_callback,
+ vertices_equivalent(make_property_map_equivalent(
+ vname_map_simple1, vname_map_simple2)));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/mean_geodesic.cpp b/src/boost/libs/graph/example/mean_geodesic.cpp
new file mode 100644
index 000000000..d0cfee821
--- /dev/null
+++ b/src/boost/libs/graph/example/mean_geodesic.cpp
@@ -0,0 +1,88 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[mean_geodesic_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/floyd_warshall_shortest.hpp>
+#include <boost/graph/geodesic_distance.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a matrix type and its corresponding property map that
+// will contain the distances between each pair of vertices.
+typedef exterior_vertex_property< Graph, int > DistanceProperty;
+typedef DistanceProperty::matrix_type DistanceMatrix;
+typedef DistanceProperty::matrix_map_type DistanceMatrixMap;
+
+// Declare the weight map so that each edge returns the same value.
+typedef constant_property_map< Edge, int > WeightMap;
+
+// Declare a container and its corresponding property map that
+// will contain the resulting mean geodesic distances of each
+// vertex in the graph.
+typedef exterior_vertex_property< Graph, float > GeodesicProperty;
+typedef GeodesicProperty::container_type GeodesicContainer;
+typedef GeodesicProperty::map_type GeodesicMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a property map that provides access
+ // to the actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standad input.
+ read_graph(g, nm, cin);
+
+ // Compute the distances between all pairs of vertices using
+ // the Floyd-Warshall algorithm. Note that the weight map is
+ // created so that every edge has a weight of 1.
+ DistanceMatrix distances(num_vertices(g));
+ DistanceMatrixMap dm(distances, g);
+ WeightMap wm(1);
+ floyd_warshall_all_pairs_shortest_paths(g, dm, weight_map(wm));
+
+ // Compute the mean geodesic distances for each vertex in
+ // the graph and get the average mean geodesic distace (the
+ // so-called small-world distance) as a result.
+ GeodesicContainer geodesics(num_vertices(g));
+ GeodesicMap gm(geodesics, g);
+ float sw = all_mean_geodesics(g, dm, gm);
+
+ // Print the mean geodesic distance of each vertex and finally,
+ // the graph itself.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << get(gm, *i)
+ << endl;
+ }
+ cout << "small world distance: " << sw << endl;
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/miles_span.cpp b/src/boost/libs/graph/example/miles_span.cpp
new file mode 100644
index 000000000..d09c7f6f9
--- /dev/null
+++ b/src/boost/libs/graph/example/miles_span.cpp
@@ -0,0 +1,126 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+// Sample output:
+//
+// The graph miles(100,0,0,0,0,10,0) has 405 edges,
+// and its minimum spanning tree has length 14467.
+//
+
+#include <boost/config.hpp>
+#include <string.h>
+#include <stdio.h>
+#include <boost/graph/stanford_graph.hpp>
+#include <boost/graph/prim_minimum_spanning_tree.hpp>
+
+// A visitor class for accumulating the total length of the minimum
+// spanning tree. The Distance template parameter is for a
+// PropertyMap.
+template < class Distance >
+struct total_length_visitor : public boost::dijkstra_visitor<>
+{
+ typedef typename boost::property_traits< Distance >::value_type D;
+ total_length_visitor(D& len, Distance d) : _total_length(len), _distance(d)
+ {
+ }
+ template < class Vertex, class Graph >
+ inline void finish_vertex(Vertex s, Graph& g)
+ {
+ _total_length += boost::get(_distance, s);
+ }
+ D& _total_length;
+ Distance _distance;
+};
+
+int main(int argc, char* argv[])
+{
+ using namespace boost;
+ Graph* g;
+
+ unsigned long n = 100;
+ unsigned long n_weight = 0;
+ unsigned long w_weight = 0;
+ unsigned long p_weight = 0;
+ unsigned long d = 10;
+ long s = 0;
+ unsigned long r = 1;
+ char* file_name = NULL;
+
+ while (--argc)
+ {
+ if (sscanf(argv[argc], "-n%lu", &n) == 1)
+ ;
+ else if (sscanf(argv[argc], "-N%lu", &n_weight) == 1)
+ ;
+ else if (sscanf(argv[argc], "-W%lu", &w_weight) == 1)
+ ;
+ else if (sscanf(argv[argc], "-P%lu", &p_weight) == 1)
+ ;
+ else if (sscanf(argv[argc], "-d%lu", &d) == 1)
+ ;
+ else if (sscanf(argv[argc], "-r%lu", &r) == 1)
+ ;
+ else if (sscanf(argv[argc], "-s%ld", &s) == 1)
+ ;
+ else if (strcmp(argv[argc], "-v") == 0)
+ verbose = 1;
+ else if (strncmp(argv[argc], "-g", 2) == 0)
+ file_name = argv[argc] + 2;
+ else
+ {
+ fprintf(stderr,
+ "Usage: %s [-nN][-dN][-rN][-sN][-NN][-WN][-PN][-v][-gfoo]\n",
+ argv[0]);
+ return -2;
+ }
+ }
+ if (file_name)
+ r = 1;
+
+ while (r--)
+ {
+ if (file_name)
+ g = restore_graph(file_name);
+ else
+ g = miles(n, n_weight, w_weight, p_weight, 0L, d, s);
+
+ if (g == NULL || g->n <= 1)
+ {
+ fprintf(stderr, "Sorry, can't create the graph! (error code %ld)\n",
+ panic_code);
+ return -1;
+ }
+
+ printf("The graph %s has %ld edges,\n", g->id, g->m / 2);
+
+ long sp_length = 0;
+
+ // Use the "z" utility field for distance.
+ typedef property_map< Graph*, z_property< long > >::type Distance;
+ Distance d = get(z_property< long >(), g);
+ // Use the "w" property for parent
+ typedef property_map< Graph*, w_property< Vertex* > >::type Parent;
+ Parent p = get(w_property< Vertex* >(), g);
+ total_length_visitor< Distance > length_vis(sp_length, d);
+
+ prim_minimum_spanning_tree(g, p,
+ distance_map(get(z_property< long >(), g))
+ .weight_map(get(edge_length_t(), g))
+ .
+ // Use the "y" utility field for color
+ color_map(get(y_property< long >(), g))
+ .visitor(length_vis));
+
+ printf(" and its minimum spanning tree has length %ld.\n", sp_length);
+
+ gb_recycle(g);
+ s++;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/miles_span.expected b/src/boost/libs/graph/example/miles_span.expected
new file mode 100644
index 000000000..f2ab51101
--- /dev/null
+++ b/src/boost/libs/graph/example/miles_span.expected
@@ -0,0 +1,2 @@
+The graph miles(100,0,0,0,0,10,0) has 405 edges,
+ and its minimum spanning tree has length 14467.
diff --git a/src/boost/libs/graph/example/min_max_paths.cpp b/src/boost/libs/graph/example/min_max_paths.cpp
new file mode 100644
index 000000000..fabf4c942
--- /dev/null
+++ b/src/boost/libs/graph/example/min_max_paths.cpp
@@ -0,0 +1,106 @@
+//=======================================================================
+// Copyright 1997-2001 University of Notre Dame.
+// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#error \
+ "This example appears to be incorrect; it uses edge weights that are smaller than 0 using the comparison operator passed to Dijkstra's algorithm, which is not allowed."
+
+#include <boost/config.hpp>
+#include <iostream>
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/transpose_graph.hpp>
+
+/* Output:
+
+ distances from start vertex:
+ distance(a) = 0
+ distance(b) = 3
+ distance(c) = 1
+ distance(d) = 3
+ distance(e) = 3
+
+ min-max paths tree
+ a --> c
+ b -->
+ c --> d
+ d --> e
+ e --> b
+
+*/
+
+int main(int, char*[])
+{
+ using namespace boost;
+
+ typedef adjacency_list< listS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+
+ typedef std::pair< int, int > E;
+
+ const char name[] = "abcdef";
+
+ const int num_nodes = 6;
+ E edges[] = { E(0, 2), E(1, 1), E(1, 3), E(1, 4), E(2, 1), E(2, 3), E(3, 4),
+ E(4, 0), E(4, 1) };
+ int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1 };
+ const int n_edges = sizeof(edges) / sizeof(E);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle iterator constructors
+ Graph G(num_nodes);
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, G);
+ for (std::size_t j = 0; j < sizeof(edges) / sizeof(E); ++j)
+ {
+ graph_traits< Graph >::edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted) = add_edge(edges[j].first, edges[j].second, G);
+ weightmap[e] = weights[j];
+ }
+#else
+ Graph G(edges, edges + n_edges, weights, num_nodes);
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, G);
+#endif
+
+ std::vector< Vertex > p(num_vertices(G));
+ std::vector< int > d(num_vertices(G));
+
+ Vertex s = *(vertices(G).first);
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ dijkstra_shortest_paths(G, s, &p[0], &d[0], weightmap, get(vertex_index, G),
+ std::greater< int >(), closed_plus< int >(),
+ (std::numeric_limits< int >::max)(), 0, default_dijkstra_visitor());
+#else
+ dijkstra_shortest_paths(G, s,
+ distance_map(&d[0]).predecessor_map(&p[0]).distance_compare(
+ std::greater< int >()));
+#endif
+
+ std::cout << "distances from start vertex:" << std::endl;
+ graph_traits< Graph >::vertex_iterator vi, vend;
+ for (boost::tie(vi, vend) = vertices(G); vi != vend; ++vi)
+ std::cout << "distance(" << name[*vi] << ") = " << d[*vi] << std::endl;
+ std::cout << std::endl;
+
+ std::cout << "min-max paths tree" << std::endl;
+ adjacency_list<> tree(num_nodes);
+
+ for (boost::tie(vi, vend) = vertices(G); vi != vend; ++vi)
+ if (*vi != p[*vi])
+ add_edge(p[*vi], *vi, tree);
+
+ print_graph(tree, name);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/minimum_degree_ordering.cpp b/src/boost/libs/graph/example/minimum_degree_ordering.cpp
new file mode 100644
index 000000000..c096ccf6d
--- /dev/null
+++ b/src/boost/libs/graph/example/minimum_degree_ordering.cpp
@@ -0,0 +1,199 @@
+//-*-c++-*-
+//=======================================================================
+// Copyright 1997-2001 University of Notre Dame.
+// Authors: Lie-Quan Lee
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ This file is to demo how to use minimum_degree_ordering algorithm.
+
+ Important Note: This implementation requires the BGL graph to be
+ directed. Therefore, nonzero entry (i, j) in a symmetrical matrix
+ A coresponds to two directed edges (i->j and j->i).
+
+ The bcsstk01.rsa is an example graph in Harwell-Boeing format,
+ and bcsstk01 is the ordering produced by Liu's MMD implementation.
+ Link this file with iohb.c to get the harwell-boeing I/O functions.
+ To run this example, type:
+
+ ./minimum_degree_ordering bcsstk01.rsa bcsstk01
+
+*/
+
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include "boost/graph/adjacency_list.hpp"
+#include "boost/graph/graph_utility.hpp"
+#include "boost/graph/minimum_degree_ordering.hpp"
+
+void terminate(const char* msg)
+{
+ std::cerr << msg << std::endl;
+ abort();
+}
+
+// copy and modify from mtl harwell boeing stream
+struct harwell_boeing
+{
+ harwell_boeing(char* filename)
+ {
+ int Nrhs;
+ char* Type;
+ Type = new char[4];
+ isComplex = false;
+ // Never called:
+ // readHB_info(filename, &M, &N, &nonzeros, &Type, &Nrhs);
+ colptr = (int*)malloc((N + 1) * sizeof(int));
+ if (colptr == NULL)
+ terminate("Insufficient memory for colptr.\n");
+ rowind = (int*)malloc(nonzeros * sizeof(int));
+ if (rowind == NULL)
+ terminate("Insufficient memory for rowind.\n");
+
+ if (Type[0] == 'C')
+ {
+ isComplex = true;
+ val = (double*)malloc(nonzeros * sizeof(double) * 2);
+ if (val == NULL)
+ terminate("Insufficient memory for val.\n");
+ }
+ else
+ {
+ if (Type[0] != 'P')
+ {
+ val = (double*)malloc(nonzeros * sizeof(double));
+ if (val == NULL)
+ terminate("Insufficient memory for val.\n");
+ }
+ }
+ // Never called:
+ // readHB_mat_double(filename, colptr, rowind, val);
+
+ cnt = 0;
+ col = 0;
+ delete[] Type;
+ }
+
+ ~harwell_boeing()
+ {
+ free(colptr);
+ free(rowind);
+ free(val);
+ }
+
+ inline int nrows() const { return M; }
+
+ int cnt;
+ int col;
+ int* colptr;
+ bool isComplex;
+ int M;
+ int N;
+ int nonzeros;
+ int* rowind;
+ double* val;
+};
+
+int main(int argc, char* argv[])
+{
+ using namespace std;
+ using namespace boost;
+
+ if (argc < 2)
+ {
+ cout << argv[0] << " HB file" << endl;
+ return -1;
+ }
+
+ int delta = 0;
+
+ if (argc >= 4)
+ delta = atoi(argv[3]);
+
+ harwell_boeing hbs(argv[1]);
+
+ // must be BGL directed graph now
+ typedef adjacency_list< vecS, vecS, directedS > Graph;
+
+ int n = hbs.nrows();
+
+ cout << "n is " << n << endl;
+
+ Graph G(n);
+
+ int num_edge = 0;
+
+ for (int i = 0; i < n; ++i)
+ for (int j = hbs.colptr[i]; j < hbs.colptr[i + 1]; ++j)
+ if ((hbs.rowind[j - 1] - 1) > i)
+ {
+ add_edge(hbs.rowind[j - 1] - 1, i, G);
+ add_edge(i, hbs.rowind[j - 1] - 1, G);
+ num_edge++;
+ }
+
+ cout << "number of off-diagnal elements: " << num_edge << endl;
+
+ typedef std::vector< int > Vector;
+
+ Vector inverse_perm(n, 0);
+ Vector perm(n, 0);
+
+ Vector supernode_sizes(n, 1); // init has to be 1
+
+ boost::property_map< Graph, vertex_index_t >::type id
+ = get(vertex_index, G);
+
+ Vector degree(n, 0);
+
+ minimum_degree_ordering(G,
+ make_iterator_property_map(&degree[0], id, degree[0]), &inverse_perm[0],
+ &perm[0],
+ make_iterator_property_map(&supernode_sizes[0], id, supernode_sizes[0]),
+ delta, id);
+
+ if (argc >= 3)
+ {
+ ifstream input(argv[2]);
+ if (input.fail())
+ {
+ cout << argv[3] << " is failed to open!. " << endl;
+ return -1;
+ }
+ int comp;
+ bool is_correct = true;
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ input >> comp;
+ if (comp != inverse_perm[i] + 1)
+ {
+ cout << "at i= " << i << ": " << comp
+ << " ***is NOT EQUAL to*** " << inverse_perm[i] + 1
+ << endl;
+ is_correct = false;
+ }
+ }
+ for (i = 0; i < n; i++)
+ {
+ input >> comp;
+ if (comp != perm[i] + 1)
+ {
+ cout << "at i= " << i << ": " << comp
+ << " ***is NOT EQUAL to*** " << perm[i] + 1 << endl;
+ is_correct = false;
+ }
+ }
+ if (is_correct)
+ cout << "Permutation and inverse permutation are correct. " << endl;
+ else
+ cout << "WARNING -- Permutation or inverse permutation is not the "
+ << "same ones generated by Liu's " << endl;
+ }
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/modify_graph.cpp b/src/boost/libs/graph/example/modify_graph.cpp
new file mode 100644
index 000000000..9c8836e07
--- /dev/null
+++ b/src/boost/libs/graph/example/modify_graph.cpp
@@ -0,0 +1,208 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+// Predicate Function for use in remove if
+template < class NamePropertyMap > struct name_equals_predicate
+{
+ name_equals_predicate(const std::string& x, NamePropertyMap name)
+ : m_str(x), m_name(name)
+ {
+ }
+
+ template < class Edge > bool operator()(const Edge& e) const
+ {
+ return m_str == m_name[e];
+ }
+ std::string m_str;
+ NamePropertyMap m_name;
+};
+// helper creation function
+template < class NamePropertyMap >
+inline name_equals_predicate< NamePropertyMap > name_equals(
+ const std::string& str, NamePropertyMap name)
+{
+ return name_equals_predicate< NamePropertyMap >(str, name);
+}
+
+template < class MutableGraph > void modify_demo(MutableGraph& g)
+{
+ typedef graph_traits< MutableGraph > GraphTraits;
+ typedef typename GraphTraits::vertices_size_type size_type;
+ typedef typename GraphTraits::edge_descriptor edge_descriptor;
+ size_type n = 0;
+ typename GraphTraits::edges_size_type m = 0;
+ typename GraphTraits::vertex_descriptor u, v, w;
+ edge_descriptor e, e1, e2;
+ typename property_map< MutableGraph, edge_name_t >::type name_map
+ = get(edge_name, g);
+ bool added;
+ typename GraphTraits::vertex_iterator vi, vi_end;
+
+ {
+ v = add_vertex(g);
+
+ assert(num_vertices(g) == n + 1);
+ assert(size_type(vertices(g).second - vertices(g).first) == n + 1);
+ assert(v == *std::find(vertices(g).first, vertices(g).second, v));
+ }
+ {
+ remove_vertex(v, g);
+
+ assert(num_vertices(g) == n);
+ assert(size_type(vertices(g).second - vertices(g).first) == n);
+ // v is no longer a valid vertex descriptor
+ }
+ {
+ u = add_vertex(g);
+ v = add_vertex(g);
+
+ std::pair< edge_descriptor, bool > p = add_edge(u, v, g);
+
+ assert(num_edges(g) == m + 1);
+ assert(p.second == true); // edge should have been added
+ assert(source(p.first, g) == u);
+ assert(target(p.first, g) == v);
+ assert(p.first
+ == *std::find(
+ out_edges(u, g).first, out_edges(u, g).second, p.first));
+ assert(p.first
+ == *std::find(
+ in_edges(v, g).first, in_edges(v, g).second, p.first));
+ }
+ {
+ // use tie() for convenience, avoid using the std::pair
+
+ u = add_vertex(g);
+ v = add_vertex(g);
+
+ boost::tie(e, added) = add_edge(u, v, g);
+
+ assert(num_edges(g) == m + 2);
+ assert(added == true); // edge should have been added
+ assert(source(e, g) == u);
+ assert(target(e, g) == v);
+ assert(
+ e == *std::find(out_edges(u, g).first, out_edges(u, g).second, e));
+ assert(e == *std::find(in_edges(v, g).first, in_edges(v, g).second, e));
+ }
+ {
+ add_edge(u, v, g); // add a parallel edge
+
+ remove_edge(u, v, g);
+
+ assert(num_edges(g) == m + 1);
+ bool exists;
+ boost::tie(e, exists) = edge(u, v, g);
+ assert(exists == false);
+ assert(out_degree(u, g) == 0);
+ assert(in_degree(v, g) == 0);
+ }
+ {
+ e = *edges(g).first;
+ boost::tie(u, v) = incident(e, g);
+
+ remove_edge(e, g);
+
+ assert(num_edges(g) == m);
+ assert(out_degree(u, g) == 0);
+ assert(in_degree(v, g) == 0);
+ }
+ {
+ add_edge(u, v, g);
+
+ typename GraphTraits::out_edge_iterator iter, iter_end;
+ boost::tie(iter, iter_end) = out_edges(u, g);
+
+ remove_edge(iter, g);
+
+ assert(num_edges(g) == m);
+ assert(out_degree(u, g) == 0);
+ assert(in_degree(v, g) == 0);
+ }
+ {
+ w = add_vertex(g);
+ boost::tie(e1, added) = add_edge(u, v, g);
+ boost::tie(e2, added) = add_edge(v, w, g);
+ name_map[e1] = "I-5";
+ name_map[e2] = "Route 66";
+
+ typename GraphTraits::out_edge_iterator iter, iter_end;
+ boost::tie(iter, iter_end) = out_edges(u, g);
+
+ remove_edge_if(name_equals("Route 66", name_map), g);
+
+ assert(num_edges(g) == m + 1);
+
+ remove_edge_if(name_equals("I-5", name_map), g);
+
+ assert(num_edges(g) == m);
+ assert(out_degree(u, g) == 0);
+ assert(out_degree(v, g) == 0);
+ assert(in_degree(v, g) == 0);
+ assert(in_degree(w, g) == 0);
+ }
+ {
+ boost::tie(e1, added) = add_edge(u, v, g);
+ boost::tie(e2, added) = add_edge(u, w, g);
+ name_map[e1] = "foo";
+ name_map[e2] = "foo";
+
+ remove_out_edge_if(u, name_equals("foo", name_map), g);
+
+ assert(num_edges(g) == m);
+ assert(out_degree(u, g) == 0);
+ }
+ {
+ boost::tie(e1, added) = add_edge(u, v, g);
+ boost::tie(e2, added) = add_edge(w, v, g);
+ name_map[e1] = "bar";
+ name_map[e2] = "bar";
+
+ remove_in_edge_if(v, name_equals("bar", name_map), g);
+
+ assert(num_edges(g) == m);
+ assert(in_degree(v, g) == 0);
+ }
+ {
+ add_edge(u, v, g);
+ add_edge(u, w, g);
+ add_edge(u, v, g);
+ add_edge(v, u, g);
+
+ clear_vertex(u, g);
+
+ assert(out_degree(u, g) == 0);
+
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ typename GraphTraits::adjacency_iterator ai, ai_end;
+ for (boost::tie(ai, ai_end) = adjacent_vertices(*vi, g);
+ ai != ai_end; ++ai)
+ assert(*ai != u);
+ }
+ }
+}
+
+int main()
+{
+ adjacency_list< listS, vecS, bidirectionalS, no_property,
+ property< edge_name_t, std::string > >
+ g;
+
+ modify_demo(g);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/modify_graph.expected b/src/boost/libs/graph/example/modify_graph.expected
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/libs/graph/example/modify_graph.expected
diff --git a/src/boost/libs/graph/example/neighbor_bfs.cpp b/src/boost/libs/graph/example/neighbor_bfs.cpp
new file mode 100644
index 000000000..2beb4b6e9
--- /dev/null
+++ b/src/boost/libs/graph/example/neighbor_bfs.cpp
@@ -0,0 +1,149 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+
+#include <algorithm>
+#include <vector>
+#include <utility>
+#include <iostream>
+
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/neighbor_bfs.hpp>
+#include <boost/property_map/property_map.hpp>
+
+/*
+
+ Sample Output:
+
+ 0 --> 2
+ 1 --> 1 3 4
+ 2 --> 1 3 4
+ 3 --> 1 4
+ 4 --> 0 1
+ distances: 0 2 1 2 1
+ parent[0] = 0
+ parent[1] = 2
+ parent[2] = 0
+ parent[3] = 2
+ parent[4] = 0
+
+*/
+
+using namespace boost;
+
+template < class ParentDecorator > struct print_parent
+{
+ print_parent(const ParentDecorator& p_) : p(p_) {}
+ template < class Vertex > void operator()(const Vertex& v) const
+ {
+ std::cout << "parent[" << v << "] = " << p[v] << std::endl;
+ }
+ ParentDecorator p;
+};
+
+template < class DistanceMap, class PredecessorMap, class ColorMap >
+class distance_and_pred_visitor : public neighbor_bfs_visitor<>
+{
+ typedef typename property_traits< ColorMap >::value_type ColorValue;
+ typedef color_traits< ColorValue > Color;
+
+public:
+ distance_and_pred_visitor(DistanceMap d, PredecessorMap p, ColorMap c)
+ : m_distance(d), m_predecessor(p), m_color(c)
+ {
+ }
+
+ template < class Edge, class Graph >
+ void tree_out_edge(Edge e, const Graph& g) const
+ {
+ typename graph_traits< Graph >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ put(m_distance, v, get(m_distance, u) + 1);
+ put(m_predecessor, v, u);
+ }
+ template < class Edge, class Graph >
+ void tree_in_edge(Edge e, const Graph& g) const
+ {
+ typename graph_traits< Graph >::vertex_descriptor u = source(e, g),
+ v = target(e, g);
+ put(m_distance, u, get(m_distance, v) + 1);
+ put(m_predecessor, u, v);
+ }
+
+ DistanceMap m_distance;
+ PredecessorMap m_predecessor;
+ ColorMap m_color;
+};
+
+int main(int, char*[])
+{
+ typedef adjacency_list< mapS, vecS, bidirectionalS,
+ property< vertex_color_t, default_color_type > >
+ Graph;
+
+ typedef property_map< Graph, vertex_color_t >::type ColorMap;
+
+ Graph G(5);
+ add_edge(0, 2, G);
+ add_edge(1, 1, G);
+ add_edge(1, 3, G);
+ add_edge(1, 4, G);
+ add_edge(2, 1, G);
+ add_edge(2, 3, G);
+ add_edge(2, 4, G);
+ add_edge(3, 1, G);
+ add_edge(3, 4, G);
+ add_edge(4, 0, G);
+ add_edge(4, 1, G);
+
+ typedef Graph::vertex_descriptor Vertex;
+
+ // Array to store predecessor (parent) of each vertex. This will be
+ // used as a Decorator (actually, its iterator will be).
+ std::vector< Vertex > p(num_vertices(G));
+ // VC++ version of std::vector has no ::pointer, so
+ // I use ::value_type* instead.
+ typedef std::vector< Vertex >::value_type* Piter;
+
+ // Array to store distances from the source to each vertex . We use
+ // a built-in array here just for variety. This will also be used as
+ // a Decorator.
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+ size_type d[5];
+ std::fill_n(d, 5, 0);
+
+ // The source vertex
+ Vertex s = *(vertices(G).first);
+ p[s] = s;
+ distance_and_pred_visitor< size_type*, Vertex*, ColorMap > vis(
+ d, &p[0], get(vertex_color, G));
+ neighbor_breadth_first_search(
+ G, s, visitor(vis).color_map(get(vertex_color, G)));
+
+ print_graph(G);
+
+ if (num_vertices(G) < 11)
+ {
+ std::cout << "distances: ";
+#ifdef BOOST_OLD_STREAM_ITERATORS
+ std::copy(d, d + 5, std::ostream_iterator< int, char >(std::cout, " "));
+#else
+ std::copy(d, d + 5, std::ostream_iterator< int >(std::cout, " "));
+#endif
+ std::cout << std::endl;
+
+ std::for_each(vertices(G).first, vertices(G).second,
+ print_parent< Piter >(&p[0]));
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/ordered_out_edges.cpp b/src/boost/libs/graph/example/ordered_out_edges.cpp
new file mode 100644
index 000000000..5235eb28c
--- /dev/null
+++ b/src/boost/libs/graph/example/ordered_out_edges.cpp
@@ -0,0 +1,147 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT:
+ ~~~~~~~~~~
+
+ This example appears to be broken and crashes at runtime, see
+ https://github.com/boostorg/graph/issues/149
+
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <functional>
+#include <string>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+
+/*
+ Sample output:
+
+ 0 --chandler--> 1 --joe--> 1
+ 1 --chandler--> 0 --joe--> 0 --curly--> 2 --dick--> 3 --dick--> 3
+ 2 --curly--> 1 --tom--> 4
+ 3 --dick--> 1 --dick--> 1 --harry--> 4
+ 4 --tom--> 2 --harry--> 3
+
+ name(0,1) = chandler
+
+ name(0,1) = chandler
+ name(0,1) = joe
+
+ */
+
+template < class StoredEdge > struct order_by_name
+{
+ typedef StoredEdge first_argument_type;
+ typedef StoredEdge second_argument_type;
+ typedef bool result_type;
+ bool operator()(const StoredEdge& e1, const StoredEdge& e2) const
+ {
+ // Order by target vertex, then by name.
+ // std::pair's operator< does a nice job of implementing
+ // lexicographical compare on tuples.
+ return std::make_pair(e1.get_target(), boost::get(boost::edge_name, e1))
+ < std::make_pair(e2.get_target(), boost::get(boost::edge_name, e2));
+ }
+};
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+struct ordered_set_by_nameS
+{
+};
+namespace boost
+{
+template < class ValueType >
+struct container_gen< ordered_set_by_nameS, ValueType >
+{
+ typedef std::multiset< ValueType, order_by_name< ValueType > > type;
+};
+}
+#else
+struct ordered_set_by_nameS
+{
+ template < class T > struct bind_
+ {
+ typedef std::multiset< T, order_by_name< T > > type;
+ };
+};
+namespace boost
+{
+template <> struct container_selector< ordered_set_by_nameS >
+{
+ typedef ordered_set_by_nameS type;
+};
+}
+#endif
+
+namespace boost
+{
+template <> struct parallel_edge_traits< ordered_set_by_nameS >
+{
+ typedef allow_parallel_edge_tag type;
+};
+}
+
+int main()
+{
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ std::cout << "This program requires partial specialization" << std::endl;
+#else
+ using namespace boost;
+ typedef property< edge_name_t, std::string > EdgeProperty;
+ typedef adjacency_list< ordered_set_by_nameS, vecS, undirectedS,
+ no_property, EdgeProperty >
+ graph_type;
+ graph_type g;
+
+ add_edge(0, 1, EdgeProperty("joe"), g);
+ add_edge(1, 2, EdgeProperty("curly"), g);
+ add_edge(1, 3, EdgeProperty("dick"), g);
+ add_edge(1, 3, EdgeProperty("dick"), g);
+ add_edge(2, 4, EdgeProperty("tom"), g);
+ add_edge(3, 4, EdgeProperty("harry"), g);
+ add_edge(0, 1, EdgeProperty("chandler"), g);
+
+ property_map< graph_type, vertex_index_t >::type id = get(vertex_index, g);
+ property_map< graph_type, edge_name_t >::type name = get(edge_name, g);
+
+ graph_traits< graph_type >::vertex_iterator i, end;
+ graph_traits< graph_type >::out_edge_iterator ei, edge_end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ std::cout << id[*i] << " ";
+ for (boost::tie(ei, edge_end) = out_edges(*i, g); ei != edge_end; ++ei)
+ std::cout << " --" << name[*ei] << "--> " << id[target(*ei, g)]
+ << " ";
+ std::cout << std::endl;
+ }
+ std::cout << std::endl;
+
+ bool found;
+ typedef graph_traits< graph_type > Traits;
+ Traits::edge_descriptor e;
+ Traits::out_edge_iterator e_first, e_last;
+
+ boost::tie(e, found) = edge(0, 1, g);
+ if (found)
+ std::cout << "name(0,1) = " << name[e] << std::endl;
+ else
+ std::cout << "not found" << std::endl;
+ std::cout << std::endl;
+
+ boost::tie(e_first, e_last) = edge_range(0, 1, g);
+ while (e_first != e_last)
+ std::cout << "name(0,1) = " << name[*e_first++] << std::endl;
+#endif
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/ordered_out_edges.expected b/src/boost/libs/graph/example/ordered_out_edges.expected
new file mode 100644
index 000000000..dc5e76f34
--- /dev/null
+++ b/src/boost/libs/graph/example/ordered_out_edges.expected
@@ -0,0 +1,10 @@
+0 --chandler--> 1 --joe--> 1
+1 --chandler--> 0 --joe--> 0 --curly--> 2 --dick--> 3 --dick--> 3
+2 --curly--> 1 --tom--> 4
+3 --dick--> 1 --dick--> 1 --harry--> 4
+4 --tom--> 2 --harry--> 3
+
+name(0,1) = chandler
+
+name(0,1) = chandler
+name(0,1) = joe
diff --git a/src/boost/libs/graph/example/ospf-example.cpp b/src/boost/libs/graph/example/ospf-example.cpp
new file mode 100644
index 000000000..54d30a1d5
--- /dev/null
+++ b/src/boost/libs/graph/example/ospf-example.cpp
@@ -0,0 +1,118 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <fstream> // for file I/O
+#include <boost/graph/graphviz.hpp> // for read/write_graphviz()
+#include <boost/graph/dijkstra_shortest_paths.hpp>
+#include <boost/lexical_cast.hpp>
+
+namespace boost
+{
+enum graph_color_t
+{
+ graph_color = 5556
+};
+BOOST_INSTALL_PROPERTY(graph, color);
+}
+
+int main(int argc, const char** argv)
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string >,
+ property< edge_color_t, std::string, property< edge_weight_t, int > >,
+ property< graph_color_t, std::string > >
+ g_dot_type;
+ g_dot_type g_dot;
+
+ dynamic_properties dp(ignore_other_properties);
+ dp.property("node_id", get(vertex_name, g_dot));
+ dp.property("label", get(edge_weight, g_dot));
+ dp.property("color", get(edge_color, g_dot));
+ dp.property("color",
+ ref_property_map< g_dot_type*, std::string >(
+ get_property(g_dot, graph_color)));
+ {
+ std::ifstream infile(argc >= 2 ? argv[1] : "figs/ospf-graph.dot");
+ read_graphviz(infile, g_dot, dp);
+ }
+
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ typedef graph_traits< Graph >::vertex_descriptor vertex_descriptor;
+ Graph g(num_vertices(g_dot));
+ graph_traits< g_dot_type >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g_dot); ei != ei_end; ++ei)
+ {
+ int weight = get(edge_weight, g_dot, *ei);
+ property< edge_weight_t, int > edge_property(weight);
+ add_edge(source(*ei, g_dot), target(*ei, g_dot), edge_property, g);
+ }
+
+ vertex_descriptor router_six;
+ graph_traits< g_dot_type >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g_dot); vi != vi_end; ++vi)
+ if ("RT6" == get(vertex_name, g_dot, *vi))
+ {
+ router_six = *vi;
+ break;
+ }
+
+ std::vector< vertex_descriptor > parent(num_vertices(g));
+ // All vertices start out as there own parent
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+ for (size_type p = 0; p < num_vertices(g); ++p)
+ parent[p] = p;
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ std::vector< int > distance(num_vertices(g));
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, g);
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+ dijkstra_shortest_paths(g, router_six, &parent[0], &distance[0], weightmap,
+ indexmap, std::less< int >(), closed_plus< int >(),
+ (std::numeric_limits< int >::max)(), 0, default_dijkstra_visitor());
+#else
+ dijkstra_shortest_paths(g, router_six, predecessor_map(&parent[0]));
+#endif
+
+ graph_traits< g_dot_type >::edge_descriptor e;
+ for (size_type i = 0; i < num_vertices(g); ++i)
+ if (parent[i] != i)
+ {
+ e = edge(parent[i], i, g_dot).first;
+ put(edge_color, g_dot, e, "black");
+ }
+
+ get_property(g_dot, graph_color) = "grey";
+ {
+ std::ofstream outfile(argc >= 3 ? argv[2] : "figs/ospf-sptree.dot");
+ write_graphviz_dp(outfile, g_dot, dp);
+ }
+
+ std::ofstream rtable(argc >= 4 ? argv[3] : "routing-table.dat");
+ rtable << "Dest Next Hop Total Cost" << std::endl;
+ for (boost::tie(vi, vi_end) = vertices(g_dot); vi != vi_end; ++vi)
+ if (parent[*vi] != *vi)
+ {
+ rtable << get(vertex_name, g_dot, *vi) << " ";
+ vertex_descriptor v = *vi, child;
+ int path_cost = 0;
+ property_map< Graph, edge_weight_t >::type weight_map
+ = get(edge_weight, g);
+ do
+ {
+ path_cost += get(weight_map, edge(parent[v], v, g).first);
+ child = v;
+ v = parent[v];
+ } while (v != parent[v]);
+ rtable << get(vertex_name, g_dot, child) << " ";
+ rtable << path_cost << std::endl;
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/parallel-compile-time.cpp b/src/boost/libs/graph/example/parallel-compile-time.cpp
new file mode 100644
index 000000000..22c6e4795
--- /dev/null
+++ b/src/boost/libs/graph/example/parallel-compile-time.cpp
@@ -0,0 +1,199 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <numeric>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/property_iter_range.hpp>
+#include <boost/graph/depth_first_search.hpp> // for default_dfs_visitor
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+namespace boost
+{
+enum vertex_compile_cost_t
+{
+ vertex_compile_cost
+};
+BOOST_INSTALL_PROPERTY(vertex, compile_cost);
+}
+
+using namespace boost;
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ listS, // Store vertex set in a std::list
+ directedS, // The file dependency graph is directed
+ // vertex properties
+ property< vertex_name_t, std::string,
+ property< vertex_compile_cost_t, float,
+ property< vertex_distance_t, float,
+ property< vertex_color_t, default_color_type > > > >,
+ // an edge property
+ property< edge_weight_t, float > >
+ file_dep_graph2;
+
+typedef graph_traits< file_dep_graph2 >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph2 >::edge_descriptor edge_t;
+
+template < typename Graph, typename ColorMap, typename Visitor >
+void dfs_v2(const Graph& g, typename graph_traits< Graph >::vertex_descriptor u,
+ ColorMap color, Visitor vis)
+{
+ typedef typename property_traits< ColorMap >::value_type color_type;
+ typedef color_traits< color_type > ColorT;
+ color[u] = ColorT::gray();
+ vis.discover_vertex(u, g);
+ typename graph_traits< Graph >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei)
+ if (color[target(*ei, g)] == ColorT::white())
+ {
+ vis.tree_edge(*ei, g);
+ dfs_v2(g, target(*ei, g), color, vis);
+ }
+ else if (color[target(*ei, g)] == ColorT::gray())
+ vis.back_edge(*ei, g);
+ else
+ vis.forward_or_cross_edge(*ei, g);
+ color[u] = ColorT::black();
+ vis.finish_vertex(u, g);
+}
+
+template < typename Graph, typename Visitor, typename ColorMap >
+void generic_dfs_v2(const Graph& g, Visitor vis, ColorMap color)
+{
+ typedef typename property_traits< ColorMap >::value_type ColorValue;
+ typedef color_traits< ColorValue > ColorT;
+ typename graph_traits< Graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ color[*vi] = ColorT::white();
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (color[*vi] == ColorT::white())
+ dfs_v2(g, *vi, color, vis);
+}
+
+template < typename OutputIterator >
+struct topo_visitor : public default_dfs_visitor
+{
+ topo_visitor(OutputIterator& order) : topo_order(order) {}
+ template < typename Graph >
+ void finish_vertex(
+ typename graph_traits< Graph >::vertex_descriptor u, const Graph&)
+ {
+ *topo_order++ = u;
+ }
+ OutputIterator& topo_order;
+};
+
+template < typename Graph, typename OutputIterator, typename ColorMap >
+void topo_sort(const Graph& g, OutputIterator topo_order, ColorMap color)
+{
+ topo_visitor< OutputIterator > vis(topo_order);
+ generic_dfs_v2(g, vis, color);
+}
+
+typedef property_map< file_dep_graph2, vertex_name_t >::type name_map_t;
+typedef property_map< file_dep_graph2, vertex_compile_cost_t >::type
+ compile_cost_map_t;
+typedef property_map< file_dep_graph2, vertex_distance_t >::type distance_map_t;
+typedef property_map< file_dep_graph2, vertex_color_t >::type color_map_t;
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph2 >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ file_dep_graph2 g;
+ typedef graph_traits< file_dep_graph2 >::vertex_descriptor vertex_t;
+ std::vector< vertex_t > id2vertex;
+ for (std::size_t v = 0; v < n_vertices; ++v)
+ id2vertex.push_back(add_vertex(g));
+ while (input_begin != input_end)
+ {
+ size_type i, j;
+ boost::tie(i, j) = *input_begin++;
+ add_edge(id2vertex[i], id2vertex[j], g);
+ }
+#else
+ file_dep_graph2 g(input_begin, input_end, n_vertices);
+#endif
+
+ name_map_t name_map = get(vertex_name, g);
+ compile_cost_map_t compile_cost_map = get(vertex_compile_cost, g);
+ distance_map_t distance_map = get(vertex_distance, g);
+ color_map_t color_map = get(vertex_color, g);
+
+ {
+ std::ifstream name_in(
+ argc >= 3 ? argv[2] : "makefile-target-names.dat");
+ std::ifstream compile_cost_in(
+ argc >= 4 ? argv[3] : "target-compile-costs.dat");
+ graph_traits< file_dep_graph2 >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ name_in >> name_map[*vi];
+ compile_cost_in >> compile_cost_map[*vi];
+ }
+ }
+ std::vector< vertex_t > topo_order(num_vertices(g));
+ topo_sort(g, topo_order.rbegin(), color_map);
+
+ graph_traits< file_dep_graph2 >::vertex_iterator i, i_end;
+ graph_traits< file_dep_graph2 >::adjacency_iterator vi, vi_end;
+
+ // find source vertices with zero in-degree by marking all vertices with
+ // incoming edges
+ for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i)
+ color_map[*i] = white_color;
+ for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i)
+ for (boost::tie(vi, vi_end) = adjacent_vertices(*i, g); vi != vi_end;
+ ++vi)
+ color_map[*vi] = black_color;
+
+ // initialize distances to zero, or for source vertices, to the compile cost
+ for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i)
+ if (color_map[*i] == white_color)
+ distance_map[*i] = compile_cost_map[*i];
+ else
+ distance_map[*i] = 0;
+
+ std::vector< vertex_t >::iterator ui;
+ for (ui = topo_order.begin(); ui != topo_order.end(); ++ui)
+ {
+ vertex_t u = *ui;
+ for (boost::tie(vi, vi_end) = adjacent_vertices(u, g); vi != vi_end;
+ ++vi)
+ if (distance_map[*vi] < distance_map[u] + compile_cost_map[*vi])
+ distance_map[*vi] = distance_map[u] + compile_cost_map[*vi];
+ }
+
+ graph_property_iter_range< file_dep_graph2, vertex_distance_t >::iterator
+ ci,
+ ci_end;
+ boost::tie(ci, ci_end) = get_property_iter_range(g, vertex_distance);
+ std::cout << "total (parallel) compile time: "
+ << *std::max_element(ci, ci_end) << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/planar_face_traversal.cpp b/src/boost/libs/graph/example/planar_face_traversal.cpp
new file mode 100644
index 000000000..f67e34c0d
--- /dev/null
+++ b/src/boost/libs/graph/example/planar_face_traversal.cpp
@@ -0,0 +1,99 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/ref.hpp>
+#include <vector>
+
+#include <boost/graph/planar_face_traversal.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+using namespace boost;
+
+// Some planar face traversal visitors that will
+// print the vertices and edges on the faces
+
+struct output_visitor : public planar_face_traversal_visitor
+{
+ void begin_face() { std::cout << "New face: "; }
+ void end_face() { std::cout << std::endl; }
+};
+
+struct vertex_output_visitor : public output_visitor
+{
+ template < typename Vertex > void next_vertex(Vertex v)
+ {
+ std::cout << v << " ";
+ }
+};
+
+struct edge_output_visitor : public output_visitor
+{
+ template < typename Edge > void next_edge(Edge e) { std::cout << e << " "; }
+};
+
+int main(int argc, char** argv)
+{
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int >, property< edge_index_t, int > >
+ graph;
+
+ // Create a graph - this is a biconnected, 3 x 3 grid.
+ // It should have four small (four vertex/four edge) faces and
+ // one large face that contains all but the interior vertex
+ graph g(9);
+
+ add_edge(0, 1, g);
+ add_edge(1, 2, g);
+
+ add_edge(3, 4, g);
+ add_edge(4, 5, g);
+
+ add_edge(6, 7, g);
+ add_edge(7, 8, g);
+
+ add_edge(0, 3, g);
+ add_edge(3, 6, g);
+
+ add_edge(1, 4, g);
+ add_edge(4, 7, g);
+
+ add_edge(2, 5, g);
+ add_edge(5, 8, g);
+
+ // Initialize the interior edge index
+ property_map< graph, edge_index_t >::type e_index = get(edge_index, g);
+ graph_traits< graph >::edges_size_type edge_count = 0;
+ graph_traits< graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ put(e_index, *ei, edge_count++);
+
+ // Test for planarity - we know it is planar, we just want to
+ // compute the planar embedding as a side-effect
+ typedef std::vector< graph_traits< graph >::edge_descriptor > vec_t;
+ std::vector< vec_t > embedding(num_vertices(g));
+ if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = &embedding[0]))
+ std::cout << "Input graph is planar" << std::endl;
+ else
+ std::cout << "Input graph is not planar" << std::endl;
+
+ std::cout << std::endl << "Vertices on the faces: " << std::endl;
+ vertex_output_visitor v_vis;
+ planar_face_traversal(g, &embedding[0], v_vis);
+
+ std::cout << std::endl << "Edges on the faces: " << std::endl;
+ edge_output_visitor e_vis;
+ planar_face_traversal(g, &embedding[0], e_vis);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/prim-example.cpp b/src/boost/libs/graph/example/prim-example.cpp
new file mode 100644
index 000000000..d9a78758a
--- /dev/null
+++ b/src/boost/libs/graph/example/prim-example.cpp
@@ -0,0 +1,56 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/prim_minimum_spanning_tree.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_distance_t, int >, property< edge_weight_t, int > >
+ Graph;
+ typedef std::pair< int, int > E;
+ const int num_nodes = 5;
+ E edges[]
+ = { E(0, 2), E(1, 3), E(1, 4), E(2, 1), E(2, 3), E(3, 4), E(4, 0) };
+ int weights[] = { 1, 1, 2, 7, 3, 1, 1 };
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph g(num_nodes);
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, g);
+ for (std::size_t j = 0; j < sizeof(edges) / sizeof(E); ++j)
+ {
+ graph_traits< Graph >::edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted) = add_edge(edges[j].first, edges[j].second, g);
+ weightmap[e] = weights[j];
+ }
+#else
+ Graph g(edges, edges + sizeof(edges) / sizeof(E), weights, num_nodes);
+#endif
+ std::vector< graph_traits< Graph >::vertex_descriptor > p(num_vertices(g));
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ property_map< Graph, vertex_distance_t >::type distance
+ = get(vertex_distance, g);
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+ prim_minimum_spanning_tree(g, *vertices(g).first, &p[0], distance,
+ weightmap, indexmap, default_dijkstra_visitor());
+#else
+ prim_minimum_spanning_tree(g, &p[0]);
+#endif
+
+ for (std::size_t i = 0; i != p.size(); ++i)
+ if (p[i] != i)
+ std::cout << "parent[" << i << "] = " << p[i] << std::endl;
+ else
+ std::cout << "parent[" << i << "] = no parent" << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/prim-telephone.cpp b/src/boost/libs/graph/example/prim-telephone.cpp
new file mode 100644
index 000000000..1f256db06
--- /dev/null
+++ b/src/boost/libs/graph/example/prim-telephone.cpp
@@ -0,0 +1,72 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <boost/lexical_cast.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/prim_minimum_spanning_tree.hpp>
+int main()
+{
+ using namespace boost;
+ GraphvizGraph g_dot;
+ read_graphviz("figs/telephone-network.dot", g_dot);
+
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+ Graph g(num_vertices(g_dot));
+ property_map< GraphvizGraph, edge_attribute_t >::type edge_attr_map
+ = get(edge_attribute, g_dot);
+ graph_traits< GraphvizGraph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g_dot); ei != ei_end; ++ei)
+ {
+ int weight = lexical_cast< int >(edge_attr_map[*ei]["label"]);
+ property< edge_weight_t, int > edge_property(weight);
+ add_edge(source(*ei, g_dot), target(*ei, g_dot), edge_property, g);
+ }
+
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ std::vector< Vertex > parent(num_vertices(g));
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+ std::vector< std::size_t > distance(num_vertices(g));
+ prim_minimum_spanning_tree(g, *vertices(g).first, &parent[0], &distance[0],
+ weight, indexmap, default_dijkstra_visitor());
+#else
+ prim_minimum_spanning_tree(g, &parent[0]);
+#endif
+
+ int total_weight = 0;
+ for (int v = 0; v < num_vertices(g); ++v)
+ if (parent[v] != v)
+ total_weight += get(weight, edge(parent[v], v, g).first);
+ std::cout << "total weight: " << total_weight << std::endl;
+
+ for (int u = 0; u < num_vertices(g); ++u)
+ if (parent[u] != u)
+ edge_attr_map[edge(parent[u], u, g_dot).first]["color"] = "black";
+ std::ofstream out("figs/telephone-mst-prim.dot");
+ graph_property< GraphvizGraph, graph_edge_attribute_t >::type&
+ graph_edge_attr_map
+ = get_property(g_dot, graph_edge_attribute);
+ graph_edge_attr_map["color"] = "gray";
+ write_graphviz(out, g_dot);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/prim.expected b/src/boost/libs/graph/example/prim.expected
new file mode 100644
index 000000000..0a51ff818
--- /dev/null
+++ b/src/boost/libs/graph/example/prim.expected
@@ -0,0 +1,9 @@
+parent[a] = a
+parent[b] = a
+parent[c] = f
+parent[d] = c
+parent[e] = d
+parent[f] = g
+parent[g] = h
+parent[h] = a
+parent[i] = c
diff --git a/src/boost/libs/graph/example/print-adjacent-vertices.cpp b/src/boost/libs/graph/example/print-adjacent-vertices.cpp
new file mode 100644
index 000000000..22b0ba656
--- /dev/null
+++ b/src/boost/libs/graph/example/print-adjacent-vertices.cpp
@@ -0,0 +1,118 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+template < typename Graph, typename VertexNameMap >
+void output_adjacent_vertices(std::ostream& out,
+ typename graph_traits< Graph >::vertex_descriptor u, const Graph& g,
+ VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::adjacency_iterator vi, vi_end;
+ out << get(name_map, u) << " -> { ";
+ for (boost::tie(vi, vi_end) = adjacent_vertices(u, g); vi != vi_end; ++vi)
+ out << get(name_map, *vi) << " ";
+ out << "}" << std::endl;
+}
+
+template < typename NameMap > class name_equals_t
+{
+public:
+ name_equals_t(const std::string& n, NameMap map)
+ : m_name(n), m_name_map(map)
+ {
+ }
+ template < typename Vertex > bool operator()(Vertex u) const
+ {
+ return get(m_name_map, u) == m_name;
+ }
+
+private:
+ std::string m_name;
+ NameMap m_name_map;
+};
+
+// object generator function
+template < typename NameMap >
+inline name_equals_t< NameMap > name_equals(
+ const std::string& str, NameMap name)
+{
+ return name_equals_t< NameMap >(str, name);
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ graph_traits< graph_type >::vertex_iterator i, end;
+ boost::tie(i, end) = vertices(g);
+ i = std::find_if(i, end, name_equals("dax.h", get(vertex_name, g)));
+ output_adjacent_vertices(std::cout, *i, g, get(vertex_name, g));
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/print-edges.cpp b/src/boost/libs/graph/example/print-edges.cpp
new file mode 100644
index 000000000..20d4e1900
--- /dev/null
+++ b/src/boost/libs/graph/example/print-edges.cpp
@@ -0,0 +1,89 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+template < typename Graph, typename VertexNameMap >
+void print_dependencies(
+ std::ostream& out, const Graph& g, VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ out << get(name_map, source(*ei, g)) << " -$>$ "
+ << get(name_map, target(*ei, g)) << std::endl;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ print_dependencies(std::cout, g, get(vertex_name, g));
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/print-in-edges.cpp b/src/boost/libs/graph/example/print-in-edges.cpp
new file mode 100644
index 000000000..f45ecde1a
--- /dev/null
+++ b/src/boost/libs/graph/example/print-in-edges.cpp
@@ -0,0 +1,117 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+template < typename Graph, typename VertexNameMap >
+void output_in_edges(std::ostream& out, const Graph& g,
+ typename graph_traits< Graph >::vertex_descriptor v, VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::in_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = in_edges(v, g); ei != ei_end; ++ei)
+ out << get(name_map, source(*ei, g)) << " -> "
+ << get(name_map, target(*ei, g)) << std::endl;
+}
+
+template < typename NameMap > class name_equals_t
+{
+public:
+ name_equals_t(const std::string& n, NameMap map)
+ : m_name(n), m_name_map(map)
+ {
+ }
+ template < typename Vertex > bool operator()(Vertex u) const
+ {
+ return get(m_name_map, u) == m_name;
+ }
+
+private:
+ std::string m_name;
+ NameMap m_name_map;
+};
+
+// object generator function
+template < typename NameMap >
+inline name_equals_t< NameMap > name_equals(
+ const std::string& str, NameMap name)
+{
+ return name_equals_t< NameMap >(str, name);
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ bidirectionalS, // The graph is directed, with both out-edges and
+ // in-edges
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ graph_traits< graph_type >::vertex_iterator i, end;
+ boost::tie(i, end) = vertices(g);
+ i = std::find_if(i, end, name_equals("libzigzag.a", get(vertex_name, g)));
+ output_in_edges(std::cout, g, *i, get(vertex_name, g));
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/print-out-edges.cpp b/src/boost/libs/graph/example/print-out-edges.cpp
new file mode 100644
index 000000000..8c97205d2
--- /dev/null
+++ b/src/boost/libs/graph/example/print-out-edges.cpp
@@ -0,0 +1,118 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+template < typename Graph, typename VertexNameMap >
+void output_out_edges(std::ostream& out, const Graph& g,
+ typename graph_traits< Graph >::vertex_descriptor u, VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei)
+ out << get(name_map, source(*ei, g)) << " -> "
+ << get(name_map, target(*ei, g)) << std::endl;
+}
+
+template < typename NameMap > class name_equals_t
+{
+public:
+ name_equals_t(const std::string& n, NameMap map)
+ : m_name(n), m_name_map(map)
+ {
+ }
+ template < typename Vertex > bool operator()(Vertex u) const
+ {
+ return get(m_name_map, u) == m_name;
+ }
+
+private:
+ std::string m_name;
+ NameMap m_name_map;
+};
+
+// object generator function
+template < typename NameMap >
+inline name_equals_t< NameMap > name_equals(
+ const std::string& str, NameMap name)
+{
+ return name_equals_t< NameMap >(str, name);
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ graph_traits< graph_type >::vertex_iterator i, end;
+ boost::tie(i, end) = vertices(g);
+ typedef property_map< graph_type, vertex_name_t >::type name_map_t;
+ name_equals_t< name_map_t > predicate("dax.h", get(vertex_name, g));
+ i = std::find_if(i, end, predicate);
+ output_out_edges(std::cout, g, *i, get(vertex_name, g));
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/prism_3_2.graph b/src/boost/libs/graph/example/prism_3_2.graph
new file mode 100644
index 000000000..dcb84c862
--- /dev/null
+++ b/src/boost/libs/graph/example/prism_3_2.graph
@@ -0,0 +1,16 @@
+0,1
+1,2
+2,0
+
+3,4
+4,5
+5,3
+
+0,3
+3,0
+
+1,4
+4,1
+
+2,5
+5,2 \ No newline at end of file
diff --git a/src/boost/libs/graph/example/prob_network.graph b/src/boost/libs/graph/example/prob_network.graph
new file mode 100644
index 000000000..c5cf790bc
--- /dev/null
+++ b/src/boost/libs/graph/example/prob_network.graph
@@ -0,0 +1,18 @@
+myspace,myspace,.5
+myspace,digg,.5
+blogger,digg,.33
+blogger,slashdot,.33
+blogger,wikipedia,.33
+digg,slashdot,.33
+digg,wikipedia,.33
+digg,digg,.33
+blogspot,slashdot,.5
+blogspot,wikipedia,.5
+slashdot,bbc,.5
+slashdot,wikipedia,.5
+bbc,wikipedia,.5
+bbc,bbc,.5
+wikipedia,wikipedia,.25
+wikipedia,blogger,.25
+wikipedia,myspace,.25
+wikipedia,blogspot,.25 \ No newline at end of file
diff --git a/src/boost/libs/graph/example/property-map-traits-eg.cpp b/src/boost/libs/graph/example/property-map-traits-eg.cpp
new file mode 100644
index 000000000..3df924324
--- /dev/null
+++ b/src/boost/libs/graph/example/property-map-traits-eg.cpp
@@ -0,0 +1,24 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< listS, listS, directedS,
+ property< vertex_name_t, std::string > >
+ graph_t;
+ graph_t g;
+ graph_traits< graph_t >::vertex_descriptor u = add_vertex(g);
+ property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, g);
+ name_map[u] = "Joe";
+ std::cout << name_map[u] << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/property_iterator.cpp b/src/boost/libs/graph/example/property_iterator.cpp
new file mode 100644
index 000000000..e95619b33
--- /dev/null
+++ b/src/boost/libs/graph/example/property_iterator.cpp
@@ -0,0 +1,129 @@
+
+// (C) Copyright Francois Faure, iMAGIS-GRAVIR / UJF, 2001.
+
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Revision History:
+// 03 May 2001 Jeremy Siek
+// Moved property iterator code to headers.
+// 02 May 2001 Francois Faure
+// Initial version.
+
+#include <boost/graph/adjacency_list_io.hpp>
+#include <boost/graph/property_iter_range.hpp>
+#include <fstream>
+#include <algorithm>
+
+using namespace boost;
+
+//======== vertex properties
+struct toto_t
+{
+ enum
+ {
+ num = 23063
+ };
+ typedef vertex_property_tag kind;
+};
+typedef property< toto_t, double > Toto;
+
+struct radius_t
+{
+ enum
+ {
+ num = 23062
+ };
+ typedef vertex_property_tag kind;
+};
+typedef property< radius_t, double, Toto > Radius;
+
+struct mass_t
+{
+ enum
+ {
+ num = 23061
+ };
+ typedef vertex_property_tag kind;
+};
+typedef property< mass_t, int, Radius > Mass;
+
+//====== edge properties
+struct stiff_t
+{
+ enum
+ {
+ num = 23064
+ };
+ typedef edge_property_tag kind;
+};
+typedef property< stiff_t, double > Stiff;
+
+//===== graph type
+typedef Mass VertexProperty;
+typedef Stiff EdgeProperty;
+typedef adjacency_list< vecS, setS, bidirectionalS, VertexProperty,
+ EdgeProperty >
+ Graph;
+
+//===== utilities
+struct Print
+{
+ template < class T > Print& operator()(const T& t)
+ {
+ std::cout << t << " ";
+ return (*this);
+ }
+};
+
+template < class T > struct Set
+{
+ T value;
+
+ Set(const T& t) : value(t) {}
+
+ Set& operator()(T& t)
+ {
+ t = value;
+ return (*this);
+ }
+};
+
+//===== program
+int main(int argc, char* argv[])
+{
+ if (argc < 2)
+ {
+ std::cerr << "args: file" << std::endl;
+ return EXIT_FAILURE;
+ }
+
+ std::ifstream readFile(argv[1]);
+
+ Graph graph;
+ readFile >> read(graph);
+ std::cout << write(graph);
+
+ std::cout << "radii:" << std::endl;
+ graph_property_iter_range< Graph, radius_t >::type seqRadius
+ = get_property_iter_range(graph, radius_t());
+ std::for_each(seqRadius.first, seqRadius.second, Print());
+ std::cout << std::endl;
+
+ std::cout << "stiff:" << std::endl;
+ graph_property_iter_range< Graph, stiff_t >::type seqStiff
+ = get_property_iter_range(graph, stiff_t());
+ std::for_each(seqStiff.first, seqStiff.second, Print());
+ std::cout << std::endl;
+
+ seqStiff = get_property_iter_range(graph, stiff_t());
+ std::for_each(seqStiff.first, seqStiff.second, Set< double >(2.4));
+
+ std::cout << "new stiff:" << std::endl;
+ seqStiff = get_property_iter_range(graph, stiff_t());
+ std::for_each(seqStiff.first, seqStiff.second, Print());
+ std::cout << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/push-relabel-eg.cpp b/src/boost/libs/graph/example/push-relabel-eg.cpp
new file mode 100644
index 000000000..04a6fa485
--- /dev/null
+++ b/src/boost/libs/graph/example/push-relabel-eg.cpp
@@ -0,0 +1,87 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/push_relabel_max_flow.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/read_dimacs.hpp>
+
+// Use a DIMACS network flow file as stdin.
+// push-relabel-eg < max_flow.dat
+//
+// Sample output:
+// c The total flow:
+// s 13
+//
+// c flow values:
+// f 0 6 3
+// f 0 1 0
+// f 0 2 10
+// f 1 5 1
+// f 1 0 0
+// f 1 3 0
+// f 2 4 4
+// f 2 3 6
+// f 2 0 0
+// f 3 7 5
+// f 3 2 0
+// f 3 1 1
+// f 4 5 4
+// f 4 6 0
+// f 5 4 0
+// f 5 7 5
+// f 6 7 3
+// f 6 4 0
+// f 7 6 0
+// f 7 5 0
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_name_t, std::string >,
+ property< edge_capacity_t, long,
+ property< edge_residual_capacity_t, long,
+ property< edge_reverse_t, Traits::edge_descriptor > > > >
+ Graph;
+ Graph g;
+
+ property_map< Graph, edge_capacity_t >::type capacity
+ = get(edge_capacity, g);
+ property_map< Graph, edge_residual_capacity_t >::type residual_capacity
+ = get(edge_residual_capacity, g);
+ property_map< Graph, edge_reverse_t >::type rev = get(edge_reverse, g);
+ Traits::vertex_descriptor s, t;
+ read_dimacs_max_flow(g, capacity, rev, s, t);
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+ long flow = push_relabel_max_flow(
+ g, s, t, capacity, residual_capacity, rev, indexmap);
+#else
+ long flow = push_relabel_max_flow(g, s, t);
+#endif
+
+ std::cout << "c The total flow:" << std::endl;
+ std::cout << "s " << flow << std::endl << std::endl;
+ std::cout << "c flow values:" << std::endl;
+ graph_traits< Graph >::vertex_iterator u_iter, u_end;
+ graph_traits< Graph >::out_edge_iterator ei, e_end;
+ for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
+ for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
+ if (capacity[*ei] > 0)
+ std::cout << "f " << *u_iter << " " << target(*ei, g) << " "
+ << (capacity[*ei] - residual_capacity[*ei])
+ << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/put-get-helper-eg.cpp b/src/boost/libs/graph/example/put-get-helper-eg.cpp
new file mode 100644
index 000000000..ae736ba10
--- /dev/null
+++ b/src/boost/libs/graph/example/put-get-helper-eg.cpp
@@ -0,0 +1,60 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <vector>
+#include <string>
+#include <boost/property_map/property_map.hpp>
+#include <boost/concept/assert.hpp>
+
+#ifdef BOOST_NO_STD_ITERATOR_TRAITS
+#error This examples requires a compiler that provides a working std::iterator_traits
+#endif
+
+namespace foo
+{
+using namespace boost;
+template < class RandomAccessIterator, class IndexMap >
+class iterator_property_map
+: public boost::put_get_helper<
+ typename std::iterator_traits< RandomAccessIterator >::reference,
+ iterator_property_map< RandomAccessIterator, IndexMap > >
+{
+public:
+ typedef std::ptrdiff_t key_type;
+ typedef typename std::iterator_traits< RandomAccessIterator >::value_type
+ value_type;
+ typedef typename std::iterator_traits< RandomAccessIterator >::reference
+ reference;
+ typedef boost::lvalue_property_map_tag category;
+
+ iterator_property_map(RandomAccessIterator cc = RandomAccessIterator(),
+ const IndexMap& _id = IndexMap())
+ : iter(cc), index(_id)
+ {
+ }
+ reference operator[](std::ptrdiff_t v) const
+ {
+ return *(iter + get(index, v));
+ }
+
+protected:
+ RandomAccessIterator iter;
+ IndexMap index;
+};
+
+}
+
+int main()
+{
+ typedef std::vector< std::string > vec_t;
+ typedef foo::iterator_property_map< vec_t::iterator,
+ boost::identity_property_map >
+ pmap_t;
+ using namespace boost;
+ BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept< pmap_t, int >));
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/quick-tour.cpp b/src/boost/libs/graph/example/quick-tour.cpp
new file mode 100644
index 000000000..8d79b72b7
--- /dev/null
+++ b/src/boost/libs/graph/example/quick-tour.cpp
@@ -0,0 +1,105 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename VertexDescriptor, typename VertexNameMap >
+void print_vertex_name(VertexDescriptor v, VertexNameMap name_map)
+{
+ std::cout << get(name_map, v);
+}
+
+template < typename Graph, typename TransDelayMap, typename VertexNameMap >
+void print_trans_delay(typename graph_traits< Graph >::edge_descriptor e,
+ const Graph& g, TransDelayMap delay_map, VertexNameMap name_map)
+{
+ std::cout << "trans-delay(" << get(name_map, source(e, g)) << ","
+ << get(name_map, target(e, g)) << ") = " << get(delay_map, e);
+}
+
+template < typename Graph, typename VertexNameMap >
+void print_vertex_names(const Graph& g, VertexNameMap name_map)
+{
+ std::cout << "vertices(g) = { ";
+ typedef typename graph_traits< Graph >::vertex_iterator iter_t;
+ for (std::pair< iter_t, iter_t > p = vertices(g); p.first != p.second;
+ ++p.first)
+ {
+ print_vertex_name(*p.first, name_map);
+ std::cout << ' ';
+ }
+ std::cout << "}" << std::endl;
+}
+
+template < typename Graph, typename TransDelayMap, typename VertexNameMap >
+void print_trans_delays(
+ const Graph& g, TransDelayMap trans_delay_map, VertexNameMap name_map)
+{
+ typename graph_traits< Graph >::edge_iterator first, last;
+ for (boost::tie(first, last) = edges(g); first != last; ++first)
+ {
+ print_trans_delay(*first, g, trans_delay_map, name_map);
+ std::cout << std::endl;
+ }
+}
+
+template < typename Graph, typename VertexNameMap, typename TransDelayMap >
+void build_router_network(
+ Graph& g, VertexNameMap name_map, TransDelayMap delay_map)
+{
+ typename graph_traits< Graph >::vertex_descriptor a, b, c, d, e;
+ a = add_vertex(g);
+ name_map[a] = 'a';
+ b = add_vertex(g);
+ name_map[b] = 'b';
+ c = add_vertex(g);
+ name_map[c] = 'c';
+ d = add_vertex(g);
+ name_map[d] = 'd';
+ e = add_vertex(g);
+ name_map[e] = 'e';
+
+ typename graph_traits< Graph >::edge_descriptor ed;
+ bool inserted;
+
+ boost::tie(ed, inserted) = add_edge(a, b, g);
+ delay_map[ed] = 1.2;
+ boost::tie(ed, inserted) = add_edge(a, d, g);
+ delay_map[ed] = 4.5;
+ boost::tie(ed, inserted) = add_edge(b, d, g);
+ delay_map[ed] = 1.8;
+ boost::tie(ed, inserted) = add_edge(c, a, g);
+ delay_map[ed] = 2.6;
+ boost::tie(ed, inserted) = add_edge(c, e, g);
+ delay_map[ed] = 5.2;
+ boost::tie(ed, inserted) = add_edge(d, c, g);
+ delay_map[ed] = 0.4;
+ boost::tie(ed, inserted) = add_edge(d, e, g);
+ delay_map[ed] = 3.3;
+}
+
+int main()
+{
+ typedef adjacency_list< listS, listS, directedS,
+ property< vertex_name_t, char >, property< edge_weight_t, double > >
+ graph_t;
+ graph_t g;
+
+ property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, g);
+ property_map< graph_t, edge_weight_t >::type delay_map
+ = get(edge_weight, g);
+
+ build_router_network(g, name_map, delay_map);
+ print_vertex_names(g, name_map);
+ print_trans_delays(g, delay_map, name_map);
+}
diff --git a/src/boost/libs/graph/example/quick_tour.cpp b/src/boost/libs/graph/example/quick_tour.cpp
new file mode 100644
index 000000000..25d1f5e11
--- /dev/null
+++ b/src/boost/libs/graph/example/quick_tour.cpp
@@ -0,0 +1,156 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream> // for std::cout
+#include <utility> // for std::pair
+#include <algorithm> // for std::for_each
+#include <boost/utility.hpp> // for boost::tie
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graphviz.hpp>
+
+using namespace boost;
+
+template < class Graph > struct exercise_vertex
+{
+ exercise_vertex(Graph& g_, const char name_[]) : g(g_), name(name_) {}
+ typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
+ void operator()(const Vertex& v) const
+ {
+ using namespace boost;
+ typename property_map< Graph, vertex_index_t >::type vertex_id
+ = get(vertex_index, g);
+ std::cout << "vertex: " << name[get(vertex_id, v)] << std::endl;
+
+ // Write out the outgoing edges
+ std::cout << "\tout-edges: ";
+ typename graph_traits< Graph >::out_edge_iterator out_i, out_end;
+ typename graph_traits< Graph >::edge_descriptor e;
+ for (boost::tie(out_i, out_end) = out_edges(v, g); out_i != out_end;
+ ++out_i)
+ {
+ e = *out_i;
+ Vertex src = source(e, g), targ = target(e, g);
+ std::cout << "(" << name[get(vertex_id, src)] << ","
+ << name[get(vertex_id, targ)] << ") ";
+ }
+ std::cout << std::endl;
+
+ // Write out the incoming edges
+ std::cout << "\tin-edges: ";
+ typename graph_traits< Graph >::in_edge_iterator in_i, in_end;
+ for (boost::tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i)
+ {
+ e = *in_i;
+ Vertex src = source(e, g), targ = target(e, g);
+ std::cout << "(" << name[get(vertex_id, src)] << ","
+ << name[get(vertex_id, targ)] << ") ";
+ }
+ std::cout << std::endl;
+
+ // Write out all adjacent vertices
+ std::cout << "\tadjacent vertices: ";
+ typename graph_traits< Graph >::adjacency_iterator ai, ai_end;
+ for (boost::tie(ai, ai_end) = adjacent_vertices(v, g); ai != ai_end;
+ ++ai)
+ std::cout << name[get(vertex_id, *ai)] << " ";
+ std::cout << std::endl;
+ }
+ Graph& g;
+ const char* name;
+};
+
+int main(int, char*[])
+{
+ // create a typedef for the Graph type
+ typedef adjacency_list< vecS, vecS, bidirectionalS, no_property,
+ property< edge_weight_t, float > >
+ Graph;
+
+ // Make convenient labels for the vertices
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ N
+ };
+ const int num_vertices = N;
+ const char name[] = "ABCDE";
+
+ // writing out the edges in the graph
+ typedef std::pair< int, int > Edge;
+ Edge edge_array[] = {
+ Edge(A, B),
+ Edge(A, D),
+ Edge(C, A),
+ Edge(D, C),
+ Edge(C, E),
+ Edge(B, D),
+ Edge(D, E),
+ };
+ const int num_edges = sizeof(edge_array) / sizeof(edge_array[0]);
+
+ // average transmission delay (in milliseconds) for each connection
+ float transmission_delay[] = { 1.2, 4.5, 2.6, 0.4, 5.2, 1.8, 3.3, 9.1 };
+
+ // declare a graph object, adding the edges and edge properties
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ Graph g(num_vertices);
+ property_map< Graph, edge_weight_t >::type weightmap = get(edge_weight, g);
+ for (std::size_t j = 0; j < num_edges; ++j)
+ {
+ graph_traits< Graph >::edge_descriptor e;
+ bool inserted;
+ boost::tie(e, inserted)
+ = add_edge(edge_array[j].first, edge_array[j].second, g);
+ weightmap[e] = transmission_delay[j];
+ }
+#else
+ Graph g(
+ edge_array, edge_array + num_edges, transmission_delay, num_vertices);
+#endif
+
+ boost::property_map< Graph, vertex_index_t >::type vertex_id
+ = get(vertex_index, g);
+ boost::property_map< Graph, edge_weight_t >::type trans_delay
+ = get(edge_weight, g);
+
+ std::cout << "vertices(g) = ";
+ typedef graph_traits< Graph >::vertex_iterator vertex_iter;
+ std::pair< vertex_iter, vertex_iter > vp;
+ for (vp = vertices(g); vp.first != vp.second; ++vp.first)
+ std::cout << name[get(vertex_id, *vp.first)] << " ";
+ std::cout << std::endl;
+
+ std::cout << "edges(g) = ";
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ std::cout << "(" << name[get(vertex_id, source(*ei, g))] << ","
+ << name[get(vertex_id, target(*ei, g))] << ") ";
+ std::cout << std::endl;
+
+ std::for_each(vertices(g).first, vertices(g).second,
+ exercise_vertex< Graph >(g, name));
+
+ std::map< std::string, std::string > graph_attr, vertex_attr, edge_attr;
+ graph_attr["size"] = "3,3";
+ graph_attr["rankdir"] = "LR";
+ graph_attr["ratio"] = "fill";
+ vertex_attr["shape"] = "circle";
+
+ boost::write_graphviz(std::cout, g, make_label_writer(name),
+ make_label_writer(trans_delay),
+ make_graph_attributes_writer(graph_attr, vertex_attr, edge_attr));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/quick_tour.expected b/src/boost/libs/graph/example/quick_tour.expected
new file mode 100644
index 000000000..fb2d34a85
--- /dev/null
+++ b/src/boost/libs/graph/example/quick_tour.expected
@@ -0,0 +1,22 @@
+vertices(g) = 0 1 2 3 4
+edges(g) = (0,1) (0,2) (0,3) (0,4) (2,0) (2,4) (3,0) (3,1) (3,4) (4,0) (4,1)
+vertex: 0
+ out-edges: (0,1) (0,2) (0,3) (0,4)
+ in-edges: (2,0) (3,0) (4,0)
+ adjacent vertices: 1 2 3 4
+vertex: 1
+ out-edges:
+ in-edges: (0,1) (3,1) (4,1)
+ adjacent vertices:
+vertex: 2
+ out-edges: (2,0) (2,4)
+ in-edges: (0,2)
+ adjacent vertices: 0 4
+vertex: 3
+ out-edges: (3,0) (3,1) (3,4)
+ in-edges: (0,3)
+ adjacent vertices: 0 1 4
+vertex: 4
+ out-edges: (4,0) (4,1)
+ in-edges: (0,4) (2,4) (3,4)
+ adjacent vertices: 0 1
diff --git a/src/boost/libs/graph/example/r_c_shortest_paths_example.cpp b/src/boost/libs/graph/example/r_c_shortest_paths_example.cpp
new file mode 100644
index 000000000..2d759e73d
--- /dev/null
+++ b/src/boost/libs/graph/example/r_c_shortest_paths_example.cpp
@@ -0,0 +1,332 @@
+// Copyright Michael Drexl 2005, 2006.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://boost.org/LICENSE_1_0.txt)
+
+// Example use of the resource-constrained shortest paths algorithm.
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(disable : 4267)
+#endif
+
+#include <boost/graph/adjacency_list.hpp>
+
+#include <boost/graph/r_c_shortest_paths.hpp>
+#include <iostream>
+
+using namespace boost;
+
+struct SPPRC_Example_Graph_Vert_Prop
+{
+ SPPRC_Example_Graph_Vert_Prop(int n = 0, int e = 0, int l = 0)
+ : num(n), eat(e), lat(l)
+ {
+ }
+ int num;
+ // earliest arrival time
+ int eat;
+ // latest arrival time
+ int lat;
+};
+
+struct SPPRC_Example_Graph_Arc_Prop
+{
+ SPPRC_Example_Graph_Arc_Prop(int n = 0, int c = 0, int t = 0)
+ : num(n), cost(c), time(t)
+ {
+ }
+ int num;
+ // traversal cost
+ int cost;
+ // traversal time
+ int time;
+};
+
+typedef adjacency_list< vecS, vecS, directedS, SPPRC_Example_Graph_Vert_Prop,
+ SPPRC_Example_Graph_Arc_Prop >
+ SPPRC_Example_Graph;
+
+// data structures for spp without resource constraints:
+// ResourceContainer model
+struct spp_no_rc_res_cont
+{
+ spp_no_rc_res_cont(int c = 0) : cost(c) {};
+ spp_no_rc_res_cont& operator=(const spp_no_rc_res_cont& other)
+ {
+ if (this == &other)
+ return *this;
+ this->~spp_no_rc_res_cont();
+ new (this) spp_no_rc_res_cont(other);
+ return *this;
+ }
+ int cost;
+};
+
+bool operator==(
+ const spp_no_rc_res_cont& res_cont_1, const spp_no_rc_res_cont& res_cont_2)
+{
+ return (res_cont_1.cost == res_cont_2.cost);
+}
+
+bool operator<(
+ const spp_no_rc_res_cont& res_cont_1, const spp_no_rc_res_cont& res_cont_2)
+{
+ return (res_cont_1.cost < res_cont_2.cost);
+}
+
+// ResourceExtensionFunction model
+class ref_no_res_cont
+{
+public:
+ inline bool operator()(const SPPRC_Example_Graph& g,
+ spp_no_rc_res_cont& new_cont, const spp_no_rc_res_cont& old_cont,
+ graph_traits< SPPRC_Example_Graph >::edge_descriptor ed) const
+ {
+ new_cont.cost = old_cont.cost + g[ed].cost;
+ return true;
+ }
+};
+
+// DominanceFunction model
+class dominance_no_res_cont
+{
+public:
+ inline bool operator()(const spp_no_rc_res_cont& res_cont_1,
+ const spp_no_rc_res_cont& res_cont_2) const
+ {
+ // must be "<=" here!!!
+ // must NOT be "<"!!!
+ return res_cont_1.cost <= res_cont_2.cost;
+ // this is not a contradiction to the documentation
+ // the documentation says:
+ // "A label $l_1$ dominates a label $l_2$ if and only if both are
+ // resident at the same vertex, and if, for each resource, the resource
+ // consumption of $l_1$ is less than or equal to the resource
+ // consumption of $l_2$, and if there is at least one resource where
+ // $l_1$ has a lower resource consumption than $l_2$." one can think of
+ // a new label with a resource consumption equal to that of an old label
+ // as being dominated by that old label, because the new one will have a
+ // higher number and is created at a later point in time, so one can
+ // implicitly use the number or the creation time as a resource for
+ // tie-breaking
+ }
+};
+// end data structures for spp without resource constraints:
+
+// data structures for shortest path problem with time windows (spptw)
+// ResourceContainer model
+struct spp_spptw_res_cont
+{
+ spp_spptw_res_cont(int c = 0, int t = 0) : cost(c), time(t) {}
+ spp_spptw_res_cont& operator=(const spp_spptw_res_cont& other)
+ {
+ if (this == &other)
+ return *this;
+ this->~spp_spptw_res_cont();
+ new (this) spp_spptw_res_cont(other);
+ return *this;
+ }
+ int cost;
+ int time;
+};
+
+bool operator==(
+ const spp_spptw_res_cont& res_cont_1, const spp_spptw_res_cont& res_cont_2)
+{
+ return (res_cont_1.cost == res_cont_2.cost
+ && res_cont_1.time == res_cont_2.time);
+}
+
+bool operator<(
+ const spp_spptw_res_cont& res_cont_1, const spp_spptw_res_cont& res_cont_2)
+{
+ if (res_cont_1.cost > res_cont_2.cost)
+ return false;
+ if (res_cont_1.cost == res_cont_2.cost)
+ return res_cont_1.time < res_cont_2.time;
+ return true;
+}
+
+// ResourceExtensionFunction model
+class ref_spptw
+{
+public:
+ inline bool operator()(const SPPRC_Example_Graph& g,
+ spp_spptw_res_cont& new_cont, const spp_spptw_res_cont& old_cont,
+ graph_traits< SPPRC_Example_Graph >::edge_descriptor ed) const
+ {
+ const SPPRC_Example_Graph_Arc_Prop& arc_prop = get(edge_bundle, g)[ed];
+ const SPPRC_Example_Graph_Vert_Prop& vert_prop
+ = get(vertex_bundle, g)[target(ed, g)];
+ new_cont.cost = old_cont.cost + arc_prop.cost;
+ int& i_time = new_cont.time;
+ i_time = old_cont.time + arc_prop.time;
+ i_time < vert_prop.eat ? i_time = vert_prop.eat : 0;
+ return i_time <= vert_prop.lat ? true : false;
+ }
+};
+
+// DominanceFunction model
+class dominance_spptw
+{
+public:
+ inline bool operator()(const spp_spptw_res_cont& res_cont_1,
+ const spp_spptw_res_cont& res_cont_2) const
+ {
+ // must be "<=" here!!!
+ // must NOT be "<"!!!
+ return res_cont_1.cost <= res_cont_2.cost
+ && res_cont_1.time <= res_cont_2.time;
+ // this is not a contradiction to the documentation
+ // the documentation says:
+ // "A label $l_1$ dominates a label $l_2$ if and only if both are
+ // resident at the same vertex, and if, for each resource, the resource
+ // consumption of $l_1$ is less than or equal to the resource
+ // consumption of $l_2$, and if there is at least one resource where
+ // $l_1$ has a lower resource consumption than $l_2$." one can think of
+ // a new label with a resource consumption equal to that of an old label
+ // as being dominated by that old label, because the new one will have a
+ // higher number and is created at a later point in time, so one can
+ // implicitly use the number or the creation time as a resource for
+ // tie-breaking
+ }
+};
+// end data structures for shortest path problem with time windows (spptw)
+
+// example graph structure and cost from
+// http://www.boost.org/libs/graph/example/dijkstra-example.cpp
+enum nodes
+{
+ A,
+ B,
+ C,
+ D,
+ E
+};
+char name[] = "ABCDE";
+
+int main()
+{
+ SPPRC_Example_Graph g;
+
+ add_vertex(SPPRC_Example_Graph_Vert_Prop(A, 0, 0), g);
+ add_vertex(SPPRC_Example_Graph_Vert_Prop(B, 5, 20), g);
+ add_vertex(SPPRC_Example_Graph_Vert_Prop(C, 6, 10), g);
+ add_vertex(SPPRC_Example_Graph_Vert_Prop(D, 3, 12), g);
+ add_vertex(SPPRC_Example_Graph_Vert_Prop(E, 0, 100), g);
+
+ add_edge(A, C, SPPRC_Example_Graph_Arc_Prop(0, 1, 5), g);
+ add_edge(B, B, SPPRC_Example_Graph_Arc_Prop(1, 2, 5), g);
+ add_edge(B, D, SPPRC_Example_Graph_Arc_Prop(2, 1, 2), g);
+ add_edge(B, E, SPPRC_Example_Graph_Arc_Prop(3, 2, 7), g);
+ add_edge(C, B, SPPRC_Example_Graph_Arc_Prop(4, 7, 3), g);
+ add_edge(C, D, SPPRC_Example_Graph_Arc_Prop(5, 3, 8), g);
+ add_edge(D, E, SPPRC_Example_Graph_Arc_Prop(6, 1, 3), g);
+ add_edge(E, A, SPPRC_Example_Graph_Arc_Prop(7, 1, 5), g);
+ add_edge(E, B, SPPRC_Example_Graph_Arc_Prop(8, 1, 4), g);
+
+ // the unique shortest path from A to E in the dijkstra-example.cpp is
+ // A -> C -> D -> E
+ // its length is 5
+ // the following code also yields this result
+
+ // with the above time windows, this path is infeasible
+ // now, there are two shortest paths that are also feasible with respect to
+ // the vertex time windows:
+ // A -> C -> B -> D -> E and
+ // A -> C -> B -> E
+ // however, the latter has a longer total travel time and is therefore not
+ // pareto-optimal, i.e., it is dominated by the former path
+ // therefore, the code below returns only the former path
+
+ // spp without resource constraints
+ graph_traits< SPPRC_Example_Graph >::vertex_descriptor s = A;
+ graph_traits< SPPRC_Example_Graph >::vertex_descriptor t = E;
+
+ std::vector<
+ std::vector< graph_traits< SPPRC_Example_Graph >::edge_descriptor > >
+ opt_solutions;
+ std::vector< spp_no_rc_res_cont > pareto_opt_rcs_no_rc;
+
+ r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g),
+ get(&SPPRC_Example_Graph_Arc_Prop::num, g), s, t, opt_solutions,
+ pareto_opt_rcs_no_rc, spp_no_rc_res_cont(0), ref_no_res_cont(),
+ dominance_no_res_cont(),
+ std::allocator< r_c_shortest_paths_label< SPPRC_Example_Graph,
+ spp_no_rc_res_cont > >(),
+ default_r_c_shortest_paths_visitor());
+
+ std::cout << "SPP without resource constraints:" << std::endl;
+ std::cout << "Number of optimal solutions: ";
+ std::cout << static_cast< int >(opt_solutions.size()) << std::endl;
+ for (int i = 0; i < static_cast< int >(opt_solutions.size()); ++i)
+ {
+ std::cout << "The " << i << "th shortest path from A to E is: ";
+ std::cout << std::endl;
+ for (int j = static_cast< int >(opt_solutions[i].size()) - 1; j >= 0;
+ --j)
+ std::cout << name[source(opt_solutions[i][j], g)] << std::endl;
+ std::cout << "E" << std::endl;
+ std::cout << "Length: " << pareto_opt_rcs_no_rc[i].cost << std::endl;
+ }
+ std::cout << std::endl;
+
+ // spptw
+ std::vector<
+ std::vector< graph_traits< SPPRC_Example_Graph >::edge_descriptor > >
+ opt_solutions_spptw;
+ std::vector< spp_spptw_res_cont > pareto_opt_rcs_spptw;
+
+ r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g),
+ get(&SPPRC_Example_Graph_Arc_Prop::num, g), s, t, opt_solutions_spptw,
+ pareto_opt_rcs_spptw, spp_spptw_res_cont(0, 0), ref_spptw(),
+ dominance_spptw(),
+ std::allocator< r_c_shortest_paths_label< SPPRC_Example_Graph,
+ spp_spptw_res_cont > >(),
+ default_r_c_shortest_paths_visitor());
+
+ std::cout << "SPP with time windows:" << std::endl;
+ std::cout << "Number of optimal solutions: ";
+ std::cout << static_cast< int >(opt_solutions.size()) << std::endl;
+ for (int i = 0; i < static_cast< int >(opt_solutions.size()); ++i)
+ {
+ std::cout << "The " << i << "th shortest path from A to E is: ";
+ std::cout << std::endl;
+ for (int j = static_cast< int >(opt_solutions_spptw[i].size()) - 1;
+ j >= 0; --j)
+ std::cout << name[source(opt_solutions_spptw[i][j], g)]
+ << std::endl;
+ std::cout << "E" << std::endl;
+ std::cout << "Length: " << pareto_opt_rcs_spptw[i].cost << std::endl;
+ std::cout << "Time: " << pareto_opt_rcs_spptw[i].time << std::endl;
+ }
+
+ // utility function check_r_c_path example
+ std::cout << std::endl;
+ bool b_is_a_path_at_all = false;
+ bool b_feasible = false;
+ bool b_correctly_extended = false;
+ spp_spptw_res_cont actual_final_resource_levels(0, 0);
+ graph_traits< SPPRC_Example_Graph >::edge_descriptor ed_last_extended_arc;
+ check_r_c_path(g, opt_solutions_spptw[0], spp_spptw_res_cont(0, 0), true,
+ pareto_opt_rcs_spptw[0], actual_final_resource_levels, ref_spptw(),
+ b_is_a_path_at_all, b_feasible, b_correctly_extended,
+ ed_last_extended_arc);
+ if (!b_is_a_path_at_all)
+ std::cout << "Not a path." << std::endl;
+ if (!b_feasible)
+ std::cout << "Not a feasible path." << std::endl;
+ if (!b_correctly_extended)
+ std::cout << "Not correctly extended." << std::endl;
+ if (b_is_a_path_at_all && b_feasible && b_correctly_extended)
+ {
+ std::cout << "Actual final resource levels:" << std::endl;
+ std::cout << "Length: " << actual_final_resource_levels.cost
+ << std::endl;
+ std::cout << "Time: " << actual_final_resource_levels.time << std::endl;
+ std::cout << "OK." << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/reachable-loop-head.cpp b/src/boost/libs/graph/example/reachable-loop-head.cpp
new file mode 100644
index 000000000..fcb90ff1e
--- /dev/null
+++ b/src/boost/libs/graph/example/reachable-loop-head.cpp
@@ -0,0 +1,105 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/copy.hpp>
+
+int main(int argc, char* argv[])
+{
+ if (argc < 3)
+ {
+ std::cerr << "usage: reachable-loop-head.exe <in-file> <out-file>"
+ << std::endl;
+ return -1;
+ }
+ using namespace boost;
+ GraphvizDigraph g;
+ read_graphviz(argv[1], g);
+ graph_traits< GraphvizDigraph >::vertex_descriptor loop_head = 1;
+ typedef color_traits< default_color_type > Color;
+
+ std::vector< default_color_type > reachable_from_head(
+ num_vertices(g), Color::white());
+ default_color_type c;
+ depth_first_visit(g, loop_head, default_dfs_visitor(),
+ make_iterator_property_map(
+ reachable_from_head.begin(), get(vertex_index, g), c));
+
+ property_map< GraphvizDigraph, vertex_attribute_t >::type vattr_map
+ = get(vertex_attribute, g);
+
+ graph_traits< GraphvizDigraph >::vertex_iterator i, i_end;
+ for (boost::tie(i, i_end) = vertices(g); i != i_end; ++i)
+ if (reachable_from_head[*i] != Color::white())
+ {
+ vattr_map[*i]["color"] = "gray";
+ vattr_map[*i]["style"] = "filled";
+ }
+
+ std::ofstream loops_out(argv[2]);
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ has trouble with the get_property() functions
+ loops_out << "digraph G {\n"
+ << "size=\"3,3\"\n"
+ << "ratio=\"fill\"\n"
+ << "shape=\"box\"\n";
+ graph_traits< GraphvizDigraph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ loops_out << *vi << "[";
+ for (std::map< std::string, std::string >::iterator ai
+ = vattr_map[*vi].begin();
+ ai != vattr_map[*vi].end(); ++ai)
+ {
+ loops_out << ai->first << "=" << ai->second;
+ if (next(ai) != vattr_map[*vi].end())
+ loops_out << ", ";
+ }
+ loops_out << "]";
+ }
+ property_map< GraphvizDigraph, edge_attribute_t >::type eattr_map
+ = get(edge_attribute, g);
+ graph_traits< GraphvizDigraph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ {
+ loops_out << source(*ei, g) << " -> " << target(*ei, g) << "[";
+ std::map< std::string, std::string >& attr_map = eattr_map[*ei];
+ for (std::map< std::string, std::string >::iterator eai
+ = attr_map.begin();
+ eai != attr_map.end(); ++eai)
+ {
+ loops_out << eai->first << "=" << eai->second;
+ if (next(eai) != attr_map.end())
+ loops_out << ", ";
+ }
+ loops_out << "]";
+ }
+ loops_out << "}\n";
+#else
+ get_property(g, graph_graph_attribute)["size"] = "3,3";
+ get_property(g, graph_graph_attribute)["ratio"] = "fill";
+ get_property(g, graph_vertex_attribute)["shape"] = "box";
+
+ write_graphviz(loops_out, g, make_vertex_attributes_writer(g),
+ make_edge_attributes_writer(g), make_graph_attributes_writer(g));
+#endif
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/reachable-loop-tail.cpp b/src/boost/libs/graph/example/reachable-loop-tail.cpp
new file mode 100644
index 000000000..e3e50b0d9
--- /dev/null
+++ b/src/boost/libs/graph/example/reachable-loop-tail.cpp
@@ -0,0 +1,76 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/copy.hpp>
+#include <boost/graph/reverse_graph.hpp>
+
+int main(int argc, char* argv[])
+{
+ if (argc < 3)
+ {
+ std::cerr << "usage: reachable-loop-tail.exe <in-file> <out-file>"
+ << std::endl;
+ return -1;
+ }
+ using namespace boost;
+ GraphvizDigraph g_in;
+ read_graphviz(argv[1], g_in);
+
+ typedef adjacency_list< vecS, vecS, bidirectionalS, GraphvizVertexProperty,
+ GraphvizEdgeProperty, GraphvizGraphProperty >
+ Graph;
+ Graph g;
+ copy_graph(g_in, g);
+
+ graph_traits< GraphvizDigraph >::vertex_descriptor loop_tail = 6;
+ typedef color_traits< default_color_type > Color;
+ default_color_type c;
+
+ std::vector< default_color_type > reachable_to_tail(num_vertices(g));
+ reverse_graph< Graph > reverse_g(g);
+ depth_first_visit(reverse_g, loop_tail, default_dfs_visitor(),
+ make_iterator_property_map(
+ reachable_to_tail.begin(), get(vertex_index, g), c));
+
+ std::ofstream loops_out(argv[2]);
+ loops_out << "digraph G {\n"
+ << " graph [ratio=\"fill\",size=\"3,3\"];\n"
+ << " node [shape=\"box\"];\n"
+ << " edge [style=\"bold\"];\n";
+
+ property_map< Graph, vertex_attribute_t >::type vattr_map
+ = get(vertex_attribute, g);
+ graph_traits< GraphvizDigraph >::vertex_iterator i, i_end;
+ for (boost::tie(i, i_end) = vertices(g_in); i != i_end; ++i)
+ {
+ loops_out << *i << "[label=\"" << vattr_map[*i]["label"] << "\"";
+ if (reachable_to_tail[*i] != Color::white())
+ {
+ loops_out << ", color=\"gray\", style=\"filled\"";
+ }
+ loops_out << "]\n";
+ }
+ graph_traits< GraphvizDigraph >::edge_iterator e, e_end;
+ for (boost::tie(e, e_end) = edges(g_in); e != e_end; ++e)
+ loops_out << source(*e, g) << " -> " << target(*e, g) << ";\n";
+ loops_out << "}\n";
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/read_graphviz.cpp b/src/boost/libs/graph/example/read_graphviz.cpp
new file mode 100644
index 000000000..d3b395598
--- /dev/null
+++ b/src/boost/libs/graph/example/read_graphviz.cpp
@@ -0,0 +1,61 @@
+// Copyright 2006 Trustees of Indiana University
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// A simple example of using read_graphviz to load a GraphViz Dot textual
+// graph into a BGL adjacency_list graph
+
+// Author: Ronald Garcia
+
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <string>
+#include <sstream>
+
+using namespace boost;
+using namespace std;
+
+int main()
+{
+ // Vertex properties
+ typedef property< vertex_name_t, std::string,
+ property< vertex_color_t, float > >
+ vertex_p;
+ // Edge properties
+ typedef property< edge_weight_t, double > edge_p;
+ // Graph properties
+ typedef property< graph_name_t, std::string > graph_p;
+ // adjacency_list-based type
+ typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
+ graph_t;
+
+ // Construct an empty graph and prepare the dynamic_property_maps.
+ graph_t graph(0);
+ dynamic_properties dp;
+
+ property_map< graph_t, vertex_name_t >::type name = get(vertex_name, graph);
+ dp.property("node_id", name);
+
+ property_map< graph_t, vertex_color_t >::type mass
+ = get(vertex_color, graph);
+ dp.property("mass", mass);
+
+ property_map< graph_t, edge_weight_t >::type weight
+ = get(edge_weight, graph);
+ dp.property("weight", weight);
+
+ // Use ref_property_map to turn a graph property into a property map
+ boost::ref_property_map< graph_t*, std::string > gname(
+ get_property(graph, graph_name));
+ dp.property("name", gname);
+
+ // Sample graph as an std::istream;
+ std::istringstream gvgraph(
+ "digraph { graph [name=\"graphname\"] a c e [mass = 6.66] }");
+
+ bool status = read_graphviz(gvgraph, graph, dp, "node_id");
+
+ return status ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/boost/libs/graph/example/read_write_dimacs-eg.cpp b/src/boost/libs/graph/example/read_write_dimacs-eg.cpp
new file mode 100644
index 000000000..d6435679f
--- /dev/null
+++ b/src/boost/libs/graph/example/read_write_dimacs-eg.cpp
@@ -0,0 +1,133 @@
+// Copyright (c) 2006, Stephan Diederich
+//
+// This code may be used under either of the following two licences:
+//
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE.
+//
+// Or:
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#include <boost/config.hpp>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/read_dimacs.hpp>
+#include <boost/graph/write_dimacs.hpp>
+
+/*************************************
+ *
+ * example which reads in a max-flow problem from std::cin, augments all paths
+ *from source->NODE->sink and writes the graph back to std::cout
+ *
+ **************************************/
+
+template < typename EdgeCapacityMap > struct zero_edge_capacity
+{
+
+ zero_edge_capacity() {}
+ zero_edge_capacity(EdgeCapacityMap cap_map) : m_cap_map(cap_map) {};
+
+ template < typename Edge > bool operator()(const Edge& e) const
+ {
+ return get(m_cap_map, e) == 0;
+ }
+
+ EdgeCapacityMap m_cap_map;
+};
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list_traits< vecS, vecS, directedS > Traits;
+ typedef adjacency_list< vecS, vecS, directedS, no_property,
+ property< edge_capacity_t, long,
+ property< edge_reverse_t, Traits::edge_descriptor > > >
+ Graph;
+
+ typedef graph_traits< Graph >::out_edge_iterator out_edge_iterator;
+ typedef graph_traits< Graph >::edge_descriptor edge_descriptor;
+ typedef graph_traits< Graph >::vertex_descriptor vertex_descriptor;
+
+ Graph g;
+
+ typedef property_map< Graph, edge_capacity_t >::type tCapMap;
+ typedef tCapMap::value_type tCapMapValue;
+
+ typedef property_map< Graph, edge_reverse_t >::type tRevEdgeMap;
+
+ tCapMap capacity = get(edge_capacity, g);
+ tRevEdgeMap rev = get(edge_reverse, g);
+
+ vertex_descriptor s, t;
+ /*reading the graph from stdin*/
+ read_dimacs_max_flow(g, capacity, rev, s, t, std::cin);
+
+ /*process graph*/
+ tCapMapValue augmented_flow = 0;
+
+ // we take the source node and check for each outgoing edge e which has a
+ // target(p) if we can augment that path
+ out_edge_iterator oei, oe_end;
+ for (boost::tie(oei, oe_end) = out_edges(s, g); oei != oe_end; ++oei)
+ {
+ edge_descriptor from_source = *oei;
+ vertex_descriptor v = target(from_source, g);
+ edge_descriptor to_sink;
+ bool is_there;
+ boost::tie(to_sink, is_there) = edge(v, t, g);
+ if (is_there)
+ {
+ if (get(capacity, to_sink) > get(capacity, from_source))
+ {
+ tCapMapValue to_augment = get(capacity, from_source);
+ capacity[from_source] = 0;
+ capacity[to_sink] -= to_augment;
+ augmented_flow += to_augment;
+ }
+ else
+ {
+ tCapMapValue to_augment = get(capacity, to_sink);
+ capacity[to_sink] = 0;
+ capacity[from_source] -= to_augment;
+ augmented_flow += to_augment;
+ }
+ }
+ }
+
+ // remove edges with zero capacity (most of them are the reverse edges)
+ zero_edge_capacity< tCapMap > filter(capacity);
+ remove_edge_if(filter, g);
+
+ /*write the graph back to stdout */
+ write_dimacs_max_flow(
+ g, capacity, identity_property_map(), s, t, std::cout);
+ // print flow we augmented to std::cerr
+ std::cerr << "removed " << augmented_flow
+ << " from SOURCE->NODE->SINK connects" << std::endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/regression.cfg b/src/boost/libs/graph/example/regression.cfg
new file mode 100644
index 000000000..5cccee3d3
--- /dev/null
+++ b/src/boost/libs/graph/example/regression.cfg
@@ -0,0 +1,114 @@
+// Boost Graph Library examples regression test configuration file
+//
+// From the boost/status directory, run
+// ./regression --tests ../libs/graph/example/regression.cfg -o graph-eg.html
+//
+// Please keep the entries ordered alphabetically by the test's file name.
+
+compile libs/graph/example/accum-compile-times.cpp
+compile libs/graph/example/adjacency_list.cpp
+compile libs/graph/example/adjacency_list_io.cpp
+compile libs/graph/example/adjacency_matrix.cpp
+compile libs/graph/example/bellman-example.cpp
+compile libs/graph/example/bellman-ford-internet.cpp
+compile libs/graph/example/bfs-example.cpp
+compile libs/graph/example/bfs-name-printer.cpp
+compile libs/graph/example/bfs.cpp
+compile libs/graph/example/bfs_neighbor.cpp
+compile libs/graph/example/biconnected_components.cpp
+compile libs/graph/example/boost_web_graph.cpp
+compile libs/graph/example/bucket_sorter.cpp
+compile libs/graph/example/cc-internet.cpp
+compile libs/graph/example/city_visitor.cpp
+compile libs/graph/example/components_on_edgelist.cpp
+compile libs/graph/example/connected-components.cpp
+compile libs/graph/example/connected_components.cpp
+compile libs/graph/example/container_gen.cpp
+compile libs/graph/example/copy-example.cpp
+compile libs/graph/example/cuthill_mckee_ordering.cpp
+compile libs/graph/example/cycle-file-dep.cpp
+compile libs/graph/example/cycle-file-dep2.cpp
+compile libs/graph/example/dag_shortest_paths.cpp
+compile libs/graph/example/dave.cpp
+compile libs/graph/example/default-constructor.cpp
+compile libs/graph/example/default-constructor2.cpp
+compile libs/graph/example/dfs-example.cpp
+compile libs/graph/example/dfs-parenthesis.cpp
+compile libs/graph/example/dfs.cpp
+compile libs/graph/example/dfs_parenthesis.cpp
+compile libs/graph/example/dijkstra-example.cpp
+compile libs/graph/example/edge-connectivity.cpp
+compile libs/graph/example/edge-function.cpp
+compile libs/graph/example/edge-iter-constructor.cpp
+compile libs/graph/example/edge_basics.cpp
+compile libs/graph/example/edge_connectivity.cpp
+compile libs/graph/example/edge_iterator_constructor.cpp
+compile libs/graph/example/edge_property.cpp
+compile libs/graph/example/edmonds-karp-eg.cpp
+compile libs/graph/example/exterior_properties.cpp
+compile libs/graph/example/exterior_property_map.cpp
+compile libs/graph/example/family_tree.cpp
+compile libs/graph/example/fibonacci_heap.cpp
+compile libs/graph/example/file_dependencies.cpp
+compile libs/graph/example/filtered_graph.cpp
+compile libs/graph/example/gerdemann.cpp
+compile libs/graph/example/graph-assoc-types.cpp
+compile libs/graph/example/graph-property-iter-eg.cpp
+compile libs/graph/example/graph.cpp
+compile libs/graph/example/graphviz.cpp
+compile libs/graph/example/in_edges.cpp
+compile libs/graph/example/incremental-components-eg.cpp
+compile libs/graph/example/incremental_components.cpp
+compile libs/graph/example/interior_property_map.cpp
+compile libs/graph/example/isomorphism.cpp
+compile libs/graph/example/iterator-property-map-eg.cpp
+compile libs/graph/example/johnson-eg.cpp
+compile libs/graph/example/kevin-bacon.cpp
+compile libs/graph/example/knights-tour.cpp
+compile libs/graph/example/kruskal-example.cpp
+compile libs/graph/example/kruskal-telephone.cpp
+compile libs/graph/example/last-mod-time.cpp
+compile libs/graph/example/loops_dfs.cpp
+compile libs/graph/example/max_flow.cpp
+compile libs/graph/example/min_max_paths.cpp
+compile libs/graph/example/minimum_degree_ordering.cpp
+compile libs/graph/example/modify_graph.cpp
+compile libs/graph/example/neighbor_bfs.cpp
+compile libs/graph/example/ordered_out_edges.cpp
+compile libs/graph/example/ospf-example.cpp
+compile libs/graph/example/parallel-compile-time.cpp
+compile libs/graph/example/prim-example.cpp
+compile libs/graph/example/prim-telephone.cpp
+compile libs/graph/example/print-adjacent-vertices.cpp
+compile libs/graph/example/print-edges.cpp
+compile libs/graph/example/print-in-edges.cpp
+compile libs/graph/example/print-out-edges.cpp
+compile libs/graph/example/property-map-traits-eg.cpp
+compile libs/graph/example/property_iterator.cpp
+compile libs/graph/example/push-relabel-eg.cpp
+compile libs/graph/example/put-get-helper-eg.cpp
+compile libs/graph/example/quick-tour.cpp
+compile libs/graph/example/quick_tour.cpp
+compile libs/graph/example/reachable-loop-head.cpp
+compile libs/graph/example/reachable-loop-tail.cpp
+compile libs/graph/example/remove_edge_if_bidir.cpp
+compile libs/graph/example/remove_edge_if_dir.cpp
+compile libs/graph/example/remove_edge_if_undir.cpp
+compile libs/graph/example/reverse-graph-eg.cpp
+compile libs/graph/example/scc.cpp
+compile libs/graph/example/strong-components.cpp
+compile libs/graph/example/strong_components.cpp
+compile libs/graph/example/subgraph.cpp
+compile libs/graph/example/topo-sort-file-dep.cpp
+compile libs/graph/example/topo-sort-file-dep2.cpp
+compile libs/graph/example/topo-sort1.cpp
+compile libs/graph/example/topo-sort2.cpp
+compile libs/graph/example/topo_sort.cpp
+compile libs/graph/example/transitive_closure.cpp
+compile libs/graph/example/transpose-example.cpp
+compile libs/graph/example/undirected.cpp
+compile libs/graph/example/vector-as-graph.cpp
+compile libs/graph/example/vertex-name-property.cpp
+compile libs/graph/example/vertex_basics.cpp
+compile libs/graph/example/visitor.cpp
+
diff --git a/src/boost/libs/graph/example/remove_edge_if_bidir.cpp b/src/boost/libs/graph/example/remove_edge_if_bidir.cpp
new file mode 100644
index 000000000..a58df802d
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_bidir.cpp
@@ -0,0 +1,101 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+/*
+ Sample output:
+
+ original graph:
+ 0 --> 3 2 3
+ 1 --> 3
+ 2 --> 0
+ 3 --> 2
+ 1(0,3) 2(0,2) 3(0,3) 4(1,3) 5(2,0) 6(3,2)
+
+ removing edges connecting 0 to 3
+ 0 --> 2
+ 1 --> 3
+ 2 --> 0
+ 3 --> 2
+ 2(0,2) 4(1,3) 5(2,0) 6(3,2)
+ removing edges with weight greater than 3
+ 0 --> 2
+ 1 -->
+ 2 -->
+ 3 -->
+ 2(0,2)
+
+
+ */
+
+using namespace boost;
+
+typedef adjacency_list< vecS, vecS, bidirectionalS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+
+struct has_weight_greater_than
+{
+ has_weight_greater_than(int w_, Graph& g_) : w(w_), g(g_) {}
+ bool operator()(graph_traits< Graph >::edge_descriptor e)
+ {
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+ return get(weight, e) > w;
+#else
+ // This version of get() breaks VC++
+ return get(edge_weight, g, e) > w;
+#endif
+ }
+ int w;
+ Graph& g;
+};
+
+int main()
+{
+ typedef std::pair< std::size_t, std::size_t > Edge;
+ Edge edge_array[6] = { Edge(0, 3), Edge(0, 2), Edge(0, 3), Edge(1, 3),
+ Edge(2, 0), Edge(3, 2) };
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph g(4);
+ for (std::size_t j = 0; j < 6; ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ Graph g(edge_array, edge_array + 6, 4);
+#endif
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+
+ int w = 0;
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ weight[*ei] = ++w;
+
+ property_map< Graph, vertex_index_t >::type indexmap = get(vertex_index, g);
+
+ std::cout << "original graph:" << std::endl;
+ print_graph(g, indexmap);
+ print_edges2(g, indexmap, weight);
+ std::cout << std::endl;
+
+ std::cout << "removing edges connecting 0 to 3" << std::endl;
+ remove_out_edge_if(vertex(0, g), incident_to(vertex(3, g), g), g);
+ print_graph(g, indexmap);
+ print_edges2(g, indexmap, weight);
+
+ std::cout << "removing edges with weight greater than 3" << std::endl;
+ remove_edge_if(has_weight_greater_than(3, g), g);
+ print_graph(g, indexmap);
+ print_edges2(g, indexmap, weight);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/remove_edge_if_bidir.expected b/src/boost/libs/graph/example/remove_edge_if_bidir.expected
new file mode 100644
index 000000000..e6fe9ac3c
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_bidir.expected
@@ -0,0 +1,19 @@
+original graph:
+0 --> 3 2 3
+1 --> 3
+2 --> 0
+3 --> 2
+1(0,3) 2(0,2) 3(0,3) 4(1,3) 5(2,0) 6(3,2)
+
+removing edges connecting 0 to 3
+0 --> 2
+1 --> 3
+2 --> 0
+3 --> 2
+2(0,2) 4(1,3) 5(2,0) 6(3,2)
+removing edges with weight greater than 3
+0 --> 2
+1 -->
+2 -->
+3 -->
+2(0,2)
diff --git a/src/boost/libs/graph/example/remove_edge_if_dir.cpp b/src/boost/libs/graph/example/remove_edge_if_dir.cpp
new file mode 100644
index 000000000..825e409bd
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_dir.cpp
@@ -0,0 +1,69 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+/*
+ Sample output:
+
+ original graph:
+ 0 --> 3 2 3
+ 1 --> 3
+ 2 --> 0
+ 3 --> 2
+
+ removing edges (0,3)
+ 0 --> 2
+ 1 --> 3
+ 2 --> 0
+ 3 --> 2
+ removing edge (0,2) and (3, 2)
+ 0 -->
+ 1 --> 3
+ 2 --> 0
+ 3 -->
+
+ */
+
+using namespace boost;
+
+typedef adjacency_list< vecS, vecS, directedS > Graph;
+
+int main()
+{
+ typedef std::pair< std::size_t, std::size_t > Edge;
+ Edge edges[6] = { Edge(0, 3), Edge(0, 2), Edge(0, 3), Edge(1, 3),
+ Edge(2, 0), Edge(3, 2) };
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle iterator constructor
+ Graph g(4);
+ for (std::size_t j = 0; j < 6; ++j)
+ add_edge(edges[j].first, edges[j].second, g);
+#else
+ Graph g(edges, edges + 6, 4);
+#endif
+
+ std::cout << "original graph:" << std::endl;
+ print_graph(g, get(vertex_index, g));
+ std::cout << std::endl;
+
+ std::cout << "removing edges (0,3)" << std::endl;
+ remove_out_edge_if(vertex(0, g), incident_to(vertex(3, g), g), g);
+ print_graph(g, get(vertex_index, g));
+
+ std::cout << "removing edge (0,2) and (3, 2)" << std::endl;
+ remove_edge_if(incident_to(vertex(2, g), g), g);
+ print_graph(g, get(vertex_index, g));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/remove_edge_if_dir.expected b/src/boost/libs/graph/example/remove_edge_if_dir.expected
new file mode 100644
index 000000000..214c49fda
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_dir.expected
@@ -0,0 +1,16 @@
+original graph:
+0 --> 3 2 3
+1 --> 3
+2 --> 0
+3 --> 2
+
+removing edges (0,3)
+0 --> 2
+1 --> 3
+2 --> 0
+3 --> 2
+removing edge (0,2) and (3, 2)
+0 -->
+1 --> 3
+2 --> 0
+3 -->
diff --git a/src/boost/libs/graph/example/remove_edge_if_undir.cpp b/src/boost/libs/graph/example/remove_edge_if_undir.cpp
new file mode 100644
index 000000000..3f4b62e86
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_undir.cpp
@@ -0,0 +1,99 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+/*
+ Sample output:
+
+ original graph:
+ 0 <--> 3 3 2
+ 1 <--> 3
+ 2 <--> 0 3
+ 3 <--> 0 0 1 2
+ 1(0,3) 2(0,3) 3(1,3) 4(2,0) 5(3,2)
+
+ removing edges connecting 0 and 3
+ 0 <--> 2
+ 1 <--> 3
+ 2 <--> 0 3
+ 3 <--> 1 2
+ 3(1,3) 4(2,0) 5(3,2)
+ removing edges with weight greater than 3
+ 0 <-->
+ 1 <--> 3
+ 2 <-->
+ 3 <--> 1
+ 3(1,3)
+
+ */
+
+typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_weight_t, int > >
+ Graph;
+
+struct has_weight_greater_than
+{
+ has_weight_greater_than(int w_, Graph& g_) : w(w_), g(g_) {}
+ bool operator()(graph_traits< Graph >::edge_descriptor e)
+ {
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+ return get(weight, e) > w;
+#else
+ // This version of get breaks VC++
+ return get(edge_weight, g, e) > w;
+#endif
+ }
+ int w;
+ Graph& g;
+};
+
+int main()
+{
+ typedef std::pair< std::size_t, std::size_t > Edge;
+ Edge edge_array[5]
+ = { Edge(0, 3), Edge(0, 3), Edge(1, 3), Edge(2, 0), Edge(3, 2) };
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph g(4);
+ for (std::size_t j = 0; j < 5; ++j)
+ add_edge(edge_array[j].first, edge_array[j].second, g);
+#else
+ Graph g(edge_array, edge_array + 5, 4);
+#endif
+ property_map< Graph, edge_weight_t >::type weight = get(edge_weight, g);
+
+ int w = 0;
+ graph_traits< Graph >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
+ weight[*ei] = ++w;
+
+ std::cout << "original graph:" << std::endl;
+ print_graph(g, get(vertex_index, g));
+ print_edges2(g, get(vertex_index, g), get(edge_weight, g));
+ std::cout << std::endl;
+
+ std::cout << "removing edges connecting 0 and 3" << std::endl;
+ remove_out_edge_if(vertex(0, g), incident_on(vertex(3, g), g), g);
+ print_graph(g, get(vertex_index, g));
+ print_edges2(g, get(vertex_index, g), get(edge_weight, g));
+
+ std::cout << "removing edges with weight greater than 3" << std::endl;
+ remove_edge_if(has_weight_greater_than(3, g), g);
+ print_graph(g, get(vertex_index, g));
+ print_edges2(g, get(vertex_index, g), get(edge_weight, g));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/remove_edge_if_undir.expected b/src/boost/libs/graph/example/remove_edge_if_undir.expected
new file mode 100644
index 000000000..2ae4359ed
--- /dev/null
+++ b/src/boost/libs/graph/example/remove_edge_if_undir.expected
@@ -0,0 +1,19 @@
+original graph:
+0 <--> 3 3 2
+1 <--> 3
+2 <--> 0 3
+3 <--> 0 0 1 2
+1(0,3) 2(0,3) 3(1,3) 4(2,0) 5(3,2)
+
+removing edges connecting 0 and 3
+0 <--> 2
+1 <--> 3
+2 <--> 0 3
+3 <--> 1 2
+3(1,3) 4(2,0) 5(3,2)
+removing edges with weight greater than 3
+0 <-->
+1 <--> 3
+2 <-->
+3 <--> 1
+3(1,3)
diff --git a/src/boost/libs/graph/example/reverse_graph.cpp b/src/boost/libs/graph/example/reverse_graph.cpp
new file mode 100644
index 000000000..be840bd0b
--- /dev/null
+++ b/src/boost/libs/graph/example/reverse_graph.cpp
@@ -0,0 +1,49 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+
+#include <algorithm>
+#include <vector>
+#include <utility>
+#include <iostream>
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/reverse_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, bidirectionalS > Graph;
+
+ Graph G(5);
+ add_edge(0, 2, G);
+ add_edge(1, 1, G);
+ add_edge(1, 3, G);
+ add_edge(1, 4, G);
+ add_edge(2, 1, G);
+ add_edge(2, 3, G);
+ add_edge(2, 4, G);
+ add_edge(3, 1, G);
+ add_edge(3, 4, G);
+ add_edge(4, 0, G);
+ add_edge(4, 1, G);
+
+ std::cout << "original graph:" << std::endl;
+ print_graph(G, get(vertex_index, G));
+
+ std::cout << std::endl << "reversed graph:" << std::endl;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 // avoid VC++ bug...
+ reverse_graph< Graph > R(G);
+ print_graph(R, get(vertex_index, G));
+#else
+ print_graph(make_reverse_graph(G), get(vertex_index, G));
+#endif
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/reverse_graph.expected b/src/boost/libs/graph/example/reverse_graph.expected
new file mode 100644
index 000000000..068c8195e
--- /dev/null
+++ b/src/boost/libs/graph/example/reverse_graph.expected
@@ -0,0 +1,13 @@
+original graph:
+0 --> 2
+1 --> 1 3 4
+2 --> 1 3 4
+3 --> 1 4
+4 --> 0 1
+
+reversed graph:
+0 --> 4
+1 --> 1 2 3 4
+2 --> 0
+3 --> 1 2
+4 --> 1 2 3
diff --git a/src/boost/libs/graph/example/roget_components.cpp b/src/boost/libs/graph/example/roget_components.cpp
new file mode 100644
index 000000000..5347acca6
--- /dev/null
+++ b/src/boost/libs/graph/example/roget_components.cpp
@@ -0,0 +1,146 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <cstdio>
+#include <cstring>
+#include <iostream>
+#include <boost/graph/stanford_graph.hpp>
+#include <boost/graph/strong_components.hpp>
+
+#define specs(v) (filename ? index_map[v] : v->cat_no) << " " << v->name
+
+int main(int argc, char* argv[])
+{
+ using namespace boost;
+ Graph* g;
+ typedef graph_traits< Graph* >::vertex_descriptor vertex_t;
+ unsigned long n = 0;
+ unsigned long d = 0;
+ unsigned long p = 0;
+ long s = 0;
+ char* filename = NULL;
+ int c, i;
+
+ while (--argc)
+ {
+ if (sscanf(argv[argc], "-n%lu", &n) == 1)
+ ;
+ else if (sscanf(argv[argc], "-d%lu", &d) == 1)
+ ;
+ else if (sscanf(argv[argc], "-p%lu", &p) == 1)
+ ;
+ else if (sscanf(argv[argc], "-s%ld", &s) == 1)
+ ;
+ else if (strncmp(argv[argc], "-g", 2) == 0)
+ filename = argv[argc] + 2;
+ else
+ {
+ fprintf(stderr, "Usage: %s [-nN][-dN][-pN][-sN][-gfoo]\n", argv[0]);
+ return -2;
+ }
+ }
+
+ g = (filename ? restore_graph(filename) : roget(n, d, p, s));
+ if (g == NULL)
+ {
+ fprintf(stderr, "Sorry, can't create the graph! (error code %ld)\n",
+ panic_code);
+ return -1;
+ }
+ printf("Reachability analysis of %s\n\n", g->id);
+
+ // - The root map corresponds to what Knuth calls the "min" field.
+ // - The discover time map is the "rank" field
+ // - Knuth uses the rank field for double duty, to record the
+ // discover time, and to keep track of which vertices have
+ // been visited. The BGL strong_components() function needs
+ // a separate field for marking colors, so we use the w field.
+
+ std::vector< int > comp(num_vertices(g));
+ property_map< Graph*, vertex_index_t >::type index_map
+ = get(vertex_index, g);
+
+ property_map< Graph*, v_property< vertex_t > >::type root
+ = get(v_property< vertex_t >(), g);
+
+ int num_comp = strong_components(g,
+ make_iterator_property_map(comp.begin(), index_map),
+ root_map(root)
+ .discover_time_map(get(z_property< long >(), g))
+ .color_map(get(w_property< long >(), g)));
+
+ std::vector< std::vector< vertex_t > > strong_comp(num_comp);
+
+ // First add representative vertices to each component's list
+ graph_traits< Graph* >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (root[*vi] == *vi)
+ strong_comp[comp[index_map[*vi]]].push_back(*vi);
+
+ // Then add the other vertices of the component
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (root[*vi] != *vi)
+ strong_comp[comp[index_map[*vi]]].push_back(*vi);
+
+ // We do not print out the "from" and "to" information as Knuth
+ // does because we no longer have easy access to that information
+ // from outside the algorithm.
+
+ for (c = 0; c < num_comp; ++c)
+ {
+ vertex_t v = strong_comp[c].front();
+ std::cout << "Strong component `" << specs(v) << "'";
+ if (strong_comp[c].size() > 1)
+ {
+ std::cout << " also includes:\n";
+ for (i = 1; i < strong_comp[c].size(); ++i)
+ std::cout << " " << specs(strong_comp[c][i]) << std::endl;
+ }
+ else
+ std::cout << std::endl;
+ }
+
+ // Next we print out the "component graph" or "condensation", that
+ // is, we consider each component to be a vertex in a new graph
+ // where there is an edge connecting one component to another if there
+ // is one or more edges connecting any of the vertices from the
+ // first component to any of the vertices in the second. We use the
+ // name of the representative vertex as the name of the component.
+
+ printf("\nLinks between components:\n");
+
+ // This array provides an efficient way to check if we've already
+ // created a link from the current component to the component
+ // of the target vertex.
+ std::vector< int > mark(num_comp, (std::numeric_limits< int >::max)());
+
+ // We go in reverse order just to mimic the output ordering in
+ // Knuth's version.
+ for (c = num_comp - 1; c >= 0; --c)
+ {
+ vertex_t u = strong_comp[c][0];
+ for (i = 0; i < strong_comp[c].size(); ++i)
+ {
+ vertex_t v = strong_comp[c][i];
+ graph_traits< Graph* >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei)
+ {
+ vertex_t x = target(*ei, g);
+ int comp_x = comp[index_map[x]];
+ if (comp_x != c && mark[comp_x] != c)
+ {
+ mark[comp_x] = c;
+ vertex_t w = strong_comp[comp_x][0];
+ std::cout << specs(u) << " -> " << specs(w) << " (e.g., "
+ << specs(v) << " -> " << specs(x) << ")\n";
+ } // if
+ } // for
+ } // for
+ } // for
+}
diff --git a/src/boost/libs/graph/example/scaled_closeness_centrality.cpp b/src/boost/libs/graph/example/scaled_closeness_centrality.cpp
new file mode 100644
index 000000000..1f349f682
--- /dev/null
+++ b/src/boost/libs/graph/example/scaled_closeness_centrality.cpp
@@ -0,0 +1,114 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[scaled_closeness_centrality_example
+#include <iostream>
+#include <iomanip>
+
+#include <boost/graph/undirected_graph.hpp>
+#include <boost/graph/exterior_property.hpp>
+#include <boost/graph/floyd_warshall_shortest.hpp>
+#include <boost/graph/closeness_centrality.hpp>
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// This template struct provides a generic version of a "scaling"
+// closeness measure. Specifically, this implementation divides
+// the number of vertices in the graph by the sum of geodesic
+// distances of each vertex. This measure allows customization
+// of the distance type, result type, and even the underlying
+// divide operation.
+template < typename Graph, typename Distance, typename Result,
+ typename Divide = divides< Result > >
+struct scaled_closeness_measure
+{
+ typedef Distance distance_type;
+ typedef Result result_type;
+
+ Result operator()(Distance d, const Graph& g)
+ {
+ if (d == numeric_values< Distance >::infinity())
+ {
+ return numeric_values< Result >::zero();
+ }
+ else
+ {
+ return div(Result(num_vertices(g)), Result(d));
+ }
+ }
+ Divide div;
+};
+
+// The Actor type stores the name of each vertex in the graph.
+struct Actor
+{
+ std::string name;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef undirected_graph< Actor > Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+// The name map provides an abstract accessor for the names of
+// each vertex. This is used during graph creation.
+typedef property_map< Graph, string Actor::* >::type NameMap;
+
+// Declare a matrix type and its corresponding property map that
+// will contain the distances between each pair of vertices.
+typedef exterior_vertex_property< Graph, int > DistanceProperty;
+typedef DistanceProperty::matrix_type DistanceMatrix;
+typedef DistanceProperty::matrix_map_type DistanceMatrixMap;
+
+// Declare the weight map so that each edge returns the same value.
+typedef constant_property_map< Edge, int > WeightMap;
+
+// Declare a container and its corresponding property map that
+// will contain the resulting closeness centralities of each
+// vertex in the graph.
+typedef boost::exterior_vertex_property< Graph, float > ClosenessProperty;
+typedef ClosenessProperty::container_type ClosenessContainer;
+typedef ClosenessProperty::map_type ClosenessMap;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and a property map that provides access
+ // to the actor names.
+ Graph g;
+ NameMap nm(get(&Actor::name, g));
+
+ // Read the graph from standard input.
+ read_graph(g, nm, cin);
+
+ // Compute the distances between all pairs of vertices using
+ // the Floyd-Warshall algorithm. Note that the weight map is
+ // created so that every edge has a weight of 1.
+ DistanceMatrix distances(num_vertices(g));
+ DistanceMatrixMap dm(distances, g);
+ WeightMap wm(1);
+ floyd_warshall_all_pairs_shortest_paths(g, dm, weight_map(wm));
+
+ // Create the scaled closeness measure.
+ scaled_closeness_measure< Graph, int, float > m;
+
+ // Compute the degree centrality for graph
+ ClosenessContainer cents(num_vertices(g));
+ ClosenessMap cm(cents, g);
+ all_closeness_centralities(g, dm, cm, m);
+
+ // Print the scaled closeness centrality of each vertex.
+ graph_traits< Graph >::vertex_iterator i, end;
+ for (boost::tie(i, end) = vertices(g); i != end; ++i)
+ {
+ cout << setw(12) << setiosflags(ios::left) << g[*i].name << get(cm, *i)
+ << endl;
+ }
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/scc.cpp b/src/boost/libs/graph/example/scc.cpp
new file mode 100644
index 000000000..142316db9
--- /dev/null
+++ b/src/boost/libs/graph/example/scc.cpp
@@ -0,0 +1,48 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <fstream>
+#include <map>
+#include <string>
+#include <boost/graph/strong_components.hpp>
+#include <boost/graph/graphviz.hpp>
+
+int main()
+{
+ using namespace boost;
+ GraphvizDigraph g;
+ read_graphviz("figs/scc.dot", g);
+
+ typedef graph_traits< GraphvizDigraph >::vertex_descriptor vertex_t;
+ std::map< vertex_t, int > component;
+
+ strong_components(g, make_assoc_property_map(component));
+
+ property_map< GraphvizDigraph, vertex_attribute_t >::type vertex_attr_map
+ = get(vertex_attribute, g);
+ std::string color[] = { "white", "gray", "black", "lightgray" };
+ graph_traits< GraphvizDigraph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ vertex_attr_map[*vi]["color"] = color[component[*vi]];
+ vertex_attr_map[*vi]["style"] = "filled";
+ if (vertex_attr_map[*vi]["color"] == "black")
+ vertex_attr_map[*vi]["fontcolor"] = "white";
+ }
+ write_graphviz("figs/scc-out.dot", g);
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/scc.dot b/src/boost/libs/graph/example/scc.dot
new file mode 100644
index 000000000..0775898da
--- /dev/null
+++ b/src/boost/libs/graph/example/scc.dot
@@ -0,0 +1,33 @@
+
+digraph SCC {
+ node[shape=circle];
+ ratio=1.2
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+
+ a -> b
+ a -> f
+ a -> h
+ b -> c
+ b -> a
+ c -> d
+ c -> b
+ d -> e
+ e -> d
+ f -> g
+ g -> f
+ g -> d
+ h -> i
+ i -> h
+ i -> j
+ i -> e
+ i -> c
+}
diff --git a/src/boost/libs/graph/example/sgb-regression.cfg b/src/boost/libs/graph/example/sgb-regression.cfg
new file mode 100644
index 000000000..067a5ea6e
--- /dev/null
+++ b/src/boost/libs/graph/example/sgb-regression.cfg
@@ -0,0 +1,11 @@
+// Boost Graph Library LEDA examples regression test configuration file
+//
+// From the boost/status directory, run
+// ./regression --tests ../libs/graph/example/sgb-regression.cfg -o graph-sgb-eg.html
+//
+// Please keep the entries ordered alphabetically by the test's file name.
+
+compile libs/graph/example/girth.cpp
+compile libs/graph/example/miles_span.cpp
+compile libs/graph/example/topo-sort-with-sgb.cpp
+compile libs/graph/example/roget_components.cpp
diff --git a/src/boost/libs/graph/example/simple_planarity_test.cpp b/src/boost/libs/graph/example/simple_planarity_test.cpp
new file mode 100644
index 000000000..cb67452a4
--- /dev/null
+++ b/src/boost/libs/graph/example/simple_planarity_test.cpp
@@ -0,0 +1,67 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+int main(int argc, char** argv)
+{
+
+ // This program illustrates a simple use of boyer_myrvold_planar_embedding
+ // as a simple yes/no test for planarity.
+
+ using namespace boost;
+
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int > >
+ graph;
+
+ graph K_4(4);
+ add_edge(0, 1, K_4);
+ add_edge(0, 2, K_4);
+ add_edge(0, 3, K_4);
+ add_edge(1, 2, K_4);
+ add_edge(1, 3, K_4);
+ add_edge(2, 3, K_4);
+
+ if (boyer_myrvold_planarity_test(K_4))
+ std::cout << "K_4 is planar." << std::endl;
+ else
+ std::cout << "ERROR! K_4 should have been recognized as planar!"
+ << std::endl;
+
+ graph K_5(5);
+ add_edge(0, 1, K_5);
+ add_edge(0, 2, K_5);
+ add_edge(0, 3, K_5);
+ add_edge(0, 4, K_5);
+ add_edge(1, 2, K_5);
+ add_edge(1, 3, K_5);
+ add_edge(1, 4, K_5);
+ add_edge(2, 3, K_5);
+ add_edge(2, 4, K_5);
+
+ // We've almost created a K_5 - it's missing one edge - so it should still
+ // be planar at this point.
+
+ if (boyer_myrvold_planarity_test(K_5))
+ std::cout << "K_5 (minus an edge) is planar." << std::endl;
+ else
+ std::cout << "ERROR! K_5 with one edge missing should"
+ << " have been recognized as planar!" << std::endl;
+
+ // Now add the final edge...
+ add_edge(3, 4, K_5);
+
+ if (boyer_myrvold_planarity_test(K_5))
+ std::cout << "ERROR! K_5 was recognized as planar!" << std::endl;
+ else
+ std::cout << "K_5 is not planar." << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/sloan_ordering.cpp b/src/boost/libs/graph/example/sloan_ordering.cpp
new file mode 100644
index 000000000..538e10601
--- /dev/null
+++ b/src/boost/libs/graph/example/sloan_ordering.cpp
@@ -0,0 +1,234 @@
+//
+//=======================================================================
+// Copyright 2002 Marc Wintermantel (wintermantel@imes.mavt.ethz.ch)
+// ETH Zurich, Center of Structure Technologies
+// (https://web.archive.org/web/20050307090307/http://www.structures.ethz.ch/)
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/sloan_ordering.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/bandwidth.hpp>
+#include <boost/graph/profile.hpp>
+#include <boost/graph/wavefront.hpp>
+
+using std::cout;
+using std::endl;
+
+/*
+ Sample Output
+ #####################################
+ ### First light of sloan-ordering ###
+ #####################################
+
+ original bandwidth: 8
+ original profile: 42
+ original max_wavefront: 7
+ original aver_wavefront: 4.2
+ original rms_wavefront: 4.58258
+
+ Starting vertex: 0
+ Pseudoperipheral vertex: 9
+ Pseudoperipheral radius: 4
+
+ Sloan ordering starting at: 0
+ 0 8 3 7 5 2 4 6 1 9
+ bandwidth: 4
+ profile: 28
+ max_wavefront: 4
+ aver_wavefront: 2.8
+ rms_wavefront: 2.93258
+
+ Sloan ordering without a start-vertex:
+ 8 0 3 7 5 2 4 6 1 9
+ bandwidth: 4
+ profile: 27
+ max_wavefront: 4
+ aver_wavefront: 2.7
+ rms_wavefront: 2.84605
+
+ ###############################
+ ### sloan-ordering finished ###
+ ###############################
+*/
+
+int main(int, char*[])
+{
+ cout << endl;
+ cout << "#####################################" << endl;
+ cout << "### First light of sloan-ordering ###" << endl;
+ cout << "#####################################" << endl << endl;
+
+ using namespace boost;
+ using namespace std;
+
+ // Defining the graph type
+ typedef adjacency_list< setS, vecS, undirectedS,
+ property< vertex_color_t, default_color_type,
+ property< vertex_degree_t, int,
+ property< vertex_priority_t, double > > > >
+ Graph;
+
+ typedef graph_traits< Graph >::vertex_descriptor Vertex;
+ typedef graph_traits< Graph >::vertices_size_type size_type;
+
+ typedef std::pair< std::size_t, std::size_t > Pair;
+
+ Pair edges[14] = { Pair(0, 3), // a-d
+ Pair(0, 5), // a-f
+ Pair(1, 2), // b-c
+ Pair(1, 4), // b-e
+ Pair(1, 6), // b-g
+ Pair(1, 9), // b-j
+ Pair(2, 3), // c-d
+ Pair(2, 4), // c-e
+ Pair(3, 5), // d-f
+ Pair(3, 8), // d-i
+ Pair(4, 6), // e-g
+ Pair(5, 6), // f-g
+ Pair(5, 7), // f-h
+ Pair(6, 7) }; // g-h
+
+ // Creating a graph and adding the edges from above into it
+ Graph G(10);
+ for (int i = 0; i < 14; ++i)
+ add_edge(edges[i].first, edges[i].second, G);
+
+ // Creating two iterators over the vertices
+ graph_traits< Graph >::vertex_iterator ui, ui_end;
+
+ // Creating a property_map with the degrees of the degrees of each vertex
+ property_map< Graph, vertex_degree_t >::type deg = get(vertex_degree, G);
+ for (boost::tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui)
+ deg[*ui] = degree(*ui, G);
+
+ // Creating a property_map for the indices of a vertex
+ property_map< Graph, vertex_index_t >::type index_map
+ = get(vertex_index, G);
+
+ std::cout << "original bandwidth: " << bandwidth(G) << std::endl;
+ std::cout << "original profile: " << profile(G) << std::endl;
+ std::cout << "original max_wavefront: " << max_wavefront(G) << std::endl;
+ std::cout << "original aver_wavefront: " << aver_wavefront(G) << std::endl;
+ std::cout << "original rms_wavefront: " << rms_wavefront(G) << std::endl;
+
+ // Creating a vector of vertices
+ std::vector< Vertex > sloan_order(num_vertices(G));
+ // Creating a vector of size_type
+ std::vector< size_type > perm(num_vertices(G));
+
+ {
+
+ // Setting the start node
+ Vertex s = vertex(0, G);
+ int ecc; // defining a variable for the pseudoperipheral radius
+
+ // Calculating the pseudoeperipheral node and radius
+ Vertex e = pseudo_peripheral_pair(
+ G, s, ecc, get(vertex_color, G), get(vertex_degree, G));
+
+ cout << endl;
+ cout << "Starting vertex: " << s << endl;
+ cout << "Pseudoperipheral vertex: " << e << endl;
+ cout << "Pseudoperipheral radius: " << ecc << endl << endl;
+
+ // Sloan ordering
+ sloan_ordering(G, s, e, sloan_order.begin(), get(vertex_color, G),
+ get(vertex_degree, G), get(vertex_priority, G));
+
+ cout << "Sloan ordering starting at: " << s << endl;
+ cout << " ";
+
+ for (std::vector< Vertex >::const_iterator i = sloan_order.begin();
+ i != sloan_order.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != sloan_order.size(); ++c)
+ perm[index_map[sloan_order[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " profile: "
+ << profile(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " max_wavefront: "
+ << max_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " aver_wavefront: "
+ << aver_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " rms_wavefront: "
+ << rms_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+
+ /////////////////////////////////////////////////
+ // Version including finding a good starting point
+ /////////////////////////////////////////////////
+
+ {
+ // sloan_ordering
+ sloan_ordering(G, sloan_order.begin(), get(vertex_color, G),
+ make_degree_map(G), get(vertex_priority, G));
+
+ cout << endl << "Sloan ordering without a start-vertex:" << endl;
+ cout << " ";
+ for (std::vector< Vertex >::const_iterator i = sloan_order.begin();
+ i != sloan_order.end(); ++i)
+ cout << index_map[*i] << " ";
+ cout << endl;
+
+ for (size_type c = 0; c != sloan_order.size(); ++c)
+ perm[index_map[sloan_order[c]]] = c;
+ std::cout << " bandwidth: "
+ << bandwidth(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " profile: "
+ << profile(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " max_wavefront: "
+ << max_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " aver_wavefront: "
+ << aver_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ std::cout << " rms_wavefront: "
+ << rms_wavefront(G,
+ make_iterator_property_map(
+ &perm[0], index_map, perm[0]))
+ << std::endl;
+ }
+
+ cout << endl;
+ cout << "###############################" << endl;
+ cout << "### sloan-ordering finished ###" << endl;
+ cout << "###############################" << endl << endl;
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/social_network.graph b/src/boost/libs/graph/example/social_network.graph
new file mode 100644
index 000000000..33779ba14
--- /dev/null
+++ b/src/boost/libs/graph/example/social_network.graph
@@ -0,0 +1,12 @@
+Scott,Jill
+Mary,Scott
+Jill,Mary
+Bill,Scott
+Josh,Bill
+Scott,Frank
+Laurie,Frank
+Mary,Laurie
+Anne,Frank
+Howard,Anne
+Frank,Howard
+Josh,Frank \ No newline at end of file
diff --git a/src/boost/libs/graph/example/stoer_wagner.cpp b/src/boost/libs/graph/example/stoer_wagner.cpp
new file mode 100644
index 000000000..ce5b0e59c
--- /dev/null
+++ b/src/boost/libs/graph/example/stoer_wagner.cpp
@@ -0,0 +1,83 @@
+// Copyright Daniel Trebbien 2010.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or the copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cassert>
+#include <cstddef>
+#include <cstdlib>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/one_bit_color_map.hpp>
+#include <boost/graph/stoer_wagner_min_cut.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <boost/typeof/typeof.hpp>
+
+struct edge_t
+{
+ unsigned long first;
+ unsigned long second;
+};
+
+// A graphic of the min-cut is available at
+// <http://www.boost.org/doc/libs/release/libs/graph/doc/stoer_wagner_imgs/stoer_wagner.cpp.gif>
+int main()
+{
+ using namespace std;
+
+ typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS,
+ boost::no_property, boost::property< boost::edge_weight_t, int > >
+ undirected_graph;
+ typedef boost::property_map< undirected_graph, boost::edge_weight_t >::type
+ weight_map_type;
+ typedef boost::property_traits< weight_map_type >::value_type weight_type;
+
+ // define the 16 edges of the graph. {3, 4} means an undirected edge between
+ // vertices 3 and 4.
+ edge_t edges[] = { { 3, 4 }, { 3, 6 }, { 3, 5 }, { 0, 4 }, { 0, 1 },
+ { 0, 6 }, { 0, 7 }, { 0, 5 }, { 0, 2 }, { 4, 1 }, { 1, 6 }, { 1, 5 },
+ { 6, 7 }, { 7, 5 }, { 5, 2 }, { 3, 4 } };
+
+ // for each of the 16 edges, define the associated edge weight. ws[i] is the
+ // weight for the edge that is described by edges[i].
+ weight_type ws[] = { 0, 3, 1, 3, 1, 2, 6, 1, 8, 1, 1, 80, 2, 1, 1, 4 };
+
+ // construct the graph object. 8 is the number of vertices, which are
+ // numbered from 0 through 7, and 16 is the number of edges.
+ undirected_graph g(edges, edges + 16, ws, 8, 16);
+
+ // define a property map, `parities`, that will store a boolean value for
+ // each vertex. Vertices that have the same parity after
+ // `stoer_wagner_min_cut` runs are on the same side of the min-cut.
+ BOOST_AUTO(parities,
+ boost::make_one_bit_color_map(
+ num_vertices(g), get(boost::vertex_index, g)));
+
+ // run the Stoer-Wagner algorithm to obtain the min-cut weight. `parities`
+ // is also filled in.
+ int w = boost::stoer_wagner_min_cut(
+ g, get(boost::edge_weight, g), boost::parity_map(parities));
+
+ cout << "The min-cut weight of G is " << w << ".\n" << endl;
+ assert(w == 7);
+
+ cout << "One set of vertices consists of:" << endl;
+ size_t i;
+ for (i = 0; i < num_vertices(g); ++i)
+ {
+ if (get(parities, i))
+ cout << i << endl;
+ }
+ cout << endl;
+
+ cout << "The other set of vertices consists of:" << endl;
+ for (i = 0; i < num_vertices(g); ++i)
+ {
+ if (!get(parities, i))
+ cout << i << endl;
+ }
+ cout << endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/straight_line_drawing.cpp b/src/boost/libs/graph/example/straight_line_drawing.cpp
new file mode 100644
index 000000000..b76bb4ab3
--- /dev/null
+++ b/src/boost/libs/graph/example/straight_line_drawing.cpp
@@ -0,0 +1,110 @@
+//=======================================================================
+// Copyright 2007 Aaron Windsor
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/graph_traits.hpp>
+#include <boost/property_map/property_map.hpp>
+#include <vector>
+
+#include <boost/graph/planar_canonical_ordering.hpp>
+#include <boost/graph/is_straight_line_drawing.hpp>
+#include <boost/graph/chrobak_payne_drawing.hpp>
+#include <boost/graph/boyer_myrvold_planar_test.hpp>
+
+using namespace boost;
+
+// a class to hold the coordinates of the straight line embedding
+struct coord_t
+{
+ std::size_t x;
+ std::size_t y;
+};
+
+int main(int argc, char** argv)
+{
+ typedef adjacency_list< vecS, vecS, undirectedS,
+ property< vertex_index_t, int > >
+ graph;
+
+ // Define the storage type for the planar embedding
+ typedef std::vector< std::vector< graph_traits< graph >::edge_descriptor > >
+ embedding_storage_t;
+ typedef boost::iterator_property_map< embedding_storage_t::iterator,
+ property_map< graph, vertex_index_t >::type >
+ embedding_t;
+
+ // Create the graph - a maximal planar graph on 7 vertices. The functions
+ // planar_canonical_ordering and chrobak_payne_straight_line_drawing both
+ // require a maximal planar graph. If you start with a graph that isn't
+ // maximal planar (or you're not sure), you can use the functions
+ // make_connected, make_biconnected_planar, and make_maximal planar in
+ // sequence to add a set of edges to any undirected planar graph to make
+ // it maximal planar.
+
+ graph g(7);
+ add_edge(0, 1, g);
+ add_edge(1, 2, g);
+ add_edge(2, 3, g);
+ add_edge(3, 0, g);
+ add_edge(3, 4, g);
+ add_edge(4, 5, g);
+ add_edge(5, 6, g);
+ add_edge(6, 3, g);
+ add_edge(0, 4, g);
+ add_edge(1, 3, g);
+ add_edge(3, 5, g);
+ add_edge(2, 6, g);
+ add_edge(1, 4, g);
+ add_edge(1, 5, g);
+ add_edge(1, 6, g);
+
+ // Create the planar embedding
+ embedding_storage_t embedding_storage(num_vertices(g));
+ embedding_t embedding(embedding_storage.begin(), get(vertex_index, g));
+
+ boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
+ boyer_myrvold_params::embedding = embedding);
+
+ // Find a canonical ordering
+ std::vector< graph_traits< graph >::vertex_descriptor > ordering;
+ planar_canonical_ordering(g, embedding, std::back_inserter(ordering));
+
+ // Set up a property map to hold the mapping from vertices to coord_t's
+ typedef std::vector< coord_t > straight_line_drawing_storage_t;
+ typedef boost::iterator_property_map<
+ straight_line_drawing_storage_t::iterator,
+ property_map< graph, vertex_index_t >::type >
+ straight_line_drawing_t;
+
+ straight_line_drawing_storage_t straight_line_drawing_storage(
+ num_vertices(g));
+ straight_line_drawing_t straight_line_drawing(
+ straight_line_drawing_storage.begin(), get(vertex_index, g));
+
+ // Compute the straight line drawing
+ chrobak_payne_straight_line_drawing(
+ g, embedding, ordering.begin(), ordering.end(), straight_line_drawing);
+
+ std::cout << "The straight line drawing is: " << std::endl;
+ graph_traits< graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ coord_t coord(get(straight_line_drawing, *vi));
+ std::cout << *vi << " -> (" << coord.x << ", " << coord.y << ")"
+ << std::endl;
+ }
+
+ // Verify that the drawing is actually a plane drawing
+ if (is_straight_line_drawing(g, straight_line_drawing))
+ std::cout << "Is a plane drawing." << std::endl;
+ else
+ std::cout << "Is not a plane drawing." << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/strong-components.cpp b/src/boost/libs/graph/example/strong-components.cpp
new file mode 100644
index 000000000..12265daf0
--- /dev/null
+++ b/src/boost/libs/graph/example/strong-components.cpp
@@ -0,0 +1,39 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <vector>
+#include <iostream>
+#include <boost/graph/strong_components.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, directedS > Graph;
+ const int N = 6;
+ Graph G(N);
+ add_edge(0, 1, G);
+ add_edge(1, 1, G);
+ add_edge(1, 3, G);
+ add_edge(1, 4, G);
+ add_edge(3, 4, G);
+ add_edge(3, 0, G);
+ add_edge(4, 3, G);
+ add_edge(5, 2, G);
+
+ std::vector< int > c(N);
+ int num = strong_components(
+ G, make_iterator_property_map(c.begin(), get(vertex_index, G), c[0]));
+
+ std::cout << "Total number of components: " << num << std::endl;
+ std::vector< int >::iterator i;
+ for (i = c.begin(); i != c.end(); ++i)
+ std::cout << "Vertex " << i - c.begin() << " is in component " << *i
+ << std::endl;
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/strong_components.cpp b/src/boost/libs/graph/example/strong_components.cpp
new file mode 100644
index 000000000..2b1e1b13b
--- /dev/null
+++ b/src/boost/libs/graph/example/strong_components.cpp
@@ -0,0 +1,86 @@
+//=======================================================================
+// Copyright 1997-2001 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ IMPORTANT!!!
+ ~~~~~~~~~~~~
+ This example uses interfaces that have been deprecated and removed from
+ Boost.Grpah. Someone needs to update it, as it does NOT compile.
+*/
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <boost/graph/strong_components.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/graph_utility.hpp>
+/*
+ Sample output:
+ A directed graph:
+ a --> b f h
+ b --> c a
+ c --> d b
+ d --> e
+ e --> d
+ f --> g
+ g --> f d
+ h --> i
+ i --> h j e c
+ j -->
+
+ Total number of components: 4
+ Vertex a is in component 3
+ Vertex b is in component 3
+ Vertex c is in component 3
+ Vertex d is in component 0
+ Vertex e is in component 0
+ Vertex f is in component 1
+ Vertex g is in component 1
+ Vertex h is in component 3
+ Vertex i is in component 3
+ Vertex j is in component 2
+ */
+
+int main(int, char*[])
+{
+ using namespace boost;
+ const char* name = "abcdefghij";
+
+ adjacency_list< vecS, vecS, directedS > G;
+ dynamic_properties dp;
+ read_graphviz("scc.dot", G, dp);
+
+ std::cout << "A directed graph:" << std::endl;
+ print_graph(G, name);
+ std::cout << std::endl;
+
+ typedef graph_traits<
+ adjacency_list< vecS, vecS, directedS > >::vertex_descriptor Vertex;
+
+ std::vector< int > component(num_vertices(G)),
+ discover_time(num_vertices(G));
+ std::vector< default_color_type > color(num_vertices(G));
+ std::vector< Vertex > root(num_vertices(G));
+ int num = strong_components(G,
+ make_iterator_property_map(component.begin(), get(vertex_index, G)),
+ root_map(make_iterator_property_map(root.begin(), get(vertex_index, G)))
+ .color_map(
+ make_iterator_property_map(color.begin(), get(vertex_index, G)))
+ .discover_time_map(make_iterator_property_map(
+ discover_time.begin(), get(vertex_index, G))));
+
+ std::cout << "Total number of components: " << num << std::endl;
+ std::vector< int >::size_type i;
+ for (i = 0; i != component.size(); ++i)
+ std::cout << "Vertex " << name[i] << " is in component " << component[i]
+ << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/strong_components.expected b/src/boost/libs/graph/example/strong_components.expected
new file mode 100644
index 000000000..3e25bdd75
--- /dev/null
+++ b/src/boost/libs/graph/example/strong_components.expected
@@ -0,0 +1,23 @@
+A directed graph:
+a --> b f h
+b --> c a
+c --> d b
+d --> e
+e --> d
+f --> g
+g --> f d
+h --> i
+i --> h j e c
+j -->
+
+Total number of components: 4
+Vertex a is in component 3
+Vertex b is in component 3
+Vertex c is in component 3
+Vertex d is in component 0
+Vertex e is in component 0
+Vertex f is in component 1
+Vertex g is in component 1
+Vertex h is in component 3
+Vertex i is in component 3
+Vertex j is in component 2
diff --git a/src/boost/libs/graph/example/subgraph.cpp b/src/boost/libs/graph/example/subgraph.cpp
new file mode 100644
index 000000000..36fa274b3
--- /dev/null
+++ b/src/boost/libs/graph/example/subgraph.cpp
@@ -0,0 +1,106 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Author: Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+/*
+ Sample output:
+
+ G0:
+ 0 --> 1
+ 1 --> 2 3
+ 2 --> 5
+ 3 -->
+ 4 --> 1 5
+ 5 --> 3
+ 0(0,1) 1(1,2) 2(1,3) 6(2,5) 3(4,1) 4(4,5) 5(5,3)
+
+ G1:
+ 2 --> 5
+ 4 --> 5
+ 5 -->
+ 6(2,5) 4(4,5)
+
+ G2:
+ 0 --> 1
+ 1 -->
+ 0(0,1)
+
+ */
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/subgraph.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main(int, char*[])
+{
+ using namespace boost;
+ typedef subgraph< adjacency_list< vecS, vecS, directedS,
+ property< vertex_color_t, int >, property< edge_index_t, int > > >
+ Graph;
+
+ const int N = 6;
+ Graph G0(N);
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ F
+ }; // for conveniently refering to vertices in G0
+
+ Graph& G1 = G0.create_subgraph();
+ Graph& G2 = G0.create_subgraph();
+ enum
+ {
+ A1,
+ B1,
+ C1
+ }; // for conveniently refering to vertices in G1
+ enum
+ {
+ A2,
+ B2
+ }; // for conveniently refering to vertices in G2
+
+ add_vertex(C, G1); // global vertex C becomes local A1 for G1
+ add_vertex(E, G1); // global vertex E becomes local B1 for G1
+ add_vertex(F, G1); // global vertex F becomes local C1 for G1
+
+ add_vertex(A, G2); // global vertex A becomes local A1 for G2
+ add_vertex(B, G2); // global vertex B becomes local B1 for G2
+
+ add_edge(A, B, G0);
+ add_edge(B, C, G0);
+ add_edge(B, D, G0);
+ add_edge(E, B, G0);
+ add_edge(E, F, G0);
+ add_edge(F, D, G0);
+
+ add_edge(A1, C1, G1); // (A1,C1) is subgraph G1 local indices for (C,F).
+
+ std::cout << "G0:" << std::endl;
+ print_graph(G0, get(vertex_index, G0));
+ print_edges2(G0, get(vertex_index, G0), get(edge_index, G0));
+ std::cout << std::endl;
+
+ Graph::children_iterator ci, ci_end;
+ int num = 1;
+ for (boost::tie(ci, ci_end) = G0.children(); ci != ci_end; ++ci)
+ {
+ std::cout << "G" << num++ << ":" << std::endl;
+ print_graph(*ci, get(vertex_index, *ci));
+ print_edges2(*ci, get(vertex_index, *ci), get(edge_index, *ci));
+ std::cout << std::endl;
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/subgraph.expected b/src/boost/libs/graph/example/subgraph.expected
new file mode 100644
index 000000000..026bac845
--- /dev/null
+++ b/src/boost/libs/graph/example/subgraph.expected
@@ -0,0 +1,20 @@
+G0:
+0 --> 1
+1 --> 2 3
+2 --> 5
+3 -->
+4 --> 1 5
+5 --> 3
+0(0,1) 1(1,2) 2(1,3) 6(2,5) 3(4,1) 4(4,5) 5(5,3)
+
+G1:
+2 --> 5
+4 --> 5
+5 -->
+6(2,5) 4(4,5)
+
+G2:
+0 --> 1
+1 -->
+0(0,1)
+
diff --git a/src/boost/libs/graph/example/subgraph_properties.cpp b/src/boost/libs/graph/example/subgraph_properties.cpp
new file mode 100644
index 000000000..ac9316fad
--- /dev/null
+++ b/src/boost/libs/graph/example/subgraph_properties.cpp
@@ -0,0 +1,147 @@
+// (C) Copyright Jeremy Siek 2004
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+ Sample output:
+
+ After initializing properties for G1:
+ Global and local properties for vertex G0[C]...
+ G0[C]= A1
+ G1[A1]= A1
+ Global and local properties for vertex G0[E]...
+ G0[E]= B1
+ G1[B1]= B1
+ Global and local properties for vertex G0[F]...
+ G0[F]= C1
+ G1[C1]= C1
+
+
+ After initializing properties for G2:
+ Global and local properties for vertex G0[A]
+ G0[A]= A2
+ G2[A2]= A2
+ Global and local properties for vertex G0[C]...
+ G0[C]= B2
+ G1[A1]= B2
+ G2[B2]= B2
+
+ */
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/subgraph.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main(int, char*[])
+{
+ using namespace boost;
+ // typedef adjacency_list_traits<vecS, vecS, directedS> Traits;// Does
+ // nothing?
+ typedef property< vertex_color_t, int,
+ property< vertex_name_t, std::string > >
+ VertexProperty;
+
+ typedef subgraph< adjacency_list< vecS, vecS, directedS, VertexProperty,
+ property< edge_index_t, int > > >
+ Graph;
+
+ const int N = 6;
+ Graph G0(N);
+ enum
+ {
+ A,
+ B,
+ C,
+ D,
+ E,
+ F
+ }; // for conveniently refering to vertices in G0
+
+ property_map< Graph, vertex_name_t >::type name = get(vertex_name_t(), G0);
+ name[A] = "A";
+ name[B] = "B";
+ name[C] = "C";
+ name[D] = "D";
+ name[E] = "E";
+ name[F] = "F";
+
+ Graph& G1 = G0.create_subgraph();
+ enum
+ {
+ A1,
+ B1,
+ C1
+ }; // for conveniently refering to vertices in G1
+
+ add_vertex(C, G1); // global vertex C becomes local A1 for G1
+ add_vertex(E, G1); // global vertex E becomes local B1 for G1
+ add_vertex(F, G1); // global vertex F becomes local C1 for G1
+
+ property_map< Graph, vertex_name_t >::type name1 = get(vertex_name_t(), G1);
+ name1[A1] = "A1";
+
+ std::cout << std::endl
+ << "After initializing properties for G1:" << std::endl;
+ std::cout << " Global and local properties for vertex G0[C]..."
+ << std::endl;
+ std::cout << " G0[C]= " << boost::get(vertex_name, G0, vertex(C, G0))
+ << std::endl; // prints: "G0[C]= C"
+ std::cout << " G1[A1]= " << boost::get(vertex_name, G1, vertex(A1, G1))
+ << std::endl; // prints: "G1[A1]= A1"
+
+ name1[B1] = "B1";
+
+ std::cout << " Global and local properties for vertex G0[E]..."
+ << std::endl;
+ std::cout << " G0[E]= " << boost::get(vertex_name, G0, vertex(E, G0))
+ << std::endl; // prints: "G0[E]= E"
+ std::cout << " G1[B1]= " << boost::get(vertex_name, G1, vertex(B1, G1))
+ << std::endl; // prints: "G1[B1]= B1"
+
+ name1[C1] = "C1";
+
+ std::cout << " Global and local properties for vertex G0[F]..."
+ << std::endl;
+ std::cout << " G0[F]= " << boost::get(vertex_name, G0, vertex(F, G0))
+ << std::endl; // prints: "G0[F]= F"
+ std::cout << " G1[C1]= " << boost::get(vertex_name, G1, vertex(C1, G1))
+ << std::endl; // prints: "G1[C1]= C1"
+
+ Graph& G2 = G0.create_subgraph();
+ enum
+ {
+ A2,
+ B2
+ }; // for conveniently refering to vertices in G2
+
+ add_vertex(A, G2); // global vertex A becomes local A2 for G2
+ add_vertex(C, G2); // global vertex C becomes local B2 for G2
+
+ property_map< Graph, vertex_name_t >::type name2 = get(vertex_name_t(), G2);
+ name2[A2] = "A2";
+
+ std::cout << std::endl
+ << std::endl
+ << "After initializing properties for G2:" << std::endl;
+ std::cout << " Global and local properties for vertex G0[A]" << std::endl;
+ std::cout << " G0[A]= " << boost::get(vertex_name, G0, vertex(A, G0))
+ << std::endl; // prints: "G0[A]= A"
+ std::cout << " G2[A2]= " << boost::get(vertex_name, G2, vertex(A2, G2))
+ << std::endl; // prints: "G2[A2]= A2"
+
+ name2[B2] = "B2";
+
+ std::cout << " Global and local properties for vertex G0[C]..."
+ << std::endl;
+ std::cout << " G0[C]= " << boost::get(vertex_name, G0, vertex(C, G0))
+ << std::endl; // prints: "G0[C]= C"
+ std::cout << " G1[A1]= " << boost::get(vertex_name, G1, vertex(A1, G1))
+ << std::endl; // prints: "G1[A1]= A1"
+ std::cout << " G2[B2]= " << boost::get(vertex_name, G2, vertex(B2, G2))
+ << std::endl; // prints: "G2[B2]= B2"
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp b/src/boost/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp
new file mode 100644
index 000000000..017972038
--- /dev/null
+++ b/src/boost/libs/graph/example/successive_shortest_path_nonnegative_weights_example.cpp
@@ -0,0 +1,27 @@
+//=======================================================================
+// Copyright 2013 University of Warsaw.
+// Authors: Piotr Wygocki
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/successive_shortest_path_nonnegative_weights.hpp>
+#include <boost/graph/find_flow_cost.hpp>
+
+#include "../test/min_cost_max_flow_utils.hpp"
+
+int main()
+{
+ boost::SampleGraph::vertex_descriptor s, t;
+ boost::SampleGraph::Graph g;
+ boost::SampleGraph::getSampleGraph(g, s, t);
+
+ boost::successive_shortest_path_nonnegative_weights(g, s, t);
+
+ int cost = boost::find_flow_cost(g);
+ assert(cost == 29);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/target-compile-costs.dat b/src/boost/libs/graph/example/target-compile-costs.dat
new file mode 100644
index 000000000..cc1453577
--- /dev/null
+++ b/src/boost/libs/graph/example/target-compile-costs.dat
@@ -0,0 +1,15 @@
+0.0
+0.0
+0.0
+0.0
+0.0
+1.5
+0.0
+2.8
+0.0
+3.6
+0.0
+8.7
+1.1
+1.5
+2.1
diff --git a/src/boost/libs/graph/example/tc.dot b/src/boost/libs/graph/example/tc.dot
new file mode 100644
index 000000000..39c429411
--- /dev/null
+++ b/src/boost/libs/graph/example/tc.dot
@@ -0,0 +1,13 @@
+digraph TC {
+ node[shape=circle];
+ a
+ b
+ c
+ d
+
+ b -> c
+ b -> d
+ c -> b
+ d -> c
+ d -> a
+}
diff --git a/src/boost/libs/graph/example/test-astar-cities.dot b/src/boost/libs/graph/example/test-astar-cities.dot
new file mode 100644
index 000000000..aee8107c7
--- /dev/null
+++ b/src/boost/libs/graph/example/test-astar-cities.dot
@@ -0,0 +1,36 @@
+graph G {
+0[label="Troy", pos="460,193", fontsize="11"];
+1[label="Lake Placid", pos="432,338", fontsize="11"];
+2[label="Plattsburgh", pos="480,378", fontsize="11"];
+3[label="Massena", pos="352,400", fontsize="11"];
+4[label="Watertown", pos="262,309", fontsize="11"];
+5[label="Utica", pos="322,228", fontsize="11"];
+6[label="Syracuse", pos="241,222", fontsize="11"];
+7[label="Rochester", pos="111,234", fontsize="11"];
+8[label="Buffalo", pos="0,208", fontsize="11"];
+9[label="Ithaca", pos="209,166", fontsize="11"];
+10[label="Binghamton", pos="262,134", fontsize="11"];
+11[label="Woodstock", pos="422,128", fontsize="11"];
+12[label="New York", pos="437,0", fontsize="11"];
+0--5 [label="96", fontsize="11"];
+0--1 [label="134", fontsize="11"];
+0--2 [label="143", fontsize="11"];
+1--2 [label="65", fontsize="11"];
+2--3 [label="115", fontsize="11"];
+1--3 [label="133", fontsize="11"];
+3--4 [label="117", fontsize="11"];
+4--5 [label="116", fontsize="11"];
+4--6 [label="74", fontsize="11"];
+5--6 [label="56", fontsize="11"];
+6--7 [label="84", fontsize="11"];
+7--8 [label="73", fontsize="11"];
+6--9 [label="69", fontsize="11"];
+9--10 [label="70", fontsize="11"];
+9--7 [label="116", fontsize="11"];
+10--0 [label="147", fontsize="11"];
+10--11 [label="173", fontsize="11"];
+10--12 [label="183", fontsize="11"];
+6--10 [label="74", fontsize="11"];
+11--0 [label="71", fontsize="11"];
+11--12 [label="124", fontsize="11"];
+}
diff --git a/src/boost/libs/graph/example/tiernan_girth_circumference.cpp b/src/boost/libs/graph/example/tiernan_girth_circumference.cpp
new file mode 100644
index 000000000..a2c36d3e5
--- /dev/null
+++ b/src/boost/libs/graph/example/tiernan_girth_circumference.cpp
@@ -0,0 +1,39 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[tiernan_girth_circumference
+#include <iostream>
+
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/tiernan_all_cycles.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// Declare the graph type and its vertex and edge types.
+typedef directed_graph<> Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and read it from standard input.
+ Graph g;
+ read_graph(g, cin);
+
+ // Compute the girth and circumference simulataneously
+ size_t girth, circ;
+ boost::tie(girth, circ) = tiernan_girth_and_circumference(g);
+
+ // Print the result
+ cout << "girth: " << girth << endl;
+ cout << "circumference: " << circ << endl;
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/tiernan_print_cycles.cpp b/src/boost/libs/graph/example/tiernan_print_cycles.cpp
new file mode 100644
index 000000000..0905973a7
--- /dev/null
+++ b/src/boost/libs/graph/example/tiernan_print_cycles.cpp
@@ -0,0 +1,66 @@
+// (C) Copyright Andrew Sutton 2007
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0 (See accompanying file
+// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+//[tiernan_print_cycles
+#include <iostream>
+
+#include <boost/graph/directed_graph.hpp>
+#include <boost/graph/tiernan_all_cycles.hpp>
+
+#include "helper.hpp"
+
+using namespace std;
+using namespace boost;
+
+// The cycle_printer is a visitor that will print the path that comprises
+// the cycle. Note that the back() vertex of the path is not the same as
+// the front(). It is implicit in the listing of vertices that the back()
+// vertex is connected to the front().
+template < typename OutputStream > struct cycle_printer
+{
+ cycle_printer(OutputStream& stream) : os(stream) {}
+
+ template < typename Path, typename Graph >
+ void cycle(const Path& p, const Graph& g)
+ {
+ // Get the property map containing the vertex indices
+ // so we can print them.
+ typedef
+ typename property_map< Graph, vertex_index_t >::const_type IndexMap;
+ IndexMap indices = get(vertex_index, g);
+
+ // Iterate over path printing each vertex that forms the cycle.
+ typename Path::const_iterator i, end = p.end();
+ for (i = p.begin(); i != end; ++i)
+ {
+ os << get(indices, *i) << " ";
+ }
+ os << endl;
+ }
+ OutputStream& os;
+};
+
+// Declare the graph type and its vertex and edge types.
+typedef directed_graph<> Graph;
+typedef graph_traits< Graph >::vertex_descriptor Vertex;
+typedef graph_traits< Graph >::edge_descriptor Edge;
+
+int main(int argc, char* argv[])
+{
+ // Create the graph and read it from standard input.
+ Graph g;
+ read_graph(g, cin);
+
+ // Instantiate the visitor for printing cycles
+ cycle_printer< ostream > vis(cout);
+
+ // Use the Tiernan algorithm to visit all cycles, printing them
+ // as they are found.
+ tiernan_all_cycles(g, vis);
+
+ return 0;
+}
+//]
diff --git a/src/boost/libs/graph/example/topo-sort-file-dep.cpp b/src/boost/libs/graph/example/topo-sort-file-dep.cpp
new file mode 100644
index 000000000..6607e7e93
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort-file-dep.cpp
@@ -0,0 +1,91 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The file dependency graph is directed
+ >
+ file_dep_graph;
+
+typedef graph_traits< file_dep_graph >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph >::edge_descriptor edge_t;
+
+void topo_sort_dfs(
+ const file_dep_graph& g, vertex_t u, vertex_t*& topo_order, int* mark)
+{
+ mark[u] = 1; // 1 means visited, 0 means not yet visited
+ graph_traits< file_dep_graph >::adjacency_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = adjacent_vertices(u, g); vi != vi_end; ++vi)
+ if (mark[*vi] == 0)
+ topo_sort_dfs(g, *vi, topo_order, mark);
+
+ *--topo_order = u;
+}
+
+void topo_sort(const file_dep_graph& g, vertex_t* topo_order)
+{
+ std::vector< int > mark(num_vertices(g), 0);
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (mark[*vi] == 0)
+ topo_sort_dfs(g, *vi, topo_order, &mark[0]);
+}
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ file_dep_graph g(n_vertices);
+ while (input_begin != input_end)
+ {
+ size_type i, j;
+ boost::tie(i, j) = *input_begin++;
+ add_edge(i, j, g);
+ }
+#else
+ file_dep_graph g(input_begin, input_end, n_vertices);
+#endif
+
+ std::vector< std::string > name(num_vertices(g));
+ std::ifstream name_in(argc >= 3 ? argv[2] : "makefile-target-names.dat");
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ name_in >> name[*vi];
+
+ std::vector< vertex_t > order(num_vertices(g));
+ topo_sort(g, &order[0] + num_vertices(g));
+ for (size_type i = 0; i < num_vertices(g); ++i)
+ std::cout << name[order[i]] << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/topo-sort-file-dep2.cpp b/src/boost/libs/graph/example/topo-sort-file-dep2.cpp
new file mode 100644
index 000000000..68304b3fe
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort-file-dep2.cpp
@@ -0,0 +1,134 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <fstream>
+#include <iostream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+using namespace boost;
+
+namespace std
+{
+template < typename T >
+std::istream& operator>>(std::istream& in, std::pair< T, T >& p)
+{
+ in >> p.first >> p.second;
+ return in;
+}
+}
+
+typedef adjacency_list< listS, // Store out-edges of each vertex in a std::list
+ vecS, // Store vertex set in a std::vector
+ directedS // The file dependency graph is directed
+ >
+ file_dep_graph;
+
+typedef graph_traits< file_dep_graph >::vertex_descriptor vertex_t;
+typedef graph_traits< file_dep_graph >::edge_descriptor edge_t;
+
+template < typename Visitor >
+void dfs_v1(
+ const file_dep_graph& g, vertex_t u, default_color_type* color, Visitor vis)
+{
+ color[u] = gray_color;
+ vis.discover_vertex(u, g);
+ graph_traits< file_dep_graph >::out_edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei)
+ {
+ if (color[target(*ei, g)] == white_color)
+ {
+ vis.tree_edge(*ei, g);
+ dfs_v1(g, target(*ei, g), color, vis);
+ }
+ else if (color[target(*ei, g)] == gray_color)
+ vis.back_edge(*ei, g);
+ else
+ vis.forward_or_cross_edge(*ei, g);
+ }
+ color[u] = black_color;
+ vis.finish_vertex(u, g);
+}
+
+template < typename Visitor >
+void generic_dfs_v1(const file_dep_graph& g, Visitor vis)
+{
+ std::vector< default_color_type > color(num_vertices(g), white_color);
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ {
+ if (color[*vi] == white_color)
+ dfs_v1(g, *vi, &color[0], vis);
+ }
+}
+
+struct dfs_visitor_default
+{
+ template < typename V, typename G > void discover_vertex(V, const G&) {}
+
+ template < typename E, typename G > void tree_edge(E, const G&) {}
+
+ template < typename E, typename G > void back_edge(E, const G&) {}
+
+ template < typename E, typename G > void forward_or_cross_edge(E, const G&)
+ {
+ }
+
+ template < typename V, typename G > void finish_vertex(V, const G&) {}
+};
+
+struct topo_visitor : public dfs_visitor_default
+{
+ topo_visitor(vertex_t*& order) : topo_order(order) {}
+ void finish_vertex(vertex_t u, const file_dep_graph&) { *--topo_order = u; }
+ vertex_t*& topo_order;
+};
+
+void topo_sort(const file_dep_graph& g, vertex_t* topo_order)
+{
+ topo_visitor vis(topo_order);
+ generic_dfs_v1(g, vis);
+}
+
+int main(int argc, const char** argv)
+{
+ std::ifstream file_in(argc >= 2 ? argv[1] : "makefile-dependencies.dat");
+ typedef graph_traits< file_dep_graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ file_in >> n_vertices; // read in number of vertices
+ std::istream_iterator< std::pair< size_type, size_type > > input_begin(
+ file_in),
+ input_end;
+
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ file_dep_graph g(n_vertices);
+ while (input_begin != input_end)
+ {
+ size_type i, j;
+ boost::tie(i, j) = *input_begin++;
+ add_edge(i, j, g);
+ }
+#else
+ file_dep_graph g(input_begin, input_end, n_vertices);
+#endif
+
+ std::vector< std::string > name(num_vertices(g));
+ std::ifstream name_in(argc >= 2 ? argv[1] : "makefile-target-names.dat");
+ graph_traits< file_dep_graph >::vertex_iterator vi, vi_end;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ name_in >> name[*vi];
+
+ std::vector< vertex_t > order(num_vertices(g));
+ topo_sort(g, &order[0] + num_vertices(g));
+ for (size_type i = 0; i < num_vertices(g); ++i)
+ std::cout << name[order[i]] << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/topo-sort-with-leda.cpp b/src/boost/libs/graph/example/topo-sort-with-leda.cpp
new file mode 100644
index 000000000..42c07e2ea
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort-with-leda.cpp
@@ -0,0 +1,53 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <vector>
+#include <string>
+#include <boost/graph/topological_sort.hpp>
+#include <boost/graph/leda_graph.hpp>
+// Undefine macros from LEDA that conflict with the C++ Standard Library.
+#undef string
+#undef vector
+
+int main()
+{
+ using namespace boost;
+ typedef GRAPH< std::string, char > graph_t;
+ graph_t leda_g;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_t;
+ std::vector< vertex_t > vert(7);
+ vert[0] = add_vertex(std::string("pick up kids from school"), leda_g);
+ vert[1] = add_vertex(std::string("buy groceries (and snacks)"), leda_g);
+ vert[2] = add_vertex(std::string("get cash at ATM"), leda_g);
+ vert[3]
+ = add_vertex(std::string("drop off kids at soccer practice"), leda_g);
+ vert[4] = add_vertex(std::string("cook dinner"), leda_g);
+ vert[5] = add_vertex(std::string("pick up kids from soccer"), leda_g);
+ vert[6] = add_vertex(std::string("eat dinner"), leda_g);
+
+ add_edge(vert[0], vert[3], leda_g);
+ add_edge(vert[1], vert[3], leda_g);
+ add_edge(vert[1], vert[4], leda_g);
+ add_edge(vert[2], vert[1], leda_g);
+ add_edge(vert[3], vert[5], leda_g);
+ add_edge(vert[4], vert[6], leda_g);
+ add_edge(vert[5], vert[6], leda_g);
+
+ std::vector< vertex_t > topo_order;
+ node_array< default_color_type > color_array(leda_g);
+
+ topological_sort(leda_g, std::back_inserter(topo_order),
+ color_map(make_leda_node_property_map(color_array)));
+
+ std::reverse(topo_order.begin(), topo_order.end());
+ int n = 1;
+ for (std::vector< vertex_t >::iterator i = topo_order.begin();
+ i != topo_order.end(); ++i, ++n)
+ std::cout << n << ": " << leda_g[*i] << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/topo-sort-with-sgb.cpp b/src/boost/libs/graph/example/topo-sort-with-sgb.cpp
new file mode 100644
index 000000000..7453c3d3b
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort-with-sgb.cpp
@@ -0,0 +1,46 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <vector>
+#include <string>
+#include <iostream>
+#include <boost/graph/stanford_graph.hpp>
+#include <boost/graph/topological_sort.hpp>
+
+int main()
+{
+ using namespace boost;
+ const int n_vertices = 7;
+ Graph* sgb_g = gb_new_graph(n_vertices);
+
+ const char* tasks[]
+ = { "pick up kids from school", "buy groceries (and snacks)",
+ "get cash at ATM", "drop off kids at soccer practice",
+ "cook dinner", "pick up kids from soccer", "eat dinner" };
+ const int n_tasks = sizeof(tasks) / sizeof(char*);
+
+ gb_new_arc(sgb_g->vertices + 0, sgb_g->vertices + 3, 0);
+ gb_new_arc(sgb_g->vertices + 1, sgb_g->vertices + 3, 0);
+ gb_new_arc(sgb_g->vertices + 1, sgb_g->vertices + 4, 0);
+ gb_new_arc(sgb_g->vertices + 2, sgb_g->vertices + 1, 0);
+ gb_new_arc(sgb_g->vertices + 3, sgb_g->vertices + 5, 0);
+ gb_new_arc(sgb_g->vertices + 4, sgb_g->vertices + 6, 0);
+ gb_new_arc(sgb_g->vertices + 5, sgb_g->vertices + 6, 0);
+
+ typedef graph_traits< Graph* >::vertex_descriptor vertex_t;
+ std::vector< vertex_t > topo_order;
+ topological_sort(sgb_g, std::back_inserter(topo_order),
+ vertex_index_map(get(vertex_index, sgb_g)));
+ int n = 1;
+ for (std::vector< vertex_t >::reverse_iterator i = topo_order.rbegin();
+ i != topo_order.rend(); ++i, ++n)
+ std::cout << n << ": " << tasks[get(vertex_index, sgb_g)[*i]]
+ << std::endl;
+
+ gb_recycle(sgb_g);
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/topo-sort1.cpp b/src/boost/libs/graph/example/topo-sort1.cpp
new file mode 100644
index 000000000..6579d0e04
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort1.cpp
@@ -0,0 +1,44 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <deque> // to store the vertex ordering
+#include <vector>
+#include <list>
+#include <iostream>
+#include <boost/graph/vector_as_graph.hpp>
+#include <boost/graph/topological_sort.hpp>
+
+int main()
+{
+ using namespace boost;
+ const char* tasks[]
+ = { "pick up kids from school", "buy groceries (and snacks)",
+ "get cash at ATM", "drop off kids at soccer practice",
+ "cook dinner", "pick up kids from soccer", "eat dinner" };
+ const int n_tasks = sizeof(tasks) / sizeof(char*);
+
+ std::vector< std::list< int > > g(n_tasks);
+ g[0].push_back(3);
+ g[1].push_back(3);
+ g[1].push_back(4);
+ g[2].push_back(1);
+ g[3].push_back(5);
+ g[4].push_back(6);
+ g[5].push_back(6);
+
+ std::deque< int > topo_order;
+
+ topological_sort(g, std::front_inserter(topo_order),
+ vertex_index_map(identity_property_map()));
+
+ int n = 1;
+ for (std::deque< int >::iterator i = topo_order.begin();
+ i != topo_order.end(); ++i, ++n)
+ std::cout << tasks[*i] << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/topo-sort2.cpp b/src/boost/libs/graph/example/topo-sort2.cpp
new file mode 100644
index 000000000..80aa3412b
--- /dev/null
+++ b/src/boost/libs/graph/example/topo-sort2.cpp
@@ -0,0 +1,44 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <vector>
+#include <deque>
+#include <iostream>
+#include <boost/graph/topological_sort.hpp>
+#include <boost/graph/adjacency_list.hpp>
+int main()
+{
+ using namespace boost;
+ const char* tasks[]
+ = { "pick up kids from school", "buy groceries (and snacks)",
+ "get cash at ATM", "drop off kids at soccer practice",
+ "cook dinner", "pick up kids from soccer", "eat dinner" };
+ const int n_tasks = sizeof(tasks) / sizeof(char*);
+
+ adjacency_list< listS, vecS, directedS > g(n_tasks);
+
+ add_edge(0, 3, g);
+ add_edge(1, 3, g);
+ add_edge(1, 4, g);
+ add_edge(2, 1, g);
+ add_edge(3, 5, g);
+ add_edge(4, 6, g);
+ add_edge(5, 6, g);
+
+ std::deque< int > topo_order;
+
+ topological_sort(g, std::front_inserter(topo_order),
+ vertex_index_map(identity_property_map()));
+
+ int n = 1;
+ for (std::deque< int >::iterator i = topo_order.begin();
+ i != topo_order.end(); ++i, ++n)
+ std::cout << tasks[*i] << std::endl;
+
+ return EXIT_SUCCESS;
+}
diff --git a/src/boost/libs/graph/example/topo_sort.cpp b/src/boost/libs/graph/example/topo_sort.cpp
new file mode 100644
index 000000000..38dc4667c
--- /dev/null
+++ b/src/boost/libs/graph/example/topo_sort.cpp
@@ -0,0 +1,70 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <list>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/topological_sort.hpp>
+#include <iterator>
+#include <utility>
+
+typedef std::pair< std::size_t, std::size_t > Pair;
+
+/*
+ Topological sort example
+
+ The topological sort algorithm creates a linear ordering
+ of the vertices such that if edge (u,v) appears in the graph,
+ then u comes before v in the ordering.
+
+ Sample output:
+
+ A topological ordering: 2 5 0 1 4 3
+
+*/
+
+int main(int, char*[])
+{
+ // begin
+ using namespace boost;
+
+ /* Topological sort will need to color the graph. Here we use an
+ internal decorator, so we "property" the color to the graph.
+ */
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_color_t, default_color_type > >
+ Graph;
+
+ typedef boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ Pair edges[6] = { Pair(0, 1), Pair(2, 4), Pair(2, 5), Pair(0, 3),
+ Pair(1, 4), Pair(4, 3) };
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ // VC++ can't handle the iterator constructor
+ Graph G(6);
+ for (std::size_t j = 0; j < 6; ++j)
+ add_edge(edges[j].first, edges[j].second, G);
+#else
+ Graph G(edges, edges + 6, 6);
+#endif
+
+ boost::property_map< Graph, vertex_index_t >::type id
+ = get(vertex_index, G);
+
+ typedef std::vector< Vertex > container;
+ container c;
+ topological_sort(G, std::back_inserter(c));
+
+ std::cout << "A topological ordering: ";
+ for (container::reverse_iterator ii = c.rbegin(); ii != c.rend(); ++ii)
+ std::cout << id[*ii] << " ";
+ std::cout << std::endl;
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/topo_sort.expected b/src/boost/libs/graph/example/topo_sort.expected
new file mode 100644
index 000000000..ab0d6ec06
--- /dev/null
+++ b/src/boost/libs/graph/example/topo_sort.expected
@@ -0,0 +1 @@
+A topological ordering: 2 5 0 1 4 3
diff --git a/src/boost/libs/graph/example/transitive_closure.cpp b/src/boost/libs/graph/example/transitive_closure.cpp
new file mode 100644
index 000000000..1699071e8
--- /dev/null
+++ b/src/boost/libs/graph/example/transitive_closure.cpp
@@ -0,0 +1,49 @@
+// Copyright (c) Jeremy Siek 2001
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// NOTE: this final is generated by libs/graph/doc/transitive_closure.w
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#error The transitive closure algorithm uses partial specialization.
+#endif
+
+#include <boost/graph/transitive_closure.hpp>
+#include <boost/graph/graphviz.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main(int, char*[])
+{
+ using namespace boost;
+ typedef property< vertex_name_t, char > Name;
+ typedef property< vertex_index_t, std::size_t, Name > Index;
+ typedef adjacency_list< listS, listS, directedS, Index > graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_t;
+ graph_t G;
+ std::vector< vertex_t > verts(4);
+ for (int i = 0; i < 4; ++i)
+ verts[i] = add_vertex(Index(i, Name('a' + i)), G);
+ add_edge(verts[1], verts[2], G);
+ add_edge(verts[1], verts[3], G);
+ add_edge(verts[2], verts[1], G);
+ add_edge(verts[3], verts[2], G);
+ add_edge(verts[3], verts[0], G);
+
+ std::cout << "Graph G:" << std::endl;
+ print_graph(G, get(vertex_name, G));
+
+ adjacency_list<> TC;
+ transitive_closure(G, TC);
+
+ std::cout << std::endl << "Graph G+:" << std::endl;
+ char name[] = "abcd";
+ print_graph(TC, name);
+ std::cout << std::endl;
+
+ std::ofstream out("tc-out.dot");
+ write_graphviz(out, TC, make_label_writer(name));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/transpose-example.cpp b/src/boost/libs/graph/example/transpose-example.cpp
new file mode 100644
index 000000000..618a288b7
--- /dev/null
+++ b/src/boost/libs/graph/example/transpose-example.cpp
@@ -0,0 +1,57 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/transpose_graph.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main()
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, bidirectionalS,
+ property< vertex_name_t, char > >
+ graph_t;
+
+ enum
+ {
+ a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ N
+ };
+ graph_t G(N);
+ property_map< graph_t, vertex_name_t >::type name_map = get(vertex_name, G);
+ char name = 'a';
+ graph_traits< graph_t >::vertex_iterator v, v_end;
+ for (boost::tie(v, v_end) = vertices(G); v != v_end; ++v, ++name)
+ name_map[*v] = name;
+
+ typedef std::pair< int, int > E;
+ E edge_array[] = { E(a, c), E(a, d), E(b, a), E(b, d), E(c, f), E(d, c),
+ E(d, e), E(d, f), E(e, b), E(e, g), E(f, e), E(f, g) };
+ for (int i = 0; i < 12; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, G);
+
+ print_graph(G, name_map);
+ std::cout << std::endl;
+
+ graph_t G_T;
+ transpose_graph(G, G_T);
+
+ print_graph(G_T, name_map);
+
+ graph_traits< graph_t >::edge_iterator ei, ei_end;
+ for (boost::tie(ei, ei_end) = edges(G); ei != ei_end; ++ei)
+ assert(edge(target(*ei, G), source(*ei, G), G_T).second == true);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/two_graphs_common_spanning_trees.cpp b/src/boost/libs/graph/example/two_graphs_common_spanning_trees.cpp
new file mode 100644
index 000000000..824556dbe
--- /dev/null
+++ b/src/boost/libs/graph/example/two_graphs_common_spanning_trees.cpp
@@ -0,0 +1,72 @@
+// Copyright (C) 2012, Michele Caini.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Two Graphs Common Spanning Trees Algorithm
+// Based on academic article of Mint, Read and Tarjan
+// Efficient Algorithm for Common Spanning Tree Problem
+// Electron. Lett., 28 April 1983, Volume 19, Issue 9, p.346-347
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/two_graphs_common_spanning_trees.hpp>
+#include <exception>
+#include <vector>
+
+using namespace std;
+
+typedef boost::adjacency_list< boost::vecS, // OutEdgeList
+ boost::vecS, // VertexList
+ boost::undirectedS, // Directed
+ boost::no_property, // VertexProperties
+ boost::no_property, // EdgeProperties
+ boost::no_property, // GraphProperties
+ boost::listS // EdgeList
+ >
+ Graph;
+
+typedef boost::graph_traits< Graph >::vertex_descriptor vertex_descriptor;
+
+typedef boost::graph_traits< Graph >::edge_descriptor edge_descriptor;
+
+typedef boost::graph_traits< Graph >::vertex_iterator vertex_iterator;
+
+typedef boost::graph_traits< Graph >::edge_iterator edge_iterator;
+
+int main(int argc, char** argv)
+{
+ Graph iG, vG;
+ vector< edge_descriptor > iG_o;
+ vector< edge_descriptor > vG_o;
+
+ iG_o.push_back(boost::add_edge(0, 1, iG).first);
+ iG_o.push_back(boost::add_edge(0, 2, iG).first);
+ iG_o.push_back(boost::add_edge(0, 3, iG).first);
+ iG_o.push_back(boost::add_edge(0, 4, iG).first);
+ iG_o.push_back(boost::add_edge(1, 2, iG).first);
+ iG_o.push_back(boost::add_edge(3, 4, iG).first);
+
+ vG_o.push_back(boost::add_edge(1, 2, vG).first);
+ vG_o.push_back(boost::add_edge(2, 0, vG).first);
+ vG_o.push_back(boost::add_edge(2, 3, vG).first);
+ vG_o.push_back(boost::add_edge(4, 3, vG).first);
+ vG_o.push_back(boost::add_edge(0, 3, vG).first);
+ vG_o.push_back(boost::add_edge(0, 4, vG).first);
+
+ vector< bool > inL(iG_o.size(), false);
+
+ std::vector< std::vector< bool > > coll;
+ boost::tree_collector< std::vector< std::vector< bool > >,
+ std::vector< bool > >
+ tree_collector(coll);
+ boost::two_graphs_common_spanning_trees(
+ iG, iG_o, vG, vG_o, tree_collector, inL);
+
+ std::vector< std::vector< bool > >::iterator it;
+ for (it = coll.begin(); it != coll.end(); ++it)
+ {
+ // Here you can play with the trees that the algorithm has found.
+ }
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/undirected_adjacency_list.cpp b/src/boost/libs/graph/example/undirected_adjacency_list.cpp
new file mode 100644
index 000000000..9e3601493
--- /dev/null
+++ b/src/boost/libs/graph/example/undirected_adjacency_list.cpp
@@ -0,0 +1,113 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <boost/graph/adjacency_list.hpp>
+using namespace boost;
+
+template < typename UndirectedGraph > void undirected_graph_demo1()
+{
+ const int V = 3;
+ UndirectedGraph undigraph(V);
+ typename graph_traits< UndirectedGraph >::vertex_descriptor zero, one, two;
+ typename graph_traits< UndirectedGraph >::out_edge_iterator out, out_end;
+ typename graph_traits< UndirectedGraph >::in_edge_iterator in, in_end;
+
+ zero = vertex(0, undigraph);
+ one = vertex(1, undigraph);
+ two = vertex(2, undigraph);
+ add_edge(zero, one, undigraph);
+ add_edge(zero, two, undigraph);
+ add_edge(one, two, undigraph);
+
+ std::cout << "out_edges(0):";
+ for (boost::tie(out, out_end) = out_edges(zero, undigraph); out != out_end;
+ ++out)
+ std::cout << ' ' << *out;
+ std::cout << std::endl << "in_edges(0):";
+ for (boost::tie(in, in_end) = in_edges(zero, undigraph); in != in_end; ++in)
+ std::cout << ' ' << *in;
+ std::cout << std::endl;
+}
+
+template < typename DirectedGraph > void directed_graph_demo()
+{
+ const int V = 2;
+ DirectedGraph digraph(V);
+ typename graph_traits< DirectedGraph >::vertex_descriptor u, v;
+ typedef typename DirectedGraph::edge_property_type Weight;
+ typename property_map< DirectedGraph, edge_weight_t >::type weight
+ = get(edge_weight, digraph);
+ typename graph_traits< DirectedGraph >::edge_descriptor e1, e2;
+ bool found;
+
+ u = vertex(0, digraph);
+ v = vertex(1, digraph);
+ add_edge(u, v, Weight(1.2), digraph);
+ add_edge(v, u, Weight(2.4), digraph);
+ boost::tie(e1, found) = edge(u, v, digraph);
+ boost::tie(e2, found) = edge(v, u, digraph);
+ std::cout << "in a directed graph is ";
+#ifdef __GNUC__
+ // no boolalpha
+ std::cout << "(u,v) == (v,u) ? " << (e1 == e2) << std::endl;
+#else
+ std::cout << "(u,v) == (v,u) ? " << std::boolalpha << (e1 == e2)
+ << std::endl;
+#endif
+ std::cout << "weight[(u,v)] = " << get(weight, e1) << std::endl;
+ std::cout << "weight[(v,u)] = " << get(weight, e2) << std::endl;
+}
+
+template < typename UndirectedGraph > void undirected_graph_demo2()
+{
+ const int V = 2;
+ UndirectedGraph undigraph(V);
+ typename graph_traits< UndirectedGraph >::vertex_descriptor u, v;
+ typedef typename UndirectedGraph::edge_property_type Weight;
+ typename property_map< UndirectedGraph, edge_weight_t >::type weight
+ = get(edge_weight, undigraph);
+ typename graph_traits< UndirectedGraph >::edge_descriptor e1, e2;
+ bool found;
+
+ u = vertex(0, undigraph);
+ v = vertex(1, undigraph);
+ add_edge(u, v, Weight(3.1), undigraph);
+ boost::tie(e1, found) = edge(u, v, undigraph);
+ boost::tie(e2, found) = edge(v, u, undigraph);
+ std::cout << "in an undirected graph is ";
+#ifdef __GNUC__
+ std::cout << "(u,v) == (v,u) ? " << (e1 == e2) << std::endl;
+#else
+ std::cout << "(u,v) == (v,u) ? " << std::boolalpha << (e1 == e2)
+ << std::endl;
+#endif
+ std::cout << "weight[(u,v)] = " << get(weight, e1) << std::endl;
+ std::cout << "weight[(v,u)] = " << get(weight, e2) << std::endl;
+
+ std::cout << "the edges incident to v: ";
+ typename boost::graph_traits< UndirectedGraph >::out_edge_iterator e, e_end;
+ typename boost::graph_traits< UndirectedGraph >::vertex_descriptor s
+ = vertex(0, undigraph);
+ for (boost::tie(e, e_end) = out_edges(s, undigraph); e != e_end; ++e)
+ std::cout << "(" << source(*e, undigraph) << ","
+ << target(*e, undigraph) << ")" << std::endl;
+}
+
+int main()
+{
+ typedef property< edge_weight_t, double > Weight;
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property, Weight >
+ UndirectedGraph;
+ typedef adjacency_list< vecS, vecS, directedS, no_property, Weight >
+ DirectedGraph;
+ undirected_graph_demo1< UndirectedGraph >();
+ directed_graph_demo< DirectedGraph >();
+ undirected_graph_demo2< UndirectedGraph >();
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/undirected_adjacency_list.expected b/src/boost/libs/graph/example/undirected_adjacency_list.expected
new file mode 100644
index 000000000..b02c64016
--- /dev/null
+++ b/src/boost/libs/graph/example/undirected_adjacency_list.expected
@@ -0,0 +1,9 @@
+out_edges(0): (0,1) (0,2)
+in_edges(0): (1,0) (2,0)
+in a directed graph is (u,v) == (v,u) ? 0
+weight[(u,v)] = 1.2
+weight[(v,u)] = 2.4
+in an undirected graph is (u,v) == (v,u) ? 1
+weight[(u,v)] = 3.1
+weight[(v,u)] = 3.1
+the edges incident to v: (0,1)
diff --git a/src/boost/libs/graph/example/undirected_dfs.cpp b/src/boost/libs/graph/example/undirected_dfs.cpp
new file mode 100644
index 000000000..05ce6e7ac
--- /dev/null
+++ b/src/boost/libs/graph/example/undirected_dfs.cpp
@@ -0,0 +1,79 @@
+//=======================================================================
+// Copyright 2002 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/undirected_dfs.hpp>
+#include <boost/cstdlib.hpp>
+#include <iostream>
+
+/*
+ Example graph from Tarjei Knapstad.
+
+ H15
+ |
+ H8 C2
+ \ / \
+ H9-C0-C1 C3-O7-H14
+ / | |
+ H10 C6 C4
+ / \ / \
+ H11 C5 H13
+ |
+ H12
+*/
+
+std::string name[] = { "C0", "C1", "C2", "C3", "C4", "C5", "C6", "O7", "H8",
+ "H9", "H10", "H11", "H12", "H13", "H14", "H15" };
+
+struct detect_loops : public boost::dfs_visitor<>
+{
+ template < class Edge, class Graph > void back_edge(Edge e, const Graph& g)
+ {
+ std::cout << name[source(e, g)] << " -- " << name[target(e, g)] << "\n";
+ }
+};
+
+int main(int, char*[])
+{
+ using namespace boost;
+ typedef adjacency_list< vecS, vecS, undirectedS, no_property,
+ property< edge_color_t, default_color_type > >
+ graph_t;
+ typedef graph_traits< graph_t >::vertex_descriptor vertex_t;
+
+ const std::size_t N = sizeof(name) / sizeof(std::string);
+ graph_t g(N);
+
+ add_edge(0, 1, g);
+ add_edge(0, 8, g);
+ add_edge(0, 9, g);
+ add_edge(0, 10, g);
+ add_edge(1, 2, g);
+ add_edge(1, 6, g);
+ add_edge(2, 15, g);
+ add_edge(2, 3, g);
+ add_edge(3, 7, g);
+ add_edge(3, 4, g);
+ add_edge(4, 13, g);
+ add_edge(4, 5, g);
+ add_edge(5, 12, g);
+ add_edge(5, 6, g);
+ add_edge(6, 11, g);
+ add_edge(7, 14, g);
+
+ std::cout << "back edges:\n";
+ detect_loops vis;
+ undirected_dfs(g,
+ root_vertex(vertex_t(0))
+ .visitor(vis)
+ .edge_color_map(get(edge_color, g)));
+ std::cout << std::endl;
+
+ return boost::exit_success;
+}
diff --git a/src/boost/libs/graph/example/undirected_graph.cpp b/src/boost/libs/graph/example/undirected_graph.cpp
new file mode 100644
index 000000000..0c0365ceb
--- /dev/null
+++ b/src/boost/libs/graph/example/undirected_graph.cpp
@@ -0,0 +1,30 @@
+//=======================================================================
+// Copyright 2012
+// Authors: David Doria
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/graph_traits.hpp>
+#include <boost/graph/undirected_graph.hpp>
+
+typedef boost::undirected_graph< boost::no_property > Graph;
+
+int main(int, char*[])
+{
+ // Create a graph object
+ Graph g;
+
+ // Add vertices
+ boost::graph_traits< Graph >::vertex_descriptor v0 = g.add_vertex();
+ boost::graph_traits< Graph >::vertex_descriptor v1 = g.add_vertex();
+ boost::graph_traits< Graph >::vertex_descriptor v2 = g.add_vertex();
+
+ // Add edges
+ g.add_edge(v0, v1);
+ g.add_edge(v1, v2);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/vector_as_graph.cpp b/src/boost/libs/graph/example/vector_as_graph.cpp
new file mode 100644
index 000000000..f9e785ed3
--- /dev/null
+++ b/src/boost/libs/graph/example/vector_as_graph.cpp
@@ -0,0 +1,48 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#error The vector_as_graph.hpp header requires partial specialization
+#endif
+
+#include <vector>
+#include <list>
+#include <iostream> // needed by graph_utility. -Jeremy
+#include <boost/graph/vector_as_graph.hpp>
+#include <boost/graph/graph_utility.hpp>
+
+int main()
+{
+ enum
+ {
+ r,
+ s,
+ t,
+ u,
+ v,
+ w,
+ x,
+ y,
+ N
+ };
+ char name[] = "rstuvwxy";
+ typedef std::vector< std::list< int > > Graph;
+ Graph g(N);
+ g[r].push_back(v);
+ g[s].push_back(r);
+ g[s].push_back(r);
+ g[s].push_back(w);
+ g[t].push_back(x);
+ g[u].push_back(t);
+ g[w].push_back(t);
+ g[w].push_back(x);
+ g[x].push_back(y);
+ g[y].push_back(u);
+ boost::print_graph(g, name);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/vector_as_graph.expected b/src/boost/libs/graph/example/vector_as_graph.expected
new file mode 100644
index 000000000..a41a4d4a1
--- /dev/null
+++ b/src/boost/libs/graph/example/vector_as_graph.expected
@@ -0,0 +1,2 @@
+order of discovery: s r w v t x y u
+order of finish: s r w v t x y u
diff --git a/src/boost/libs/graph/example/vertex-name-property.cpp b/src/boost/libs/graph/example/vertex-name-property.cpp
new file mode 100644
index 000000000..c1a3b0b70
--- /dev/null
+++ b/src/boost/libs/graph/example/vertex-name-property.cpp
@@ -0,0 +1,86 @@
+//=======================================================================
+// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <boost/config.hpp>
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace boost;
+
+template < typename Graph, typename VertexNamePropertyMap >
+void read_graph_file(std::istream& graph_in, std::istream& name_in, Graph& g,
+ VertexNamePropertyMap name_map)
+{
+ typedef typename graph_traits< Graph >::vertices_size_type size_type;
+ size_type n_vertices;
+ typename graph_traits< Graph >::vertex_descriptor u;
+ typename property_traits< VertexNamePropertyMap >::value_type name;
+
+ graph_in >> n_vertices; // read in number of vertices
+ for (size_type i = 0; i < n_vertices; ++i)
+ { // Add n vertices to the graph
+ u = add_vertex(g);
+ name_in >> name;
+ put(name_map, u, name); // ** Attach name property to vertex u **
+ }
+ size_type src, targ;
+ while (graph_in >> src) // Read in edges
+ if (graph_in >> targ)
+ add_edge(src, targ, g); // add an edge to the graph
+ else
+ break;
+}
+
+int main(int argc, const char** argv)
+{
+ typedef adjacency_list< listS, // Store out-edges of each vertex in a
+ // std::list
+ vecS, // Store vertex set in a std::vector
+ directedS, // The graph is directed
+ property< vertex_name_t, std::string > // Add a vertex property
+ >
+ graph_type;
+
+ graph_type g; // use default constructor to create empty graph
+ const char* dep_file_name
+ = argc >= 2 ? argv[1] : "makefile-dependencies.dat";
+ const char* target_file_name
+ = argc >= 3 ? argv[2] : "makefile-target-names.dat";
+ std::ifstream file_in(dep_file_name), name_in(target_file_name);
+ if (!file_in)
+ {
+ std::cerr << "** Error: could not open file " << dep_file_name
+ << std::endl;
+ return -1;
+ }
+ if (!name_in)
+ {
+ std::cerr << "** Error: could not open file " << target_file_name
+ << std::endl;
+ return -1;
+ }
+
+ // Obtain internal property map from the graph
+ property_map< graph_type, vertex_name_t >::type name_map
+ = get(vertex_name, g);
+ read_graph_file(file_in, name_in, g, name_map);
+
+ // Create storage for last modified times
+ std::vector< time_t > last_mod_vec(num_vertices(g));
+ // Create nickname for the property map type
+ typedef iterator_property_map< std::vector< time_t >::iterator,
+ property_map< graph_type, vertex_index_t >::type, time_t, time_t& >
+ iter_map_t;
+ // Create last modified time property map
+ iter_map_t mod_time_map(last_mod_vec.begin(), get(vertex_index, g));
+
+ assert(num_vertices(g) == 15);
+ assert(num_edges(g) == 19);
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/vertex_basics.cpp b/src/boost/libs/graph/example/vertex_basics.cpp
new file mode 100644
index 000000000..107fd5ebc
--- /dev/null
+++ b/src/boost/libs/graph/example/vertex_basics.cpp
@@ -0,0 +1,154 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <algorithm>
+#include <boost/graph/adjacency_list.hpp>
+
+using namespace std;
+using namespace boost;
+
+/*
+ Vertex Basics
+
+ This example demonstrates the GGCL Vertex interface.
+
+ Sample output:
+
+ vertices(g) = 0 1 2 3 4
+ vertex id: 0
+ out-edges: (0,1) (0,2) (0,3) (0,4)
+ in-edges: (2,0) (3,0) (4,0)
+ adjacent vertices: 1 2 3 4
+
+ vertex id: 1
+ out-edges:
+ in-edges: (0,1) (3,1) (4,1)
+ adjacent vertices:
+
+ vertex id: 2
+ out-edges: (2,0) (2,4)
+ in-edges: (0,2)
+ adjacent vertices: 0 4
+
+ vertex id: 3
+ out-edges: (3,0) (3,1) (3,4)
+ in-edges: (0,3)
+ adjacent vertices: 0 1 4
+
+ vertex id: 4
+ out-edges: (4,0) (4,1)
+ in-edges: (0,4) (2,4) (3,4)
+ adjacent vertices: 0 1
+
+
+ */
+
+/* some helper functors for output */
+
+template < class Graph > struct print_edge
+{
+ print_edge(Graph& g) : G(g) {}
+
+ typedef typename boost::graph_traits< Graph >::edge_descriptor Edge;
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ void operator()(Edge e) const
+ {
+ typename boost::property_map< Graph, vertex_index_t >::type id
+ = get(vertex_index, G);
+
+ Vertex src = source(e, G);
+ Vertex targ = target(e, G);
+
+ cout << "(" << id[src] << "," << id[targ] << ") ";
+ }
+
+ Graph& G;
+};
+
+template < class Graph > struct print_index
+{
+ print_index(Graph& g) : G(g) {}
+
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+ void operator()(Vertex c) const
+ {
+ typename boost::property_map< Graph, vertex_index_t >::type id
+ = get(vertex_index, G);
+ cout << id[c] << " ";
+ }
+
+ Graph& G;
+};
+
+template < class Graph > struct exercise_vertex
+{
+ typedef typename boost::graph_traits< Graph >::vertex_descriptor Vertex;
+
+ exercise_vertex(Graph& _g) : g(_g) {}
+
+ void operator()(Vertex v) const
+ {
+ typename boost::property_map< Graph, vertex_index_t >::type id
+ = get(vertex_index, g);
+
+ cout << "vertex id: " << id[v] << endl;
+
+ cout << "out-edges: ";
+ for_each(out_edges(v, g).first, out_edges(v, g).second,
+ print_edge< Graph >(g));
+
+ cout << endl;
+
+ cout << "in-edges: ";
+ for_each(in_edges(v, g).first, in_edges(v, g).second,
+ print_edge< Graph >(g));
+
+ cout << endl;
+
+ cout << "adjacent vertices: ";
+ for_each(adjacent_vertices(v, g).first, adjacent_vertices(v, g).second,
+ print_index< Graph >(g));
+ cout << endl << endl;
+ }
+
+ Graph& g;
+};
+
+int main()
+{
+ typedef adjacency_list< vecS, vecS, bidirectionalS > MyGraphType;
+
+ typedef pair< int, int > Pair;
+ Pair edge_array[11] = { Pair(0, 1), Pair(0, 2), Pair(0, 3), Pair(0, 4),
+ Pair(2, 0), Pair(3, 0), Pair(2, 4), Pair(3, 1), Pair(3, 4), Pair(4, 0),
+ Pair(4, 1) };
+
+ /* Construct a graph using the edge_array*/
+ MyGraphType g(5);
+ for (int i = 0; i < 11; ++i)
+ add_edge(edge_array[i].first, edge_array[i].second, g);
+
+ boost::property_map< MyGraphType, vertex_index_t >::type id
+ = get(vertex_index, g);
+
+ cout << "vertices(g) = ";
+ boost::graph_traits< MyGraphType >::vertex_iterator vi;
+ for (vi = vertices(g).first; vi != vertices(g).second; ++vi)
+ std::cout << id[*vi] << " ";
+ std::cout << std::endl;
+
+ /* Use the STL for_each algorithm to "exercise" all
+ of the vertices in the graph */
+ for_each(vertices(g).first, vertices(g).second,
+ exercise_vertex< MyGraphType >(g));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/vertex_basics.expected b/src/boost/libs/graph/example/vertex_basics.expected
new file mode 100644
index 000000000..69012bfae
--- /dev/null
+++ b/src/boost/libs/graph/example/vertex_basics.expected
@@ -0,0 +1,26 @@
+vertices(g) = 0 1 2 3 4
+vertex id: 0
+out-edges: (0,1) (0,2) (0,3) (0,4)
+in-edges: (2,0) (3,0) (4,0)
+adjacent vertices: 1 2 3 4
+
+vertex id: 1
+out-edges:
+in-edges: (0,1) (3,1) (4,1)
+adjacent vertices:
+
+vertex id: 2
+out-edges: (2,0) (2,4)
+in-edges: (0,2)
+adjacent vertices: 0 4
+
+vertex id: 3
+out-edges: (3,0) (3,1) (3,4)
+in-edges: (0,3)
+adjacent vertices: 0 1 4
+
+vertex id: 4
+out-edges: (4,0) (4,1)
+in-edges: (0,4) (2,4) (3,4)
+adjacent vertices: 0 1
+
diff --git a/src/boost/libs/graph/example/vf2_sub_graph_iso_example.cpp b/src/boost/libs/graph/example/vf2_sub_graph_iso_example.cpp
new file mode 100644
index 000000000..613cb6967
--- /dev/null
+++ b/src/boost/libs/graph/example/vf2_sub_graph_iso_example.cpp
@@ -0,0 +1,52 @@
+//=======================================================================
+// Copyright (C) 2012 Flavio De Lorenzi (fdlorenzi@gmail.com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/vf2_sub_graph_iso.hpp>
+using namespace boost;
+
+int main()
+{
+
+ typedef adjacency_list< setS, vecS, bidirectionalS > graph_type;
+
+ // Build graph1
+ int num_vertices1 = 8;
+ graph_type graph1(num_vertices1);
+ add_edge(0, 6, graph1);
+ add_edge(0, 7, graph1);
+ add_edge(1, 5, graph1);
+ add_edge(1, 7, graph1);
+ add_edge(2, 4, graph1);
+ add_edge(2, 5, graph1);
+ add_edge(2, 6, graph1);
+ add_edge(3, 4, graph1);
+
+ // Build graph2
+ int num_vertices2 = 9;
+ graph_type graph2(num_vertices2);
+ add_edge(0, 6, graph2);
+ add_edge(0, 8, graph2);
+ add_edge(1, 5, graph2);
+ add_edge(1, 7, graph2);
+ add_edge(2, 4, graph2);
+ add_edge(2, 7, graph2);
+ add_edge(2, 8, graph2);
+ add_edge(3, 4, graph2);
+ add_edge(3, 5, graph2);
+ add_edge(3, 6, graph2);
+
+ // Create callback to print mappings
+ vf2_print_callback< graph_type, graph_type > callback(graph1, graph2);
+
+ // Print out all subgraph isomorphism mappings between graph1 and graph2.
+ // Vertices and edges are assumed to be always equivalent.
+ vf2_subgraph_iso(graph1, graph2, callback);
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/vf2_sub_graph_iso_multi_example.cpp b/src/boost/libs/graph/example/vf2_sub_graph_iso_multi_example.cpp
new file mode 100644
index 000000000..330fe28c8
--- /dev/null
+++ b/src/boost/libs/graph/example/vf2_sub_graph_iso_multi_example.cpp
@@ -0,0 +1,95 @@
+//=======================================================================
+// Copyright (C) 2012 Flavio De Lorenzi (fdlorenzi@gmail.com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/vf2_sub_graph_iso.hpp>
+using namespace boost;
+
+int main()
+{
+ typedef property< edge_name_t, char > edge_property;
+ typedef property< vertex_name_t, char, property< vertex_index_t, int > >
+ vertex_property;
+
+ // Using a vecS graphs => the index maps are implicit.
+ typedef adjacency_list< vecS, vecS, bidirectionalS, vertex_property,
+ edge_property >
+ graph_type;
+
+ // Build graph1
+ graph_type graph1;
+
+ add_vertex(vertex_property('a'), graph1);
+ add_vertex(vertex_property('a'), graph1);
+ add_vertex(vertex_property('a'), graph1);
+
+ add_edge(0, 1, edge_property('b'), graph1);
+ add_edge(0, 1, edge_property('b'), graph1);
+ add_edge(0, 1, edge_property('d'), graph1);
+
+ add_edge(1, 2, edge_property('s'), graph1);
+
+ add_edge(2, 2, edge_property('l'), graph1);
+ add_edge(2, 2, edge_property('l'), graph1);
+
+ // Build graph2
+ graph_type graph2;
+
+ add_vertex(vertex_property('a'), graph2);
+ add_vertex(vertex_property('a'), graph2);
+ add_vertex(vertex_property('a'), graph2);
+ add_vertex(vertex_property('a'), graph2);
+ add_vertex(vertex_property('a'), graph2);
+ add_vertex(vertex_property('a'), graph2);
+
+ add_edge(0, 1, edge_property('a'), graph2);
+ add_edge(0, 1, edge_property('a'), graph2);
+ add_edge(0, 1, edge_property('b'), graph2);
+
+ add_edge(1, 2, edge_property('s'), graph2);
+
+ add_edge(2, 3, edge_property('b'), graph2);
+ add_edge(2, 3, edge_property('d'), graph2);
+ add_edge(2, 3, edge_property('b'), graph2);
+
+ add_edge(3, 4, edge_property('s'), graph2);
+
+ add_edge(4, 4, edge_property('l'), graph2);
+ add_edge(4, 4, edge_property('l'), graph2);
+
+ add_edge(4, 5, edge_property('c'), graph2);
+ add_edge(4, 5, edge_property('c'), graph2);
+ add_edge(4, 5, edge_property('c'), graph2);
+
+ add_edge(5, 0, edge_property('s'), graph2);
+
+ // create predicates
+ typedef property_map< graph_type, vertex_name_t >::type vertex_name_map_t;
+ typedef property_map_equivalent< vertex_name_map_t, vertex_name_map_t >
+ vertex_comp_t;
+ vertex_comp_t vertex_comp = make_property_map_equivalent(
+ get(vertex_name, graph1), get(vertex_name, graph2));
+
+ typedef property_map< graph_type, edge_name_t >::type edge_name_map_t;
+ typedef property_map_equivalent< edge_name_map_t, edge_name_map_t >
+ edge_comp_t;
+ edge_comp_t edge_comp = make_property_map_equivalent(
+ get(edge_name, graph1), get(edge_name, graph2));
+
+ // Create callback
+ vf2_print_callback< graph_type, graph_type > callback(graph1, graph2);
+
+ // Print out all subgraph isomorphism mappings between graph1 and graph2.
+ // Function vertex_order_by_mult is used to compute the order of
+ // vertices of graph1. This is the order in which the vertices are examined
+ // during the matching process.
+ vf2_subgraph_iso(graph1, graph2, callback, vertex_order_by_mult(graph1),
+ edges_equivalent(edge_comp).vertices_equivalent(vertex_comp));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/visitor.cpp b/src/boost/libs/graph/example/visitor.cpp
new file mode 100644
index 000000000..8620c1165
--- /dev/null
+++ b/src/boost/libs/graph/example/visitor.cpp
@@ -0,0 +1,102 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+//
+// Sample output
+//
+// DFS categorized directed graph
+// tree: 0 --> 2
+// tree: 2 --> 1
+// back: 1 --> 1
+// tree: 1 --> 3
+// back: 3 --> 1
+// tree: 3 --> 4
+// back: 4 --> 0
+// back: 4 --> 1
+// forward or cross: 2 --> 3
+
+// BFS categorized directed graph
+// tree: 0 --> 2
+// tree: 2 --> 1
+// tree: 2 --> 3
+// cycle: 1 --> 1
+// cycle: 1 --> 3
+// cycle: 3 --> 1
+// tree: 3 --> 4
+// cycle: 4 --> 0
+// cycle: 4 --> 1
+
+#include <boost/config.hpp>
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <utility>
+#include <string>
+
+#include <boost/graph/visitors.hpp>
+#include <boost/graph/graph_utility.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/breadth_first_search.hpp>
+#include <boost/graph/depth_first_search.hpp>
+
+using namespace boost;
+using namespace std;
+
+template < class Tag >
+struct edge_printer : public base_visitor< edge_printer< Tag > >
+{
+ typedef Tag event_filter;
+ edge_printer(std::string edge_t) : m_edge_type(edge_t) {}
+ template < class Edge, class Graph > void operator()(Edge e, Graph& G)
+ {
+ std::cout << m_edge_type << ": " << source(e, G) << " --> "
+ << target(e, G) << std::endl;
+ }
+ std::string m_edge_type;
+};
+template < class Tag > edge_printer< Tag > print_edge(std::string type, Tag)
+{
+ return edge_printer< Tag >(type);
+}
+
+int main(int, char*[])
+{
+
+ using namespace boost;
+
+ typedef adjacency_list<> Graph;
+ typedef std::pair< int, int > E;
+ E edges[] = { E(0, 2), E(1, 1), E(1, 3), E(2, 1), E(2, 3), E(3, 1), E(3, 4),
+ E(4, 0), E(4, 1) };
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+ Graph G(5);
+ for (std::size_t j = 0; j < sizeof(edges) / sizeof(E); ++j)
+ add_edge(edges[j].first, edges[j].second, G);
+#else
+ Graph G(edges, edges + sizeof(edges) / sizeof(E), 5);
+#endif
+
+ typedef boost::graph_traits< Graph >::vertices_size_type size_type;
+
+ std::vector< size_type > d(num_vertices(G));
+ std::vector< size_type > f(num_vertices(G));
+
+ cout << "DFS categorized directed graph" << endl;
+ depth_first_search(G,
+ visitor(make_dfs_visitor(make_list(print_edge("tree", on_tree_edge()),
+ print_edge("back", on_back_edge()),
+ print_edge("forward or cross", on_forward_or_cross_edge())))));
+
+ cout << endl << "BFS categorized directed graph" << endl;
+ boost::breadth_first_search(G, vertex(0, G),
+ visitor(
+ make_bfs_visitor(std::make_pair(print_edge("tree", on_tree_edge()),
+ print_edge("cycle", on_non_tree_edge())))));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/visitor.expected b/src/boost/libs/graph/example/visitor.expected
new file mode 100644
index 000000000..18bad31fc
--- /dev/null
+++ b/src/boost/libs/graph/example/visitor.expected
@@ -0,0 +1,21 @@
+DFS categorized directed graph
+tree: 0 --> 2
+tree: 2 --> 1
+back: 1 --> 1
+tree: 1 --> 3
+back: 3 --> 1
+tree: 3 --> 4
+back: 4 --> 0
+back: 4 --> 1
+forward or cross: 2 --> 3
+
+BFS categorized directed graph
+tree: 0 --> 2
+tree: 2 --> 1
+tree: 2 --> 3
+cycle: 1 --> 1
+cycle: 1 --> 3
+cycle: 3 --> 1
+tree: 3 --> 4
+cycle: 4 --> 0
+cycle: 4 --> 1
diff --git a/src/boost/libs/graph/example/weighted_matching_example.cpp b/src/boost/libs/graph/example/weighted_matching_example.cpp
new file mode 100644
index 000000000..50fe5d50c
--- /dev/null
+++ b/src/boost/libs/graph/example/weighted_matching_example.cpp
@@ -0,0 +1,121 @@
+//=======================================================================
+// Copyright (c) 2018 Yi Ji
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//=======================================================================
+
+#include <iostream>
+#include <vector>
+#include <string>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/maximum_weighted_matching.hpp>
+
+using namespace boost;
+
+typedef property< edge_weight_t, float, property< edge_index_t, int > >
+ EdgeProperty;
+typedef adjacency_list< vecS, vecS, undirectedS, no_property, EdgeProperty >
+ my_graph;
+
+int main(int argc, const char* argv[])
+{
+ graph_traits< my_graph >::vertex_iterator vi, vi_end;
+ const int n_vertices = 18;
+ my_graph g(n_vertices);
+
+ // vertices can be refered by integers because my_graph use vector to store
+ // them
+
+ add_edge(1, 2, EdgeProperty(5), g);
+ add_edge(0, 4, EdgeProperty(1), g);
+ add_edge(1, 5, EdgeProperty(4), g);
+ add_edge(2, 6, EdgeProperty(1), g);
+ add_edge(3, 7, EdgeProperty(4), g);
+ add_edge(4, 5, EdgeProperty(7), g);
+ add_edge(6, 7, EdgeProperty(5), g);
+ add_edge(4, 8, EdgeProperty(2), g);
+ add_edge(5, 9, EdgeProperty(5), g);
+ add_edge(6, 10, EdgeProperty(6), g);
+ add_edge(7, 11, EdgeProperty(5), g);
+ add_edge(10, 11, EdgeProperty(4), g);
+ add_edge(8, 13, EdgeProperty(4), g);
+ add_edge(9, 14, EdgeProperty(4), g);
+ add_edge(10, 15, EdgeProperty(7), g);
+ add_edge(11, 16, EdgeProperty(6), g);
+ add_edge(14, 15, EdgeProperty(6), g);
+ add_edge(12, 13, EdgeProperty(2), g);
+ add_edge(16, 17, EdgeProperty(5), g);
+
+ // print the ascii graph into terminal (better to use fixed-width font)
+ // this graph has a maximum cardinality matching of size 8
+ // but maximum weighted matching is of size 7
+
+ std::vector< std::string > ascii_graph_weighted;
+
+ ascii_graph_weighted.push_back(" 5 ");
+ ascii_graph_weighted.push_back(" A B---C D ");
+ ascii_graph_weighted.push_back(" 1\\ 7 /4 1\\ 5 /4 ");
+ ascii_graph_weighted.push_back(" E---F G---H ");
+ ascii_graph_weighted.push_back(" 2| |5 6| |5 ");
+ ascii_graph_weighted.push_back(" I J K---L ");
+ ascii_graph_weighted.push_back(" 4/ 3\\ 7/ 4 \\6 ");
+ ascii_graph_weighted.push_back(" M---N O---P Q---R ");
+ ascii_graph_weighted.push_back(" 2 6 5 ");
+
+ // our maximum weighted matching and result
+
+ std::cout << "In the following graph:" << std::endl << std::endl;
+
+ for (std::vector< std::string >::iterator itr
+ = ascii_graph_weighted.begin();
+ itr != ascii_graph_weighted.end(); ++itr)
+ std::cout << *itr << std::endl;
+
+ std::cout << std::endl;
+
+ std::vector< graph_traits< my_graph >::vertex_descriptor > mate1(
+ n_vertices),
+ mate2(n_vertices);
+ maximum_weighted_matching(g, &mate1[0]);
+
+ std::cout << "Found a weighted matching:" << std::endl;
+ std::cout << "Matching size is " << matching_size(g, &mate1[0])
+ << ", total weight is " << matching_weight_sum(g, &mate1[0])
+ << std::endl;
+ std::cout << std::endl;
+
+ std::cout << "The matching is:" << std::endl;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (mate1[*vi] != graph_traits< my_graph >::null_vertex()
+ && *vi < mate1[*vi])
+ std::cout << "{" << *vi << ", " << mate1[*vi] << "}" << std::endl;
+ std::cout << std::endl;
+
+ // now we check the correctness by compare the weight sum to a brute-force
+ // matching result note that two matchings may be different because of
+ // multiple optimal solutions
+
+ brute_force_maximum_weighted_matching(g, &mate2[0]);
+
+ std::cout << "Found a weighted matching by brute-force searching:"
+ << std::endl;
+ std::cout << "Matching size is " << matching_size(g, &mate2[0])
+ << ", total weight is " << matching_weight_sum(g, &mate2[0])
+ << std::endl;
+ std::cout << std::endl;
+
+ std::cout << "The brute-force matching is:" << std::endl;
+ for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
+ if (mate2[*vi] != graph_traits< my_graph >::null_vertex()
+ && *vi < mate2[*vi])
+ std::cout << "{" << *vi << ", " << mate2[*vi] << "}" << std::endl;
+ std::cout << std::endl;
+
+ assert(
+ matching_weight_sum(g, &mate1[0]) == matching_weight_sum(g, &mate2[0]));
+
+ return 0;
+}
diff --git a/src/boost/libs/graph/example/write_graphviz.cpp b/src/boost/libs/graph/example/write_graphviz.cpp
new file mode 100644
index 000000000..c033fcb9f
--- /dev/null
+++ b/src/boost/libs/graph/example/write_graphviz.cpp
@@ -0,0 +1,62 @@
+// Copyright 2007 Trustees of Indiana University
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// A simple example of using write_graphviz to output a BGL adjacency_list
+// graph in GraphViz Dot format.
+
+// Author: Doug Gregor
+
+#include <boost/graph/graphviz.hpp>
+
+enum files_e
+{
+ dax_h,
+ yow_h,
+ boz_h,
+ zow_h,
+ foo_cpp,
+ foo_o,
+ bar_cpp,
+ bar_o,
+ libfoobar_a,
+ zig_cpp,
+ zig_o,
+ zag_cpp,
+ zag_o,
+ libzigzag_a,
+ killerapp,
+ N
+};
+const char* name[] = { "dax.h", "yow.h", "boz.h", "zow.h", "foo.cpp", "foo.o",
+ "bar.cpp", "bar.o", "libfoobar.a", "zig.cpp", "zig.o", "zag.cpp", "zag.o",
+ "libzigzag.a", "killerapp" };
+
+int main(int, char*[])
+{
+
+ typedef std::pair< int, int > Edge;
+ Edge used_by[] = { Edge(dax_h, foo_cpp), Edge(dax_h, bar_cpp),
+ Edge(dax_h, yow_h), Edge(yow_h, bar_cpp), Edge(yow_h, zag_cpp),
+ Edge(boz_h, bar_cpp), Edge(boz_h, zig_cpp), Edge(boz_h, zag_cpp),
+ Edge(zow_h, foo_cpp), Edge(foo_cpp, foo_o), Edge(foo_o, libfoobar_a),
+ Edge(bar_cpp, bar_o), Edge(bar_o, libfoobar_a),
+ Edge(libfoobar_a, libzigzag_a), Edge(zig_cpp, zig_o),
+ Edge(zig_o, libzigzag_a), Edge(zag_cpp, zag_o),
+ Edge(zag_o, libzigzag_a), Edge(libzigzag_a, killerapp) };
+ const int nedges = sizeof(used_by) / sizeof(Edge);
+ int weights[nedges];
+ std::fill(weights, weights + nedges, 1);
+
+ using namespace boost;
+
+ typedef adjacency_list< vecS, vecS, directedS,
+ property< vertex_color_t, default_color_type >,
+ property< edge_weight_t, int > >
+ Graph;
+ Graph g(used_by, used_by + nedges, weights, N);
+
+ write_graphviz(std::cout, g, make_label_writer(name));
+}