src/demo/TSP.java
void addCities(ArrayList<Integer> newDrawCities, ArrayList<Integer> newPreviousDrawCities, ArrayList<Integer> newShortestDrawCities) {
            drawCities.clear();
            drawCities.addAll(newDrawCities);
            if (newPreviousDrawCities != null) {
                previousDrawCities.clear();
                previousDrawCities.addAll(newPreviousDrawCities);
                previousExists = true;
            }
            else previousExists = false;
            if (newShortestDrawCities != null) {
                shortestDrawCities.clear();
                shortestDrawCities.addAll(newShortestDrawCities);
            }
        }
/**
         * Add cities in order to be drawn.
         *
         * @param newDrawCities list of cities to be drawn.
         */
Add cities in order to be drawn.
@param newDrawCities list of cities to be drawn.
Add cities in order to be drawn . @param newDrawCities list of cities to be drawn .
void addCities(ArrayList<Integer> newDrawCities, ArrayList<Integer> newPreviousDrawCities, ArrayList<Integer> newShortestDrawCities) {
            drawCities.clear();
            drawCities.addAll(newDrawCities);
            if (newPreviousDrawCities != null) {
                previousDrawCities.clear();
                previousDrawCities.addAll(newPreviousDrawCities);
                previousExists = true;
            }
            else previousExists = false;
            if (newShortestDrawCities != null) {
                shortestDrawCities.clear();
                shortestDrawCities.addAll(newShortestDrawCities);
            }
        }
void addCities ( ArrayList < Integer > newDrawCities , ArrayList < Integer > newPreviousDrawCities , ArrayList < Integer > newShortestDrawCities ) { drawCities . clear ( ) ; drawCities . addAll ( newDrawCities ) ; if ( newPreviousDrawCities != null ) { previousDrawCities . clear ( ) ; previousDrawCities . addAll ( newPreviousDrawCities ) ; previousExists = true ; } else previousExists = false ; if ( newShortestDrawCities != null ) { shortestDrawCities . clear ( ) ; shortestDrawCities . addAll ( newShortestDrawCities ) ; } }
Add cities in order to be drawn.
Add cities in order to be drawn .