Last change
on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
936 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | import { BitBucketSize } from "./Histogram";
|
---|
| 2 | import PackedHistogram from "./PackedHistogram";
|
---|
| 3 | import Int8Histogram from "./Int8Histogram";
|
---|
| 4 | import Int16Histogram from "./Int16Histogram";
|
---|
| 5 | import Int32Histogram from "./Int32Histogram";
|
---|
| 6 | import Float64Histogram from "./Float64Histogram";
|
---|
| 7 | import JsHistogram from "./JsHistogram";
|
---|
| 8 |
|
---|
| 9 | export interface JsHistogramConstructor {
|
---|
| 10 | new (
|
---|
| 11 | lowestDiscernibleValue: number,
|
---|
| 12 | highestTrackableValue: number,
|
---|
| 13 | numberOfSignificantValueDigits: number
|
---|
| 14 | ): JsHistogram;
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | export function constructorFromBucketSize(
|
---|
| 18 | bitBucketSize: BitBucketSize
|
---|
| 19 | ): JsHistogramConstructor {
|
---|
| 20 | switch (bitBucketSize) {
|
---|
| 21 | case "packed":
|
---|
| 22 | return PackedHistogram;
|
---|
| 23 | case 8:
|
---|
| 24 | return Int8Histogram;
|
---|
| 25 | case 16:
|
---|
| 26 | return Int16Histogram;
|
---|
| 27 | case 32:
|
---|
| 28 | return Int32Histogram;
|
---|
| 29 | case 64:
|
---|
| 30 | return Float64Histogram;
|
---|
| 31 | default:
|
---|
| 32 | throw new Error("Incorrect parameter bitBucketSize");
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.