Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | exports.build = exports.defaultRequest = void 0;
|
---|
| 4 | const JsHistogramFactory_1 = require("./JsHistogramFactory");
|
---|
| 5 | const wasm_1 = require("./wasm");
|
---|
| 6 | exports.defaultRequest = {
|
---|
| 7 | bitBucketSize: 32,
|
---|
| 8 | autoResize: true,
|
---|
| 9 | lowestDiscernibleValue: 1,
|
---|
| 10 | highestTrackableValue: 2,
|
---|
| 11 | numberOfSignificantValueDigits: 3,
|
---|
| 12 | useWebAssembly: false,
|
---|
| 13 | };
|
---|
| 14 | exports.build = (request = exports.defaultRequest) => {
|
---|
| 15 | const parameters = Object.assign({}, exports.defaultRequest, request);
|
---|
| 16 | if (request.useWebAssembly && wasm_1.webAssemblyAvailable) {
|
---|
| 17 | return wasm_1.WasmHistogram.build(parameters);
|
---|
| 18 | }
|
---|
| 19 | const histogramConstr = JsHistogramFactory_1.constructorFromBucketSize(parameters.bitBucketSize);
|
---|
| 20 | const histogram = new histogramConstr(parameters.lowestDiscernibleValue, parameters.highestTrackableValue, parameters.numberOfSignificantValueDigits);
|
---|
| 21 | histogram.autoResize = parameters.autoResize;
|
---|
| 22 | return histogram;
|
---|
| 23 | };
|
---|
| 24 | //# sourceMappingURL=HistogramBuilder.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.