lib/eep.fn.stats.js
function MaxFunction(win) { 
  var self = this, r;
  self.win = win;
  self.name = "max";
  self.type = "ordered_reverse";
  self.init = function() { r = null; };
  self.accumulate = function(v) { if (v == null) { return; } if (r == null) { r = v; return; } r = (v > r) ? v : r; };
  self.compensate = function(v) { r = self.win.max(); };
  self.emit = function()  { return r; };
  self.make = function(win) { return new MaxFunction(win); };
}
function MaxFunction(win) { 
  var self = this, r;
  self.win = win;
  self.name = "max";
  self.type = "ordered_reverse";
  self.init = function() { r = null; };
  self.accumulate = function(v) { if (v == null) { return; } if (r == null) { r = v; return; } r = (v > r) ? v : r; };
  self.compensate = function(v) { r = self.win.max(); };
  self.emit = function()  { return r; };
  self.make = function(win) { return new MaxFunction(win); };
}
function MaxFunction ( win ) { var self = this , r ; self . win = win ; self . name = "max" ; self . type = "ordered_reverse" ; self . init = function ( ) { r = null ; } ; self . accumulate = function ( v ) { if ( v == null ) { return ; } if ( r == null ) { r = v ; return ; } r = ( v > r ) ? v : r ; } ; self . compensate = function ( v ) { r = self . win . max ( ) ; } ; self . emit = function ( ) { return r ; } ; self . make = function ( win ) { return new MaxFunction ( win ) ; } ; }
Get the biggest of all the things
Get the biggest of all the things