assignment = oldAssignment;
setAssignment(oldAssignment);
    private final boolean perturbConfiguration(double T) {        // the cost of the new layout and the old layout        double e_new, e_old = placementCost(false);        //the old assignment        HashMap oldAssignment = (HashMap)assignment.clone();        // find 2 suitable nodes to swap        while (true) {            swapAssignment();            //get the new placement codes            e_new = placementCost(false);            if (e_new < 0.0) {                // illegal tile assignment so revert the assignment                assignment = oldAssignment;                continue;            } else                // found a successful new layout                break;        }        double P = 1.0;        double R = random.nextDouble();        if (e_new >= e_old)            P = Math.exp((((double) e_old) - ((double) e_new)) / T);        if (R < P) {            return true;        } else {            //don't accept the new state,            //revert..            assignment = oldAssignment;            return false;        }    }