Changeset 34659 in osm for applications/editors/josm/plugins
- Timestamp:
- 2018-09-15T14:36:13+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java
r34525 r34659 131 131 measuredTime = 0; 132 132 jcf = 0; 133 //System.out.println("maxchannel: " + i);134 133 for (int j = 0; j < runs; j++) { 135 //System.out.println("run: " +j);136 134 subset.clear(); 137 135 do { 138 136 seed = cdgb.getDigraph() 139 137 .getChannelAtPosition( 140 (int) ((cdgb.getDigraph().getChannels() 141 .size()) * Math.random())); 138 (int) (cdgb.getDigraph().getChannels().size() * Math.random())); 142 139 } 143 140 while (!seed.isStrongConnected()); 144 141 subset.add(seed); 145 //System.out.println("Seed: " + seed.getNewid());146 142 vorChannel = seed; 147 143 for (int k = 0; k < i - 1; k++) { … … 151 147 if (!subset.contains(tempChannel)) { 152 148 subset.add(tempChannel); 153 //System.out.println("zugefügt: " + tempChannel.getNewid());154 149 seed = tempChannel; 155 150 isIn = true; … … 163 158 jc.junctionSearch(subset); 164 159 measuredTime += (System.currentTimeMillis() - start); 165 //System.out.println("jc beendet");166 160 measuredIterateThroughTime += jc.getMeasuredIterateTime(); 167 161 measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime(); 168 162 jcf = jcf + jc.getJunctions().size(); 169 163 } 170 System.out.println("Channels: " + (i)+164 System.out.println("Channels: " + i + 171 165 " Time(Iterate): " + (measuredIterateThroughTime/runs) + 172 166 " Time(Generate): " + (measuredGenerateSubColumnTime/runs) + -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java
r32596 r34659 171 171 172 172 protected String valuestoString() { 173 return ("ID: " + (id)+ "\n" + "User: " + user + "\n");173 return ("ID: " + id + "\n" + "User: " + user + "\n"); 174 174 } 175 175 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java
r32596 r34659 163 163 int missing = 0; 164 164 boolean smallerjunction = false; 165 for (int k = 0; k < ans; k++) { //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise 165 //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise 166 for (int k = 0; k < ans; k++) { 166 167 for (int y = 0; y < n; y++) { //Iterates over all rows of subgrid k 167 168 missing = 0; //test = ""; 168 169 for (int x = 0; x < c.data.length; x++) { //Iterates over all columns of subgrid k 169 170 x_i = ((Integer) L.get((int) (lindex-m+c.data[x])).get(0)); //columnindex in grid 170 v = ((int[][]) (L.get((int) (lindex-m+c.data[x])).get(2))); //subcolumn of grid171 v = ((int[][]) L.get((int) (lindex-m+c.data[x])).get(2)); //subcolumn of grid 171 172 y_j = v[y][0]; //rowindex in grid 172 173 if (v[y][1] == 0) { … … 175 176 CandidateK.add(new int[]{y_j, x_i}); 176 177 } //save entry/exit tuple 177 if (!smallerjunction && ( (!OrEn.contains(E.get(v[y][0])))178 && (!OrEx.contains(E.get(x_i))))) { // Tests, whether y or x is not an original entry/exit178 if (!smallerjunction && (!OrEn.contains(E.get(v[y][0])) 179 && !OrEx.contains(E.get(x_i)))) { // Tests, whether y or x is not an original entry/exit 179 180 smallerjunction = true; //Then k identifies a different junction than the original one 180 181 } -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java
r33121 r34659 147 147 for (int y = 0; y < E.size(); y++) { 148 148 for (int x = 0; x < E.size(); x++) { 149 if (x != y && ! (entries.contains(E.get(x)))150 && ! (exits.contains(E.get(y)))149 if (x != y && !entries.contains(E.get(x)) 150 && !exits.contains(E.get(y)) 151 151 && E.get(y).getReachableNodes().contains(E.get(x))) { 152 152 Grid[y][x] = 1; 153 //log.trace("Grid-Position auf 1 gesetzT (y/x): " + y + ":"154 // + x + "(Entry/exit):" + E.get(y).getNewid() + ":" +155 // E.get(x).getNewid());156 153 } else { 157 154 Grid[y][x] = 0; -
applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java
r34107 r34659 37 37 Channel c = cit.next(); 38 38 // System.out.println(c.getWay().getId()); 39 if (! (ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c40 .getWay().getId(), OsmPrimitiveType.WAY))) ){39 if (!ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c 40 .getWay().getId(), OsmPrimitiveType.WAY))) { 41 41 ways.add(plugin.getOsmlayer().data.getPrimitiveById(c.getWay() 42 42 .getId(), OsmPrimitiveType.WAY));
Note:
See TracChangeset
for help on using the changeset viewer.