{"_id":"@aureooms/js-graph-spec","_rev":"2-09cd2ce35190b882b1ccd233bb388d3a","name":"@aureooms/js-graph-spec","description":"Graph specification code bricks for JavaScript","dist-tags":{"latest":"5.0.2"},"versions":{"5.0.2":{"main":"js/dist/graph-spec.js","author":{"name":"aureooms"},"keywords":["bricks","directed","ender","graph","javascript","js","spec","specification","undirected"],"scripts":{"build":"aureooms-node-package-build","doc":"groc","test":"aureooms-node-package-test"},"name":"@aureooms/js-graph-spec","homepage":"http://aureooms.github.io/js-graph-spec/","version":"5.0.2","description":"Graph specification code bricks for JavaScript","dependencies":{"@aureooms/js-cardinality":"^2.0.0","@aureooms/js-collections":"^3.0.0","@aureooms/js-itertools":"^3.0.0","@aureooms/js-type":"^1.0.4"},"license":"AGPL-3.0","spm":{"main":"js/dist/graph-spec.js"},"devDependencies":{"@aureooms/js-adjacency-list":"^4.0.7","@aureooms/js-adjacency-matrix":"^3.1.6","@aureooms/js-dll":"^6.0.10","aureooms-node-package":"^6.0.1"},"bugs":{"url":"https://github.com/aureooms/js-graph-spec/issues"},"repository":{"url":"git+https://github.com/aureooms/js-graph-spec.git","type":"git"},"gitHead":"ea1e374490a2888155f2753e6e1b874af1b01db8","_id":"@aureooms/js-graph-spec@5.0.2","_shasum":"d77cdfc991d41fd0a34ed3a53ddf58fd5ed8e49e","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.5.0","_npmUser":{"name":"aureooms","email":"aurelien.ooms@gmail.com"},"dist":{"shasum":"d77cdfc991d41fd0a34ed3a53ddf58fd5ed8e49e","tarball":"https://registry.npmjs.org/@aureooms/js-graph-spec/-/js-graph-spec-5.0.2.tgz","integrity":"sha512-MvT1EnAcilLHA0YZqWiAdRphmYJ3qi4p+sZi+w5tYxRXZLt0DPk8l2WESS8PDoCtjMDR1dY6t1RrBLSQTIjltQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD21M0j8xOMCqh2X7Maj/YvR4tm5N4u6Gp5iokr0OnUQwIgWKuzlUrmDuK25poVmG/Ns49k0GD9miiE5DZ2CNN+E7Q="}]},"maintainers":[{"name":"aureooms","email":"aurelien.ooms@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/js-graph-spec-5.0.2.tgz_1487246704075_0.27651452692225575"}}},"readme":"[js-graph-spec](http://aureooms.github.io/js-graph-spec)\n==\n\nGraph specification code bricks for JavaScript. Parent is\n[js-gn](https://github.com/aureooms/js-gn).\n\n```js\ngraphspec.Graph( \"My graph implementation\" , MyGraphConstructor ) ;\n```\n\n[![NPM license](http://img.shields.io/npm/l/@aureooms/js-graph-spec.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-graph-spec/master/LICENSE)\n[![NPM version](http://img.shields.io/npm/v/@aureooms/js-graph-spec.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-graph-spec)\n[![Bower version](http://img.shields.io/bower/v/@aureooms/js-graph-spec.svg?style=flat)](http://bower.io/search/?q=@aureooms/js-graph-spec)\n[![Build Status](http://img.shields.io/travis/aureooms/js-graph-spec.svg?style=flat)](https://travis-ci.org/aureooms/js-graph-spec)\n[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-graph-spec.svg?style=flat)](https://coveralls.io/r/aureooms/js-graph-spec)\n[![Dependencies Status](http://img.shields.io/david/aureooms/js-graph-spec.svg?style=flat)](https://david-dm.org/aureooms/js-graph-spec#info=dependencies)\n[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-graph-spec.svg?style=flat)](https://david-dm.org/aureooms/js-graph-spec#info=devDependencies)\n[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-graph-spec.svg?style=flat)](https://codeclimate.com/github/aureooms/js-graph-spec)\n[![NPM downloads per month](http://img.shields.io/npm/dm/@aureooms/js-graph-spec.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-graph-spec)\n[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-graph-spec.svg?style=flat)](https://github.com/aureooms/js-graph-spec/issues)\n[![Inline docs](http://inch-ci.org/github/aureooms/js-graph-spec.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-graph-spec)\n\nCan be managed through [jspm](https://github.com/jspm/jspm-cli),\n[duo](https://github.com/duojs/duo),\n[component](https://github.com/componentjs/component),\n[bower](https://github.com/bower/bower),\n[ender](https://github.com/ender-js/Ender),\n[jam](https://github.com/caolan/jam),\n[spm](https://github.com/spmjs/spm),\nand [npm](https://github.com/npm/npm).\n\n## Install\n\n### jspm\n```terminal\njspm install github:aureooms/js-graph-spec\n# or\njspm install npm:@aureooms/js-graph-spec\n```\n### duo\nNo install step needed for duo!\n\n### component\n```terminal\ncomponent install aureooms/js-graph-spec\n```\n\n### bower\n```terminal\nbower install @aureooms/js-graph-spec\n```\n\n### ender\n```terminal\nender add @aureooms/js-graph-spec\n```\n\n### jam\n```terminal\njam install @aureooms/js-graph-spec\n```\n\n### spm\n```terminal\nspm install @aureooms/js-graph-spec --save\n```\n\n### npm\n```terminal\nnpm install @aureooms/js-graph-spec --save\n```\n\n## Require\n### jspm\n```js\nlet graphspec = require( \"github:aureooms/js-graph-spec\" ) ;\n// or\nimport graphspec from '@aureooms/js-graph-spec' ;\n```\n### duo\n```js\nlet graphspec = require( \"aureooms/js-graph-spec\" ) ;\n```\n\n### component, ender, spm, npm\n```js\nlet graphspec = require( \"@aureooms/js-graph-spec\" ) ;\n```\n\n### bower\nThe script tag exposes the global variable `graphspec`.\n```html\n<script src=\"bower_components/@aureooms/js-graph-spec/js/dist/graph-spec.min.js\"></script>\n```\nAlternatively, you can use any tool mentioned [here](http://bower.io/docs/tools/).\n\n### jam\n```js\nrequire( [ \"@aureooms/js-graph-spec\" ] , function ( graphspec ) { ... } ) ;\n```\n\n## Signatures\n\n### Graphs, DiGraphs, MultiGraphs, and MultiDiGraphs\n\n#### `Graph`, `DiGraph`, `MultiGraph`, or `MultiDiGraph`\n\nCreate a new graph.\n\n```js\nlet G = new Graph( ) ;\n// ...\nlet G = new DiGraph( ) ;\n// ...\nlet G = new MultiGraph( ) ;\n// ...\nlet G = new MultiDiGraph( ) ;\n// ...\n```\n\n#### `vadd`\n\nAdd a vertex to graph `G`.\n\n```js\nlet u = G.vadd( ) ;\n```\n\n#### `vdel`\n\nDelete vertex `u` from graph `G`.\n\n```js\nG.vdel( u ) ;\n```\n\n#### `eadd`\n\nAdd edge `(u,v)` to graph `G`.\n\n```js\nlet e = G.eadd( u , v ) ;\n```\n\n#### `edel`\n\nDelete edge `e` from graph `G`.\n\n```js\nG.edel( e ) ;\n```\n\n#### `vitr`\n\nGet an iterator over vertex references in graph `G`.\n\n```js\nfor ( let u of G.vitr( ) ) ... ;\n```\n\n#### `eitr`\n\nGet an iterator over edge references in graph `G`.\n\n```js\nfor ( let e of g.eitr( ) ) ... ;\n```\n\n#### `iitr`\n\nGet an iterator over edge references of edges incident to `u` in graph `G`.\n\n```js\nfor ( let e of G.iitr( u ) ) ... ;\n```\n\n\n#### `nitr`\n\nGet an iterator over vertex references of neighbors of `u` in graph `G`.\n\n```js\nfor ( let v of G.nitr( u ) ) ... ;\n```\n\n#### `vertices`\n\nGet an iterator over vertices in graph `G`.\n\n```js\nfor ( let u of G.vertices( ) ) ... ;\n```\n\n#### `edges`\n\nGet an iterator over edges in graph `G`.\n\n```js\nfor ( let [ u , v , e ] of G.edges( ) ) ... ;\n```\n\n#### `incident`\n\nGet an iterator over edges incident to `w` in graph `G`.\n\n```js\nfor ( let [ u , v , e ] of G.incident( w ) ) ... ;\n```\n\n#### `endpoints`\n\nGet endpoints `u` and `v` of an edge reference `e` in graph `G`.\n\n```js\nlet [ u , v ] = G.endpoints( e ) ;\n```\n\n### DiGraphs and MultiDiGraphs\n\nThese methods must also be implemented (with the same invariants)\nin Graphs and MultiGraphs for convenience.\n\n#### `initr`\n\nGet an iterator over edge references of ingoing edges of `u` in graph `G`.\n\n```js\nfor ( let e of G.initr( u ) ) ... ;\n```\n\n#### `outitr`\n\nGet an iterator over edge references of outgoing edges of `u` in graph `G`.\n\n```js\nfor ( let e of G.outitr( u ) ) ... ;\n```\n\n#### `dpitr`\n\nGet an iterator over direct predecessors of `u` in graph `G`.\n\n```js\nfor ( let v of G.dpitr( u ) ) ... ;\n```\n\n#### `dsitr`\n\nGet an iterator over direct successors of `u` in graph `G`.\n\n```js\nfor ( let v of G.dsitr( u ) ) ... ;\n```\n\n#### `ingoing`\n\nGet an iterator over ingoing edges of `w` in graph `G`.\nThe invariant `v === w` must hold.\n\n```js\nfor ( let [ u , v , e ] of G.ingoing( w ) ) ... ;\n```\n\n#### `outgoing`\n\nGet an iterator over outgoing edges of `w` in graph `G`.\nThe invariant `u === w` must hold.\n\n```js\nfor ( let [ u , v , e ] of G.outgoing( w ) ) ... ;\n```\n\n#### `reverse`\n\nReverse the directions of edges in  `G`.\n\n```js\nG.reverse( ) ;\n```\n","maintainers":[{"name":"aureooms","email":"aurelien.ooms@gmail.com"}],"time":{"modified":"2022-06-12T14:52:02.220Z","created":"2017-02-16T12:05:04.752Z","5.0.2":"2017-02-16T12:05:04.752Z"},"homepage":"http://aureooms.github.io/js-graph-spec/","keywords":["bricks","directed","ender","graph","javascript","js","spec","specification","undirected"],"repository":{"url":"git+https://github.com/aureooms/js-graph-spec.git","type":"git"},"author":{"name":"aureooms"},"bugs":{"url":"https://github.com/aureooms/js-graph-spec/issues"},"license":"AGPL-3.0","readmeFilename":"README.md"}