public void reSize(){
    maximum=2*maximum;
    //construct new vars
    Location[] locations1 = new Location[maximum];
    for (int i=0; i < maximum; i++) {
      locations1[i]=new Location(null);
    }
    boolean[][] adjacent1 = new boolean[maximum][maximum];
    double[][] weight1 = new double[maximum][maximum]; 
    //copy the values of locations
    for(int i=0;i<current;i++){
      locations1[i].setName(locations[i].getName());
      locations1[i].setPoint(locations[i].getPoint());
      locations1[i].setID(locations[i].getID());
    }
    //copy the values of adjacent and weight
    for(int i=0;i<current;i++){
      for(int j=0;j<current;j++){
        adjacent1[i][j]= adjacent[i][j];
        weight1[i][j]= weight[i][j];
      }
    }
    //set the vars to the new ones
    locations=locations1;
    adjacent=adjacent1;
    weight=weight1;
  }