You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							26 lines
						
					
					
						
							627 B
						
					
					
				
			
		
		
	
	
							26 lines
						
					
					
						
							627 B
						
					
					
				| /**
 | |
|  * Mnemonist FixedReverseHeap Typings
 | |
|  * ===================================
 | |
|  */
 | |
| import {IArrayLikeConstructor, TypedArray} from './utils/types';
 | |
| 
 | |
| type HeapComparator<T> = (a: T, b: T) => number;
 | |
| 
 | |
| export default class FixedReverseHeap<T> {
 | |
| 
 | |
|   // Members
 | |
|   capacity: number;
 | |
|   size: number;
 | |
| 
 | |
|   // Constructor
 | |
|   constructor(ArrayClass: IArrayLikeConstructor, comparator: HeapComparator<T>, capacity: number);
 | |
|   constructor(ArrayClass: IArrayLikeConstructor, capacity: number);
 | |
| 
 | |
|   // Methods
 | |
|   clear(): void;
 | |
|   push(item: T): number;
 | |
|   consume(): Array<T> | TypedArray;
 | |
|   toArray(): Array<T> | TypedArray;
 | |
|   inspect(): any;
 | |
| }
 |