priority_queue
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ "name": "priority_queue" | ||
, "version": "0.1.2" | ||
, "version": "0.1.3" | ||
, "description": "simple priority queue using a binary heap" | ||
@@ -4,0 +4,0 @@ , "main": "./priority_queue.js" |
@@ -1,4 +0,5 @@ | ||
var agnat_priority_queue = (function() { // namespace | ||
(function() { // namespace | ||
var exports = (typeof module !== 'undefined' && module.exports) ? module.exports : {}; | ||
var exports = (typeof module !== 'undefined' && module.exports) ? | ||
module.exports : window.priority_queue = {}; | ||
@@ -39,3 +40,3 @@ exports.PriorityQueue = function PriorityQueue(compare, queue) { | ||
j = i; p = parent(i); | ||
for(; j >= 0 && compare(queue[j], queue[p]) < 0; j = p, p = parent(j)) { | ||
for (; j > 0 && compare(queue[j], queue[p]) < 0; j = p, p = parent(j)) { | ||
swap(j, p); | ||
@@ -61,2 +62,2 @@ } | ||
return exports; })(); // end of namespace | ||
})(); // end of namespace |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192
9815