I'm trying to do some graph analysis with JSNetworkX.
Finding the centrality values works.
According to the documentation, there is also a function called jsnx.findCliques()
. In my case it returns an empty object.
var G = new jsnx.Graph();
G.addEdge("A", "B");
G.addEdge("A", "C");
G.addEdge("A", "D");
G.addEdge("C", "D");
G.addEdge("B", "E");
var central = jsnx.betweennessCentrality(G);
console.log(central) // object with useful values
var cliques = jsnx.findCliques(G);
console.log(cliques) // empty object
Here is the fiddle to play around with: https://jsfiddle.net/mrpf5ybq/
I'm not tied to JSNetworkX. I just need a JS library for simple graph algorithms, such as centrality, cliques detection, etc.