net.sourceforge.jabm.gametheory
Class CompressedPayoffMatrix
java.lang.Object
net.sourceforge.jabm.gametheory.CompressedPayoffMatrix
- All Implemented Interfaces:
- java.io.Serializable
public class CompressedPayoffMatrix
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
matrix
protected java.util.HashMap<CompressedPayoffMatrix.Entry,PayoffMap> matrix
numRoles
protected int numRoles
numStrategiesPerRole
protected int[] numStrategiesPerRole
numPlayersPerRole
protected int[] numPlayersPerRole
numPlayers
protected int numPlayers
numStrategies
protected int numStrategies
numEntries
protected int numEntries
CompressedPayoffMatrix
public CompressedPayoffMatrix(int numRoles,
int[] numStrategiesPerRole,
int[] numPlayersPerRole,
java.util.List<Strategy> strategies)
CompressedPayoffMatrix
public CompressedPayoffMatrix(java.util.List<Strategy> strategies,
int numPlayers)
size
public int size()
getCompressedPayoffs
public PayoffMap getCompressedPayoffs(CompressedPayoffMatrix.Entry entry)
setCompressedPayoffs
public void setCompressedPayoffs(CompressedPayoffMatrix.Entry entry,
PayoffMap compressedPayoffs)
compressedEntryIterator
public java.util.Iterator<CompressedPayoffMatrix.Entry> compressedEntryIterator()
orderedEntryIterator
public java.util.Iterator<CompressedPayoffMatrix.Entry> orderedEntryIterator()
fullEntryIterator
public java.util.Iterator<CompressedPayoffMatrix.FullEntry> fullEntryIterator()
getFullPayoffs
public double[] getFullPayoffs(CompressedPayoffMatrix.FullEntry entry)
payoff
public double payoff(double[] mixedStrategy)
payoff
public double payoff(int strategy,
double[] mixedStrategy)
readFromFile
public static CompressedPayoffMatrix readFromFile(java.lang.String fileName)
export
public void export(DataWriter out)
exportToGambit
public void exportToGambit(java.io.PrintWriter nfgOut)
exportToGambit
public void exportToGambit(java.io.PrintWriter nfgOut,
java.lang.String title)
getNumStrategies
public int getNumStrategies()
getNumPlayers
public int getNumPlayers()
getNumPlayersPerRole
public int getNumPlayersPerRole(int role)
getNumStrategiesPerRole
public int getNumStrategiesPerRole(int role)
getNumEntries
public int getNumEntries()