|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cfpm.caves.za.HIVAIDS
public class HIVAIDS
This class models the HIV infection for a person. It's implemented as a separate class instead of an inner class to Person to be able to use static attributes for the transmission probabilities and distribution of disease progression.
Field Summary | |
---|---|
(package private) int |
currentStage
the current clinical stage of HIV. |
(package private) int |
developedAIDS
tick of developing AIDS. |
(package private) static double |
gamma
|
(package private) int |
infectedSince
the tick of contracting HIV. |
(package private) static double |
mu
|
(package private) static flanagan.math.PsRandom |
progressionDist
|
(package private) static double |
sigma
|
(package private) static double[] |
transmissionProbs
|
Constructor Summary | |
---|---|
HIVAIDS(int tick)
Creates a new HIV/AIDS handler at the current tick. |
|
HIVAIDS(int tick,
int stage)
Creates a new HIV/AIDS handler for the current tick and clinical stage. |
Method Summary | |
---|---|
(package private) int |
getDevelopedAIDS()
returns the tick of progression to AIDS |
(package private) int |
getInfectedSince()
returns the tick of HIV infection |
double |
getTransmissionProbability(int currentTick)
returns the probability of transmitting HIV according to the current clinical stage |
boolean |
hasAIDS()
returns if the person has progressed to AIDS or not |
boolean |
isHIVPositive()
returns if the person is HIV-positive or not |
private void |
updateStage(int currentTick)
updates the clinical stage if necessary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static flanagan.math.PsRandom progressionDist
static double mu
static double sigma
static double gamma
static final double[] transmissionProbs
int infectedSince
int developedAIDS
int currentStage
Constructor Detail |
---|
HIVAIDS(int tick)
tick
- the tick when the person contracted HIVHIVAIDS(int tick, int stage)
tick
- the tick when the person contracted HIVstage
- the clinical stage of HIVMethod Detail |
---|
int getInfectedSince()
int getDevelopedAIDS()
public boolean isHIVPositive()
public boolean hasAIDS()
private void updateStage(int currentTick)
currentTick
- the current tickpublic double getTransmissionProbability(int currentTick)
currentTick
- the current tick
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |