Util
Class Stats
java.lang.Object
|
+--Util.Stats
- Direct Known Subclasses:
- CompositionalStats, HolisticStats
- public abstract class Stats
- extends java.lang.Object
Implementation of the statistics.
Copyright (c) 2004 Paul Vogt
Constructor Summary |
Stats()
|
Method Summary |
double[] |
getCS()
|
double[] |
getDS()
|
int |
getEnd()
|
int |
getGame()
|
double |
getICoh()
|
int |
getMid()
|
double |
getPCoh()
|
boolean |
getUpdate()
|
abstract void |
logFile(java.io.PrintWriter outfile)
This function writes the statistics of each game to the logfile. |
void |
print()
|
abstract void |
reinitialize(char c)
This function reinitialises the statistics at the start of
each iteration in the iterated learning model and when a new
game is started. |
abstract void |
update(Agent S,
Agent H,
int t)
Updates the statistics at the end of each language game. |
abstract void |
updateCoherence(double x,
double y)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cs
protected double[] cs
ds
protected double[] ds
game
protected int game
mid
protected int mid
end
protected int end
pCoherence
protected double pCoherence
iCoherence
protected double iCoherence
update
protected boolean update
Stats
public Stats()
reinitialize
public abstract void reinitialize(char c)
- This function reinitialises the statistics at the start of
each iteration in the iterated learning model and when a new
game is started.
- Parameters:
c
- ='n' if a new game is started.
update
public abstract void update(Agent S,
Agent H,
int t)
- Updates the statistics at the end of each language game. The agents
are used to check whether the game was successful or not.
- Parameters:
S
- the speaker AgentH
- the hearer Agent
logFile
public abstract void logFile(java.io.PrintWriter outfile)
- This function writes the statistics of each game to the logfile.
- Parameters:
outfile
- the logfile.
print
public void print()
getCS
public double[] getCS()
getDS
public double[] getDS()
getGame
public int getGame()
getMid
public int getMid()
getEnd
public int getEnd()
getPCoh
public double getPCoh()
getICoh
public double getICoh()
getUpdate
public boolean getUpdate()
updateCoherence
public abstract void updateCoherence(double x,
double y)