Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerng committed Mar 4, 2019
1 parent 81cfe46 commit 46f438d
Show file tree
Hide file tree
Showing 3 changed files with 353 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ public String getQuickAllianceReport() {
return quickReport;
}

/**
* @return
*/
private double calculateStdDevEndgamePoints() {

final int[] climbPointValues = new int[]{3, 6, 12};
Expand All @@ -535,6 +538,11 @@ private double calculateStdDevEndgamePoints() {
return endgameVariance;
}

/**
*
* @param simulationRawValues
* @return
*/
private double calculateStdDevTeleOpPoints(ArrayList<ArrayList<HashMap<String, Double>>> simulationRawValues) {

ArrayList<String> metricNames = new ArrayList<>();
Expand Down Expand Up @@ -582,7 +590,11 @@ private double calculateStdDevTeleOpPoints(ArrayList<ArrayList<HashMap<String, D
return standardDeviations.get("telePoints");
}

public void calculateMonteCarloExpectedValues(ArrayList<HashMap<String, Double>> testSets) {
/**
*
* @param testSets
*/
private void calculateMonteCarloExpectedValues(ArrayList<HashMap<String, Double>> testSets) {
String[][] metricSets = new String[][]{TeamReport.autoMetricNames, TeamReport.teleMetricNames,
TeamReport.overallMetricNames};

Expand All @@ -600,7 +612,12 @@ public void calculateMonteCarloExpectedValues(ArrayList<HashMap<String, Double>>

}

public double calculateRocketRpChance(ArrayList<ArrayList<HashMap<String, Double>>> simulationRawValues) {
/**
*
* @param simulationRawValues
* @return
*/
private double calculateRocketRpChance(ArrayList<ArrayList<HashMap<String, Double>>> simulationRawValues) {

int rocketRpAttainedCount = 0;

Expand Down Expand Up @@ -644,6 +661,11 @@ public double calculatePredictedRp(AllianceReport opposingAlliance) {
return calculateClimbRpChance() + calculateRocketRpChance(generateMonteCarloSet()) + 2 * calculateWinChance(opposingAlliance);
}

/**
*
* @param opposingAlliance
* @return
*/
public double calculateWinChance(AllianceReport opposingAlliance) {

opposingAlliance.calculateStats();
Expand All @@ -663,14 +685,28 @@ public double calculateWinChance(AllianceReport opposingAlliance) {
return winChance;
}

/**
*
* @param metric
* @return
*/
public double getPredictedValue(String metric) {
return predictedValues.get(metric);
}

/**
*
* @param metric
* @return
*/
public double getStandardDeviation(String metric) {
return standardDeviations.get(metric);
}

/**
*
* @return
*/
public double getAvgSampleSize() {
return avgSampleSize;
}
Expand Down
Loading

0 comments on commit 46f438d

Please sign in to comment.