iper

Hypergraphs for breakfast!

Node engine NPM version Build Status Dependency Status Coverage Status Test page

js-standard-style

NPM

Installation

With npm do

npm install iper

With bower do

bower install iper

API

new Graph([graph])

Hypergraph constructor.

var graph = new Graph()

graph.addEdge(nodeIds)

Add an hyperedge that connects given nodeIds.

graph.addNode(data)

Add a node, containing given data.

var nodeId = graph.addNode({ label: 'foo' })

graph.degreeOf(nodeId)

Returns the degree of a node, that is the number of incident edges with loops counted twice.

graph.delEdge(id)

Delete edge by given id.

graph.delNode(id)

Delete node by given id.

License

MIT