{"_id":"graph","_rev":"19-4484416260372e06c08f04f3e38a1567","name":"graph","description":"library for manipulating directed and undirected graphs","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.0.0","homepage":"http://github.johntantalo.com/graphjs/","repository":"git://github.com/tantalor/graphjs.git","author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"engines":{"node":"*"},"_id":"graph@0.0.0","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.2.5","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"ea9830805b4ce0140d116c67e8f97903f7ef4257","tarball":"https://registry.npmjs.org/graph/-/graph-0.0.0.tgz","integrity":"sha512-SeU7TLMpTe5MMmEuUocWzWlEYQCgRpKu9nxmfBUxGWq6TrWii4kh69/f3+2AscC2i3TQ7EvORv5LeJNCvz7snA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFosNG+YmUUv/pmubzURIkttxfrTaMfBxVMO4qredrWxAiBgW8/UWN95fu4iizW/Vl/hAngAzhtBe7X88BPDOGHOEg=="}]}},"0.0.1":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.0.1","homepage":"http://github.johntantalo.com/graphjs/","repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"engines":{"node":"*"},"_id":"graph@0.0.1","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.2.5","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"34524623dd08950ff040834b04550ae42a5a8012","tarball":"https://registry.npmjs.org/graph/-/graph-0.0.1.tgz","integrity":"sha512-a7F1XFfzvn1O51jtwl5eQmACvPWNQt1ZgzTiyS03f9acCEfR17f2/7t7hnUUpx/kQRCxoNh4BlBSFHcfFp3oQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCzPGc7V+p8necmsz/1ddHMuo3imJ5T0Gnc/0aq7kUKJQIhAJJ0lEQeZu1msNCWdecbjttVLwtQpKFa7dM3RmK5/y3T"}]}},"0.0.2":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.0.2","homepage":"http://github.johntantalo.com/graphjs/","repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"test":"./test/all.js","engines":{"node":"*","jsc":"*","narwhal":"*","ringo":"*"},"_id":"graph@0.0.2","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.2.5","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"76193c77a140f555896f52e5e2c12d40f10606df","tarball":"https://registry.npmjs.org/graph/-/graph-0.0.2.tgz","integrity":"sha512-PVY85gaxs9i9MoXTeIPqAJ5QzScsQw+KL6w58+4s9amZdMi+gkcpxuur0lGUYDr1HoQRjBkSWcJpUxgxXoBrrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDovxrcqT5huEANZJZnvluEqbiEDxo9EeiL3fCyotqQOAIgJkcRc1HfWFSW2sIffvIaIL5ZvLspNNo42dDvpuRiLkI="}]}},"0.0.3":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.0.3","homepage":"http://github.johntantalo.com/graphjs/","repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"devDependencies":{"steel":"0.0.1"},"scripts":{"test":"test/all.js"},"engines":{"node":"*","jsc":"*","narwhal":"*","ringo":"*"},"_npmJsonOpts":{"file":"/Users/john/.npm/graph/0.0.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"graph@0.0.3","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.17","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"aefc49637913de70e977181c0fc543137179e93d","tarball":"https://registry.npmjs.org/graph/-/graph-0.0.3.tgz","integrity":"sha512-k6p0/NpFlxQbPwYJYf0YApTGbVXYtW0JHvuyeADqrNiaTCv6RwNlRcZmR4MkJBH/NbrVzYaygoolRDdwR5W/Sw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGGcnVHoszY5SNl2JSfo1iaGk25vCASemXmU/VGCEMrEAiBtLse1TPrCwgMS+PwDFmejM4GbG3g3Qnfn0TBRuGHgBQ=="}]},"maintainers":[{"name":"tantalor","email":"john.tantalo@gmail.com"}]},"0.1.0":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.1.0","homepage":"http://github.johntantalo.com/graphjs/","repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"devDependencies":{"nodeunit":"latest"},"scripts":{"test":"./node_modules/.bin/nodeunit test"},"engines":{"node":"*","jsc":"*","narwhal":"*","ringo":"*"},"_npmJsonOpts":{"file":"/Users/john/.npm/graph/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"graph@0.1.0","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.17","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"f459a3baa1b864660d2445d606c8e19ae83bb335","tarball":"https://registry.npmjs.org/graph/-/graph-0.1.0.tgz","integrity":"sha512-DI0qFvhvj2mtL2YI8f+aUraR9mgd94dA+V3FWSnDsZDugHE2g02kAIICjB5oVJBvcmVFLWdKGdsbH+vUzVx78A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo+cjk81I0xhIs0ULMF37iWY12gORi0wSDQ9x0MrcFzwIhAMTkjRTE/D1YENTXXUoeFPNVUUPZLh2mogLeXx6OIheB"}]},"maintainers":[{"name":"tantalor","email":"john.tantalo@gmail.com"}]},"0.2.0":{"name":"graph","description":"library for manipulating directed and undirected graphs","version":"0.2.0","homepage":"http://github.johntantalo.com/graphjs/","repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"main":"./lib/graph","directories":{"lib":"./lib"},"devDependencies":{"nodeunit":"latest"},"scripts":{"test":"./node_modules/.bin/nodeunit test"},"engines":{"node":"*","jsc":"*","narwhal":"*","ringo":"*"},"readme":"# GraphJS\n\n[![Build Status](https://secure.travis-ci.org/tantalor/graphjs.png)](http://travis-ci.org/tantalor/graphjs)\n\n**GraphJS** is a simple Javascript library for manipulating directed and undirected [graphs](http://en.wikipedia.org/wiki/Graph_\\(mathematics\\)).\n\nYour graphs may have self edges, weighted edges, and directed edges, but not multiedges.\n\n## Usage\n\n### Creating, reading, updating, and deleting edges (CRUD)\n\n    var g = new Graph();\n    \n    g.set('a', 'b', 3); # creates edge (a, b) with weight 3\n    g.get('a', 'b'); # returns 3\n    \n    g.set('a', 'b', 4); # changes (a, b) weight to 4\n    g.get('a', 'b'); # returns 4\n    \n    g.del('a', 'b'); # removes edge (a, b)\n    g.get('a', 'b'); # returns undefined\n\n### Constructing graphs from data\n\n    new Graph({\n      a: ['b', 'c'],\n      c: ['d'],\n    }); # triangle with vertices a, b, and c\n    \n    new Graph({\n      a: {b: 2},\n      b: {c: 3},\n    }); # path with vertices a, b, c and weights (a, b) = 2, (b, c) = 3\n\n#### With directed edges\n\n    new Graph({a: ['-b', '-c']}); # Directed edges to b and c.\n\n### Degree, size, order, and adjacency\n\n    var g = new Graph({\n      a: ['b'],\n      b: ['c'],\n    }); # path with vertices a, b, c\n    \n    g.degree('a'); # returns 1\n    g.degree('b'); # returns 2\n    g.degree('c'); # returns 1\n    \n    g.size(); # returns 2, the number of edges\n    \n    g.order(); # returns 3, the number of vertices\n    \n    for (v in g.adj('b')) {\n      # v = a, c (in no particular order)\n    }\n\n### Creating directed edges\n\n    var g = new Graph();\n    g.dir('a', 'b'); # a ~ b, but b !~ a\n    g.has('a', 'b'); # true\n    g.has('b', 'a'); # false\n    \n#### Alternative syntax\n\n    g.set('a', '-b'); # Same as g.dir('a', 'b');\n\n### Deleting directed edges\n\n    var g = new Graph();\n    g.set('a', 'b'); # a ~ b, and b ~ a\n    g.deldir('b', 'a'); # remove b ~ a\n    g.has('a', 'b'); # true\n    g.has('b', 'a'); # false\n\n### Copying\n\n    var g = new Graph({\n      a: ['b', 'c'],\n      c: ['d'],\n    });\n    \n    var h = g.copy(); # an independent copy of g\n\n## Directed edges and graph size\n\nYou may mix directed and undirected edges in the same graph.\n\nA pair of directed edges (a, b) and (b, a) is always collapsed into an undirected edge. An undirected edge (a, b) may be expanded into a directed edge (a, b) by deleting the directed edge (b, a) with `deldir(b, a)`.\n\nFor consistency, the size of a graph is defined to be the number of undirected edges plus the number of directed edges. In other words, two distinct directed edges between two distinct vertices do not count twice for the size.\n\nA directed self edge is indistinguishable from an undirected self edge.\n\n## Tests\n\nGraphJS is packaged with `nodeunit` tests.\n\nThe easiest way to run the tests is with `npm test`.\n\n    $ npm test\n    ...\n    OK: 173 assertions (23ms)\n\nYou can also test your browser by loading the `test.html` page.\n","_id":"graph@0.2.0","dist":{"shasum":"ab609d8330d6a28a4f2022f5855e3a8fb666b00d","tarball":"https://registry.npmjs.org/graph/-/graph-0.2.0.tgz","integrity":"sha512-JABlOLcRKDylHil7DonITryjN8EyMwjzfOVwuUq0UaOK+fnR+cYJ2j5dS4YP+d1QPXQ9LNdL1yYJA8I1B77E1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6rKf9UHD2spLQJv5Ie10HZizH7qxJ99S4SpfDlPLu0gIhANTodw4ge3w8v3VKinBxHWNHKj730gt+qOP7ipWMRZqt"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"tantalor","email":"john.tantalo@gmail.com"},"maintainers":[{"name":"tantalor","email":"john.tantalo@gmail.com"}]}},"maintainers":[{"name":"tantalor","email":"john.tantalo@gmail.com"}],"time":{"modified":"2022-06-18T13:50:23.333Z","created":"2011-02-07T06:28:32.918Z","0.0.0":"2011-02-07T06:28:33.246Z","0.0.1":"2011-02-07T06:31:44.507Z","0.0.2":"2011-02-07T06:33:32.369Z","0.0.3":"2012-03-04T06:10:50.652Z","0.1.0":"2012-03-09T14:19:21.632Z","0.2.0":"2013-12-24T03:08:05.418Z"},"author":{"name":"John Tantalo","email":"john.tantalo@gmail.com","url":"http://johntantalo.com"},"repository":{"type":"git","url":"git://github.com/tantalor/graphjs.git"},"users":{"zhoutk":true,"ecelis":true,"martinspinks":true,"jamesgt":true}}