4.75

4.8 | 29 ratings Rate this file 419 downloads (last 30 days) File Size: 8.72 MB File ID: #10922

MatlabBGL

by David Gleich

 

30 Apr 2006 (Updated 22 Oct 2008)

No BSD License  

MatlabBGL provides robust and efficient graph algorithms for Matlab using native data structures.

Download Now | Watch this File

File Information
Description

The MatlabBGL library fills a hole in Matlab's suite of algorithms. Namely, it provides a rich set of algorithms to work with graphs, as in graph theory graphs. The MatlabBGL package uses Matlab's native sparse matrix type as a graph and provides algorithms that work

The algorithms included are

Searching: breadth first search,depth first search, and astar (A*) search

Shortest Path Algorithms: Dijkstra's algorithm, the Bellman-Ford algorithm, Johnson's algorithm, and the Floyd-Warshall algorithm.

Minimum Spanning Trees: Prim's algorithm and Kruskal's algorithm.

Components: strongly connected components and biconnected components (and articulation points).

Flow Algorithms: Goldberg's push-relabel maximum-flow minimum-cut algorithm.

Statistics: Betweenness Centrality, Clustering Coefficients, and Edge Centrality

Graph Creation: Erdos Reyni (Gnp) Graph, Cycle Graph, Wheel Graph, Star Graph

Planar Graphs: Boyer-Myrvold planarity testing, Chrobak-Payne straight line drawing

Graph Layout: force directed layout, spring based layout, topology filling layout

Additional documentation and the MatlabBGL website are at the following URL:
http://www.stanford.edu/~dgleich/programs/matlab_bgl.

The package includes precompiled MEX files for Windows (32-bit and 64-bit), and Linux (32-bit and 64-bit for Matlab 2006b+), and MacOSX (32-bit Intel and 32-bit PPC).

The package includes source code to compile on other platforms as well. For issues, please use the matlab-bgl launchpad page: https://answers.launchpad.net/matlab-bgl/

Please contact me (see the website) if you have an issue with the software and I will help you try and resolve it. (If you need an old version, check my Stanford website for older codes.)

Precompiled for 64-bit Linux (Matlab R2006b+), 32-bit Linux (Matlab R14SP3+), 32-bit Windows (Matlab R2007a+), 32-bit Mac OS X PPC (Matlab 2007a+), 32-bit Mac OS X Intel (Matlab 2007a+). Compiled and tested on 64-bit Windows and Solaris and other versions of Matlab.

