Clj-graph-java is a project mainly written in Clojure, it's free.
Java bindings for the clj-graph network graph analysis library
Java bindings for clj-graph network graph analysis library
A network is represented as a Map. The map should have a key for each node in the network. For each key in the map, the value should be the set of other nodes to which the key is connected. The following example should give you an idea of how to set up the network and calculate the cliques for that network. In this example, all nodes are of type Cat.
java.util.Map<Cat,Set<Cat>> network = Maps.newHashMap();
for(Cat cat : allCats) {
network.put(cat, toWhichCatsIsThisCatConnected(cat));
}
Set<Set<Cat>> cliques =
(Set<Set<Cat>>) new clj.graph.Core().cliques(network);
A clique is represented by a Set of nodes (Set
Copyright (C) 2010 Eric Lavigne
Distributed under the Eclipse Public License, the same as Clojure.