JGraphT Logo

a Java library of graph theory data structures and algorithms


flexible

any object can be used for vertex and edge types, with full type safety via generics
edges can be directed or undirected, weighted or unweighted
simple graphs, multigraphs, and pseudographs
unmodifiable graphs allow modules to provide “read-only” access to internal graphs
listenable graphs allow external listeners to track modification events
live subgraph views on other graphs
compositions and converter views for combining and adapting graphs
customizable incidence and adjacency representations


powerful

specialized iterators for graph traversal (DFS, BFS, etc)
algorithms for path finding, clique detection, isomorphism detection, coloring, common ancestors, tours, connectivity, matching, cycle detection, partitions, cuts, flows, centrality, spanning, and the list goes on
live adapters to other graph libraries such as JGraphX visualization and Guava Graphs
generators and transforms


efficient

designed for performance, with near-native speed in many cases
adapters for memory-optimized fastutil representation

Fork me on GitHub

Jumpstart

Maven

JGraphT releases are published to the Maven Central Repository, so you can easily add us as a dependency to your project:

<groupId>org.jgrapht</groupId>
<artifactId>jgrapht-core</artifactId>
<version>1.3.0</version>

(See the wiki for information on how to use the latest SNAPSHOT build instead.)


Development Environment

First, find out how to set up your favorite IDE (or the command line) to work with JGraphT.


Hello JGraphT

Next, try compiling and running the hello world example.

Once you get that working, dig into the user guide to learn more about JGraphT!

Docs
Download

Latest Release

For development without Maven, or for running demos from the command line, you can download a full archive of the release:


.tar.gz

Regardless of which archive format you download, you’ll have the same release contents after unpacking.


Historical Releases

Older releases are also available. They have less functionality, but may be useful with obsolete JDK’s or JRE’s.

Community

 Get answers on StackOverflow

 Browse known issues or report a new issue

 Join the user mailing list

 Check out open pull requests

 Learn how to contribute your first improvement

 Tell us your success story: how are you are using JGraphT?

 Cite JGraphT in your research

News

12-Nov-2018: Release 1.3.0 is now available!

Read the release announcement for more info.

And to celebrate the release, we have a new website and logo :)

Thanks

The JGraphT team is grateful to all of our contributors over the years for making the project what it is today!

JGraphT is dual-licensed under LGPL 2.1 and EPL 2.0. As a recipient of JGraphT, you may choose which license to receive the code under. Licensing information for libraries on which the project depends is available in the README.

Project development takes place on github, but we still make use of sourceforge for some resources as well.

This website is built using Jekyll, with help from the SinglePaged theme and the Primer theme.

If you enjoy using JGraphT, show us by clicking the Like button for our Facebook page!