Record Class GameTheoryEngine.NashEquilibrium
java.lang.Object
java.lang.Record
org.episteme.social.economics.GameTheoryEngine.NashEquilibrium
- All Implemented Interfaces:
Serializable
- Enclosing class:
GameTheoryEngine
public static record GameTheoryEngine.NashEquilibrium(String player1Strategy, String player2Strategy, double player1Payoff, double player2Payoff, boolean isPure)
extends Record
implements Serializable
Details of a strategic equilibrium point.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNashEquilibrium(String player1Strategy, String player2Strategy, double player1Payoff, double player2Payoff, boolean isPure) Creates an instance of aNashEquilibriumrecord 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.booleanisPure()Returns the value of theisPurerecord component.doubleReturns the value of theplayer1Payoffrecord component.Returns the value of theplayer1Strategyrecord component.doubleReturns the value of theplayer2Payoffrecord component.Returns the value of theplayer2Strategyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NashEquilibrium
public NashEquilibrium(String player1Strategy, String player2Strategy, double player1Payoff, double player2Payoff, boolean isPure) Creates an instance of aNashEquilibriumrecord class.- Parameters:
player1Strategy- the value for theplayer1Strategyrecord componentplayer2Strategy- the value for theplayer2Strategyrecord componentplayer1Payoff- the value for theplayer1Payoffrecord componentplayer2Payoff- the value for theplayer2Payoffrecord componentisPure- the value for theisPurerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
player1Strategy
Returns the value of theplayer1Strategyrecord component.- Returns:
- the value of the
player1Strategyrecord component
-
player2Strategy
Returns the value of theplayer2Strategyrecord component.- Returns:
- the value of the
player2Strategyrecord component
-
player1Payoff
public double player1Payoff()Returns the value of theplayer1Payoffrecord component.- Returns:
- the value of the
player1Payoffrecord component
-
player2Payoff
public double player2Payoff()Returns the value of theplayer2Payoffrecord component.- Returns:
- the value of the
player2Payoffrecord component
-
isPure
public boolean isPure()Returns the value of theisPurerecord component.- Returns:
- the value of the
isPurerecord component
-