1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import * as defaultLogger from '../common/console-logger';
|
17 | import { Bucket } from './types';
|
18 | export declare class BucketBoundaries {
|
19 | readonly buckets: Bucket[];
|
20 | readonly bucketCounts: number[];
|
21 |
|
22 | private logger;
|
23 | constructor(boundaries: number[], logger?: typeof defaultLogger);
|
24 | /**
|
25 | * Gets bucket boundaries
|
26 | */
|
27 | getBoundaries(): Bucket[];
|
28 | /**
|
29 | * Gets initial bucket counts
|
30 | */
|
31 | getCounts(): number[];
|
32 | /**
|
33 | * Drops negative (BucketBounds) are currently not supported by
|
34 | * any of the backends that OC supports
|
35 | * @param bucketBoundaries a list with the bucket boundaries
|
36 | */
|
37 | private dropNegativeBucketBounds;
|
38 | /**
|
39 | * Gets initial list of bucket counters
|
40 | * @param buckets Bucket boundaries
|
41 | */
|
42 | private getBucketCounts;
|
43 | /**
|
44 | * Checks boundaries order and duplicates
|
45 | * @param current Boundary
|
46 | * @param next Next boundary
|
47 | */
|
48 | private validateBoundary;
|
49 | }
|