Class: Ropt::CooperativeGames::CoalitionsCoefficients
- Inherits:
-
Object
- Object
- Ropt::CooperativeGames::CoalitionsCoefficients
- Defined in:
- lib/ropt/cooperative_games/coalitions_coefficients.rb
Overview
class for get coefficients of Shapley Value with limit of number of gamers equal 171
Constant Summary collapse
- LIMIT_VALUE =
171
Instance Attribute Summary collapse
-
#number_gamers ⇒ Object
Returns the value of attribute number_gamers.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(number_gamers) ⇒ CoalitionsCoefficients
constructor
A new instance of CoalitionsCoefficients.
Constructor Details
#initialize(number_gamers) ⇒ CoalitionsCoefficients
11 12 13 |
# File 'lib/ropt/cooperative_games/coalitions_coefficients.rb', line 11 def initialize(number_gamers) @number_gamers = number_gamers.to_f end |
Instance Attribute Details
#number_gamers ⇒ Object
Returns the value of attribute number_gamers.
7 8 9 |
# File 'lib/ropt/cooperative_games/coalitions_coefficients.rb', line 7 def number_gamers @number_gamers end |
Instance Method Details
#call ⇒ Object
15 16 17 18 |
# File 'lib/ropt/cooperative_games/coalitions_coefficients.rb', line 15 def call validate_number coefficients if number_gamers == coefficients.size end |