=====
Nodes is a general purpose graph library. It focuses on simple creation and traversal of graphs with general objects on their nodes and links. Nodes is a work in progress, it should not be considered production-ready in general, though certain aspects may be well-tested.
The simplest way to use nodes is to reference its maven package. We do not build releases for nodes (yet), but the latest snapshot can be included using jitpack. Simply inclide the following repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
And the following dependency:
<dependency>
<groupId>com.github.data2semantics</groupId>
<artifactId>nodes</artifactId>
<version>-SNAPSHOT</version>
</dependency>
In order to keep object names and variable descriptors short, Nodes uses some non-standard terminology:
These combinations make for four basic interfaces, which form the backbone of Nodes:
untagged | tagged | |
---|---|---|
undirected | UGraph | UTGraph |
directed | DGraph | DTGraph |
These are all subinterfaces of the basic interface org.nodes.Graph
There are currently three main implementations available:
Some final things to note:
Creating a graph:
// We're using a DTGraph, but we don't care about the specifics
Graph<String> graph = new MapDTGraph<String, String>();
Node<String> a = graph.add("a"),
b = graph.add("b"),
c = graph.add("c");
a.connect(c);
graph.node("a").connect(graph.node("b"));
System.out.println(graph);
// result (toString prints DOT format): digraph {a -> c; a -> b}
For feedback please use the issues on github, or if that's not an option, send an email to nodes peterbloem nl, replacing the asterisks with an at symbol and a period respectively.
API documentation can be found here. Note that this may be out-of-date. For the most recent version, the code should be checked out.
Nodes is produced with funding from the Dutch national research program COMMIT.