Class: Rivulet::MinMaxStream
- Defined in:
- lib/rivulet/minmax_stream.rb
Instance Method Summary collapse
Methods inherited from Stream
#initialize, #iterate_windows, #max_window, #min_window, #tumbling, #windows
Constructor Details
This class inherits a constructor from Rivulet::Stream
Instance Method Details
#max_range_while(&rule) ⇒ Object
5 6 7 8 9 |
# File 'lib/rivulet/minmax_stream.rb', line 5 def max_range_while(&rule) best = 0 each_max_window(rule) { |w| best = w.range if w.range && w.range > best } best end |