All Downloads are FREE. Search and download functionalities are using the official Maven repository.

report.js.hdrhistogram.min.js Maven / Gradle / Ivy

There is a newer version: 1.6.10
Show newest version
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("pako")):"function"==typeof define&&define.amd?define("hdr",["pako"],e):"object"==typeof exports?exports.hdr=e(require("pako")):t.hdr=e(t.pako)}(this,function(t){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(19)},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=n(3),i=n(2),u=n(16),a=n(15),s=n(18),h=n(17),c=Math.pow,l=Math.floor,d=Math.ceil,p=Math.log2,f=Math.max,g=Math.min,v=478450435,y=478450436,m=9,I=16|v,C=16|y,T=function(t){function e(e,n,o){var i=t.call(this)||this;if(i.maxValue=0,i.minNonZeroValue=Number.MAX_SAFE_INTEGER,e<1)throw new Error("lowestDiscernibleValue must be >= 1");if(n<2*e)throw new Error("highestTrackableValue must be >= 2 * lowestDiscernibleValue");if(o<0||o>5)throw new Error("numberOfSignificantValueDigits must be between 0 and 5");return i.identity=r.AbstractHistogramBase.identityBuilder++,i.init(e,n,o,1,0),i}return o(e,t),e.prototype.updatedMaxValue=function(t){var e=t+this.unitMagnitudeMask;this.maxValue=e},e.prototype.updateMinNonZeroValue=function(t){if(!(t<=this.unitMagnitudeMask)){var e=l(t/this.lowestDiscernibleValueRounded)*this.lowestDiscernibleValueRounded;this.minNonZeroValue=e}},e.prototype.resetMinNonZeroValue=function(t){var e=l(t/this.lowestDiscernibleValueRounded)*this.lowestDiscernibleValueRounded;this.minNonZeroValue=t===Number.MAX_SAFE_INTEGER?t:e},e.prototype.init=function(t,e,n,o,r){this.lowestDiscernibleValue=t,this.highestTrackableValue=e,this.numberOfSignificantValueDigits=n,this.integerToDoubleValueConversionRatio=o,0!==r&&this.setNormalizingIndexOffset(r);var i=2*l(c(10,n));this.unitMagnitude=l(p(t)),this.lowestDiscernibleValueRounded=c(2,this.unitMagnitude),this.unitMagnitudeMask=this.lowestDiscernibleValueRounded-1;var s=d(p(i));this.subBucketHalfCountMagnitude=(s>1?s:1)-1,this.subBucketCount=c(2,this.subBucketHalfCountMagnitude+1),this.subBucketHalfCount=this.subBucketCount/2,this.subBucketMask=(l(this.subBucketCount)-1)*c(2,this.unitMagnitude),this.establishSize(e),this.leadingZeroCountBase=53-this.unitMagnitude-this.subBucketHalfCountMagnitude-1,this.percentileIterator=new a.default(this,1),this.recordedValuesIterator=new u.default(this)},e.prototype.establishSize=function(t){this.countsArrayLength=this.determineArrayLengthNeeded(t),this.bucketCount=this.getBucketsNeededToCoverValue(t),this.highestTrackableValue=t},e.prototype.determineArrayLengthNeeded=function(t){if(t<2*this.lowestDiscernibleValue)throw new Error("highestTrackableValue ("+t+") cannot be < (2 * lowestDiscernibleValue)");var e=this.getLengthForNumberOfBuckets(this.getBucketsNeededToCoverValue(t));return e},e.prototype.getLengthForNumberOfBuckets=function(t){var e=(t+1)*(this.subBucketCount/2);return e},e.prototype.getBucketsNeededToCoverValue=function(t){for(var e=this.subBucketCount*c(2,this.unitMagnitude),n=1;e<=t;){if(e>Number.MAX_SAFE_INTEGER/2)return n+1;e*=2,n++}return n},e.prototype.recordValue=function(t){this.recordSingleValue(t)},e.prototype.recordSingleValue=function(t){var e=this.countsArrayIndex(t);e>=this.countsArrayLength?this.handleRecordException(1,t):this.incrementCountAtIndex(e),this.updateMinAndMax(t),this.incrementTotalCount()},e.prototype.handleRecordException=function(t,e){if(!this.autoResize)throw"Value "+e+" is outside of histogram covered range";this.resize(e);var n=this.countsArrayIndex(e);this.addToCountAtIndex(n,t),this.highestTrackableValue=this.highestEquivalentValue(this.valueFromIndex(this.countsArrayLength-1))},e.prototype.countsArrayIndex=function(t){if(t<0)throw new Error("Histogram recorded value cannot be negative.");var e=this.getBucketIndex(t),n=this.getSubBucketIndex(t,e);return this.computeCountsArrayIndex(e,n)},e.prototype.computeCountsArrayIndex=function(t,e){var n=(t+1)*c(2,this.subBucketHalfCountMagnitude),o=e-this.subBucketHalfCount;return n+o},e.prototype.getBucketIndex=function(t){return f(l(p(t))-this.subBucketHalfCountMagnitude-this.unitMagnitude,0)},e.prototype.getSubBucketIndex=function(t,e){return l(t/c(2,e+this.unitMagnitude))},e.prototype.updateMinAndMax=function(t){t>this.maxValue&&this.updatedMaxValue(t),t=n){var i=this.valueFromIndex(r);return 0===t?this.lowestEquivalentValue(i):this.highestEquivalentValue(i)}return 0},e.prototype.valueFromIndexes=function(t,e){return e*c(2,t+this.unitMagnitude)},e.prototype.valueFromIndex=function(t){var e=l(t/this.subBucketHalfCount)-1,n=t%this.subBucketHalfCount+this.subBucketHalfCount;return e<0&&(n-=this.subBucketHalfCount,e=0),this.valueFromIndexes(e,n)},e.prototype.lowestEquivalentValue=function(t){var e=this.getBucketIndex(t),n=this.getSubBucketIndex(t,e),o=this.valueFromIndexes(e,n);return o},e.prototype.highestEquivalentValue=function(t){return this.nextNonEquivalentValue(t)-1},e.prototype.nextNonEquivalentValue=function(t){return this.lowestEquivalentValue(t)+this.sizeOfEquivalentValueRange(t)},e.prototype.sizeOfEquivalentValueRange=function(t){var e=this.getBucketIndex(t),n=this.getSubBucketIndex(t,e),o=c(2,this.unitMagnitude+(n>=this.subBucketCount?e+1:e));return o},e.prototype.medianEquivalentValue=function(t){return this.lowestEquivalentValue(t)+l(this.sizeOfEquivalentValueRange(t)/2)},e.prototype.getMean=function(){if(0===this.getTotalCount())return 0;this.recordedValuesIterator.reset();for(var t=0;this.recordedValuesIterator.hasNext();){var e=this.recordedValuesIterator.next();t+=this.medianEquivalentValue(e.valueIteratedTo)*e.countAtValueIteratedTo}return 1*t/this.getTotalCount()},e.prototype.getStdDeviation=function(){if(0===this.getTotalCount())return 0;var t=this.getMean(),e=0;for(this.recordedValuesIterator.reset();this.recordedValuesIterator.hasNext();){var n=this.recordedValuesIterator.next(),o=this.medianEquivalentValue(n.valueIteratedTo)-t;e+=o*o*n.countAddedInThisIterationStep}var r=Math.sqrt(e/this.getTotalCount());return r},e.prototype.outputPercentileDistribution=function(t,e,n){void 0===t&&(t=5),void 0===e&&(e=1),void 0===n&&(n=!1);var o="";o+=n?'"Value","Percentile","TotalCount","1/(1-Percentile)"\n':"       Value     Percentile TotalCount 1/(1-Percentile)\n\n";var r=this.percentileIterator;r.reset(t);var i,u;if(n){var a=s.floatFormatter(0,this.numberOfSignificantValueDigits),h=s.floatFormatter(0,12),c=s.floatFormatter(0,2);i=function(t){return a(t.valueIteratedTo/e)+","+h(t.percentileLevelIteratedTo/100)+","+t.totalCountToThisValue+","+c(1/(1-t.percentileLevelIteratedTo/100))+"\n"},u=function(t){return a(t.valueIteratedTo/e)+","+h(t.percentileLevelIteratedTo/100)+","+t.totalCountToThisValue+",Infinity\n"}}else{var l=s.floatFormatter(12,this.numberOfSignificantValueDigits),d=s.floatFormatter(2,12),p=s.integerFormatter(10),f=s.floatFormatter(14,2);i=function(t){return l(t.valueIteratedTo/e)+" "+d(t.percentileLevelIteratedTo/100)+" "+p(t.totalCountToThisValue)+" "+f(1/(1-t.percentileLevelIteratedTo/100))+"\n"},u=function(t){return l(t.valueIteratedTo/e)+" "+d(t.percentileLevelIteratedTo/100)+" "+p(t.totalCountToThisValue)+"\n"}}for(;r.hasNext();){var g=r.next();o+=g.percentileLevelIteratedTo<100?i(g):u(g)}if(!n){var v=s.floatFormatter(12,this.numberOfSignificantValueDigits),y=v(this.getMean()/e),m=v(this.getStdDeviation()/e),I=v(this.maxValue/e),C=s.integerFormatter(12),T=C(this.getTotalCount()),A=C(this.bucketCount),b=C(this.subBucketCount);o+="#[Mean    = "+y+", StdDeviation   = "+m+"]\n#[Max     = "+I+", Total count    = "+T+"]\n#[Buckets = "+A+", SubBuckets     = "+b+"]\n"}return o},e.prototype.getEstimatedFootprintInBytes=function(){return this._getEstimatedFootprintInBytes()},e.prototype.recordSingleValueWithExpectedInterval=function(t,e){if(this.recordSingleValue(t),!(e<=0))for(var n=t-e;n>=e;n-=e)this.recordSingleValue(n)},e.prototype.recordCountAtValue=function(t,e){var n=this.countsArrayIndex(e);n>=this.countsArrayLength?this.handleRecordException(t,e):this.addToCountAtIndex(n,t),this.updateMinAndMax(e),this.addToTotalCount(t)},e.prototype.recordValueWithExpectedInterval=function(t,e){this.recordSingleValueWithExpectedInterval(t,e)},e.prototype.recordValueWithCountAndExpectedInterval=function(t,e,n){if(this.recordCountAtValue(e,t),!(n<=0))for(var o=t-n;o>=n;o-=n)this.recordCountAtValue(e,o)},e.prototype.addWhileCorrectingForCoordinatedOmission=function(t,e){for(var n=this,o=new u.default(t);o.hasNext();){var r=o.next();n.recordValueWithCountAndExpectedInterval(r.valueIteratedTo,r.countAtValueIteratedTo,e)}},e.prototype.add=function(t){var e=this.highestEquivalentValue(this.valueFromIndex(this.countsArrayLength-1));if(e0&&(this.addToCountAtIndex(o,r),n+=r)}this.setTotalCount(this.getTotalCount()+n),this.updatedMaxValue(f(this.maxValue,t.maxValue)),this.updateMinNonZeroValue(g(this.minNonZeroValue,t.minNonZeroValue))}else{var i=t.countsArrayIndex(t.maxValue),r=t.getCountAtIndex(i);this.recordCountAtValue(r,t.maxValue);for(var o=0;o0&&this.recordCountAtValue(r,t.valueFromIndex(o))}this.startTimeStampMsec=g(this.startTimeStampMsec,t.startTimeStampMsec),this.endTimeStampMsec=f(this.endTimeStampMsec,t.endTimeStampMsec)},e.prototype.getCountAtValue=function(t){var e=g(f(0,this.countsArrayIndex(t)),this.countsArrayLength-1);return this.getCountAtIndex(e)},e.prototype.subtract=function(t){var e=this.valueFromIndex(this.countsArrayLength-1);if(e0&&this.addToCountAtIndex(n,-o)}else for(var n=0;n0){var r=t.valueFromIndex(n);if(this.getCountAtValue(r)1?h.default.encode(t,-r):h.default.encode(t,o)}},e.prototype.encodeIntoByteBuffer=function(t){var e=t.position;t.putInt32(I),t.putInt32(0),t.putInt32(1),t.putInt32(this.numberOfSignificantValueDigits),t.putInt64(this.lowestDiscernibleValue),t.putInt64(this.highestTrackableValue),t.putInt64(1);var n=t.position;this.fillBufferFromCountsArray(t);var o=t.position;return t.position=e+4,t.putInt32(o-n),t.position=o,o-e},e.prototype.fillCountsArrayFromSourceBuffer=function(t,e,n){if(2!=n&&4!=n&&8!=n&&n!=m)throw"word size must be 2, 4, 8, or V2maxWordSizeInBytes ("+m+") bytes";for(var o=0,r=t.position+e;t.position0&&(o+=i,e=r,n==-1&&0!=r&&(n=r))}e>=0&&this.updatedMaxValue(this.highestEquivalentValue(this.valueFromIndex(e))),n>=0&&this.updateMinNonZeroValue(this.valueFromIndex(n)),this.setTotalCount(o)},e.getCookieBase=function(t){return t&-241},e.getWordSizeInBytesFromCookie=function(t){if(this.getCookieBase(t)==v||this.getCookieBase(t)==y)return m;var e=(240&t)>>4;return 14&e},e.decodeFromByteBuffer=function(t,e,n){var o,r,i,u,a=t.getInt32();if(this.getCookieBase(a)!==v)throw"The buffer does not contain a Histogram (no valid V2 encoding cookie found)";if(this.getWordSizeInBytesFromCookie(a)!=m)throw"The buffer does not contain a Histogram (no valid cookie found)";o=t.getInt32(),t.getInt32(),r=t.getInt32(),i=t.getInt64(),u=t.getInt64(),t.getInt64(),u=f(u,n);var s=e,h=new s(i,u,r),c=h.fillCountsArrayFromSourceBuffer(t,o,m);return h.establishInternalTackingValues(c),h},e.decodeFromCompressedByteBuffer=function(t,e,o){var r=t.position,u=t.getInt32();if((u&-241)!==y)throw"Encoding not supported, only V2 is supported";var a=t.getInt32(),s=n(7),h=s.inflate(t.data.slice(r+8,r+8+a));return this.decodeFromByteBuffer(new i.default(h),e,o)},e.prototype.encodeIntoCompressedByteBuffer=function(t,e){var o=i.default.allocate(),r=this.encodeIntoByteBuffer(o);t.putInt32(C);var u=n(7),a=e?{level:e}:{},s=u.deflate(o.data.slice(0,r),a);return t.putInt32(s.byteLength),t.putArray(s),t.position},e.prototype.reset=function(){this.clearCounts(),this.setTotalCount(0),this.startTimeStampMsec=0,this.endTimeStampMsec=0,this.tag=r.NO_TAG,this.maxValue=0,this.minNonZeroValue=Number.MAX_SAFE_INTEGER},e}(r.AbstractHistogramBase);Object.defineProperty(e,"__esModule",{value:!0}),e.default=T},function(t,e){"use strict";var n=Math.pow,o=Math.floor,r=n(2,32),i=function(){function t(t){this.position=0,this.data=t,this.int32ArrayForConvert=new Uint32Array(1),this.int8ArrayForConvert=new Uint8Array(this.int32ArrayForConvert.buffer)}return t.allocate=function(e){return void 0===e&&(e=16),new t(new Uint8Array(e))},t.prototype.put=function(t){if(this.position===this.data.length){var e=this.data;this.data=new Uint8Array(2*this.data.length),this.data.set(e)}this.data[this.position]=t,this.position++},t.prototype.putInt32=function(t){if(this.data.length-this.position<4){var e=this.data;this.data=new Uint8Array(2*this.data.length+4),this.data.set(e)}this.int32ArrayForConvert[0]=t,this.data.set(this.int8ArrayForConvert.reverse(),this.position),this.position+=4},t.prototype.putInt64=function(t){this.putInt32(o(t/r)),this.putInt32(t)},t.prototype.putArray=function(t){if(this.data.length-this.position=this.histogram.countsArrayLength},t.prototype.incrementSubBucket=function(){this.freshSubBucket=!0,this.currentIndex++,this.currentValueAtIndex=this.histogram.valueFromIndex(this.currentIndex),this.nextValueAtIndex=this.histogram.valueFromIndex(this.currentIndex+1)},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=n(1),i=function(t){function e(e,n,o){var r=t.call(this,e,n,o)||this;return r.totalCount=0,r.counts=new Uint32Array(r.countsArrayLength),r}return o(e,t),e.prototype.clearCounts=function(){this.counts.fill(0)},e.prototype.incrementCountAtIndex=function(t){var e=this.counts[t],n=e+1;if(n<0)throw n+" would overflow short integer count";this.counts[t]=n},e.prototype.addToCountAtIndex=function(t,e){var n=this.counts[t],o=n+e;if(oNumber.MAX_SAFE_INTEGER)throw o+" would overflow integer count";this.counts[t]=o},e.prototype.setCountAtIndex=function(t,e){if(eNumber.MAX_SAFE_INTEGER)throw e+" would overflow integer count";this.counts[t]=e},e.prototype.resize=function(t){this.establishSize(t);var e=new Uint32Array(this.countsArrayLength);e.set(this.counts),this.counts=e},e.prototype.setNormalizingIndexOffset=function(t){},e.prototype.incrementTotalCount=function(){this.totalCount++},e.prototype.addToTotalCount=function(t){this.totalCount+=t},e.prototype.setTotalCount=function(t){this.totalCount=t},e.prototype.getTotalCount=function(){return this.totalCount},e.prototype.getCountAtIndex=function(t){return this.counts[t]},e.prototype._getEstimatedFootprintInBytes=function(){return 512+4*this.counts.length},e.prototype.copyCorrectedForCoordinatedOmission=function(t){var n=new e(this.lowestDiscernibleValue,this.highestTrackableValue,this.numberOfSignificantValueDigits);return n.addWhileCorrectingForCoordinatedOmission(this,t),n},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";var o=n(2),r=n(1),i=n(5),u=n(8),a=function(t,e,n){void 0===e&&(e=i.default),void 0===n&&(n=0);var a=new o.default(u.toByteArray(t));return r.default.decodeFromCompressedByteBuffer(a,e,n)};e.decodeFromCompressedBase64=a;var s=function(t,e){var n=o.default.allocate(),r=t.encodeIntoCompressedByteBuffer(n,e),i=n.data.slice(0,r);return u.fromByteArray(i)};e.encodeIntoBase64String=s},function(e,n){e.exports=t},function(t,e){"use strict";function n(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function r(t){var e,o,r,i,u,a,s=t.length;u=n(t),a=new c(3*s/4-u),r=u>0?s-4:s;var l=0;for(e=0,o=0;e>16&255,a[l++]=i>>8&255,a[l++]=255&i;return 2===u?(i=h[t.charCodeAt(e)]<<2|h[t.charCodeAt(e+1)]>>4,a[l++]=255&i):1===u&&(i=h[t.charCodeAt(e)]<<10|h[t.charCodeAt(e+1)]<<4|h[t.charCodeAt(e+2)]>>2,a[l++]=i>>8&255,a[l++]=255&i),a}function i(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function u(t,e,n){for(var o,r=[],u=e;uc?c:h+a));return 1===o?(e=t[n-1],r+=s[e>>2],r+=s[e<<4&63],r+="=="):2===o&&(e=(t[n-2]<<8)+t[n-1],r+=s[e>>10],r+=s[e>>4&63],r+=s[e<<2&63],r+="="),i.push(r),i.join("")}e.byteLength=o,e.toByteArray=r,e.fromByteArray=a;for(var s=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,p=l.length;dNumber.MAX_SAFE_INTEGER)throw o+" would overflow integer count";this.counts[t]=o},e.prototype.setCountAtIndex=function(t,e){if(eNumber.MAX_SAFE_INTEGER)throw e+" would overflow integer count";this.counts[t]=e},e.prototype.resize=function(t){this.establishSize(t);var e=new Float64Array(this.countsArrayLength);e.set(this.counts),this.counts=e},e.prototype.setNormalizingIndexOffset=function(t){},e.prototype.incrementTotalCount=function(){this.totalCount++},e.prototype.addToTotalCount=function(t){this.totalCount+=t},e.prototype.setTotalCount=function(t){this.totalCount=t},e.prototype.getTotalCount=function(){return this.totalCount},e.prototype.getCountAtIndex=function(t){return this.counts[t]},e.prototype._getEstimatedFootprintInBytes=function(){return 512+8*this.counts.length},e.prototype.copyCorrectedForCoordinatedOmission=function(t){var n=new e(this.lowestDiscernibleValue,this.highestTrackableValue,this.numberOfSignificantValueDigits);return n.addWhileCorrectingForCoordinatedOmission(this,t),n},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){"use strict";var n=function(){function t(){this.reset()}return t.prototype.reset=function(){this.valueIteratedTo=0,this.valueIteratedFrom=0,this.countAtValueIteratedTo=0,this.countAddedInThisIterationStep=0,this.totalCountToThisValue=0,this.totalValueToThisValue=0,this.percentile=0,this.percentileLevelIteratedTo=0},t}();Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,n){"use strict";var o=n(3),r=n(6),i="Tag=",u="Tag=".length,a=function(){function t(t){this.lines=s(t),this.currentLineIndex=0}return t.prototype.nextIntervalHistogram=function(t,e){for(void 0===t&&(t=0),void 0===e&&(e=Number.MAX_VALUE);this.currentLineIndexNumber.MAX_SAFE_INTEGER)throw o+" would overflow integer count";this.counts[t]=o},e.prototype.setCountAtIndex=function(t,e){if(eNumber.MAX_SAFE_INTEGER)throw e+" would overflow integer count";this.counts[t]=e},e.prototype.resize=function(t){this.establishSize(t);var e=new Uint16Array(this.countsArrayLength);e.set(this.counts),this.counts=e},e.prototype.setNormalizingIndexOffset=function(t){},e.prototype.incrementTotalCount=function(){this.totalCount++},e.prototype.addToTotalCount=function(t){this.totalCount+=t},e.prototype.setTotalCount=function(t){this.totalCount=t},e.prototype.getTotalCount=function(){return this.totalCount},e.prototype.getCountAtIndex=function(t){return this.counts[t]},e.prototype._getEstimatedFootprintInBytes=function(){return 512+2*this.counts.length},e.prototype.copyCorrectedForCoordinatedOmission=function(t){var n=new e(this.lowestDiscernibleValue,this.highestTrackableValue,this.numberOfSignificantValueDigits);return n.addWhileCorrectingForCoordinatedOmission(this,t),n},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=n(1),i=function(t){function e(e,n,o){var r=t.call(this,e,n,o)||this;return r.totalCount=0,r.counts=new Uint8Array(r.countsArrayLength),r}return o(e,t),e.prototype.clearCounts=function(){this.counts.fill(0)},e.prototype.incrementCountAtIndex=function(t){var e=this.counts[t],n=e+1;if(n<0)throw n+" would overflow short integer count";this.counts[t]=n},e.prototype.addToCountAtIndex=function(t,e){var n=this.counts[t],o=n+e;if(oNumber.MAX_SAFE_INTEGER)throw o+" would overflow integer count";this.counts[t]=o},e.prototype.setCountAtIndex=function(t,e){if(eNumber.MAX_SAFE_INTEGER)throw e+" would overflow integer count";this.counts[t]=e},e.prototype.resize=function(t){this.establishSize(t);var e=new Uint8Array(this.countsArrayLength);e.set(this.counts),this.counts=e},e.prototype.setNormalizingIndexOffset=function(t){},e.prototype.incrementTotalCount=function(){this.totalCount++},e.prototype.addToTotalCount=function(t){this.totalCount+=t},e.prototype.setTotalCount=function(t){this.totalCount=t},e.prototype.getTotalCount=function(){return this.totalCount},e.prototype.getCountAtIndex=function(t){return this.counts[t]},e.prototype._getEstimatedFootprintInBytes=function(){return 512+this.counts.length},e.prototype.copyCorrectedForCoordinatedOmission=function(t){var n=new e(this.lowestDiscernibleValue,this.highestTrackableValue,this.numberOfSignificantValueDigits);return n.addWhileCorrectingForCoordinatedOmission(this,t),n},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=n(4),i=Math.pow,u=Math.floor,a=Math.log2,s=function(t){function e(e,n){var o=t.call(this)||this;return o.percentileTicksPerHalfDistance=0,o.percentileLevelToIterateTo=0,o.percentileLevelToIterateFrom=0,o.reachedLastRecordedValue=!1,o.doReset(e,n),o}return o(e,t),e.prototype.reset=function(t){this.doReset(this.histogram,t)},e.prototype.doReset=function(e,n){t.prototype.resetIterator.call(this,e),this.percentileTicksPerHalfDistance=n,this.percentileLevelToIterateTo=0,this.percentileLevelToIterateFrom=0,this.reachedLastRecordedValue=!1},e.prototype.hasNext=function(){return!!t.prototype.hasNext.call(this)||!this.reachedLastRecordedValue&&this.arrayTotalCount>0&&(this.percentileLevelToIterateTo=100,this.reachedLastRecordedValue=!0,!0)},e.prototype.incrementIterationLevel=function(){this.percentileLevelToIterateFrom=this.percentileLevelToIterateTo;var t=this.percentileTicksPerHalfDistance*i(2,u(a(100/(100-this.percentileLevelToIterateTo)))+1);this.percentileLevelToIterateTo+=100/t},e.prototype.reachedIterationLevel=function(){if(0===this.countAtThisValue)return!1;var t=100*this.totalCountToCurrentIndex/this.arrayTotalCount;return t>=this.percentileLevelToIterateTo},e.prototype.getPercentileIteratedTo=function(){return this.percentileLevelToIterateTo},e.prototype.getPercentileIteratedFrom=function(){return this.percentileLevelToIterateFrom},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=s},function(t,e,n){"use strict";var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=n(4),i=function(t){function e(e){
var n=t.call(this)||this;return n.doReset(e),n}return o(e,t),e.prototype.reset=function(){this.doReset(this.histogram)},e.prototype.doReset=function(e){t.prototype.resetIterator.call(this,e),this.visitedIndex=-1},e.prototype.incrementIterationLevel=function(){this.visitedIndex=this.currentIndex},e.prototype.reachedIterationLevel=function(){var t=this.histogram.getCountAtIndex(this.currentIndex);return 0!=t&&this.visitedIndex!==this.currentIndex},e}(r.default);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){"use strict";var n=Math.pow,o=Math.floor,r=n(2,7),i=n(2,14),u=n(2,21),a=n(2,28),s=n(2,35),h=n(2,42),c=n(2,49),l=n(2,56),d=function(){function t(){}return t.encode=function(t,e){e>=0?e*=2:e=2*-e-1,e




© 2015 - 2024 Weber Informatics LLC | Privacy Policy