Fix examples that don't build and/or run, rationalize Jamfile.v2 to place them all in alphabetical order, run those that can be run, and document those that are terminally broken.

This commit is contained in:
jzmaddock 2018-12-16 18:53:35 +00:00
parent 40f15af259
commit 972f3c49d0
10 changed files with 240 additions and 200 deletions

View File

@ -5,215 +5,220 @@
import ../../config/checks/config : requires ;
exe accum-compile-times : accum-compile-times.cpp ;
run accum-compile-times.cpp ;
exe actor_clustering : actor_clustering.cpp ;
exe adjacency_list : adjacency_list.cpp ;
exe adjacency_list_io : adjacency_list_io.cpp ;
exe adjacency_matrix : adjacency_matrix.cpp ;
exe adj_list_ra_edgelist : adj_list_ra_edgelist.cpp ;
exe astar-cities : astar-cities.cpp : [ requires unistd_h ] ;
exe astar_maze : astar_maze.cpp ;
exe bellman-example : bellman-example.cpp ;
exe bellman-ford-internet : bellman-ford-internet.cpp ;
exe bfs : bfs.cpp ;
exe bfs-example2 : bfs-example2.cpp ;
exe bfs-example : bfs-example.cpp ;
exe bfs-name-printer : bfs-name-printer.cpp ;
exe bfs_neighbor : bfs_neighbor.cpp ;
exe bipartite_example : bipartite_example.cpp ;
exe biconnected_components : biconnected_components.cpp ;
exe boost_web_graph : boost_web_graph.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 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 ;
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 ;
#exe bucket_sorter : bucket_sorter.cpp ;
exe canonical_ordering : canonical_ordering.cpp ;
# exe cc-internet : cc-internet.cpp ../build//boost_graph ;
exe city_visitor : city_visitor.cpp ;
run canonical_ordering.cpp ;
run city_visitor.cpp ;
exe closeness_centrality : closeness_centrality.cpp ;
exe clustering_coefficient : clustering_coefficient.cpp ;
exe components_on_edgelist : components_on_edgelist.cpp ;
# TODO: Duplicate?
exe connected_components : connected_components.cpp ;
exe connected-components : connected-components.cpp ;
exe container_gen : container_gen.cpp ;
exe copy-example : copy-example.cpp ;
# exe csr-example : csr-example.cpp ;
exe cuthill_mckee_ordering : cuthill_mckee_ordering.cpp ;
exe cycle_canceling_example : cycle_canceling_example.cpp ;
exe cycle-file-dep2 : cycle-file-dep2.cpp ;
exe cycle-file-dep : cycle-file-dep.cpp ;
exe cycle_ratio_example : cycle_ratio_example.cpp ;
exe dag_shortest_paths : dag_shortest_paths.cpp ;
exe dave : dave.cpp ;
exe default-constructor2 : default-constructor2.cpp ;
exe default-constructor : default-constructor.cpp ;
run components_on_edgelist.cpp ;
run connected_components.cpp ;
run connected-components.cpp ;
run container_gen.cpp ;
run copy-example.cpp ;
run cuthill_mckee_ordering.cpp ;
run cycle_canceling_example.cpp ;
run cycle_ratio_example.cpp ;
run cycle-file-dep.cpp ;
run cycle-file-dep2.cpp ;
run dag_shortest_paths.cpp ;
run dave.cpp ;
run default-constructor.cpp ;
run default-constructor2.cpp ;
exe degree_centrality : degree_centrality.cpp ;
exe dfs : dfs.cpp ;
exe dfs-example : dfs-example.cpp ;
# TODO: Duplicate?
exe dfs_parenthesis : dfs_parenthesis.cpp ;
# exe dfs-parenthesis : dfs-parenthesis.cpp ;
exe dijkstra-example : dijkstra-example.cpp ;
exe dijkstra-example-listS : dijkstra-example-listS.cpp ;
exe dijkstra-no-color-map-example : dijkstra-no-color-map-example.cpp ;
exe directed_graph : directed_graph.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 ;
exe edge_basics : edge_basics.cpp ;
exe edge_coloring : edge_coloring.cpp ;
# TODO: Duplicate?
exe edge_connectivity : edge_connectivity.cpp ;
# exe edge-connectivity : edge-connectivity.cpp ;
exe edge-function : edge-function.cpp ;
# TODO: Duplicate?
exe edge_iterator_constructor : edge_iterator_constructor.cpp ;
exe edge-iter-constructor : edge-iter-constructor.cpp ;
exe edge_property : edge_property.cpp ;
run edge_basics.cpp ;
run edge_coloring.cpp ;
run edge_iterator_constructor.cpp ;
run edge_property.cpp ;
run edge-function.cpp ;
run edge-iter-constructor.cpp ;
exe edmonds-karp-eg : edmonds-karp-eg.cpp ;
exe exterior_properties : exterior_properties.cpp ;
exe exterior_property_map : exterior_property_map.cpp ;
exe family_tree : family_tree.cpp ;
exe fibonacci_heap : fibonacci_heap.cpp ;
exe file_dependencies : file_dependencies.cpp ;
exe filtered-copy-example : filtered-copy-example.cpp ;
exe filtered_graph : filtered_graph.cpp ;
exe filtered_graph_edge_range : filtered_graph_edge_range.cpp ;
exe filtered_vec_as_graph : filtered_vec_as_graph.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 ;
exe gerdemann : gerdemann.cpp ;
# This needs SGB headers, via BGL's stanford_graph.h:
# exe girth : girth.cpp ;
exe graph-assoc-types : graph-assoc-types.cpp ;
#TODO:
#exe graph_as_tree : graph_as_tree.cpp ;
exe graph : graph.cpp ;
exe graph_property : graph_property.cpp ;
exe graph-property-iter-eg : graph-property-iter-eg.cpp ;
exe graph-thingie : graph-thingie.cpp /boost/graph//boost_graph ;
exe graphviz : graphviz.cpp /boost/graph//boost_graph ;
exe grid_graph_example : grid_graph_example.cpp ;
exe grid_graph_properties : grid_graph_properties.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 ;
run grid_graph_example.cpp ;
run grid_graph_properties.cpp ;
exe hawick_circuits : hawick_circuits.cpp ;
exe implicit_graph : implicit_graph.cpp ;
run implicit_graph.cpp ;
run in_edges.cpp ;
exe inclusive_mean_geodesic : inclusive_mean_geodesic.cpp ;
exe incremental_components : incremental_components.cpp ;
exe incremental-components-eg : incremental-components-eg.cpp ;
exe in_edges : in_edges.cpp ;
run incremental_components.cpp ;
run incremental-components-eg.cpp ;
exe influence_prestige : influence_prestige.cpp ;
exe interior_pmap_bundled : interior_pmap_bundled.cpp ;
exe interior_property_map : interior_property_map.cpp ;
exe isomorphism : isomorphism.cpp ;
exe iteration_macros : iteration_macros.cpp ;
exe iterator-property-map-eg : iterator-property-map-eg.cpp ;
exe johnson-eg : johnson-eg.cpp ;
exe kevin-bacon2 : kevin-bacon2.cpp /boost//serialization ;
exe kevin-bacon : kevin-bacon.cpp ;
exe king_ordering : king_ordering.cpp ;
exe knights_tour : knights_tour.cpp ;
exe kruskal-example : kruskal-example.cpp ;
# exe kruskal-telephone : kruskal-telephone.cpp ;
exe kuratowski_subgraph : kuratowski_subgraph.cpp ;
# exe labeled_graph : last-mod-time.cpp ;
exe last-mod-time : last-mod-time.cpp : [ requires unistd_h ] ;
# These need LEDA:
# exe leda-concept-check : leda-concept-check.cpp ;
# exe leda-graph-eg : leda-graph-eg.cpp ;
# exe loops_dfs : loops_dfs.cpp ;
exe make_biconnected_planar : make_biconnected_planar.cpp ;
exe make_maximal_planar : make_maximal_planar.cpp ;
exe matching_example : matching_example.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 ;
run king_ordering.cpp ;
run knights_tour.cpp ;
run kruskal-example.cpp ;
run kuratowski_subgraph.cpp ;
run last-mod-time.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 ;
exe mcgregor_subgraphs_example : mcgregor_subgraphs_example.cpp ;
run mcgregor_subgraphs_example.cpp ;
exe mean_geodesic : mean_geodesic.cpp ;
# This needs SGB headers, via BGL's stanford_graph.h:
# exe miles_span : miles_span.cpp ;
exe minimum_degree_ordering : minimum_degree_ordering.cpp iohb.c ;
# This has an error pragma explaining that it is incorrect.
# exe min_max_paths : min_max_paths.cpp ;
exe modify_graph : modify_graph.cpp ;
exe neighbor_bfs : neighbor_bfs.cpp ;
exe ordered_out_edges : ordered_out_edges.cpp ;
exe ospf-example : ospf-example.cpp ../build//boost_graph ;
exe parallel-compile-time : parallel-compile-time.cpp ;
exe planar_face_traversal : planar_face_traversal.cpp ;
exe prim-example : prim-example.cpp ;
# exe prim-telephone : prim-telephone.cpp ;
exe print-adjacent-vertices : print-adjacent-vertices.cpp ;
exe print-edges : print-edges.cpp ;
exe print-in-edges : print-in-edges.cpp ;
exe print-out-edges : print-out-edges.cpp ;
exe minimum_degree_ordering : minimum_degree_ordering.cpp ;
run modify_graph.cpp ;
run neighbor_bfs.cpp ;
run ospf-example.cpp ../build//boost_graph ;
run parallel-compile-time.cpp ;
run planar_face_traversal.cpp ;
run prim-example.cpp ;
run print-adjacent-vertices.cpp ;
run print-edges.cpp ;
run print-in-edges.cpp ;
run print-out-edges.cpp ;
exe property_iterator : property_iterator.cpp ;
exe property-map-traits-eg : property-map-traits-eg.cpp ;
exe push-relabel-eg : push-relabel-eg.cpp ;
exe put-get-helper-eg : put-get-helper-eg.cpp ;
exe quick_tour : quick_tour.cpp ;
exe r_c_shortest_paths_example : r_c_shortest_paths_example.cpp ;
exe read_graphviz : read_graphviz.cpp ../build//boost_graph ;
exe read_write_dimacs-eg : read_write_dimacs-eg.cpp ;
# exe reachable-loop-head : reachable-loop-head.cpp ;
# exe reachable-loop-tail : reachable-loop-tail.cpp ;
exe remove_edge_if_bidir : remove_edge_if_bidir.cpp ;
exe remove_edge_if_dir : remove_edge_if_dir.cpp ;
exe remove_edge_if_undir : remove_edge_if_undir.cpp ;
exe reverse_graph : reverse_graph.cpp ;
# This needs SGB headers, via BGL's stanford_graph.h:
# exe roget_components : roget_components.cpp ;
# exe quick_tour_new : quick_tour_new.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 ;
# exe scc : scc.cpp ;
exe simple_planarity_test : simple_planarity_test.cpp ;
exe sloan_ordering : sloan_ordering.cpp ;
exe stoer_wagner : stoer_wagner.cpp ;
exe strong-components : strong-components.cpp ;
exe strong_components : strong_components.cpp ../build//boost_graph ;
exe subgraph_properties : subgraph_properties.cpp ;
exe subgraph : subgraph.cpp ;
exe successive_shortest_path_nonnegative_weights_example : successive_shortest_path_nonnegative_weights_example.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 ;
exe topo-sort1 : topo-sort1.cpp ;
exe topo-sort2 : topo-sort2.cpp ;
exe topo_sort : topo_sort.cpp ;
exe topo-sort-file-dep2 : topo-sort-file-dep2.cpp ;
exe topo-sort-file-dep : topo-sort-file-dep.cpp ;
run topo_sort.cpp ;
run topo-sort1.cpp ;
run topo-sort2.cpp ;
run topo-sort-file-dep.cpp ;
run topo-sort-file-dep2.cpp ;
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 ;
run vf2_sub_graph_iso_example.cpp ;
run vf2_sub_graph_iso_multi_example.cpp ;
run visitor.cpp ;
run write_graphviz.cpp ;
# This needs LEDA:
# exe topo-sort-with-leda : topo-sort-with-leda.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 ;
# This needs SGB headers, via BGL's stanford_graph.h:
# exe topo-sort-with-sgb : topo-sort-with-sgb.cpp ;
#
# 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 ;
exe transitive_closure : transitive_closure.cpp ;
exe transpose-example : transpose-example.cpp ;
exe two_graphs_common_spanning_trees : two_graphs_common_spanning_trees.cpp ;
exe undirected_adjacency_list : undirected_adjacency_list.cpp ;
exe undirected_dfs : undirected_dfs.cpp ;
exe undirected_graph : undirected_graph.cpp ;
exe vector_as_graph : vector_as_graph.cpp ;
exe vertex_basics : vertex_basics.cpp ;
exe vertex-name-property : vertex-name-property.cpp ;
exe vf2_sub_graph_iso_example : vf2_sub_graph_iso_example.cpp ;
exe vf2_sub_graph_iso_multi_example : vf2_sub_graph_iso_multi_example.cpp ;
exe visitor : visitor.cpp ;
exe write_graphviz : write_graphviz.cpp ;
#
# 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 astar_maze.cpp ;
# run kevin-bacon2.cpp /boost/serialization//boost_serialization ;
#
# This one dereferences a null-iterator:
#
# run ordered_out_edges.cpp ;
#
# does not compile:
#
# run bucket_sorter.cpp ;
# run csr-example.cpp ;

