node package manager


Hypergraphs for breakfast


Hypergraphs for breakfast!

With npm do

npm install iper

With bower do

bower install iper

Hypergraph constructor.

var graph = new Graph()
  • @param {Object} [graph]
  • @param {Object} [graph.edge]
  • @param {Object} [graph.node]

Add an hyperedge that connects given nodeIds.

  • @param {Array} nodeIds
  • @returns {String} id

Add a node, containing given data.

var nodeId = graph.addNode({ label: 'foo' })
  • @param {*} [data]
  • @returns {String} id of the node created

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

  • @param {String} id
  • @returns {void}

Delete edge by given id.

  • @param {String} id
  • @returns {void}

Delete node by given id.

  • @param {String} id
  • @returns {void}