|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsir.util.Unit
Title: LadyBug Description: Estimation of SIR parameters Copyright: Copyright (c) 2002 Company:
Field Summary | |
int |
a
Initial number of infected |
protected Data |
data
Link to data object so it knows a bit about where it is located |
Event |
firstEvent
First event occuring in the unit - usually a 'N' event at time of I_0 |
int |
N
Initial number of susceptibles |
java.util.LinkedList |
N4
|
java.util.LinkedList |
N4Star
Neighbours - precomputed so we don't need to calculate it every time |
int |
posx
X-position (i.e. row number) of unit in grid |
int |
posy
Y-position (i.e. column number) of unit in grid |
protected Distributions |
prob
Link to a random generator so we got one if we need it |
java.util.Vector |
rec
Link to all recovery events occuring in this unit |
int |
STmembers
Number of individuals not affected by the epidemic at time T. |
boolean |
vacc
Are animals in this unit vaccinated? |
Constructor Summary | |
Unit(int posx,
int posy,
int N,
int a,
boolean vacc)
Constructor |
Method Summary | |
void |
fetchLocalRec(Event[] globalRec,
int noOfGlobalRec)
Fetch link to all recovery events associated to this unit and once this is found compute the number of individuals from section escaping infection. |
boolean |
isNeighbour(Unit u)
Determine whether a unit is a neighbour or not. |
java.util.LinkedList |
N4()
Return the compass direction neighbours |
java.util.LinkedList |
N4Star()
Return set of all units belonging to N4Star |
Unit |
randomN4Star()
Sample a unit from N_4^*(u) uniformly |
void |
setLocalLinks(Data data,
Distributions prob)
|
java.lang.String |
toString()
Debug Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int N
public int a
public int STmembers
public int posx
public int posy
public boolean vacc
public java.util.Vector rec
public Event firstEvent
protected Data data
protected Distributions prob
public java.util.LinkedList N4Star
public java.util.LinkedList N4
Constructor Detail |
public Unit(int posx, int posy, int N, int a, boolean vacc)
posx
- x position in unit gridposy
- y position in unit gridN
- number of initial susceptible in unita
- number of initial infectives in unitvacc
- Boolean indicating whether all animals in unit are vacicnatedMethod Detail |
public void setLocalLinks(Data data, Distributions prob)
public java.lang.String toString()
public void fetchLocalRec(Event[] globalRec, int noOfGlobalRec)
public boolean isNeighbour(Unit u)
public java.util.LinkedList N4Star()
public java.util.LinkedList N4()
public Unit randomN4Star()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |