private void generateLinksLongerThan_rPlot() throws Exception { MFilePlotData getLinksLongerThanRData = new MFilePlotData( "", "Links longer than R=" + GraphConstants.MeasurementR, "Links longer than R=" + GraphConstants.MeasurementR, "LinksLongerThanR.m", outputDirectory, null, 20); Vector<TreeMap<Double, Integer>> optimizedData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < optimized.size(); i++) { TreeMap<Double, Integer> dist = optimized.get(i).getLinksLongerThan_r(); optimizedData.add(dist); } Vector<TreeMap<Double, Integer>> exponentialData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < exponential.size(); i++) { TreeMap<Double, Integer> dist = exponential.get(i).getLinksLongerThan_r(); exponentialData.add(dist); } Vector<TreeMap<Double, Integer>> heuristicData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < heuristic.size(); i++) { TreeMap<Double, Integer> dist = heuristic.get(i).getLinksLongerThan_r(); heuristicData.add(dist); } DistWriter LinksLongerThanRPlotter = new DistWriter(getLinksLongerThanRData); LinksLongerThanRPlotter.PlotDist(optimizedData, exponentialData, heuristicData); }
private void generateBetweeness() throws Exception { MFilePlotData BetweenessData = new MFilePlotData( "", "Betweeness", "Betweeness", "Betweeness.m", outputDirectory, null, 20); Vector<TreeMap<Double, Integer>> optimizedData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < optimized.size(); i++) { TreeMap<Double, Integer> dist = optimized.get(i).getBetweeness(); optimizedData.add(dist); } Vector<TreeMap<Double, Integer>> exponentialData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < exponential.size(); i++) { System.out.println("exp iter" + i); TreeMap<Double, Integer> dist = exponential.get(i).getBetweeness(); exponentialData.add(dist); } Vector<TreeMap<Double, Integer>> heuristicData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < heuristic.size(); i++) { TreeMap<Double, Integer> dist = heuristic.get(i).getBetweeness(); heuristicData.add(dist); } DistWriter BetweenessPlotter = new DistWriter(BetweenessData); BetweenessPlotter.PlotDist(optimizedData, exponentialData, heuristicData); }
private void generateISPL() throws Exception { MFilePlotData ISPLData = new MFilePlotData("", "ISPL", "ISPL", "ISPL.m", outputDirectory, null, 20); Vector<TreeMap<Double, Integer>> optimizedData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < optimized.size(); i++) { TreeMap<Double, Integer> dist = optimized.get(i).getDistributionISPL(); optimizedData.add(dist); } Vector<TreeMap<Double, Integer>> exponentialData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < exponential.size(); i++) { TreeMap<Double, Integer> dist = exponential.get(i).getDistributionISPL(); exponentialData.add(dist); } Vector<TreeMap<Double, Integer>> heuristicData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < heuristic.size(); i++) { TreeMap<Double, Integer> dist = heuristic.get(i).getDistributionISPL(); heuristicData.add(dist); } DistWriter ISPLPlotter = new DistWriter(ISPLData); ISPLPlotter.PlotDist(optimizedData, exponentialData, heuristicData); }
private void generateNodeMaximumEdgeCost() throws Exception { MFilePlotData NodeMaximumEdgeData = new MFilePlotData( "", "Node Maximum Edge Cost", "Node Maximum Edge Cost", "NodeMaximumEdgeCost.m", outputDirectory, null, 20); Vector<TreeMap<Double, Integer>> optimizedData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < optimized.size(); i++) { TreeMap<Double, Integer> dist = optimized.get(i).getNodeMaximumEdgeCost(); optimizedData.add(dist); } Vector<TreeMap<Double, Integer>> exponentialData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < exponential.size(); i++) { TreeMap<Double, Integer> dist = exponential.get(i).getNodeMaximumEdgeCost(); exponentialData.add(dist); } Vector<TreeMap<Double, Integer>> heuristicData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < heuristic.size(); i++) { TreeMap<Double, Integer> dist = heuristic.get(i).getNodeMaximumEdgeCost(); heuristicData.add(dist); } DistWriter NodeMaximumEdgePlotter = new DistWriter(NodeMaximumEdgeData); NodeMaximumEdgePlotter.PlotDist(optimizedData, exponentialData, heuristicData); }
private void generateMeanDegreeOfConnectedNeighbors() throws Exception { MFilePlotData NodeTotalEdgeCostData = new MFilePlotData( "", "Mean Degree Of Connected Neighbors", "Mean Degree Of Connected Neighbors", "MeanDegreeOfConnectedNeighbors.m", outputDirectory, null, 20); Vector<TreeMap<Double, Integer>> optimizedData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < optimized.size(); i++) { TreeMap<Double, Integer> dist = optimized.get(i).getMeanDegreeOfConnectedNeighbors(); optimizedData.add(dist); } Vector<TreeMap<Double, Integer>> exponentialData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < exponential.size(); i++) { TreeMap<Double, Integer> dist = exponential.get(i).getMeanDegreeOfConnectedNeighbors(); exponentialData.add(dist); } Vector<TreeMap<Double, Integer>> heuristicData = new Vector<TreeMap<Double, Integer>>(); for (int i = 0; i < heuristic.size(); i++) { TreeMap<Double, Integer> dist = heuristic.get(i).getMeanDegreeOfConnectedNeighbors(); heuristicData.add(dist); } DistWriter NodeTotalEdgeLengthPlotter = new DistWriter(NodeTotalEdgeCostData); NodeTotalEdgeLengthPlotter.PlotDist(optimizedData, exponentialData, heuristicData); }
private void generateLinkLengthsH() throws Exception { MFilePlotData NodeDistributionData = new MFilePlotData( "", "Node Degree Distribution", "Node Degree Distribution", "DistLinkLengths.m", outputDirectory, null, 20); Vector<Vector<TreeMap<Double, Integer>>> data = new Vector<Vector<TreeMap<Double, Integer>>>(); for (int i = 0; i < 1; // networks.size(); i++) { Vector<TreeMap<Double, Integer>> curNetworkData = new Vector<TreeMap<Double, Integer>>(); Vector<CalculatedGraph> networkSeries = networks.get(i); for (int j = 0; j < networkSeries.size(); j++) { TreeMap<Double, Integer> dist = networkSeries.get(j).getDistributionLinkLengths(); curNetworkData.add(dist); } data.add(curNetworkData); } for (int i = 3; i < 4; i++) { Vector<TreeMap<Double, Integer>> curNetworkData = new Vector<TreeMap<Double, Integer>>(); Vector<CalculatedGraph> networkSeries = networks.get(i); for (int j = 0; j < networkSeries.size(); j++) { TreeMap<Double, Integer> dist = networkSeries.get(j).getDistributionLinkLengths(); curNetworkData.add(dist); } data.add(curNetworkData); } DistWriter NodeDistributionPlotter = new DistWriter(NodeDistributionData); NodeDistributionPlotter.PlotDist(data); }