1- ! function ( e ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = e ( ) ; else if ( "function" == typeof define && define . amd ) define ( [ ] , e ) ; else { var f ; "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof self && ( f = self ) , f . PriorityQueue = e ( ) } } ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( require , module , exports ) {
1+ ( function ( f ) { if ( typeof exports === "object" && typeof module !== "undefined" ) { module . exports = f ( ) } else if ( typeof define === "function" && define . amd ) { define ( [ ] , f ) } else { var g ; if ( typeof window !== "undefined" ) { g = window } else if ( typeof global !== "undefined" ) { g = global } else if ( typeof self !== "undefined" ) { g = self } else { g = this } g . PriorityQueue = f ( ) } } ) ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( require , module , exports ) {
22var AbstractPriorityQueue , ArrayStrategy , BHeapStrategy , BinaryHeapStrategy , PriorityQueue ,
33__hasProp = { } . hasOwnProperty ,
44__extends = function ( child , parent ) { for ( var key in parent ) { if ( __hasProp . call ( parent , key ) ) child [ key ] = parent [ key ] ; } function ctor ( ) { this . constructor = child ; } ctor . prototype = parent . prototype ; child . prototype = new ctor ( ) ; child . __super__ = parent . prototype ; return child ; } ;
@@ -36,7 +36,6 @@ PriorityQueue.BHeapStrategy = BHeapStrategy;
3636module . exports = PriorityQueue ;
3737
3838
39-
4039} , { "./PriorityQueue/AbstractPriorityQueue" :2 , "./PriorityQueue/ArrayStrategy" :3 , "./PriorityQueue/BHeapStrategy" :4 , "./PriorityQueue/BinaryHeapStrategy" :5 } ] , 2 :[ function ( require , module , exports ) {
4140var AbstractPriorityQueue ;
4241
@@ -73,12 +72,16 @@ module.exports = AbstractPriorityQueue = (function() {
7372return this . priv . peek ( ) ;
7473} ;
7574
75+ AbstractPriorityQueue . prototype . clear = function ( ) {
76+ this . length = 0 ;
77+ return this . priv . clear ( ) ;
78+ } ;
79+
7680return AbstractPriorityQueue ;
7781
7882} ) ( ) ;
7983
8084
81-
8285} , { } ] , 3 :[ function ( require , module , exports ) {
8386var ArrayStrategy , binarySearchForIndexReversed ;
8487
@@ -121,12 +124,16 @@ module.exports = ArrayStrategy = (function() {
121124return this . data [ this . data . length - 1 ] ;
122125} ;
123126
127+ ArrayStrategy . prototype . clear = function ( ) {
128+ this . data . length = 0 ;
129+ return void 0 ;
130+ } ;
131+
124132return ArrayStrategy ;
125133
126134} ) ( ) ;
127135
128136
129-
130137} , { } ] , 4 :[ function ( require , module , exports ) {
131138var BHeapStrategy ;
132139
@@ -184,6 +191,12 @@ module.exports = BHeapStrategy = (function() {
184191return this . _read ( 1 ) ;
185192} ;
186193
194+ BHeapStrategy . prototype . clear = function ( ) {
195+ this . length = 0 ;
196+ this . _memory . length = 0 ;
197+ return void 0 ;
198+ } ;
199+
187200BHeapStrategy . prototype . _write = function ( index , value ) {
188201var page ;
189202page = index >> this . _shift ;
@@ -272,7 +285,6 @@ module.exports = BHeapStrategy = (function() {
272285} ) ( ) ;
273286
274287
275-
276288} , { } ] , 5 :[ function ( require , module , exports ) {
277289var BinaryHeapStrategy ;
278290
@@ -318,6 +330,12 @@ module.exports = BinaryHeapStrategy = (function() {
318330return this . data [ 0 ] ;
319331} ;
320332
333+ BinaryHeapStrategy . prototype . clear = function ( ) {
334+ this . length = 0 ;
335+ this . data . length = 0 ;
336+ return void 0 ;
337+ } ;
338+
321339BinaryHeapStrategy . prototype . _bubbleUp = function ( pos ) {
322340var parent , x ;
323341while ( pos > 0 ) {
@@ -364,6 +382,5 @@ module.exports = BinaryHeapStrategy = (function() {
364382} ) ( ) ;
365383
366384
367-
368385} , { } ] } , { } , [ 1 ] ) ( 1 )
369386} ) ;