Acknowledgements
This submission has inspired the following:
MatPlanWDM v0.5, gaimc : Graph Algorithms In Matlab Code, wgPlot - Weighted Graph Plot (a better version of gplot)
MATLAB release MATLAB 7.4 (R2007a)
Other requirements A somewhat recent version of Matlab. See the testing matrix on the website.
Zip File Content  
Published M Files Core numbers in MatlabBGL, New features in MatlabBGL version 3.0, New features in MatlabBGL version 4.0, Planar graphs in MatlabBGL, Recording algorithm behavior with MatlabBGL, Red-Black Ordering with MatlabBGL, Reweighted graphs in MatlabBGL
HTML Files MatlabBGL,
MatlabBGL - Changes,
MatlabBGL - FAQ,
MatlabBGL - Versions
Other Files
matlab_bgl/,
matlab_bgl/.project,
matlab_bgl/@inplace/,
matlab_bgl/@inplace/assign.m,
matlab_bgl/@inplace/display.m,
matlab_bgl/@inplace/double.m,
matlab_bgl/@inplace/end.m,
matlab_bgl/@inplace/inplace.m,
matlab_bgl/@inplace/size.m,
matlab_bgl/@inplace/subsasgn.m,
matlab_bgl/@inplace/subsref.m,
matlab_bgl/@ipdouble/,
matlab_bgl/@ipdouble/ipdouble.m,
matlab_bgl/@ipint32/,
matlab_bgl/@ipint32/ipint32.m,
matlab_bgl/all_shortest_paths.m,
matlab_bgl/astar_search.m,
matlab_bgl/bellman_ford_sp.m,
matlab_bgl/betweenness_centrality.m,
matlab_bgl/bfs.m,
matlab_bgl/biconnected_components.m,
matlab_bgl/boyer_myrvold_planarity_test.m,
matlab_bgl/breadth_first_search.m,
matlab_bgl/chrobak_payne_straight_line_drawing.m,
matlab_bgl/circle_graph_layout.m,
matlab_bgl/clique_graph.m,
matlab_bgl/clustering_coefficients.m,
matlab_bgl/combine_visitors.m,
matlab_bgl/components.m,
matlab_bgl/Contents.m,
matlab_bgl/core_numbers.m,
matlab_bgl/custom/,
matlab_bgl/custom/dijkstra_all_sp.m,
matlab_bgl/custom/path_histogram.m,
matlab_bgl/cycle_graph.m,
matlab_bgl/dag_sp.m,
matlab_bgl/depth_first_search.m,
matlab_bgl/dfs.m,
matlab_bgl/dijkstra_sp.m,
matlab_bgl/doc/,
matlab_bgl/doc/changed.txt,
matlab_bgl/doc/html/,
matlab_bgl/doc/html/core_numbers_example/,
matlab_bgl/doc/html/core_numbers_example/core_numbers_example.png,
matlab_bgl/doc/html/core_numbers_example/core_numbers_example_01.png,
matlab_bgl/doc/html/core_numbers_example/core_numbers_example_02.png,
matlab_bgl/doc/html/images/,
matlab_bgl/doc/html/images/matlab-bgl-header.png,
matlab_bgl/doc/html/new_in_3/,
matlab_bgl/doc/html/new_in_3/new_in_3_0.png,
matlab_bgl/doc/html/new_in_3/new_in_3_0_01.png,
matlab_bgl/doc/html/new_in_3/new_in_3_0_02.png,
matlab_bgl/doc/html/new_in_3/new_in_3_0_03.png,
matlab_bgl/doc/html/new_in_4/,
matlab_bgl/doc/html/new_in_4/new_in_4_0.png,
matlab_bgl/doc/html/new_in_4/new_in_4_0_01.png,
matlab_bgl/doc/html/new_in_4/new_in_4_0_02.png,
matlab_bgl/doc/html/new_in_4/new_in_4_0_03.png,
matlab_bgl/doc/html/new_in_4/new_in_4_0_04.png,
matlab_bgl/doc/html/planar_graphs/,
matlab_bgl/doc/html/planar_graphs/planar_graphs.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_01.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_02.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_03.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_04.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_05.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_06.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_07.png,
matlab_bgl/doc/html/planar_graphs/planar_graphs_08.png,
matlab_bgl/doc/html/record_alg/,
matlab_bgl/doc/html/red_black/,
matlab_bgl/doc/html/red_black/red_black.png,
matlab_bgl/doc/html/red_black/red_black_01.png,
matlab_bgl/doc/html/red_black/red_black_02.png,
matlab_bgl/doc/html/red_black/red_black_03.png,
matlab_bgl/doc/html/red_black/red_black_04.png,
matlab_bgl/doc/html/reweighted_graphs/,
matlab_bgl/doc/html/site.css,
matlab_bgl/doc/html/style.css,
matlab_bgl/doc/mxdom2mbgl-html.xsl,
matlab_bgl/doc/write_examples_html.m,
matlab_bgl/edge_weight_index.m,
matlab_bgl/edge_weight_vector.m,
matlab_bgl/edmonds_maximum_cardinality_matching.m,
matlab_bgl/edmunds_karp_max_flow.m,
matlab_bgl/erdos_reyni.m,
matlab_bgl/examples/,
matlab_bgl/examples/approx_multiway_cut.m,
matlab_bgl/examples/bacon_numbers.m,
matlab_bgl/examples/bfs_example.m,
matlab_bgl/examples/bfs_in_mbgl.m,
matlab_bgl/examples/bfs_in_mbgl_efficient.m,
matlab_bgl/examples/core_numbers_example.m,
matlab_bgl/examples/dfs_example.m,
matlab_bgl/examples/edge_index_example.m,
matlab_bgl/examples/max_flow_example.m,
matlab_bgl/examples/multiway_example.m,
matlab_bgl/examples/new_in_3_0.m,
matlab_bgl/examples/new_in_4_0.m,
matlab_bgl/examples/planar_graphs.m,
matlab_bgl/examples/record_alg.m,
matlab_bgl/examples/red_black.m,
matlab_bgl/examples/reweighted_graphs.m,
matlab_bgl/floyd_warshall_all_sp.m,
matlab_bgl/fruchterman_reingold_force_directed_layout.m,
matlab_bgl/graphs/,
matlab_bgl/graphs/all_shortest_paths_example.mat,
matlab_bgl/graphs/bfs_example.mat,
matlab_bgl/graphs/bgl_cities.mat,
matlab_bgl/graphs/clique-10.mat,
matlab_bgl/graphs/clr-24-1.mat,
matlab_bgl/graphs/clr-25-2.mat,
matlab_bgl/graphs/clr-26-1.mat,
matlab_bgl/graphs/clr-27-1.mat,
matlab_bgl/graphs/cores_example.mat,
matlab_bgl/graphs/cs-stanford.mat,
matlab_bgl/graphs/dfs_example.mat,
matlab_bgl/graphs/dominator_tree_example.mat,
matlab_bgl/graphs/kt-3-2.mat,
matlab_bgl/graphs/kt-3-7.mat,
matlab_bgl/graphs/kt-6-23.mat,
matlab_bgl/graphs/kt-7-2.mat,
matlab_bgl/graphs/line-7.mat,
matlab_bgl/graphs/matching_example.mat,
matlab_bgl/graphs/max_flow_example.mat,
matlab_bgl/graphs/minnesota.mat,
matlab_bgl/graphs/padgett-florentine.mat,
matlab_bgl/graphs/tapir.mat,
matlab_bgl/graphs/tarjan-biconn.mat,
matlab_bgl/grid_graph.m,
matlab_bgl/gursoy_atun_layout.m,
matlab_bgl/indexed_sparse.m,
matlab_bgl/is_kuratowski_graph.m,
matlab_bgl/is_straight_line_drawing.m,
matlab_bgl/johnson_all_sp.m,
matlab_bgl/kamada_kawai_spring_layout.m,
matlab_bgl/kolmogorov_max_flow.m,
matlab_bgl/kruskal_mst.m,
matlab_bgl/kuratowski_subgraph.m,
matlab_bgl/lengauer_tarjan_dominator_tree.m,
matlab_bgl/libmbgl/,
matlab_bgl/libmbgl/ccfiles.sh,
matlab_bgl/libmbgl/compile-linux-32.sh,
matlab_bgl/libmbgl/compile-linux-64-large.sh,
matlab_bgl/libmbgl/compile-linux-64.sh,
matlab_bgl/libmbgl/compile-macosx-intel-32.sh,
matlab_bgl/libmbgl/compile-macosx-ppc-32.sh,
matlab_bgl/libmbgl/compile-win32.bat,
matlab_bgl/libmbgl/compile-win64.bat,
matlab_bgl/libmbgl/components.cc,
matlab_bgl/libmbgl/crm_graph.hpp,
matlab_bgl/libmbgl/include/,
matlab_bgl/libmbgl/include/matlab_bgl.h,
matlab_bgl/libmbgl/include/matlab_bgl_types.h,
matlab_bgl/libmbgl/layouts.cc,
matlab_bgl/libmbgl/libmbgl.sln,
matlab_bgl/libmbgl/libmbgl.vcproj,
matlab_bgl/libmbgl/libmbgl_test/,
matlab_bgl/libmbgl/libmbgl_test/fr_layout_test.cc,
matlab_bgl/libmbgl/libmbgl_test/layout_funcs_test.cc,
matlab_bgl/libmbgl/libmbgl_test/libmbgl_funcs_test.cc,
matlab_bgl/libmbgl/libmbgl_test/libmbgl_funcs_test.h,
matlab_bgl/libmbgl/libmbgl_test/libmbgl_test.cc,
matlab_bgl/libmbgl/libmbgl_test/libmbgl_test.vcproj,
matlab_bgl/libmbgl/libmbgl_test/Makefile,
matlab_bgl/libmbgl/libmbgl_test/planar_funcs_test.cc,
matlab_bgl/libmbgl/libmbgl_test/planar_is_straight_line_test.cc,
matlab_bgl/libmbgl/libmbgl_test/planar_ksubgraph_test.cc,
matlab_bgl/libmbgl/libmbgl_test/property_map_test.cc,
matlab_bgl/libmbgl/libmbgl_test/simple_prop_map_test.cc,
matlab_bgl/libmbgl/libmbgl_test/simple_prop_map_test_2.cc,
matlab_bgl/libmbgl/libmbgl_test/simple_prop_map_test_3.cc,
matlab_bgl/libmbgl/libmbgl_test/simple_prop_map_test_4.cc,
matlab_bgl/libmbgl/libmbgl_util.hpp,
matlab_bgl/libmbgl/max_flow.cc,
matlab_bgl/libmbgl/orderings.cc,
matlab_bgl/libmbgl/planar.cc,
matlab_bgl/libmbgl/searches.cc,
matlab_bgl/libmbgl/shortest_path.cc,
matlab_bgl/libmbgl/spanning_trees.cc,
matlab_bgl/libmbgl/statistics.cc,
matlab_bgl/libmbgl/stop_visitors.hpp,
matlab_bgl/libmbgl/visitor_macros.hpp,
matlab_bgl/libmbgl/yasmic/,
matlab_bgl/libmbgl/yasmic/.sconsign,
matlab_bgl/libmbgl/yasmic/bgl_kcore.hpp,
matlab_bgl/libmbgl/yasmic/binary_ifstream_graph.hpp,
matlab_bgl/libmbgl/yasmic/binary_ifstream_matrix.hpp,
matlab_bgl/libmbgl/yasmic/bind_utility.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/,
matlab_bgl/libmbgl/yasmic/boost_mod/.sconsign,
matlab_bgl/libmbgl/yasmic/boost_mod/bellman_ford_shortest_paths.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/betweenness_centrality.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/chrobak_payne_drawing.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/core_numbers.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/floyd_warshall_shortest.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/fruchterman_reingold.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/gzip.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/integer_extra.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/is_straight_line_drawing.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/johnson_all_pairs_shortest.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/kolmogorov_max_flow.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/kruskal_min_spanning_tree.hpp,
matlab_bgl/libmbgl/yasmic/boost_mod/zlib.cpp,
matlab_bgl/libmbgl/yasmic/bvgraph_matrix.hpp,
matlab_bgl/libmbgl/yasmic/cluto_ifstream_matrix.hpp,
matlab_bgl/libmbgl/yasmic/compressed_row_matrix.hpp,
matlab_bgl/libmbgl/yasmic/compressed_row_matrix_graph.hpp,
matlab_bgl/libmbgl/yasmic/generic_matrix_operations.hpp,
matlab_bgl/libmbgl/yasmic/graph_ifstream_matrix.hpp,
matlab_bgl/libmbgl/yasmic/ifstream_as_matrix.hpp,
matlab_bgl/libmbgl/yasmic/ifstream_matrix.hpp,
matlab_bgl/libmbgl/yasmic/indexed_list.hpp,
matlab_bgl/libmbgl/yasmic/indexed_list.old.hpp,
matlab_bgl/libmbgl/yasmic/indexed_list_as_graph.hpp,
matlab_bgl/libmbgl/yasmic/istream_as_matrix.hpp,
matlab_bgl/libmbgl/yasmic/iterator_utility.hpp,
matlab_bgl/libmbgl/yasmic/matrix_row_col_graph.hpp,
matlab_bgl/libmbgl/yasmic/nonzero_union.hpp,
matlab_bgl/libmbgl/yasmic/simple_csr_matrix.hpp,
matlab_bgl/libmbgl/yasmic/simple_csr_matrix_as_graph.hpp,
matlab_bgl/libmbgl/yasmic/simple_row_and_column_matrix.hpp,
matlab_bgl/libmbgl/yasmic/simple_row_and_column_matrix_as_graph.hpp,
matlab_bgl/libmbgl/yasmic/smatrix_traits.hpp,
matlab_bgl/libmbgl/yasmic/transpose_matrix.hpp,
matlab_bgl/libmbgl/yasmic/tuple_utility.hpp,
matlab_bgl/libmbgl/yasmic/undir_simple_csr_matrix.hpp,
matlab_bgl/libmbgl/yasmic/undir_simple_csr_matrix_as_graph.hpp,
matlab_bgl/libmbgl/yasmic/util/,
matlab_bgl/libmbgl/yasmic/util/.sconsign,
matlab_bgl/libmbgl/yasmic/util/crm_matrix.hpp,
matlab_bgl/libmbgl/yasmic/util/filtered_matrix.hpp,
matlab_bgl/libmbgl/yasmic/util/load_crm_graph.hpp,
matlab_bgl/libmbgl/yasmic/util/load_crm_matrix.hpp,
matlab_bgl/libmbgl/yasmic/util/write_matrix.hpp,
matlab_bgl/libmbgl/yasmic/util/write_petsc_matrix.hpp,
matlab_bgl/libmbgl/yasmic/verbose_util.hpp,
matlab_bgl/libmbgl/yasmic/yasmic.cbp,
matlab_bgl/libmbgl/yasmic/yasmic.layout,
matlab_bgl/libmbgl/yasmic/yasmic.vcproj,
matlab_bgl/libmbgl/yasmic/yasmic.vcproj.DUALCORE.mithandor.user,
matlab_bgl/libmbgl/yasmic/yasmic.vcproj.MITHANDOR.mithandor.user,
matlab_bgl/make_biconnected_planar.m,
matlab_bgl/make_connected.m,
matlab_bgl/make_maximal_planar.m,
matlab_bgl/matching.m,
matlab_bgl/max_flow.m,
matlab_bgl/maximal_matching.m,
matlab_bgl/mst.m,
matlab_bgl/num_edges.m,
matlab_bgl/num_vertices.m,
matlab_bgl/path_from_pred.m,
matlab_bgl/planar_canonical_ordering.m,
matlab_bgl/prim_mst.m,
matlab_bgl/private/,
matlab_bgl/private/astar_search_mex.c,
matlab_bgl/private/astar_search_mex.mexa64,
matlab_bgl/private/astar_search_mex.mexglx,
matlab_bgl/private/astar_search_mex.mexmac,
matlab_bgl/private/astar_search_mex.mexmaci,
matlab_bgl/private/astar_search_mex.mexw32,
matlab_bgl/private/astar_search_mex.mexw64,
matlab_bgl/private/betweenness_centrality_mex.c,
matlab_bgl/private/betweenness_centrality_mex.mexa64,
matlab_bgl/private/betweenness_centrality_mex.mexglx,
matlab_bgl/private/betweenness_centrality_mex.mexmac,
matlab_bgl/private/betweenness_centrality_mex.mexmaci,
matlab_bgl/private/betweenness_centrality_mex.mexw32,
matlab_bgl/private/betweenness_centrality_mex.mexw64,
matlab_bgl/private/bfs_dfs_vis_mex.c,
matlab_bgl/private/bfs_dfs_vis_mex.mexa64,
matlab_bgl/private/bfs_dfs_vis_mex.mexglx,
matlab_bgl/private/bfs_dfs_vis_mex.mexmac,
matlab_bgl/private/bfs_dfs_vis_mex.mexmaci,
matlab_bgl/private/bfs_dfs_vis_mex.mexw32,
matlab_bgl/private/bfs_dfs_vis_mex.mexw64,
matlab_bgl/private/bfs_mex.c,
matlab_bgl/private/bfs_mex.mexa64,
matlab_bgl/private/bfs_mex.mexglx,
matlab_bgl/private/bfs_mex.mexmac,
matlab_bgl/private/bfs_mex.mexmaci,
matlab_bgl/private/bfs_mex.mexw32,
matlab_bgl/private/bfs_mex.mexw64,
matlab_bgl/private/biconnected_components_mex.c,
matlab_bgl/private/biconnected_components_mex.mexa64,
matlab_bgl/private/biconnected_components_mex.mexglx,
matlab_bgl/private/biconnected_components_mex.mexmac,
matlab_bgl/private/biconnected_components_mex.mexmaci,
matlab_bgl/private/biconnected_components_mex.mexw32,
matlab_bgl/private/biconnected_components_mex.mexw64,
matlab_bgl/private/check_matlab_bgl.m,
matlab_bgl/private/clustering_coefficients_mex.c,
matlab_bgl/private/clustering_coefficients_mex.mexa64,
matlab_bgl/private/clustering_coefficients_mex.mexglx,
matlab_bgl/private/clustering_coefficients_mex.mexmac,
matlab_bgl/private/clustering_coefficients_mex.mexmaci,
matlab_bgl/private/clustering_coefficients_mex.mexw32,
matlab_bgl/private/clustering_coefficients_mex.mexw64,
matlab_bgl/private/common_functions.h,
matlab_bgl/private/common_macros.h,
matlab_bgl/private/compile.m,
matlab_bgl/private/components_mex.c,
matlab_bgl/private/components_mex.mexa64,
matlab_bgl/private/components_mex.mexglx,
matlab_bgl/private/components_mex.mexmac,
matlab_bgl/private/components_mex.mexmaci,
matlab_bgl/private/components_mex.mexw32,
matlab_bgl/private/components_mex.mexw64,
matlab_bgl/private/core_numbers_mex.c,
matlab_bgl/private/core_numbers_mex.mexa64,
matlab_bgl/private/core_numbers_mex.mexglx,
matlab_bgl/private/core_numbers_mex.mexmac,
matlab_bgl/private/core_numbers_mex.mexmaci,
matlab_bgl/private/core_numbers_mex.mexw32,
matlab_bgl/private/core_numbers_mex.mexw64,
matlab_bgl/private/dfs_mex.c,
matlab_bgl/private/dfs_mex.mexa64,
matlab_bgl/private/dfs_mex.mexglx,
matlab_bgl/private/dfs_mex.mexmac,
matlab_bgl/private/dfs_mex.mexmaci,
matlab_bgl/private/dfs_mex.mexw32,
matlab_bgl/private/dfs_mex.mexw64,
matlab_bgl/private/dominator_tree_mex.c,
matlab_bgl/private/dominator_tree_mex.mexa64,
matlab_bgl/private/dominator_tree_mex.mexglx,
matlab_bgl/private/dominator_tree_mex.mexmac,
matlab_bgl/private/dominator_tree_mex.mexmaci,
matlab_bgl/private/dominator_tree_mex.mexw32,
matlab_bgl/private/dominator_tree_mex.mexw64,
matlab_bgl/private/expand_macros.h,
matlab_bgl/private/fruchterman_reingold_mex.c,
matlab_bgl/private/fruchterman_reingold_mex.mexa64,
matlab_bgl/private/fruchterman_reingold_mex.mexglx,
matlab_bgl/private/fruchterman_reingold_mex.mexmac,
matlab_bgl/private/fruchterman_reingold_mex.mexmaci,
matlab_bgl/private/fruchterman_reingold_mex.mexw32,
matlab_bgl/private/fruchterman_reingold_mex.mexw64,
matlab_bgl/private/get_matlab_bgl_options.m,
matlab_bgl/private/gursoy_atun_mex.c,
matlab_bgl/private/gursoy_atun_mex.mexa64,
matlab_bgl/private/gursoy_atun_mex.mexglx,
matlab_bgl/private/gursoy_atun_mex.mexmac,
matlab_bgl/private/gursoy_atun_mex.mexmaci,
matlab_bgl/private/gursoy_atun_mex.mexw32,
matlab_bgl/private/gursoy_atun_mex.mexw64,
matlab_bgl/private/kamada_kawai_spring_layout_mex.c,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexa64,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexglx,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexmac,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexmaci,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexw32,
matlab_bgl/private/kamada_kawai_spring_layout_mex.mexw64,
matlab_bgl/private/matching_mex.c,
matlab_bgl/private/matching_mex.mexa64,
matlab_bgl/private/matching_mex.mexglx,
matlab_bgl/private/matching_mex.mexmac,
matlab_bgl/private/matching_mex.mexmaci,
matlab_bgl/private/matching_mex.mexw32,
matlab_bgl/private/matching_mex.mexw64,
matlab_bgl/private/matlab_bgl_all_sp_mex.c,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexa64,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexglx,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexmac,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexmaci,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexw32,
matlab_bgl/private/matlab_bgl_all_sp_mex.mexw64,
matlab_bgl/private/matlab_bgl_sp_mex.c,
matlab_bgl/private/matlab_bgl_sp_mex.mexa64,
matlab_bgl/private/matlab_bgl_sp_mex.mexglx,
matlab_bgl/private/matlab_bgl_sp_mex.mexmac,
matlab_bgl/private/matlab_bgl_sp_mex.mexmaci,
matlab_bgl/private/matlab_bgl_sp_mex.mexw32,
matlab_bgl/private/matlab_bgl_sp_mex.mexw64,
matlab_bgl/private/max_flow_mex.c,
matlab_bgl/private/max_flow_mex.mexa64,
matlab_bgl/private/max_flow_mex.mexglx,
matlab_bgl/private/max_flow_mex.mexmac,
matlab_bgl/private/max_flow_mex.mexmaci,
matlab_bgl/private/max_flow_mex.mexw32,
matlab_bgl/private/max_flow_mex.mexw64,
matlab_bgl/private/merge_options.m,
matlab_bgl/private/merge_structs.m,
matlab_bgl/private/mst_mex.c,
matlab_bgl/private/mst_mex.mexa64,
matlab_bgl/private/mst_mex.mexglx,
matlab_bgl/private/mst_mex.mexmac,
matlab_bgl/private/mst_mex.mexmaci,
matlab_bgl/private/mst_mex.mexw32,
matlab_bgl/private/mst_mex.mexw64,
matlab_bgl/private/path_from_pred_mex.c,
matlab_bgl/private/path_from_pred_mex.mexa64,
matlab_bgl/private/path_from_pred_mex.mexglx,
matlab_bgl/private/path_from_pred_mex.mexmac,
matlab_bgl/private/path_from_pred_mex.mexmaci,
matlab_bgl/private/path_from_pred_mex.mexw32,
matlab_bgl/private/path_from_pred_mex.mexw64,
matlab_bgl/private/planar_drawing_mex.c,
matlab_bgl/private/planar_drawing_mex.mexa64,
matlab_bgl/private/planar_drawing_mex.mexglx,
matlab_bgl/private/planar_drawing_mex.mexmac,
matlab_bgl/private/planar_drawing_mex.mexmaci,
matlab_bgl/private/planar_drawing_mex.mexw32,
matlab_bgl/private/planar_drawing_mex.mexw64,
matlab_bgl/private/planar_edges_mex.c,
matlab_bgl/private/planar_edges_mex.mexa64,
matlab_bgl/private/planar_edges_mex.mexglx,
matlab_bgl/private/planar_edges_mex.mexmac,
matlab_bgl/private/planar_edges_mex.mexmaci,
matlab_bgl/private/planar_edges_mex.mexw32,
matlab_bgl/private/planar_edges_mex.mexw64,
matlab_bgl/private/planar_test_mex.c,
matlab_bgl/private/planar_test_mex.mexa64,
matlab_bgl/private/planar_test_mex.mexglx,
matlab_bgl/private/planar_test_mex.mexmac,
matlab_bgl/private/planar_test_mex.mexmaci,
matlab_bgl/private/planar_test_mex.mexw32,
matlab_bgl/private/planar_test_mex.mexw64,
matlab_bgl/private/test_matching_mex.c,
matlab_bgl/private/test_matching_mex.mexa64,
matlab_bgl/private/test_matching_mex.mexglx,
matlab_bgl/private/test_matching_mex.mexmac,
matlab_bgl/private/test_matching_mex.mexmaci,
matlab_bgl/private/test_matching_mex.mexw32,
matlab_bgl/private/test_matching_mex.mexw64,
matlab_bgl/private/todo.m,
matlab_bgl/private/todo_3_0_release.m,
matlab_bgl/private/topological_order_mex.c,
matlab_bgl/private/topological_order_mex.mexa64,
matlab_bgl/private/topological_order_mex.mexglx,
matlab_bgl/private/topological_order_mex.mexmac,
matlab_bgl/private/topological_order_mex.mexmaci,
matlab_bgl/private/topological_order_mex.mexw32,
matlab_bgl/private/topological_order_mex.mexw64,
matlab_bgl/private/visitor_macros.h,
matlab_bgl/push_relabel_max_flow.m,
matlab_bgl/random_graph_layout.m,
matlab_bgl/set_matlab_bgl_default.m,
matlab_bgl/shortest_paths.m,
matlab_bgl/star_graph.m,
matlab_bgl/test/,
matlab_bgl/test/assert.m,
matlab_bgl/test/rtest_1.m,
matlab_bgl/test/rtest_2.m,
matlab_bgl/test/rtest_3_cojocaru.m,
matlab_bgl/test/rtest_5_henderson.m,
matlab_bgl/test/rtest_6.m,
matlab_bgl/test/rtest_7_karsi.m,
matlab_bgl/test/rtest_all.m,
matlab_bgl/test/test_all.m,
matlab_bgl/test/test_benchmark.m,
matlab_bgl/test/test_breadth_first_search.m,
matlab_bgl/test/test_components.m,
matlab_bgl/test/test_depth_first_search.m,
matlab_bgl/test/test_examples.m,
matlab_bgl/test/test_layouts.m,
matlab_bgl/test/test_main.m,
matlab_bgl/test/test_planar.m,
matlab_bgl/test/test_searches.m,
matlab_bgl/test/test_shortest_paths.m,
matlab_bgl/test/test_spanning_trees.m,
matlab_bgl/test/test_statistics.m,
matlab_bgl/test/test_trivial.m,
matlab_bgl/test_dag.m,
matlab_bgl/test_matching.m,
matlab_bgl/test_planar_graph.m,
matlab_bgl/topological_order.m,
matlab_bgl/tree_from_pred.m,
matlab_bgl/wheel_graph.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (48)
01 May 2006 Jeremy Kozdon

