Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/texlab/hash.rb,
lib/texlab/stats.rb

Overview

Average method for array with uncertainty calculation

Instance Method Summary collapse

Instance Method Details

#averageObject



5
6
7
8
# File 'lib/texlab/stats.rb', line 5

def average
  m = mean
  m.pm(Math.sqrt(m.delta**2 + (standard_deviation*3)**2))
end

#extract_options!Object



4
5
6
7
8
9
10
# File 'lib/texlab/hash.rb', line 4

def extract_options!
  if last.is_a? Hash
    pop
  else
    {}
  end
end