Class: Invariant::Biased

Inherits:
Invariant show all
Defined in:
lib/quantile_estimator/invariant.rb

Instance Method Summary collapse

Constructor Details

#initialize(epsilon) ⇒ Biased

Returns a new instance of Biased.



9
10
11
# File 'lib/quantile_estimator/invariant.rb', line 9

def initialize(epsilon)
  @epsilon = epsilon
end

Instance Method Details

#upper_bound(rank, n) ⇒ Object



13
14
15
# File 'lib/quantile_estimator/invariant.rb', line 13

def upper_bound(rank, n)
  2 * @epsilon * rank
end