svoid gazelle_sortBeforeCommit(L l, O... _) { bool debug = boolPar debugSorting(_); sort(l, new Comparator { public int compare(GazelleTree a, GazelleTree b) { if (debug) print("sorting: " + a.line + " / " + b.line); int c = ai_goodBadToInt(b.prediction) - ai_goodBadToInt(a.prediction); if (debug) print(" " + c); if (c != 0) ret c; c = gazelle_historyLevelRequired(b.rule()) - gazelle_historyLevelRequired(a.rule()); if (debug) print(" " + c); ret c; } }); }