miserables
v2.0.0
Published
The encounters between the characters of Les Misérables as a graph
Downloads
84
Readme
miserables
The encounters between the characters of Les Misérables as a graph (see ngraph.graph
for the API):
I'm just using this graph over and over, so I thought it's a good time to extract it into npm module.
Original graph was created by Donald Knuth here.
usage
var graph = require('miserables');
// Graph is now an instance of ngraph.graph:
assert(graph.getLinksCount() > 0);
assert(graph.getNodesCount() > 0);
// For simplicity exported instance is a singletone, but if you need to
// have multiple instances of this graph, then use `create()` method:
var create = require('miserables').create;
var g1 = create();
var g2 = create();
assert(g1 !== g2);
assert(g1.getLinksCount() === g2.getLinksCount());
install
With npm do:
npm install miserables
license
MIT