public class SSIZController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static SSIZAnalysisModel |
analysisModel |
private static java.util.ArrayList<AnalysisResultsModel> |
analysisResults |
private static int |
EVENT_RECORDED |
private static org.slf4j.Logger |
log |
private static int |
NO_DATA |
private static int |
RECORDING_BUT_NO_EVENT |
(package private) static double[] |
stdDevMultiplier |
Constructor and Description |
---|
SSIZController() |
Modifier and Type | Method and Description |
---|---|
static void |
doPreRunSetup(SSIZAnalysisModel model)
Run basic sanity checks on file.
|
static java.util.ArrayList<AnalysisResultsModel> |
getAnalysisResults()
TODO
|
static java.lang.Double |
getCenturyMultiplier(SSIZAnalysisModel model,
SegmentModel segment)
TODO
|
static java.lang.Integer[] |
getFiresByYear(SSIZAnalysisModel model,
java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> pool,
SegmentModel segment)
Return an int[] containing the count of fires in each year.
|
private static java.util.ArrayList<java.lang.Integer> |
getIntegerArrayOfFirstYears(SSIZAnalysisModel model)
Converts the int[] of first years to an ArrayList
|
private static java.util.ArrayList<java.lang.Integer> |
getIntegerArrayOfLastYears(SSIZAnalysisModel model)
Converts the int[] of last years to an ArrayList
|
private static java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> |
performResamplingWithoutReplacement(int numSamplesToChoose,
SSIZAnalysisModel model)
Resample (without replacement) the event data from within the model so that it is of size numSamplesToChoose.
|
private static java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> |
performResamplingWithReplacement(int numSamplesToChoose,
SSIZAnalysisModel model)
Resample (with replacement) the event data from within the model so that it is of size numSamplesToChoose.
|
private static void |
recalculateFirstAndLastYears(SSIZAnalysisModel model,
java.util.ArrayList<java.lang.Integer> indexesOfRemovedSeries)
Recalculate the first and last years of the series pool.
|
static void |
restrictAnalysisToCommonYears(SSIZAnalysisModel model)
Restricts the series pool to contain only the years shared between all series.
|
static void |
restrictAnalysisToSeriesWithEvents(SSIZAnalysisModel model)
Restricts the series pool to contain only series that have recorded at least one event.
|
static void |
runSampleSizeAnalysisLoopIteration(SSIZAnalysisModel model,
java.lang.Double centuryMultiplier,
int currentIteration,
SegmentModel segment)
Runs an iteration of the sample size analysis loop.
|
void |
setAnalysisModel(SSIZAnalysisModel model)
Sets the analysisModel equal to the input SSIZAnalysisModel.
|
private static final org.slf4j.Logger log
private static final int NO_DATA
private static final int RECORDING_BUT_NO_EVENT
private static final int EVENT_RECORDED
static double[] stdDevMultiplier
private static SSIZAnalysisModel analysisModel
private static java.util.ArrayList<AnalysisResultsModel> analysisResults
public void setAnalysisModel(SSIZAnalysisModel model)
model
- public static java.lang.Integer[] getFiresByYear(SSIZAnalysisModel model, java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> pool, SegmentModel segment)
pool
- public static void doPreRunSetup(SSIZAnalysisModel model) throws java.lang.Exception
model
- java.lang.Exception
public static java.lang.Double getCenturyMultiplier(SSIZAnalysisModel model, SegmentModel segment) throws java.lang.Exception
model
- java.lang.Exception
public static void runSampleSizeAnalysisLoopIteration(SSIZAnalysisModel model, java.lang.Double centuryMultiplier, int currentIteration, SegmentModel segment) throws java.lang.Exception
java.lang.Exception
public static java.util.ArrayList<AnalysisResultsModel> getAnalysisResults()
public static void restrictAnalysisToCommonYears(SSIZAnalysisModel model)
public static void restrictAnalysisToSeriesWithEvents(SSIZAnalysisModel model)
private static void recalculateFirstAndLastYears(SSIZAnalysisModel model, java.util.ArrayList<java.lang.Integer> indexesOfRemovedSeries)
model
- indexesOfRemovedSeries
- private static java.util.ArrayList<java.lang.Integer> getIntegerArrayOfFirstYears(SSIZAnalysisModel model)
model
- private static java.util.ArrayList<java.lang.Integer> getIntegerArrayOfLastYears(SSIZAnalysisModel model)
model
- private static java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> performResamplingWithReplacement(int numSamplesToChoose, SSIZAnalysisModel model)
numSamplesToChoose
- model
- private static java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> performResamplingWithoutReplacement(int numSamplesToChoose, SSIZAnalysisModel model)
numSamplesToChoose
- model
-