Class: Ropt::CooperativeGames::Validator
- Inherits:
-
Object
- Object
- Ropt::CooperativeGames::Validator
- Defined in:
- lib/ropt/cooperative_games/validator.rb
Overview
class for validation after and before calculating vector shapley
Instance Method Summary collapse
- #validate_arguments(coefficients, coalitions, number_gamers) ⇒ Object
- #validate_coalitions_consistency(coalitions, names_singletons) ⇒ Object
- #validate_result(coalitions, names_singletons, vector) ⇒ Object
Instance Method Details
#validate_arguments(coefficients, coalitions, number_gamers) ⇒ Object
7 8 9 10 11 |
# File 'lib/ropt/cooperative_games/validator.rb', line 7 def validate_arguments(coefficients, coalitions, number_gamers) validate_number_gamers(number_gamers) validate_coalitions(coalitions) validate_coefficients(coefficients) end |
#validate_coalitions_consistency(coalitions, names_singletons) ⇒ Object
13 14 15 16 |
# File 'lib/ropt/cooperative_games/validator.rb', line 13 def validate_coalitions_consistency(coalitions, names_singletons) value_grand_coalition = value_grand_coalition(coalitions, names_singletons) validate_value_grand_coalition(value_grand_coalition) end |
#validate_result(coalitions, names_singletons, vector) ⇒ Object
18 19 20 21 |
# File 'lib/ropt/cooperative_games/validator.rb', line 18 def validate_result(coalitions, names_singletons, vector) value_grand_coalition = value_grand_coalition(coalitions, names_singletons) validate_vector(value_grand_coalition, vector) end |