Ignore:
Timestamp:
2013-08-21T03:47:16+02:00 (11 years ago)
Author:
donvip
Message:

[josm_plugins] fix #8987 - bump min JOSM version of nearly all plugins to r6162 + code update/cleanup, fix warnings

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  
    11package org.openstreetmap.josm.plugins.JunctionChecker.connectedness;
    22
    3 import java.util.ArrayList;
    43import java.util.Vector;
     4
    55import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.Channel;
    66import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.ChannelDiGraph;
     
    4545                        }
    4646                }
    47                 int counter = 0;
    4847                Channel tempChannel;
    4948                LeadsTo tempLeadsTo;
     
    7372                                newID++;
    7473                                digraph.addChannel(tempChannel);
    75                                 counter++;
    7674                        }
    7775                }
     
    103101                                newID++;
    104102                                digraph.addChannel(tempChannel);
    105                                 counter++;
    106103                        }
    107104                }
     
    125122         */
    126123        private void deleteDuplicateChannels() {
    127                 ArrayList<Integer> pointer = new ArrayList<Integer>();
    128124
    129125                for (int i = 0; i < digraph.getChannels().size(); i++) {
     
    136132                                }
    137133                        }
    138 
    139134                }
    140135        }
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/PseudoChannelRemover.java

    r25501 r29854  
    1313
    1414        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>();
    1716        private Channel succChannel;
    18         private String s;
    1917        private Channel tempToChannel;
    2018        private LeadsTo tempLeadsTo;
     
    2725                succChannel = tempchannel.getLeadsTo().get(0).getToChannel();
    2826                tempchannel.setToNode(succChannel.getToNode());
    29                 s = "";
    3027                //log.trace("---Folgender Channel ist überflüssig: " + succChannel.getNewid() + "---");
    3128                //log.trace("... und wird durch diesen ersetzt: " + tempchannel.getNewid());
     
    5754                digraph.removeChannel(succChannel);
    5855                //pseudochannels.add(tempchannel.getSuccChannels().get(0));
    59                 c++;
    6056        }
    6157
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java

    r25501 r29854  
    2020        private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<OSMRelation>();
    2121        private final ChannelDiGraph channelDigraph;
    22         private final boolean isInturnrestriction;
    2322        private int relationpointer;
    2423        private LeadsTo tempLeadsTo;
     
    3534                }
    3635                this.channelDigraph = channelDigraph;
    37                 this.isInturnrestriction = false;
    3836        }
    3937
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java

    r25501 r29854  
    6464                }
    6565               
    66                 public Class getType() {
     66                public Class<? extends OSMEntity> getType() {
    6767                        return member.getClass();
    6868                }
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/BackPropagation.java

    r25501 r29854  
    1111public class BackPropagation {
    1212
    13         private Channel y;
    14         private Channel z;
    1513        private final ChannelDiGraph digraph;
    1614
     
    2523         */
    2624        public void backPropagation(Channel y, Channel z, Channel zstrich) {
    27                 this.y = y;
    28                 this.z = z;
    2925                for (int i = 0; i < z.getReachableNodes().size(); i++) {
    3026                        y.addReachableNode(z.getReachableNodeAt(i));
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java

    r25501 r29854  
    3030        private long EEovern = 0;
    3131        private final HashSet<Channel> subgraph = new HashSet<Channel>();//The candidate subgraph to be tested
    32         private double durchlauf = 1;
    3332        private ProgressMonitor pm;
    3433        private final boolean pmenabled;
    35         private final ArrayList<Integer> anzahlchannels = new ArrayList<Integer>();
    3634        private final ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
    3735        private final boolean searchFirstJunction;
     
    8583
    8684                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);
    8886                long ans = c.Choose(); //This is the number of subcolumns to be generated
    8987                int[][] v; // this is a column variable containing n y-index entries plus true false values (0/1)
     
    135133                ArrayList<int[]> CandidateK = new ArrayList<int[]>(n*n); //saves the candidate K_{n-1} in entry-exit pairs
    136134                long lindex= 0;
    137                 int countk = 0;
    138135                int h = 0;
    139136                int m = 0;
     
    188185                                        }
    189186                                        if (missing <=1 && smallerjunction == true){//The k-subgrid is a different junction candidate satisfying total reachability
    190                                                 countk++;
    191187                                                CheckMinimal = CheckSmallJunction(CandidateK)==false;// If the candidate is a smaller junction, then minimality is false
    192                                                 durchlauf++;
    193188                                                //log.info("durchlauf: " + durchlauf + " Wert von CheckMinimal: " + CheckMinimal);
    194189                                                if (!CheckMinimal) {
Note: See TracChangeset for help on using the changeset viewer.