Refactoring to allow graphs from file

This commit is contained in:
2022-02-19 17:23:55 -06:00
parent cfa473c7ce
commit 568a6be3c7
8 changed files with 730 additions and 244 deletions

View File

@@ -0,0 +1,65 @@
import org.jgrapht.graph.SimpleWeightedGraph;
import java.time.Duration;
import java.util.Map;
public class GraphWithMapData {
private final SimpleWeightedGraph graph;
private final MapData maps;
private final Map<Integer, Integer> alphaWellCounts;
private final Map<Integer, Integer> betaWellCounts;
private final Duration time;
public GraphWithMapData(SimpleWeightedGraph graph, MapData maps, Map<Integer, Integer> alphaWellCounts,
Map<Integer, Integer> betaWellCounts, Duration time) {
this.graph = graph;
this.maps = maps;
this.alphaWellCounts = alphaWellCounts;
this.betaWellCounts = betaWellCounts;
this.time = time.plus(maps.getTime());
}
public SimpleWeightedGraph getGraph() {
return graph;
}
public Map<Integer, Integer> getDistCellsMapAlphaKey() {
return maps.getDistCellsMapAlphaKey();
}
public Map<Integer, Integer> getAllAlphas() {
return maps.getAllAlphas();
}
public Map<Integer, Integer> getAllBetas() {
return maps.getAllBetas();
}
public Map<Integer, Integer> getPlateVtoAMap() {
return maps.getPlateVtoAMap();
}
public Map<Integer, Integer> getPlateVtoBMap() {
return maps.getPlateVtoBMap();
}
public Map<Integer, Integer> getPlateAtoVMap() {
return maps.getPlateAtoVMap();
}
public Map<Integer, Integer> getPlateBtoVMap() {
return maps.getPlateBtoVMap();
}
public Map<Integer, Integer> getAlphaWellCounts() {
return alphaWellCounts;
}
public Map<Integer, Integer> getBetaWellCounts() {
return betaWellCounts;
}
public Duration getTime() {
return time;
}
}