Skip to content

anvaka/miserables

Repository files navigation

miserables build status

The encounters between the characters of Les Misérables as a graph (see ngraph.graph for the API):

Les Miserables graph

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

About

The encounters between the characters of Les Misérables as a graph

Resources

License

Stars

Watchers

Forks

Packages

No packages published