Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Simple Graph Lib


This tiny library supports both directed and undirected graphs with ability to use synchronized realizations of them.

Vertexes of the graph have a user defined type.

The calculation of the path was implemented with the usage of the Dijkstra's algorithm.


You should use GraphBuilder class for building you graph data.

String a = "a";
String b = "b";
String c = "c";
String d = "d";

Graph graph = GraphBuilder.create(Builder.Type.DIRECTED)
    .addEdge(a, b)
    .addEdge(b, c)
    .addEdge(c, d)

List<String> path = graph.getPath(a, f);

addVertex - adds vertex to the graph

addEdge - adds edge to the graph

build - builds specific graph implementation.

getPath - returns a list of edges between 2 vertices

You can’t perform that action at this time.