This is excellent. It has all the graph stuff that I always wish was in MATLAB. And it is really really fast, compared to the other stuff that I have used.

01 May 2006 Les Fletcher

Been working with graphs in Matlab for a while now, but have always been frustrated the size and speed constraints it presented. Things are much faster and I can scale much better now.

04 May 2006 Qiqi Wang

Fast and robust implementation of many graph algorithms.

09 May 2006 li changbing

good

23 May 2006 Christopher Honey

Fast and accurate from what I've seen. A minor hassle is that the package only accepts sparse matrices as input.

11 Jul 2006 Mark Cummins

Fast and well-implemented.

22 Aug 2006 Shlomi Lifshits

Thank you very much for this contribution. It is simple to use and very fast.

06 Oct 2006 Doraid Beck

u made my day..
thanx alot

17 Oct 2006 Elon Yakir

Amazing

27 Nov 2006 Ahmet Bakan

Millions of thanks!

10 Jan 2007 julan hsu

ultra cool!

15 Jan 2007 Pawel Majewski

Great job! Thanks!

07 Feb 2007 wisit sukchom

it's an excellent jobs for helping me

24 Feb 2007 G C

I only used the bellman ford function and this one is buggy. easier to write your own (take pseudo code from wikipedia)

26 Feb 2007 David Gleich

