Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext.rb,
lib/ecu/labels/interpolator.rb

Instance Method Summary collapse

Instance Method Details

#avgObject



46
47
48
# File 'lib/core_ext.rb', line 46

def avg
  empty? ? nil : sum.to_f / count
end

#strictly_mon_inc?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/ecu/labels/interpolator.rb', line 2

def strictly_mon_inc?
  self.each_cons(2).all? { |lo, hi| lo < hi }
end