|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.ohiou.cs456_badabing.sceneapi.exec.data_model.DataBaseModel
public class DataBaseModel
Contains Harvest data that is read from Excel file.
Description: Contains harvest information on all counties and years that are loaded from Excel file.
Copyright: Copyright (c) 2008, Lev A Neiman
Company: Ohio University EECS
| Field Summary | |
|---|---|
java.util.TreeMap<java.lang.String,CountyInfo> |
counties
map of county name as string to CountyInfo object for that county. |
private double |
max_harvest
what is the biggest single harvest from all years, and counties? |
private int |
max_year
what is the biggest year ( most recent ). |
private double |
min_harvest
what is the smallest single harvest from all years and counties? |
private int |
min_year
what is the smallest year ( most old ). |
java.util.ArrayList<DeerTuple> |
tuples
All the tuples contained in an array. |
| Constructor Summary | |
|---|---|
DataBaseModel()
|
|
| Method Summary | |
|---|---|
void |
addTuple(DeerTuple new_tuple)
add a new Deer tuple to the database. |
double |
getMaxHarvest()
Get max harvest out of all years and counties. |
int |
getMaxYear()
what is the most recent year. |
double |
getMinHarvest()
get min harvest out of all years and counties. |
int |
getMinYear()
what is the oldest year. |
static DeerTuple |
newYearPreHuntPopulation(DeerTuple post_birth_population,
PredictionData parameters)
apply summer mortality rate from post birth population to arrive at new year's pre hunt population. |
static DeerTuple |
postBirthPopulation(DeerTuple pre_birth_population,
PredictionData parameters)
apply reproduction information from pre birth population to compute post birth population. |
static DeerTuple |
postHuntPopulation(DeerTuple pre_hunt_info,
PredictionData parameters)
applies harvest data to compute post hunt population |
static DeerTuple |
preBirthPopulation(DeerTuple post_hunt_population,
PredictionData parameters)
applies winter mortality rates from post hunt population to arrive at pre birth population. |
static DeerTuple |
predict(DeerTuple input,
PredictionData parameters)
return a new deer tuple that is the prediction based on input, given parameters scenario. |
static DeerTuple |
preHuntPopulation(DeerTuple input,
PredictionData parameters)
applies population expansion factors. |
static DataBaseModel |
readHarvestDataFile(java.lang.String file_name)
This function reads in Excel file into memory and returns a new instance of DataBaseModel |
java.lang.String |
toString()
out put entire contents of this database into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.util.ArrayList<DeerTuple> tuples
public java.util.TreeMap<java.lang.String,CountyInfo> counties
private int max_year
private int min_year
private double max_harvest
private double min_harvest
| Constructor Detail |
|---|
public DataBaseModel()
| Method Detail |
|---|
public double getMaxHarvest()
public double getMinHarvest()
public int getMaxYear()
public int getMinYear()
public void addTuple(DeerTuple new_tuple)
new_tuple - DeerTuplepublic java.lang.String toString()
toString in class java.lang.Object
public static DataBaseModel readHarvestDataFile(java.lang.String file_name)
throws java.lang.Exception
file_name - String - absolute path to the file.
java.lang.Exception
public static DeerTuple preHuntPopulation(DeerTuple input,
PredictionData parameters)
input - DeerTupleparameters - PredictionData
public static DeerTuple postHuntPopulation(DeerTuple pre_hunt_info,
PredictionData parameters)
input - DeerTupleparameters - PredictionData
public static DeerTuple preBirthPopulation(DeerTuple post_hunt_population,
PredictionData parameters)
post_hunt_population - DeerTupleparameters - PredictionData
public static DeerTuple postBirthPopulation(DeerTuple pre_birth_population,
PredictionData parameters)
pre_birth_population - DeerTupleparameters - PredictionData
public static DeerTuple newYearPreHuntPopulation(DeerTuple post_birth_population,
PredictionData parameters)
post_birth_population - DeerTupleparameters - PredictionData
public static DeerTuple predict(DeerTuple input,
PredictionData parameters)
input - DeerTupleparameters - PredictionData
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||