Changeset 29854 in osm for applications/editors/josm/plugins/junctionchecking/src/org
- Timestamp:
- 2013-08-21T03:47:16+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java
r25501 r29854 1 1 package org.openstreetmap.josm.plugins.JunctionChecker.connectedness; 2 2 3 import java.util.ArrayList;4 3 import java.util.Vector; 4 5 5 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.Channel; 6 6 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.ChannelDiGraph; … … 45 45 } 46 46 } 47 int counter = 0;48 47 Channel tempChannel; 49 48 LeadsTo tempLeadsTo; … … 73 72 newID++; 74 73 digraph.addChannel(tempChannel); 75 counter++;76 74 } 77 75 } … … 103 101 newID++; 104 102 digraph.addChannel(tempChannel); 105 counter++;106 103 } 107 104 } … … 125 122 */ 126 123 private void deleteDuplicateChannels() { 127 ArrayList<Integer> pointer = new ArrayList<Integer>();128 124 129 125 for (int i = 0; i < digraph.getChannels().size(); i++) { … … 136 132 } 137 133 } 138 139 134 } 140 135 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/PseudoChannelRemover.java
r25501 r29854 13 13 14 14 private final ChannelDiGraph digraph; 15 private final ArrayList<Channel> pseudochannels = new ArrayList<Channel>(); 16 private int c = 0; 15 //private final ArrayList<Channel> pseudochannels = new ArrayList<Channel>(); 17 16 private Channel succChannel; 18 private String s;19 17 private Channel tempToChannel; 20 18 private LeadsTo tempLeadsTo; … … 27 25 succChannel = tempchannel.getLeadsTo().get(0).getToChannel(); 28 26 tempchannel.setToNode(succChannel.getToNode()); 29 s = "";30 27 //log.trace("---Folgender Channel ist überflüssig: " + succChannel.getNewid() + "---"); 31 28 //log.trace("... und wird durch diesen ersetzt: " + tempchannel.getNewid()); … … 57 54 digraph.removeChannel(succChannel); 58 55 //pseudochannels.add(tempchannel.getSuccChannels().get(0)); 59 c++;60 56 } 61 57 -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java
r25501 r29854 20 20 private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<OSMRelation>(); 21 21 private final ChannelDiGraph channelDigraph; 22 private final boolean isInturnrestriction;23 22 private int relationpointer; 24 23 private LeadsTo tempLeadsTo; … … 35 34 } 36 35 this.channelDigraph = channelDigraph; 37 this.isInturnrestriction = false;38 36 } 39 37 -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java
r25501 r29854 64 64 } 65 65 66 public Class getType() {66 public Class<? extends OSMEntity> getType() { 67 67 return member.getClass(); 68 68 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/BackPropagation.java
r25501 r29854 11 11 public class BackPropagation { 12 12 13 private Channel y;14 private Channel z;15 13 private final ChannelDiGraph digraph; 16 14 … … 25 23 */ 26 24 public void backPropagation(Channel y, Channel z, Channel zstrich) { 27 this.y = y;28 this.z = z;29 25 for (int i = 0; i < z.getReachableNodes().size(); i++) { 30 26 y.addReachableNode(z.getReachableNodeAt(i)); -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java
r25501 r29854 30 30 private long EEovern = 0; 31 31 private final HashSet<Channel> subgraph = new HashSet<Channel>();//The candidate subgraph to be tested 32 private double durchlauf = 1;33 32 private ProgressMonitor pm; 34 33 private final boolean pmenabled; 35 private final ArrayList<Integer> anzahlchannels = new ArrayList<Integer>();36 34 private final ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>(); 37 35 private final boolean searchFirstJunction; … … 85 83 86 84 Combination c = new Combination(Grid.length, n); 87 EEovern = (int) c.Choose(Grid.length*Grid.length, n*n);85 EEovern = (int) Combination.Choose(Grid.length*Grid.length, n*n); 88 86 long ans = c.Choose(); //This is the number of subcolumns to be generated 89 87 int[][] v; // this is a column variable containing n y-index entries plus true false values (0/1) … … 135 133 ArrayList<int[]> CandidateK = new ArrayList<int[]>(n*n); //saves the candidate K_{n-1} in entry-exit pairs 136 134 long lindex= 0; 137 int countk = 0;138 135 int h = 0; 139 136 int m = 0; … … 188 185 } 189 186 if (missing <=1 && smallerjunction == true){//The k-subgrid is a different junction candidate satisfying total reachability 190 countk++;191 187 CheckMinimal = CheckSmallJunction(CandidateK)==false;// If the candidate is a smaller junction, then minimality is false 192 durchlauf++;193 188 //log.info("durchlauf: " + durchlauf + " Wert von CheckMinimal: " + CheckMinimal); 194 189 if (!CheckMinimal) {
Note:
See TracChangeset
for help on using the changeset viewer.