pop.model
Class Results

java.lang.Object
  |
  +--pop.model.Results

public class Results
extends java.lang.Object

Stores all of the results from the model, and provides access to the results of each year for which the model has been run, plus the final populations. Note: expects to be created and controlled by ModelManager.

See Also:
ModelManager

Constructor Summary
Results()
          Unavailable.
Results(Constants c)
          Only useable constructor.
 
Method Summary
 int[][] births(int year)
          Returns 2-dimensional array of births for the specified year.
 int[] births(int year, int category)
          Returns array of births for the specified year and population category (with females in the first row, males second row).
 Constants constants()
          Returns constants associated with this model.
 int[][][] deaths(int year)
          Returns 3-dimensional array of deaths for the specified year.
 int[][] deaths(int year, int category)
          Returns 2-dimensional array of deaths for the specified year and population category.
 PopulationSizes[] final_population()
          Returns the array of final population sizes; elements of array correspond to population categories.
 Migration[] migration(int year)
          Returns array of migrations for the specified year; elements of array correspond to population category.
 PopulationSizes[] population(int year)
          Returns array of population sizes for the specified year; elements of array correspond to population category.
 void store(int year, Population[] p, Migration[] m)
          Stores results for the specified year.
 void store(Population[] p)
          Stores final population results.
 int[] total_births(int year)
          Returns array of total births for a year.
 int[] total_deaths(int year)
          Returns array of total deaths for a year.
 int[] total_final_population()
          Returns array of total final populations; elements of array correspond to population categories.
 int[] total_migration(int year)
          Returns array of total migration for the specified year; elements of array correpond to population categories;
 int[] total_population(int year)
          Returns array of total populations for the indicated year; elements of array correspond to population categories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Results

public Results(Constants c)
Only useable constructor.
Parameters:
c - Constants applying to the current model.
p - Array of Populations, assumed to have just been initialized by the ModelManager; used to acquire the initial population sizes.

Results

public Results()
Unavailable.
Method Detail

store

public void store(int year,
                  Population[] p,
                  Migration[] m)
Stores results for the specified year.

store

public void store(Population[] p)
Stores final population results.

population

public PopulationSizes[] population(int year)
Returns array of population sizes for the specified year; elements of array correspond to population category.

total_population

public int[] total_population(int year)
Returns array of total populations for the indicated year; elements of array correspond to population categories.

final_population

public PopulationSizes[] final_population()
Returns the array of final population sizes; elements of array correspond to population categories.

total_final_population

public int[] total_final_population()
Returns array of total final populations; elements of array correspond to population categories.

total_births

public int[] total_births(int year)
Returns array of total births for a year. Elements of array correspond to the various population categories.

births

public int[] births(int year,
                    int category)
Returns array of births for the specified year and population category (with females in the first row, males second row).

births

public int[][] births(int year)
Returns 2-dimensional array of births for the specified year. First dimension of array is population category; second dimension is sex (with females in the first row, males second row).

total_deaths

public int[] total_deaths(int year)
Returns array of total deaths for a year. Elements of array correspond to the various population categories.

deaths

public int[][] deaths(int year,
                      int category)
Returns 2-dimensional array of deaths for the specified year and population category. First dimension of array is sex (with females in the first row, males second row) and second dimension is age.

deaths

public int[][][] deaths(int year)
Returns 3-dimensional array of deaths for the specified year. First dimension of array is population category; second dimension is sex (with females in the first row, males second row) and third dimension is age.

migration

public Migration[] migration(int year)
Returns array of migrations for the specified year; elements of array correspond to population category.

total_migration

public int[] total_migration(int year)
Returns array of total migration for the specified year; elements of array correpond to population categories;

constants

public Constants constants()
Returns constants associated with this model.