sir.sim
Class SimSellke.Individual

java.lang.Object
  extended bysir.sim.SimSellke.Individual
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
SimSellke

public class SimSellke.Individual
extends java.lang.Object
implements java.lang.Comparable

Class to handle each individual in the population.


Field Summary
 double incubtime
          Individuals length of incubation period
 double inflength
          Individuals infection length, if infected
 double serotime
          Time from exposure to seroconversion
 double threshold
          The individual's threshold before becoming exposed
 int x
          Location of the individual
 int y
          Location of the individual
 
Constructor Summary
SimSellke.Individual(int x, int y)
          Constructor
 
Method Summary
 int compareTo(java.lang.Object other)
          Comparing based on the individuals threshold
 SimSellke.Event findEvent(char eventType)
          Return the eventType event for the individual.
 java.lang.String toString(double origoTime)
          Method to write all event times of an individual to the log file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public int x
Location of the individual


y

public int y
Location of the individual


inflength

public double inflength
Individuals infection length, if infected


incubtime

public double incubtime
Individuals length of incubation period


serotime

public double serotime
Time from exposure to seroconversion


threshold

public double threshold
The individual's threshold before becoming exposed

Constructor Detail

SimSellke.Individual

public SimSellke.Individual(int x,
                            int y)
Constructor

Method Detail

compareTo

public int compareTo(java.lang.Object other)
Comparing based on the individuals threshold

Specified by:
compareTo in interface java.lang.Comparable
Returns:
-1,0,1 if o1 is less than, equal to, or greater than o2

findEvent

public SimSellke.Event findEvent(char eventType)
Return the eventType event for the individual. Uses allEvents

Parameters:
eventType - The eventype to search for: I, R, S

toString

public java.lang.String toString(double origoTime)
Method to write all event times of an individual to the log file

Parameters:
origoTime - Time to correct all event times for.