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.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							679 B
						
					
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							679 B
						
					
					
				| /**
 | |
|  * Mnemonist StaticIntervalTree Typings
 | |
|  * =====================================
 | |
|  */
 | |
| type StaticIntervalTreeGetter<T> = (item: T) => number;
 | |
| type StaticIntervalTreeGettersTuple<T> = [StaticIntervalTreeGetter<T>, StaticIntervalTreeGetter<T>];
 | |
| 
 | |
| export default class StaticIntervalTree<T> {
 | |
| 
 | |
|   // Members
 | |
|   height: number;
 | |
|   size: number;
 | |
| 
 | |
|   // Constructor
 | |
|   constructor(intervals: Array<T>, getters?: StaticIntervalTreeGettersTuple<T>);
 | |
| 
 | |
|   // Methods
 | |
|   intervalsContainingPoint(point: number): Array<T>;
 | |
|   intervalsOverlappingInterval(interval: T): Array<T>;
 | |
|   inspect(): any;
 | |
| 
 | |
|   // Statics
 | |
|   static from<I>(iterable: Iterable<I> | {[key: string]: I}): StaticIntervalTree<I>;
 | |
| } |