Util
Class HolisticStats

java.lang.Object
  |
  +--Util.Stats
        |
        +--Util.HolisticStats

public class HolisticStats
extends Stats

Implementation of the statistics.

Copyright (c) 2004 Paul Vogt


Field Summary
protected  double[] cs
           
protected  double[] ds
           
protected  int end
           
protected  int game
           
protected  double iCoherence
           
protected  int mid
           
protected  double pCoherence
           
protected  boolean update
           
 
Constructor Summary
HolisticStats()
          constructor
 
Method Summary
 double[] getCS()
           
 double[] getDS()
           
 int getEnd()
           
 int getGame()
           
 double getICoh()
           
 int getMid()
           
 double getPCoh()
           
 boolean getUpdate()
           
 void logFile(java.io.PrintWriter outfile)
          This function writes the statistics of each game to the logfile.
 void print()
          Function to write the game information to the standard output
 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.
protected  int rescale()
          This function rescales the arrays for the UI
 void update(Agent S, Agent H, int t)
          Updates the statistics at the end of each language game.
 void updateCoherence(double x, double y)
          This function updates the production coherence and interpretation coherence (aka accuracy) measures.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

HolisticStats

public HolisticStats()
constructor

Method Detail

rescale

protected int rescale()
This function rescales the arrays for the UI

Overrides:
rescale in class Stats

reinitialize

public 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.

Specified by:
reinitialize in class Stats
Parameters:
c - ='n' if a new game is started.

updateCoherence

public void updateCoherence(double x,
                            double y)
This function updates the production coherence and interpretation coherence (aka accuracy) measures.

Specified by:
updateCoherence in class Stats

update

public 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.

Specified by:
update in class Stats
Parameters:
S - the speaker Agent
H - the hearer Agent
t - the agent's type

logFile

public void logFile(java.io.PrintWriter outfile)
This function writes the statistics of each game to the logfile.

Specified by:
logFile in class Stats
Parameters:
outfile - the logfile.

print

public void print()
Function to write the game information to the standard output

Overrides:
print in class Stats

getCS

public double[] getCS()
Overrides:
getCS in class Stats

getDS

public double[] getDS()
Overrides:
getDS in class Stats

getGame

public int getGame()
Overrides:
getGame in class Stats

getMid

public int getMid()
Overrides:
getMid in class Stats

getEnd

public int getEnd()
Overrides:
getEnd in class Stats

getPCoh

public double getPCoh()
Overrides:
getPCoh in class Stats

getICoh

public double getICoh()
Overrides:
getICoh in class Stats

getUpdate

public boolean getUpdate()
Overrides:
getUpdate in class Stats