public StreamBatch(long batchSize, long slideSize) {
this.batchSize = batchSize;
this.slideSize = slideSize;
this.granularity = (int) MathUtils.gcd(batchSize, slideSize);
this.batchPerSlide = slideSize / granularity;
this.circularBuffer = new NullableCircularBuffer((int) (batchSize / granularity));
this.counter = 0;
this.minibatchCounter = 0;
this.currentValue = null;
this.numberOfBatches = batchSize / granularity;
this.changed = false;