miserables

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i miserables

Weekly Downloads

143

Version

2.0.0

License

MIT

Unpacked Size

181 kB

Total Files

11

Last publish

Collaborators

  • anvaka