konigsberg

0.0.1 • Public • Published

konigsberg

Build Status Coverage Status

A browser/Node.js library for manipulating graphs and executing graph theory algorithms.

Features

  • Directed and undirected graphs
  • Customizable data on nodes and edges
  • Simple search algorithms (Depth First Search and Breadth First Search at the moment)
  • Unit tested

Installation

Install Konigsberg with npm:

npm install konigsberg

Or Bower:

bower install konigsberg

Usage

In Node.js / Webpack / Browserify:

var konigsberg = require('konigsberg');
var g = new konigsberg.DirectedGraph();

In the browser:

<script src="konigsberg.js"></script>
<script>
    var g = new konigsberg.DirectedGraph();
    g.addNode('A');
    g.addNode('B');
    g.addEdge('A', 'B');
    console.log(g.hasEdge('A', 'B')); // true
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i konigsberg

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • jledentu