In response to GC: I am not aware of any bugs in the bellman ford function, but it is possible. If you have a bug, please send it to me.

15 Apr 2007 josmir pineda

thank you

22 May 2007 Radu Negoescu

No problems with it, well commented and (most likely) well implemented. Used for analysis of a 14K vertices graph

05 Jun 2007 Dogukan Yücel

Error: File: C:\matlabR12\work\matlab_bgl\shortest_paths.m Line: 40 Column: 18

06 Jun 2007 David Gleich

Dogukan Yücel: you need Matlab 7 or better, R12 is not compatible.

26 Jun 2007 mohamed kaf

Very good work ...thx

28 Jun 2007 mohamed k

I am getting a betweeness centrality vector with some negative values !!!! Is it normal ?

18 Jul 2007 Gabi Kliot

There is a bug in max_flow: when I call it to return cut and R and F it crashes with segfault in the C dll code (the example crashes either). Could you please fix it. Thank you.

18 Jul 2007 David Gleich

Two notes:

The betweenness centrality issue was an overflow in the int datatype for a larger graph. The function works correctly on a 64-bit version of Matlab with a 64-bit integer.

The max flow bug seems to appear in 2007a and can be fixed by replacing any instances of "free" with "mxFree" in max_flow_mex.c.

I am not planning on fixing the 2.1 release and will devote my efforts to finishing the 3.0 release (with the fix for this crash and almost a 30% across the board speed increase). Please send me an email if you are interested in testing the new version.

23 Jul 2007 David Gleich

I released a 3.0 beta version. Check it out on the website. I'll release the finished version to the File Exchange site.

I released a "beta" new version. I call it a beta because it isn't full documented yet.

http://www.stanford.edu/~dgleich/programs/matlab_bgl/index.html

24 Jul 2007 Gabi Kliot

Thank you very much! Your code is very usefull.

18 Sep 2007 tian wei  
26 Nov 2007 sienkiwicz Fliz

Nice library, but I have some problems to compile on a linux cluster (GLNXA64) and it failed with the following message:
>> compile
mex -largeArrayDims -DMATLAB_BGL_LARGE_ARRAYS -O -I../libmbgl/include -L../libmbgl -lmbgl-linux-64-large astar_search_mex.c
astar_search_mex.c: In function `mexFunction':
astar_search_mex.c:269: warning: passing arg 2 of `astar_search_hfunc_visitor' from incompatible pointer type
astar_search_mex.c:269: warning: passing arg 3 of `astar_search_hfunc_visitor' from incompatible pointer type
astar_search_mex.c:269: warning: passing arg 7 of `astar_search_hfunc_visitor' from incompatible pointer type
astar_search_mex.c:269: warning: passing arg 9 of `astar_search_hfunc_visitor' from incompatible pointer type
astar_search_mex.c:277: warning: passing arg 2 of `astar_search' from incompatible pointer type
astar_search_mex.c:277: warning: passing arg 3 of `astar_search' from incompatible pointer type
astar_search_mex.c:277: warning: passing arg 8 of `astar_search' from incompatible pointer type
astar_search_mex.c:283: warning: passing arg 2 of `astar_search_hfunc' from incompatible pointer type
astar_search_mex.c:283: warning: passing arg 3 of `astar_search_hfunc' from incompatible pointer type
astar_search_mex.c:283: warning: passing arg 8 of `astar_search_hfunc' from incompatible pointer type
astar_search_mex.c:283: warning: passing arg 10 of `astar_search_hfunc' from incompatible pointer type
/usr/bin/ld: cannot find -largeArrayDims
collect2: ld returned 1 exit status

    mex: link of 'astar_search_mex.mexa64' failed.

