@Override public boolean restore(final int branch) { final Boolean restorePruned = restorePruned(branch); if (Boolean.FALSE.equals(restorePruned)) return restorePruned; boolean restored = Boolean.TRUE.equals(restorePruned); restored |= super.restore(branch); if (_clashed) checkClash(); return restored; }
@Override public boolean restore(final int branch) { final Boolean restorePruned = restorePruned(branch); if (Boolean.FALSE.equals(restorePruned)) return restorePruned; boolean restored = Boolean.TRUE.equals(restorePruned); restored |= super.restore(branch); if (_clashed) checkClash(); return restored; }
private void restoreLocal(final Individual ind, final int branch, final Map<Node, Boolean> visited) { final boolean restored = ind.restore(branch); visited.put(ind, restored); if (restored) { for (final Edge edge : ind.getOutEdges()) { final Node succ = edge.getTo(); if (visited.containsKey(succ)) continue; if (succ.isLiteral()) { visited.put(succ, Boolean.FALSE); succ.restore(branch); } else restoreLocal((Individual) succ, branch, visited); } for (final Edge edge : ind.getInEdges()) { final Individual pred = edge.getFrom(); if (visited.containsKey(pred)) continue; restoreLocal(pred, branch, visited); } } }
private void restoreLocal(final Individual ind, final int branch, final Map<Node, Boolean> visited) { final boolean restored = ind.restore(branch); visited.put(ind, restored); if (restored) { for (final Edge edge : ind.getOutEdges()) { final Node succ = edge.getTo(); if (visited.containsKey(succ)) continue; if (succ.isLiteral()) { visited.put(succ, Boolean.FALSE); succ.restore(branch); } else restoreLocal((Individual) succ, branch, visited); } for (final Edge edge : ind.getInEdges()) { final Individual pred = edge.getFrom(); if (visited.containsKey(pred)) continue; restoreLocal(pred, branch, visited); } } }
node.restore(br.getBranchIndexInABox());
node.restore(br.getBranchIndexInABox());
restored |= super.restore(branch);
restored |= super.restore(branch);
node.restore(getBranchIndexInABox());
node.restore(getBranchIndexInABox());