Class: Invariant::Biased
- Defined in:
- lib/quantile_estimator/invariant.rb
Instance Method Summary collapse
-
#initialize(epsilon) ⇒ Biased
constructor
A new instance of Biased.
- #upper_bound(rank, n) ⇒ Object
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 |