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

8
LINES

< > BotCompany Repo | #1020579 // ai_analysisMultiMap_percentageSolved

JavaX fragment (include)

1  
static double ai_analysisMultiMap_percentageSolved(Map<O, MultiSet<S>> map) {
2  
  int correct = 0, total = 0;
3  
  for (O key, MultiSet<S> value : map) {
4  
    total += l(value);
5  
    if (value.uniqueSize() == 1) correct += l(value);
6  
  }
7  
  ret doubleRatio(correct*100, total);
8  
}

Author comment

Began life as a copy of #1020576

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: #1020579
Snippet name: ai_analysisMultiMap_percentageSolved
Eternal ID of this version: #1020579/1
Text MD5: 995eac839fd71157d3315bba8f145806
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-27 02:28:50
Source code size: 277 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 360 / 384
Referenced in: [show references]