org.cfpm.caves.za
Class SouthAfricaModel.WHOLifeTable

java.lang.Object
  extended by org.cfpm.caves.za.SouthAfricaModel.WHOLifeTable
Enclosing class:
SouthAfricaModel

 class SouthAfricaModel.WHOLifeTable
extends java.lang.Object

This class represents a life table as produced by the WHO. See: http://www.who.int/whosis/database/life_tables/life_tables.cfm Only the column nqx (probability to die within the current age range) is needed. The class is used to determine deaths of agents in the model.

Author:
Ruth

Field Summary
(package private)  int[] ageIntervals
           
(package private)  double[] deathProbabilities
           
 
Constructor Summary
SouthAfricaModel.WHOLifeTable(int[] ageIntervals, double[] deathProbabilities)
           
 
Method Summary
 int findAgeInterval(int age)
          returns the age interval into which the given age falls.
 int getAgeIntervalSize(int age)
          returns the size of the age interval into which the given age falls
 double getDeathProbability(int age)
          returns the death probability for the given age
 boolean isLowerBound(int age)
          returns true if the given age is the lower bound of an age range, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ageIntervals

int[] ageIntervals

deathProbabilities

double[] deathProbabilities
Constructor Detail

SouthAfricaModel.WHOLifeTable

public SouthAfricaModel.WHOLifeTable(int[] ageIntervals,
                                     double[] deathProbabilities)
Method Detail

getDeathProbability

public double getDeathProbability(int age)
returns the death probability for the given age


getAgeIntervalSize

public int getAgeIntervalSize(int age)
returns the size of the age interval into which the given age falls


isLowerBound

public boolean isLowerBound(int age)
returns true if the given age is the lower bound of an age range, false otherwise.


findAgeInterval

public int findAgeInterval(int age)
returns the age interval into which the given age falls.