??? Error using ==> mex
Unable to complete successfully

Error in ==> matlab_bgl-3.0-beta/private/compile at 74
     eval(mexstr);

-----------------------------------------

My matlab version is 7.1.0.183, it seems the option -largeArrayDims is not supported. I removed this option and compiling is okay, but something wrong occured when I call mst function.

Any suggestions?

26 Nov 2007 David Gleich

In response to sienkiwicz Fliz:

You need to recompile the libmbgl library using ./compile-linux-64.sh because the default linux library is compiled for the 64-bit indices used with largeArrayDims. Send me an email if you can't get this to work and I can send a precompiled version.

23 Dec 2007 hadi habibi

Dear all
Some times that i using the 'max_flow' function', i encounter with this error :
what is the problem?

------------------------------------------------------------------------
       Segmentation violation detected at Sun Dec 23 13:33:38 2007
------------------------------------------------------------------------

Configuration:
  MATLAB Version: 7.4.0.287 (R2007a)
  MATLAB License: 161051
  Operating System: Microsoft Windows XP
  Window System: Version 5.1 (Build 2600: Service Pack 2)
  Processor ID: x86 Family 15 Model 2 Stepping 4, GenuineIntel
  Virtual Machine: Java 1.5.0_07 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
  Default Charset: windows-1252

Register State:
  EAX = 00000000 EBX = 00000001
  ECX = 00000000 EDX = 00000065
  ESI = 12ed9720 EDI = 12b90000
  EBP = 00cec538 ESP = 00cec47c
  EIP = 7c92ae22 FLG = 00210213

Stack Trace:
  [0] ntdll.dll:0x7c92ae22(0x12b90000, 0, 0x12ed9740, 594)
  [1] max_flow_mex.dll:0x12b843ef(0xffff40c0, 101, 0x12ed88a0, 0x0fa25960)
  [2] max_flow_mex.dll:0x12b81519(5, 0x00cecc28, 0x12ed88a0, 396)
  [3] libmex.dll:_mexRunMexFile(5, 0x00cecc28, 3, 0x00cecc88) + 139 bytes
  [4] libmex.dll:private: void __thiscall Mfh_mex::runMexFileWithSignalProtection(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(5, 0x00cecc28, 3, 0x00cecc88) + 86 bytes
  [5] libmex.dll:public: virtual void __thiscall Mfh_mex::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(5, 0x00cecc28, 3, 0x00cecc88) + 263 bytes
  [6] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(5, 0x00cecc28, 3, 0x00cecc88) + 203 bytes
  [7] m_interpreter.dll:_inDispatchWithDebug(652, 5, 0x00cecc28, 3) + 192 bytes
  [8] m_interpreter.dll:_inDispatchFromStack(652, 0x0fb6e114 "max_flow_mex", 5, 3) + 877 bytes
  [9] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x0fb6e114 "max_flow_mex", 652, 5, 3) + 156 bytes
  [10] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 420, 61, 0) + 2620 bytes
  [11] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 420, 36, 0) + 87 bytes
  [12] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 420, 36, 0) + 302 bytes
  [13] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x043faf20, 0, 3, 0x00ced320) + 734 bytes
  [14] m_interpreter.dll:_inWordsj(4, 0x00ced2c0, 3, 0x00ced320) + 351 bytes
  [15] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(4, 0x00ced2c0, 3, 0x00ced320) + 194 bytes
  [16] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 4, 0x00ced2c0, 3) + 28 bytes
  [17] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(4, 0x00ced2c0, 3, 0x00ced320) + 28 bytes
  [18] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(4, 0x00ced2c0, 3, 0x00ced320) + 203 bytes
  [19] m_interpreter.dll:_inDispatchWithDebug(637, 4, 0x00ced2c0, 3) + 192 bytes
  [20] m_interpreter.dll:_inDispatchFromStack(637, 0x019aae10 "max_flow", 4, 3) + 877 bytes
  [21] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x019aae10 "max_flow", 637, 4, 3) + 156 bytes
  [22] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 1842, 108, 0) + 2620 bytes
  [23] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 1842, 16, 0) + 87 bytes
  [24] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 1842, 16, 0) + 302 bytes
  [25] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x0433c420, 0, 9, 0x00ced9b8) + 734 bytes
  [26] m_interpreter.dll:_inWordsj(1, 0x00ced958, 9, 0x00ced9b8) + 351 bytes
  [27] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(1, 0x00ced958, 9, 0x00ced9b8) + 194 bytes
  [28] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 1, 0x00ced958, 9) + 28 bytes
  [29] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00ced958, 9, 0x00ced9b8) + 28 bytes
  [30] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00ced958, 9, 0x00ced9b8) + 203 bytes
  [31] m_interpreter.dll:_inDispatchWithDebug(636, 1, 0x00ced958, 9) + 192 bytes
  [32] m_interpreter.dll:_inDispatchFromStack(636, 0x019af7ac "BiPartitionWithGolf", 1, 9) + 877 bytes
  [33] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x019af7ac "BiPartitionWithGolf", 636, 1, 9) + 156 bytes
  [34] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 2205, 68, 0) + 2620 bytes
  [35] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 2205, 4, 0) + 87 bytes
  [36] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 2205, 4, 0) + 302 bytes
  [37] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x0433c5e0, 0, 13, 0x00cee050) + 734 bytes
  [38] m_interpreter.dll:_inWordsj(3, 0x00cedff0, 13, 0x00cee050) + 351 bytes
  [39] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(3, 0x00cedff0, 13, 0x00cee050) + 194 bytes
  [40] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 3, 0x00cedff0, 13) + 28 bytes
  [41] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(3, 0x00cedff0, 13, 0x00cee050) + 28 bytes
  [42] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(3, 0x00cedff0, 13, 0x00cee050) + 203 bytes
  [43] m_interpreter.dll:_inDispatchWithDebug(647, 3, 0x00cedff0, 13) + 192 bytes
  [44] m_interpreter.dll:_inDispatchFromStack(647, 0x02a5331d "ClusteredSlepian", 3, 13) + 877 bytes
  [45] m_interpreter.dll:_inCallFcnFromReference(0xccbebe7e, 0x03d0f4d0, 0, 0) + 166 bytes
  [46] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 0, 48, 0) + 4783 bytes
  [47] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 87 bytes
  [48] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 0, 1, 0) + 302 bytes
  [49] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x0433c7a0, 1, 0xccbeb812, 0xffffffff) + 734 bytes
  [50] m_interpreter.dll:_inExecCompScript(0, 0x00cee620, 0x0433c7a0, 0x00cee620) + 257 bytes
  [51] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(0, 0x00cee620, 0, 0x00cee680) + 159 bytes
  [52] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00cee620, 0) + 28 bytes
  [53] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cee620, 0, 0x00cee680) + 28 bytes
  [54] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cee620, 0, 0x00cee680) + 203 bytes
  [55] m_interpreter.dll:_inDispatchWithDebug(640, 0, 0x00cee620, 0) + 192 bytes
  [56] m_interpreter.dll:_inDispatchFromStack(640, 0x12d6f7b4 "CSW_CURVE2", 0, 0) + 877 bytes
  [57] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x12d6f7b4 "CSW_CURVE2", 640, 0, 0) + 156 bytes
  [58] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(2, 0, 0, 0) + 2745 bytes
  [59] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(2, 0, 0, 0) + 87 bytes
  [60] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(2, 0, 0, 0) + 302 bytes
  [61] m_interpreter.dll:_inInterPcode(2, 0xccbeb5ae, 0, 0x78503444) + 84 bytes
  [62] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cef31c, 0x00cef38c, 0x00cef3a8, 2) + 152 bytes
  [63] m_interpreter.dll:__catch$?inEvalStringWithIsVarFcn@@YA?AW4inExecutionStatus@@PAU_memory_context@@PBDW4EvalType@@HQAPAUmxArray_tag@@W4inDebugCheck@@PAU_pcodeheader@@PAHP6A_NPAX1@Z7@Z$0(0x78503444, 0x01964420 "CSW_CURVE2\n", 0, 0) + 219 bytes
  [64] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0x01964420 "CSW_CURVE2\n", 0, 2, 0x00cef3f8) + 69 bytes
  [65] m_interpreter.dll:_inEvalCmdNoEnd(0x01964420 "CSW_CURVE2\n", 0xcce13d39, 0x7848c6b0, 0x00ec57c0) + 16 bytes
  [66] bridge.dll:enum inExecutionStatus __cdecl ThrowSignal(char const *)(0x01964420 "CSW_CURVE2\n", 0xcce13a45, 0x018613c0, 0x01861360) + 75 bytes
  [67] bridge.dll:__catch$_mnParser$0(0xccfeed3d, 0x01861360, 0x01861360, 0) + 328 bytes
  [68] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(0xccfee93f, 0x004074a4, 336694, 0) + 62 bytes
  [69] MATLAB.exe:0x004021b8(4194304, 0, 336694, 10)
  [70] MATLAB.exe:0x00403bd2(1109972, 0, 0x7ffdb000, 0x8054b038)
  [71] kernel32.dll:0x7c816d4f(0x00403daf, 0, 0x78746341, 32)

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If it is an official MathWorks function, please
follow these steps to report this problem to The MathWorks so we
have the best chance of correcting it:

The next time MATLAB is launched under typical usage, a dialog box will
open to help you send the error log to The MathWorks. Alternatively, you
can send an e-mail to segv@mathworks.com with the following file attached:
    C:\DOCUME~1\crystal\LOCALS~1\Temp\matlab_crash_dump.3144

If the problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/ts/help_request_1.html

A technical support engineer might contact you with further information.

Thank you for your help. Save your workspace and restart MATLAB.

07 Jan 2008 David Gleich

In regards to the Segmentation Violation with the max_flow function, see the suggested fix in the FAQ or try MatlabBGL 3.0 beta for a pre-compiled fix.

David

27 Jun 2008 Amanda Traud

I was wondering if I could get a precompiled versio n for Windows Vista 64bit, as the download doesn't come with this, and I have yet to find a compiler that will compile this for me in Matlab, Thanks so much!!!

03 Sep 2008 amina s

hello this my broblem
------------------------------------------------------------------------
       Segmentation violation detected at Wed Sep 03 11:41:28 2008
------------------------------------------------------------------------

Configuration:
  MATLAB Version: 7.0.0.19920 (R14)
  Operating System: Microsoft Windows XP
  Window System: Version 5.1 (Build 2600: Service Pack 2)
  Processor ID: x86 Family 15 Model 2 Stepping 9, GenuineIntel
  Virtual Machine: Java 1.4.2 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    (mixed mode)
  Default Charset: ibm-5348_P100-1997

Register State:
  EAX = 1903ac90 EBX = 00cddd00
  ECX = 190656b0 EDX = e6f9a94f
  ESI = 18ffd0b0 EDI = 00000000
  EBP = 00cddd0c ESP = 00cddcf4
  EIP = 791b743f FLG = 00010202

Stack Trace:
  [0] hg.dll:void __cdecl set_root_CurrentFigure(struct GObject_tag *,struct GObject_tag *)(0x01639bb0, 0, 0x00cde09c, 1) + 127 bytes
  [1] hg.dll:_create_figure_post_fcn(0x18ffd0b0 "__ehhandler$??0?$_Tree@V?$_Tmap_..", 0, 0x01493b60, 0xffffffff) + 139 bytes
  [2] hg.dll:_hgFigure(1, 0x00cde03c, 1, 0x00cde09c) + 430 bytes
  [3] m_dispatcher.dll:public: virtual void __thiscall Mfh_builtin<struct mxArray_tag>::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cde03c, 1, 0x00cde09c) + 55 bytes
  [4] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00cde03c, 1, 0x00cde09c) + 200 bytes
  [5] m_interpreter.dll:_inDispatchFromStack(166, 0x0160dfa3 "figure", 1, 1) + 891 bytes
  [6] m_interpreter.dll:_inCallFcnFromReference(0, 0x16a806f0, 0x789b59c0, 0xcccccccd) + 176 bytes
  [7] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(1, 0, 9, 0) + 4115 bytes
  [8] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(1, 0, 8, 0) + 272 bytes
  [9] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x18f1ad50, 1, 0, 0x18f1ad50) + 773 bytes
  [10] m_interpreter.dll:_inExecCompScript(0, 0x00cde71c, 0x18f1ad50, 0xffffffff) + 321 bytes
  [11] m_interpreter.dll:public: void __thiscall Mfh_mp::inRunMP(int,struct mxArray_tag * *,int,struct mxArray_tag * *,struct inWorkSpace_tag *)(0, 0x00cde71c, 0, 0x00cde77c) + 122 bytes
  [12] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00cde71c, 0) + 28 bytes
  [13] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 0, 0x00cde77c) + 26 bytes
  [14] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde71c, 0, 0x00cde77c) + 273 bytes
  [15] m_interpreter.dll:_inDispatchFromStack(668, 0x0144a5c4 "essaymop", 0, 0) + 891 bytes
  [16] m_interpreter.dll:enum opcodes __cdecl inDispatchCall(char const *,int,int,int,int *,int *)(0x0144a5c4 "essaymop", 668, 0, 0) + 111 bytes
  [17] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *)(2, 0, 0, 0) + 2411 bytes
  [18] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *)(2, 0, 0, 0) + 272 bytes
  [19] m_interpreter.dll:_inInterPcode(2, 0x7876f2d8 "¸òvx°úrx`ûrxÐúrx¸òvxØòvx", 0, 0) + 69 bytes
  [20] m_interpreter.dll:enum inExecutionStatus __cdecl in_local_call_eval_function(int *,struct _pcodeheader *,int *,struct mxArray_tag * * const,enum inDebugCheck)(0x00cdf2c8, 0x00cdf3bc, 2, 0x166f3670 "essaymop\n") + 162 bytes
  [21] m_interpreter.dll:$L72592(0x7876f2d8 "¸òvx°úrx`ûrxÐúrx¸òvxØòvx", 0x166f3670 "essaymop\n", 9, 0) + 196 bytes
  [22] m_interpreter.dll:enum inExecutionStatus __cdecl inEvalCmdWithLocalReturnandtype(char const *,int *,enum inDebugCheck)(0, 2, 1, 0x00cdf44c "ôôÍ") + 86 bytes
  [23] m_interpreter.dll:_inEvalCmdNoEnd(0x166f3670 "essaymop\n", 0x00cdf4e4, 0x00cdf4a0, 0x01612100) + 16 bytes
  [24] bridge.dll:_mnParser(0x7c80b529, 0x01612100, 0, 0) + 431 bytes
  [25] mcr.dll:public: void __thiscall mcrInstance::mnParser(void)(271242, 0x4d5c3a43, 0x414c5441, 0x625c3742) + 87 bytes
  [26] MATLAB.exe:0x00401d2f(4194304, 0, 271242, 0x01612100)
  [27] MATLAB.exe:0x00403e45(3538999, 3604528, 0x7ffdb000, 0x8054b35b)
  [28] kernel32.dll:0x7c816d4f(0x00403cc0 "jth(U@", 0, 200, 499)

