Record Class GameTheoryEngine.NormalFormGame
java.lang.Object
java.lang.Record
org.episteme.social.economics.GameTheoryEngine.NormalFormGame
- All Implemented Interfaces:
Serializable
- Enclosing class:
GameTheoryEngine
public static record GameTheoryEngine.NormalFormGame(List<String> player1Strategies, List<String> player2Strategies, double[][] player1Payoffs, double[][] player2Payoffs)
extends Record
implements Serializable
Data model for a 2-player game in normal form.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNormalFormGame(List<String> player1Strategies, List<String> player2Strategies, double[][] player1Payoffs, double[][] player2Payoffs) Creates an instance of aNormalFormGamerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[][]Returns the value of theplayer1Payoffsrecord component.Returns the value of theplayer1Strategiesrecord component.double[][]Returns the value of theplayer2Payoffsrecord component.Returns the value of theplayer2Strategiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NormalFormGame
public NormalFormGame(List<String> player1Strategies, List<String> player2Strategies, double[][] player1Payoffs, double[][] player2Payoffs) Creates an instance of aNormalFormGamerecord class.- Parameters:
player1Strategies- the value for theplayer1Strategiesrecord componentplayer2Strategies- the value for theplayer2Strategiesrecord componentplayer1Payoffs- the value for theplayer1Payoffsrecord componentplayer2Payoffs- the value for theplayer2Payoffsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
player1Strategies
-
player2Strategies
-
player1Payoffs
public double[][] player1Payoffs()Returns the value of theplayer1Payoffsrecord component.- Returns:
- the value of the
player1Payoffsrecord component
-
player2Payoffs
public double[][] player2Payoffs()Returns the value of theplayer2Payoffsrecord component.- Returns:
- the value of the
player2Payoffsrecord component
-