The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

moved old, unused bench files

-101
-52
benchs/bgl/bench.cpp
··· 1 - #include <string> 2 - #include <iostream> 3 - #include <time.h> 4 - 5 - #include <boost/graph/adjacency_list.hpp> 6 - #include <boost/graph/graphviz.hpp> 7 - #include <boost/graph/random.hpp> 8 - #include <boost/graph/depth_first_search.hpp> 9 - 10 - #include <boost/random/linear_congruential.hpp> 11 - 12 - using namespace boost; 13 - using namespace std; 14 - 15 - int cpt = 0; 16 - 17 - class my_dfs_visitor:public default_dfs_visitor { 18 - public: 19 - template < typename Vertex, typename Graph > 20 - void discover_vertex(const Vertex& u, const Graph& g) { 21 - cpt++; 22 - cout << cpt << "\t" << u << "\n"; 23 - } 24 - }; 25 - 26 - int main(int _, char* args[]) { 27 - // create a typedef for the Graph type 28 - typedef adjacency_list<vecS, vecS> Graph; 29 - 30 - minstd_rand ran(time(0)); 31 - 32 - GraphvizDigraph g; 33 - read_graphviz(args[1], g); 34 - // generate_random_graph(g, atoi(args[1]), atoi(args[2]), ran); 35 - // write_graphviz(cout, g); 36 - default_dfs_visitor vis; 37 - // my_dfs_visitor vis; 38 - time_t t1, t2; 39 - time(&t1); 40 - depth_first_search(g, visitor(vis)); 41 - time(&t2); 42 - double dif = difftime(t2, t1); 43 - cout << dif << " seconds.\n"; 44 - 45 - return 0; 46 - } 47 - 48 - /* 49 - Local Variables: 50 - compile-command: "g++ -O3 -o cpp_bench -Wall -lbgl-viz bench.cpp" 51 - End: 52 - */
-20
benchs/ocamlgraph/bench.ml
··· 1 - let v = int_of_string Sys.argv.(1) 2 - let e = int_of_string Sys.argv.(2) 3 - 4 - module Int = struct 5 - type t = int 6 - let compare = compare 7 - let equal = (=) 8 - let hash = Hashtbl.hash 9 - end 10 - 11 - open Graph 12 - 13 - module G = Imperative.Digraph.Abstract(Int) 14 - module R = Rand.I(G) 15 - 16 - let g = R.graph ~v ~e () 17 - 18 - (* module D = Traverse.Dfs(G) *) 19 - 20 - (* let () = D.prefix (fun _ -> ()) g *)
-29
benchs/ocamlgraph/generate.ml
··· 1 - let v = int_of_string Sys.argv.(1) 2 - let e = int_of_string Sys.argv.(2) 3 - 4 - module Int = struct 5 - type t = int 6 - let compare = compare 7 - let equal = (=) 8 - let hash = Hashtbl.hash 9 - end 10 - 11 - open Graph 12 - 13 - module G = Imperative.Digraph.Abstract(Int) 14 - module R = Rand.I(G) 15 - 16 - module Display = struct 17 - include G 18 - let vertex_name v = string_of_int (V.label v) 19 - let graph_attributes _ = [] 20 - let default_vertex_attributes _ = [] 21 - let vertex_attributes _ = [] 22 - let default_edge_attributes _ = [] 23 - let edge_attributes _ = [] 24 - let get_subgraph _ = None 25 - end 26 - 27 - module Gv = Graphviz.Dot(Display) 28 - 29 - let () = Gv.output_graph stdout (R.graph ~v ~e ())