16 Oct 2008 ta ta

Thanks a lot!

17 Nov 2008 Hallvard

Thank you for sharing this library.
I have one question. I frequently get the following warning when using max_flow from version 4. It never occured when I used the 2.1 version or the 3.0 beta.

"Warning: The rounded (unrounded) value of the minimum cut is 7442843 (7.44284e+006),but the value of the max-flow is 7442842. These values should be equal "

The discrepancy seems to always equal 1 between min cut and max flow.

Is this critical? If not, is there a way to suppress warnings like this?

03 Dec 2008 Andrea Tagliasacchi

The bioinformatics toolbox provides some functions for graphs as well. However I found a problem in the creation of spanning trees which I already reported. This library on the other hand provide a correct solution.

Thanks

03 Feb 2009 yaaqob alrefaei

very sufficient

03 Feb 2009 yaaqob alrefaei

i can't install it in matlab
i did the following steps
1- Unzip the file matlab bgl.zip.
2- in Matlab, add path the Windows path “C:\Documents and Settings\dgleich\My Documents\matlab\” to the path
3-To test the installation, try running the following script.

when i try to test the installation, i got this error

??? Undefined command/function 'clustering_coefficients_mex'.

Error in ==> clustering_coefficients at 97 ccfs=clustering_coefficients_mex(A,options.undirected,weight_arg);

04 Feb 2009 yaaqob alrefaei

when i executed the following
1- Download the latest link from the File Exchange and unzip it to a directory of your choosing.
2- Open Matlab and change directory until you get to the directory where you unzipped it.
3- Change into the matlab_bgl subdirectory.
4- Try typing
clustering_coefficients(sparse(ones(5))) into Matlab. You should the output is error.

??? Undefined command/function 'clustering_coefficients_mex'.

Error in ==> clustering_coefficients at 97
ccfs=clustering_coefficients_mex(A,options.undirected,weight_arg);

Error in ==> Untitled at 3
clustering_coefficients(sparse(ones(5)))

21 Feb 2009 Kaushal

Hi David,

Thanks for providing this library to the wider matlab community. It seems quite useful for students like myself.

I just downloaded the new version and was wondering whether the graph lay out algorithms allow insertion of node labels and edge labels on the graph ?

Thanks,

Kaushal

10 Apr 2009 Maddy

Hi,

I am looking for a implementation for the Hopcroft Karp Algorithm for maximum bipartite matching.

Please help.

Thanks
Maddy

18 Sep 2009 Petter

This is an exellent package!

23 Dec 2009 Jesse Blocher

Absolutely brilliant. I used the precompiled Linux64 code and it is fast - much faster than anything I'd been able to do so far. Thanks.

05 Jan 2010 H

Thanks for the great package!

Is it possible to use this to form a 3-d grid graph with diagonal edges?

11 Jan 2010 H

Never mind my previous question. How can I get the shortest path between nodes s and t? What I'm looking for is list of nodes, not just the distance...

18 Jan 2010 H

No one has an idea?

18 Jan 2010 m

"How can I get the shortest path between nodes s and t? What I'm looking for is list of nodes, not just the distance..."

Use the predecessors returned by the shortest_paths function.
For example:

load graphs/clr-25-2.mat
startnode = 1;
endnode = 5;
[d pred] = shortest_paths(A,startnode);

cur = endnode;
path = [];
while(true)
    path = [cur path];
    if cur == startnode
        break;
    end
    cur = pred(cur);
end

In this example, path = [1 3 5], which represents the shortest path from node 1 to node 5.

19 Jan 2010 H

Thank you very much m!

05 Feb 2010 H

As it seems, there's also a built function for my problem, path_from_pred.m...

And a next question as well:

I have a graph that represents e.g. cities and the arcs are distances between them. Is there a way to have some kind of maximum length as an constraint to the shortest path problem?

Please login to add a comment or rating.
Updates
09 May 2006

Fixed some bugs in the code:

1) components now works
2) mst default algorithm switched to handle graphs with negative edge weights
3) dfs_example.m fixed

24 Jul 2006

Significant updates to the package including visitors, bug fixes, and astar search.

11 Apr 2007

Recompiled for Matlab 2006b on 64-bit platforms, includes precompiled versions for Mac OS X, includes small bug fixes.

Adds predecessor matrix to floyd_warshall.
Adds edge centrality computations.

21 Oct 2008

Major update, includes planarity testing code and graph layout code! See the new_in_3_0 and new_in_4_0 published M files included.

22 Oct 2008

Fixed mlint warnings and a typo in the title of a published m-file.

Tag Activity for this File
Tag Applied By Date/Time
graph David Gleich 22 Oct 2008 08:23:48
bfs David Gleich 22 Oct 2008 08:23:48
dfs David Gleich 22 Oct 2008 08:23:48
shortest paths David Gleich 22 Oct 2008 08:23:48
centrality David Gleich 22 Oct 2008 08:23:48
mst David Gleich 22 Oct 2008 08:23:48
flow David Gleich 22 Oct 2008 08:23:48
max David Gleich 22 Oct 2008 08:23:48
dijkstra David Gleich 22 Oct 2008 08:23:48
max flow David Gleich 22 Oct 2008 15:06:44
layout David Gleich 22 Oct 2008 15:06:44
planar graph testing David Gleich 22 Oct 2008 15:06:44
min cut David Gleich 22 Oct 2008 15:06:44
dijkstra Ravi Eswara 02 Nov 2008 19:22:15
bfs Artur Stoppa 29 Nov 2008 15:42:41
dijkstra David Gingras 03 Dec 2008 19:51:04
bfs John 07 Dec 2008 02:03:28
shortest paths anerudhan gopal 27 Mar 2009 10:21:06
bfs Jon Schneider 04 May 2009 17:41:53
bfs ido 27 Jul 2009 07:05:45
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com