Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1022550 // gazelle_sortBeforeCommit

JavaX fragment (include)

svoid gazelle_sortBeforeCommit(L<GazelleTree> l, O... _) {
  bool debug = boolPar debugSorting(_);
  sort(l, new Comparator<GazelleTree> {
    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;
    }
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022550
Snippet name: gazelle_sortBeforeCommit
Eternal ID of this version: #1022550/5
Text MD5: b530d7127ad1e904f4dea17401b25e94
Author: stefan
Category: javax / gazelle
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-21 10:09:14
Source code size: 557 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 226 / 264
Version history: 4 change(s)
Referenced in: [show references]