change "concentrations" to "populations" for consistency

This commit is contained in:
2022-02-23 08:12:48 -06:00
parent 40c2be1cfb
commit 3ccee9891b
2 changed files with 7 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ public class GraphWithMapData implements java.io.Serializable {
private String sourceFilename; private String sourceFilename;
private final SimpleWeightedGraph graph; private final SimpleWeightedGraph graph;
private Integer numWells; private Integer numWells;
private Integer[] wellConcentrations; private Integer[] wellPopulations;
private Integer alphaCount; private Integer alphaCount;
private Integer betaCount; private Integer betaCount;
private final Map<Integer, Integer> distCellsMapAlphaKey; private final Map<Integer, Integer> distCellsMapAlphaKey;
@@ -31,7 +31,7 @@ public class GraphWithMapData implements java.io.Serializable {
Map<Integer, Integer> betaWellCounts, Duration time) { Map<Integer, Integer> betaWellCounts, Duration time) {
this.graph = graph; this.graph = graph;
this.numWells = numWells; this.numWells = numWells;
this.wellConcentrations = wellConcentrations; this.wellPopulations = wellConcentrations;
this.alphaCount = alphaCount; this.alphaCount = alphaCount;
this.betaCount = betaCount; this.betaCount = betaCount;
this.distCellsMapAlphaKey = distCellsMapAlphaKey; this.distCellsMapAlphaKey = distCellsMapAlphaKey;
@@ -52,8 +52,8 @@ public class GraphWithMapData implements java.io.Serializable {
return numWells; return numWells;
} }
public Integer[] getWellConcentrations() { public Integer[] getWellPopulations() {
return wellConcentrations; return wellPopulations;
} }
public Integer getAlphaCount() { public Integer getAlphaCount() {

View File

@@ -1,4 +1,3 @@
import org.jgrapht.Graph;
import org.jgrapht.alg.interfaces.MatchingAlgorithm; import org.jgrapht.alg.interfaces.MatchingAlgorithm;
import org.jgrapht.alg.matching.MaximumWeightBipartiteMatching; import org.jgrapht.alg.matching.MaximumWeightBipartiteMatching;
import org.jgrapht.generate.SimpleWeightedBipartiteGraphMatrixGenerator; import org.jgrapht.generate.SimpleWeightedBipartiteGraphMatrixGenerator;
@@ -248,9 +247,9 @@ public class Simulator {
//rate of pairing error //rate of pairing error
double pairingErrorRate = (double) falseCount / (trueCount + falseCount); double pairingErrorRate = (double) falseCount / (trueCount + falseCount);
BigDecimal pairingErrorRateTrunc = new BigDecimal(pairingErrorRate, mc); BigDecimal pairingErrorRateTrunc = new BigDecimal(pairingErrorRate, mc);
//get list of well concentrations //get list of well populations
Integer[] wellPopulations = data.getWellConcentrations(); Integer[] wellPopulations = data.getWellPopulations();
//make string out of concentrations list //make string out of populations list
StringBuilder populationsStringBuilder = new StringBuilder(); StringBuilder populationsStringBuilder = new StringBuilder();
populationsStringBuilder.append(wellPopulations[0].toString()); populationsStringBuilder.append(wellPopulations[0].toString());
for(int i = 1; i < wellPopulations.length; i++){ for(int i = 1; i < wellPopulations.length; i++){