Package com.jgalgo.alg

Algorithms for solving graph problems.

Most algorithms accept a Graph object as input, and perform some computation on it. Algorithms in this package follow a common pattern: an interface is defined for the functionality only (e.g. ShortestPathSingleSource), a result object is defined within the interface (e.g. ShortestPathSingleSource.Result), a default implementation is provided via newInstance() method (e.g. ShortestPathSingleSource.newInstance()), and a builder that allow more control over the algorithm is provided via newBuilder() method (e.g. ShortestPathSingleSource.newBuilder()). In addition, algorithm interfaces define a result specifically for graphs in which the vertices and edges are integer only, IntGraph (e.g. ShortestPathSingleSource.IResult). For the most common use case, there is no need to use IntGraph and the result objects that are specific to it.

Non of the algorithms or result objects in this package are thread safe. Result objects should not be used once the graph on which the result was computed is modified, as the result object may relay on the graph for information and may not be able to detect the modification.

Most algorithm implementations are not expose as public API.