public class CompressedPayoffMatrix extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CompressedPayoffMatrix.Entry |
static class |
CompressedPayoffMatrix.FullEntry |
Modifier and Type | Field and Description |
---|---|
protected HashMap<CompressedPayoffMatrix.Entry,PayoffMap> |
matrix |
protected int |
numEntries |
protected int |
numPlayers |
protected int[] |
numPlayersPerRole |
protected int |
numRoles |
protected int |
numStrategies |
protected int[] |
numStrategiesPerRole |
Constructor and Description |
---|
CompressedPayoffMatrix(int numRoles,
int[] numStrategiesPerRole,
int[] numPlayersPerRole,
List<Strategy> strategies) |
CompressedPayoffMatrix(List<Strategy> strategies,
int numPlayers) |
Modifier and Type | Method and Description |
---|---|
Iterator<CompressedPayoffMatrix.Entry> |
compressedEntryIterator() |
void |
export(DataWriter out) |
void |
exportToGambit(PrintWriter nfgOut) |
void |
exportToGambit(PrintWriter nfgOut,
String title) |
Iterator<CompressedPayoffMatrix.FullEntry> |
fullEntryIterator() |
PayoffMap |
getCompressedPayoffs(CompressedPayoffMatrix.Entry entry) |
double[] |
getFullPayoffs(CompressedPayoffMatrix.FullEntry entry) |
int |
getNumEntries() |
int |
getNumPlayers() |
int |
getNumPlayersPerRole(int role) |
int |
getNumStrategies() |
int |
getNumStrategiesPerRole(int role) |
Iterator<CompressedPayoffMatrix.Entry> |
orderedEntryIterator() |
double |
payoff(double[] mixedStrategy) |
double |
payoff(int strategy,
double[] mixedStrategy) |
static CompressedPayoffMatrix |
readFromFile(String fileName) |
void |
setCompressedPayoffs(CompressedPayoffMatrix.Entry entry,
PayoffMap compressedPayoffs) |
int |
size() |
protected HashMap<CompressedPayoffMatrix.Entry,PayoffMap> matrix
protected int numRoles
protected int[] numStrategiesPerRole
protected int[] numPlayersPerRole
protected int numPlayers
protected int numStrategies
protected int numEntries
public CompressedPayoffMatrix(int numRoles, int[] numStrategiesPerRole, int[] numPlayersPerRole, List<Strategy> strategies)
public int size()
public PayoffMap getCompressedPayoffs(CompressedPayoffMatrix.Entry entry)
public void setCompressedPayoffs(CompressedPayoffMatrix.Entry entry, PayoffMap compressedPayoffs)
public Iterator<CompressedPayoffMatrix.Entry> compressedEntryIterator()
public Iterator<CompressedPayoffMatrix.Entry> orderedEntryIterator()
public Iterator<CompressedPayoffMatrix.FullEntry> fullEntryIterator()
public double[] getFullPayoffs(CompressedPayoffMatrix.FullEntry entry)
public double payoff(double[] mixedStrategy)
public double payoff(int strategy, double[] mixedStrategy)
public static CompressedPayoffMatrix readFromFile(String fileName)
public void export(DataWriter out)
public void exportToGambit(PrintWriter nfgOut)
public void exportToGambit(PrintWriter nfgOut, String title)
public int getNumStrategies()
public int getNumPlayers()
public int getNumPlayersPerRole(int role)
public int getNumStrategiesPerRole(int role)
public int getNumEntries()
Copyright © 2014. All rights reserved.