Class: RubyUtils::ExtremeValues

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_utils/statistic.rb

Overview

simple helper class to store the minimal and maximal value for a given data set

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(min_value, max_value) ⇒ ExtremeValues

initialization

Parameters:

  • min_value (Numeric)

    the minimum value

  • max_value (Numeric)

    the maximum value



116
117
118
119
# File 'lib/ruby_utils/statistic.rb', line 116

def initialize(min_value, max_value)
  @minimum = min_value
  @maximum = max_value
end

Instance Attribute Details

#maximumNumeric (readonly)

Returns the determined maximum value.

Returns:

  • (Numeric)

    the determined maximum value



109
110
111
# File 'lib/ruby_utils/statistic.rb', line 109

def maximum
  @maximum
end

#minimumNumeric (readonly)

Returns the determined minimum value.

Returns:

  • (Numeric)

    the determined minimum value



111
112
113
# File 'lib/ruby_utils/statistic.rb', line 111

def minimum
  @minimum
end