/** * Returns a map of range -> event count. The elements of the stream are * a mutable copy of the internal data. */ public Stream<RangeWithCount> stream() { return buckets_.stream() .map(bucket -> new RangeWithCount(bucket.getRange(), bucket.getEvents())); }
/** * Returns a map of range -> event count. The elements of the stream are * a mutable copy of the internal data. */ public Stream<RangeWithCount> stream() { return buckets_.stream() .map(bucket -> new RangeWithCount(bucket.getRange(), bucket.getEvents())); }
public final Histogram_elemContext histogram_elem() throws RecognitionException { Histogram_elemContext _localctx = new Histogram_elemContext(_ctx, getState()); enterRule(_localctx, 94, RULE_histogram_elem); try { enterOuterAlt(_localctx, 1); { setState(698); ((Histogram_elemContext)_localctx).s_floor = number(); setState(699); match(DOT_DOT_LIT); setState(700); ((Histogram_elemContext)_localctx).s_ceil = number(); setState(701); match(EQ_KW); setState(702); ((Histogram_elemContext)_localctx).s_count = number(); ((Histogram_elemContext)_localctx).s = new Histogram.RangeWithCount(new Histogram.Range(((Histogram_elemContext)_localctx).s_floor.s.doubleValue(), ((Histogram_elemContext)_localctx).s_ceil.s.doubleValue()), ((Histogram_elemContext)_localctx).s_count.s.doubleValue()); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; }
final double head_right_fraction = 1 - head_left_fraction; imed.add(0, head); imed.add(0, new RangeWithCount(new Range(floor, ceil), head_left_fraction * head.getCount())); head.setRange(new Range(ceil, head.getRange().getCeil())); head.setCount(head_right_fraction * head.getCount());
final double head_right_fraction = 1 - head_left_fraction; imed.add(0, head); imed.add(0, new RangeWithCount(new Range(floor, ceil), head_left_fraction * head.getCount())); head.setRange(new Range(ceil, head.getRange().getCeil())); head.setCount(head_right_fraction * head.getCount());
public final Histogram_elemContext histogram_elem() throws RecognitionException { Histogram_elemContext _localctx = new Histogram_elemContext(_ctx, getState()); enterRule(_localctx, 172, RULE_histogram_elem); try { enterOuterAlt(_localctx, 1); { setState(1254); ((Histogram_elemContext)_localctx).s_floor = number(); setState(1255); match(DOT_DOT_LIT); setState(1256); ((Histogram_elemContext)_localctx).s_ceil = number(); setState(1257); match(EQ_KW); setState(1258); ((Histogram_elemContext)_localctx).s_count = number(); ((Histogram_elemContext)_localctx).s = new Histogram.RangeWithCount(new Histogram.Range(((Histogram_elemContext)_localctx).s_floor.s.doubleValue(), ((Histogram_elemContext)_localctx).s_ceil.s.doubleValue()), ((Histogram_elemContext)_localctx).s_count.s.doubleValue()); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; }
public final Histogram_elemContext histogram_elem() throws RecognitionException { Histogram_elemContext _localctx = new Histogram_elemContext(_ctx, getState()); enterRule(_localctx, 94, RULE_histogram_elem); try { enterOuterAlt(_localctx, 1); { setState(698); ((Histogram_elemContext)_localctx).s_floor = number(); setState(699); match(DOT_DOT_LIT); setState(700); ((Histogram_elemContext)_localctx).s_ceil = number(); setState(701); match(EQ_KW); setState(702); ((Histogram_elemContext)_localctx).s_count = number(); ((Histogram_elemContext)_localctx).s = new Histogram.RangeWithCount(new Histogram.Range(((Histogram_elemContext)_localctx).s_floor.s.doubleValue(), ((Histogram_elemContext)_localctx).s_ceil.s.doubleValue()), ((Histogram_elemContext)_localctx).s_count.s.doubleValue()); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; }
@Override public RangeWithCount clone() { return new RangeWithCount(range, count); } }
@Override public RangeWithCount clone() { return new RangeWithCount(range, count); } }