MatlabBGL provides robust and efficient graph algorithms for Matlab using native data structures.
68,9K téléchargements
Mise à jour 22 oct. 2008

Aucune licence

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:

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:

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.

** For 64-bit Mac's with R2009b or higher, please see for a set of files compiled for you. I'm hoping to start working on version 5.0 soon and won't be updating this version.

Citation pour cette source

David Gleich (2024). MatlabBGL (, MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2007a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

















Version Publié le Notes de version

Added comment about Matlab R2009b and higher on 64-bit OSX.

Fixed mlint warnings and a typo in the title of a published m-file.
Added comment about Matlab R2009b and higher on 64-bit OSX.

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.