View File

@ -16,7 +16,7 @@
#include <boost/graph/random.hpp>
#include <boost/random.hpp>
#include <boost/graph/graphviz.hpp>
#include <sys/time.h>
#include <ctime>
#include <vector>
#include <list>
#include <iostream>
@ -170,7 +170,7 @@ int main(int argc, char **argv)
// pick random start/goal
boost::mt19937 gen(time(0));
boost::mt19937 gen(std::time(0));
vertex start = random_vertex(g, gen);
vertex goal = random_vertex(g, gen);

View File

@ -6,7 +6,9 @@
//[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>

View File

@ -5,6 +5,11 @@
// 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>

View File

@ -6,7 +6,12 @@
// 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>

View File

@ -5,12 +5,19 @@
// 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 <fstream>
#include <string>
#include <ctime>
#ifdef BOOST_HAS_UNISTD_H
#include <unistd.h>
#endif
#include <sys/stat.h>
#include <boost/graph/adjacency_list.hpp>

View File

@ -7,6 +7,10 @@
// 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>

View File

@ -30,7 +30,12 @@
#include "boost/graph/adjacency_list.hpp"
#include "boost/graph/graph_utility.hpp"
#include "boost/graph/minimum_degree_ordering.hpp"
#include "iohb.h"
void terminate(const char* msg)
{
std::cerr << msg << std::endl;
abort();
}
//copy and modify from mtl harwell boeing stream
struct harwell_boeing
@ -40,25 +45,26 @@ struct harwell_boeing
char* Type;
Type = new char[4];
isComplex = false;
readHB_info(filename, &M, &N, &nonzeros, &Type, &Nrhs);
// Never called:
//readHB_info(filename, &M, &N, &nonzeros, &Type, &Nrhs);
colptr = (int *)malloc((N+1)*sizeof(int));
if ( colptr == NULL ) IOHBTerminate("Insufficient memory for colptr.\n");
if ( colptr == NULL ) terminate("Insufficient memory for colptr.\n");
rowind = (int *)malloc(nonzeros*sizeof(int));
if ( rowind == NULL ) IOHBTerminate("Insufficient memory for rowind.\n");
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 ) IOHBTerminate("Insufficient memory for val.\n");
if ( val == NULL ) terminate("Insufficient memory for val.\n");
} else {
if ( Type[0] != 'P' ) {
val = (double *)malloc(nonzeros*sizeof(double));
if ( val == NULL ) IOHBTerminate("Insufficient memory for val.\n");
if ( val == NULL ) terminate("Insufficient memory for val.\n");
}
}
readHB_mat_double(filename, colptr, rowind, val);
// Never called:
//readHB_mat_double(filename, colptr, rowind, val);
cnt = 0;
col = 0;

View File

@ -5,6 +5,9 @@
// 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>

View File

@ -29,6 +29,9 @@
// (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>