{"_id":"compare-cell","_rev":"3-4372ac780e92ed8e8a70158c1086375f","name":"compare-cell","description":"An ordering for sets of integers","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"compare-cell","version":"1.0.0","description":"An ordering for sets of integers","main":"compare.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"shuffle-array":"0.1.0","tape":"^4.0.0"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"https://github.com/mikolalysenko/compare-cells.git"},"keywords":["order","cell","comparison","sequence","sorting","unordered","simplicial","complex","graph","network","mesh","topology"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/compare-cells/issues"},"homepage":"https://github.com/mikolalysenko/compare-cells","gitHead":"9b219eed38cff9f9644a207b9caf5577b79617aa","_id":"compare-cell@1.0.0","_shasum":"a9eb708f6e0e41aef7aa566b130f1968dc9e1aaa","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"dist":{"shasum":"a9eb708f6e0e41aef7aa566b130f1968dc9e1aaa","tarball":"https://registry.npmjs.org/compare-cell/-/compare-cell-1.0.0.tgz","integrity":"sha512-uNIkjiNLZLhdCgouF39J+W04R7oP1vwrNME4vP2b2/bAa6PHOj+h8yXu52uPjPTKs5RatvqNsDVwEN7Yp19vNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDY9YKKSSxpcv8zivE1xNHFY6S7+fa4IcTyeRpk9ewMCwIgeoVmMR0nABOi6Dw36TZ4WVZzxEoY3ExBbpL84NzNEws="}]},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]}},"readme":"compare-cell\n============\nCompares two unordered integer sequences to test if they contain the same elements. This can be used to implement various algorithms for unoriented simplicial complexes.\n\nFor more information, see the following blog post:\n\n[Comparing sequences without sorting](http://0fps.net/2013/01/24/comparing-sequences-without-sorting/)\n\n# Example\n\n```javascript\nvar compareCells = require('compare-cell')\nvar bsearch = require('binary-search-bounds')\n\n//Create a list of triangles defined by indexed faces\nvar triangles = [\n  [1, 0, 2],\n  [2, 1, 3],\n  [3, 4, 5],\n  [5, 6, 7]\n]\n\n//Sort triangles\ntriangles.sort(compareCells)\n\n//Now we can test if various cells are contained in the list in O(log n)\nconsole.log(bsearch.eq(triangles, [2, 1, 0], compareCells) >= 0)\nconsole.log(bsearch.eq(triangles, [3, 5, 7], compareCells) >= 0)\n```\n\n# API\n\n#### `var d = require('compare-cells')(a, b)`\nTests if two unordered lists contain the same elements.\n\n* `a, b` are arrays of integers\n\n**Returns** An order function which tests if `a` comes before or after `b`.  The value is `0` if they are equal.\n\n# License\n(c) 2015 Mikola Lysenko. MIT License\n","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-06-13T19:40:01.674Z","created":"2015-06-19T19:15:25.207Z","1.0.0":"2015-06-19T19:15:25.207Z"},"homepage":"https://github.com/mikolalysenko/compare-cells","keywords":["order","cell","comparison","sequence","sorting","unordered","simplicial","complex","graph","network","mesh","topology"],"repository":{"type":"git","url":"https://github.com/mikolalysenko/compare-cells.git"},"author":{"name":"Mikola Lysenko"},"bugs":{"url":"https://github.com/mikolalysenko/compare-cells/issues"},"license":"MIT","readmeFilename":"README.md"}