{"_id":"@aureooms/js-permutation","_rev":"4-6efe44f0674059ccda908677829c57d0","name":"@aureooms/js-permutation","description":"Permutation library for JavaScript","dist-tags":{"latest":"2.0.0"},"versions":{"1.2.1":{"license":"AGPL-3.0","repository":{"type":"git","url":"git+https://github.com/aureooms/js-permutation.git"},"homepage":"http://aureooms.github.io/js-permutation/","keywords":["bricks","ender","javascript","js","list","permutation"],"dependencies":{},"devDependencies":{"@aureooms/js-compare":"^1.4.4","@aureooms/js-random":"^1.0.2","aureooms-node-package":"^4.2.5"},"author":{"name":"aureooms"},"bugs":{"url":"https://github.com/aureooms/js-permutation/issues"},"main":"js/dist/permutation.js","scripts":{"doc":"groc","test":"aureooms-node-package-test","build":"aureooms-node-package-build"},"version":"1.2.1","description":"Permutations code bricks for JavaScript","name":"@aureooms/js-permutation","spm":{"main":"js/dist/permutation.js"},"gitHead":"6037ad78ec297eaf3e2a43b10218bbc9e1e238e0","_id":"@aureooms/js-permutation@1.2.1","_shasum":"8c307e6a7f53c7b34002da2b5d71ca0e72fb0f77","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.5.0","_npmUser":{"name":"aureooms","email":"aurelien.ooms@gmail.com"},"dist":{"shasum":"8c307e6a7f53c7b34002da2b5d71ca0e72fb0f77","tarball":"https://registry.npmjs.org/@aureooms/js-permutation/-/js-permutation-1.2.1.tgz","integrity":"sha512-/GoZy8n2Jhkn6RwcDdD0MPPteUKHb1/32bZCVFG3IJ7Bv2njfZXReP2nVpptJbElN8H7xJNU0QPntSs/633nVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPEQwcDMxtfuuG3hhRtH6PimQMoV6HO34wlzxemmDZQAIhAMTSJNeUa6AGM6gXq9dki9JX/npyALqY4kEAfPWI0HdX"}]},"maintainers":[{"name":"aureooms","email":"aurelien.ooms@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/js-permutation-1.2.1.tgz_1487246663511_0.919491927837953"},"directories":{},"deprecated":"This package has moved to @combinatorics/permutation."},"2.0.0":{"name":"@aureooms/js-permutation","description":"Permutation library for JavaScript","version":"2.0.0","author":{"name":"Aurélien Ooms","email":"aurelien.ooms@gmail.com"},"ava":{"require":["babel-polyfill","babel-register"]},"babel":{"presets":["env"],"env":{"development":{"sourceMaps":"inline"}}},"bugs":{"url":"https://github.com/aureooms/js-permutation/issues"},"dependencies":{},"devDependencies":{"@aureooms/js-compare":"^1.4.5","@aureooms/js-random":"^2.0.0","ava":"^0.19.1","babel-cli":"^6.24.1","babel-polyfill":"^6.23.0","babel-preset-env":"^1.4.0","codeclimate-test-reporter":"^0.4.1","coveralls":"^2.13.1","esdoc":"^0.5.2","nyc":"^10.3.0"},"homepage":"https://aureooms.github.io/js-permutation","keywords":["algorithm","javascript","js","list","permutation"],"license":"AGPL-3.0","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/aureooms/js-permutation.git"},"scripts":{"build":"babel src -d lib","cover":"nyc --reporter=lcov npm test","prepublish":"npm run build","test":"ava ./test/src"},"gitHead":"45c9f144d3696e5a01872775ed2c29c5d8e1dc8c","_id":"@aureooms/js-permutation@2.0.0","_shasum":"48f4a1bfdc73d8759e79ba376bf2ca1d8b1ea132","_from":".","_npmVersion":"4.5.0","_nodeVersion":"7.9.0","_npmUser":{"name":"aureooms","email":"aurelien.ooms@gmail.com"},"dist":{"shasum":"48f4a1bfdc73d8759e79ba376bf2ca1d8b1ea132","tarball":"https://registry.npmjs.org/@aureooms/js-permutation/-/js-permutation-2.0.0.tgz","integrity":"sha512-GIIqCJi19+/IH+f7hfiJpPCT/VxbA+Y7l4zjQAhheRqASmR04JYOtaKqYdzn0VyhCeGOLBlP4O++MmAP356swA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlPQCxi5NnZqlxnLRCe7728rTnKLTtXmLyvv/FozkltQIgHCK1hEYwoK3nMY8WQamabomlcfeaKqKFbUdsvWNKosI="}]},"maintainers":[{"name":"aureooms","email":"aurelien.ooms@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/js-permutation-2.0.0.tgz_1493830970420_0.5258696803357452"},"directories":{},"deprecated":"This package has moved to @combinatorics/permutation."}},"readme":"[js-permutation](http://aureooms.github.io/js-permutation)\n==\n\nPermutations code bricks for JavaScript.\n\n```js\nnext( reversed( identity( 3 ) ) ) ; // [ 0 , 1 , 2 ]\n```\n\n[![License](https://img.shields.io/github/license/aureooms/js-permutation.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-permutation/master/LICENSE)\n[![NPM version](https://img.shields.io/npm/v/@aureooms/js-permutation.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-permutation)\n[![Bower version](https://img.shields.io/bower/v/@aureooms/js-permutation.svg?style=flat)](http://bower.io/search/?q=@aureooms/js-permutation)\n[![Build Status](https://img.shields.io/travis/aureooms/js-permutation.svg?style=flat)](https://travis-ci.org/aureooms/js-permutation)\n[![Coverage Status](https://img.shields.io/coveralls/aureooms/js-permutation.svg?style=flat)](https://coveralls.io/r/aureooms/js-permutation)\n[![Dependencies Status](https://img.shields.io/david/aureooms/js-permutation.svg?style=flat)](https://david-dm.org/aureooms/js-permutation#info=dependencies)\n[![devDependencies Status](https://img.shields.io/david/dev/aureooms/js-permutation.svg?style=flat)](https://david-dm.org/aureooms/js-permutation#info=devDependencies)\n[![Code Climate](https://img.shields.io/codeclimate/github/aureooms/js-permutation.svg?style=flat)](https://codeclimate.com/github/aureooms/js-permutation)\n[![NPM downloads per month](https://img.shields.io/npm/dm/@aureooms/js-permutation.svg?style=flat)](https://www.npmjs.org/package/@aureooms/js-permutation)\n[![GitHub issues](https://img.shields.io/github/issues/aureooms/js-permutation.svg?style=flat)](https://github.com/aureooms/js-permutation/issues)\n[![Inline docs](http://inch-ci.org/github/aureooms/js-permutation.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-permutation)\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## Caveat\n\nRequires `regeneratorRuntime` to be defined, see\n[babel docs](http://babeljs.io/docs/usage/polyfill/).\n\n## Install\n\n### jspm\n```terminal\njspm install github:aureooms/js-permutation\n# or\njspm install npm:@aureooms/js-permutation\n```\n### duo\nNo install step needed for duo!\n\n### component\n```terminal\ncomponent install aureooms/js-permutation\n```\n\n### bower\n```terminal\nbower install @aureooms/js-permutation\n```\n\n### ender\n```terminal\nender add @aureooms/js-permutation\n```\n\n### jam\n```terminal\njam install @aureooms/js-permutation\n```\n\n### spm\n```terminal\nspm install @aureooms/js-permutation --save\n```\n\n### npm\n```terminal\nnpm install @aureooms/js-permutation --save\n```\n\n## Require\n### jspm\n```js\nlet permutation = require( \"github:aureooms/js-permutation\" ) ;\n// or\nimport permutation from '@aureooms/js-permutation' ;\n```\n### duo\n```js\nlet permutation = require( \"aureooms/js-permutation\" ) ;\n```\n\n### component, ender, spm, npm\n```js\nlet permutation = require( \"@aureooms/js-permutation\" ) ;\n```\n\n### bower\nThe script tag exposes the global variable `permutation`.\n```html\n<script src=\"bower_components/@aureooms/js-permutation/js/dist/permutation.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-permutation\" ] , function ( permutation ) { ... } ) ;\n```\n\n## Use\n\n```js\nlet sigma = permutation.identity( 3 ) ;\n\nsigma ; // [ 0 , 1 , 2 ]\n\npermutation.reversed( sigma ) ; // [ 2 , 1 , 0 ]\n\npermutation.next( sigma ) ; // [ 0 , 2 , 1 ]\n\nfor ( let tau of permutation.permutations( 3 ) ) {\n\n\t... // yields [ 0 , 1 , 2 ]\n\t    //        [ 0 , 2 , 1 ]\n\t    //        [ 1 , 0 , 2 ]\n\t    //        [ 1 , 2 , 0 ]\n\t    //        [ 2 , 0 , 1 ]\n\t    //        [ 2 , 1 , 0 ]\n\n}\n\npermutation.invert( [ 0 , 1 , 2 ] ) ; // [ 0 , 1 , 2 ]\npermutation.invert( [ 0 , 2 , 1 ] ) ; // [ 0 , 2 , 1 ]\npermutation.invert( [ 1 , 0 , 2 ] ) ; // [ 1 , 0 , 2 ]\npermutation.invert( [ 1 , 2 , 0 ] ) ; // [ 2 , 0 , 1 ]\npermutation.invert( [ 2 , 0 , 1 ] ) ; // [ 1 , 2 , 0 ]\npermutation.invert( [ 2 , 1 , 0 ] ) ; // [ 2 , 1 , 0 ]\n\npermutation.compose( \"abc\" , [ 2 , 0 , 1 ] ) ; // [ \"c\" , \"a\" , \"b\" ]\n\npermutation.bitreversal( 8 ) ; // [ 0 , 4 , 2 , 6 , 1 , 5 , 3 , 7 ]\n```\n","maintainers":[{"name":"aureooms","email":"aurelien.ooms@gmail.com"}],"time":{"modified":"2022-06-12T14:52:10.722Z","created":"2017-02-16T12:04:25.356Z","1.2.1":"2017-02-16T12:04:25.356Z","2.0.0":"2017-05-03T17:02:52.447Z"},"homepage":"https://aureooms.github.io/js-permutation","keywords":["algorithm","javascript","js","list","permutation"],"repository":{"type":"git","url":"git+https://github.com/aureooms/js-permutation.git"},"author":{"name":"Aurélien Ooms","email":"aurelien.ooms@gmail.com"},"bugs":{"url":"https://github.com/aureooms/js-permutation/issues"},"license":"AGPL-3.0","readmeFilename":"README.md"}