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

6
LINES

< > BotCompany Repo | #1030218 // repetitionPercentage

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2559L/16K).

static <A> double repetitionPercentage(Cl<A> entries) {
  if (empty(entries)) ret 0;
  int total = l(entries), unique = countUniques(entries);
  int repeated = total-unique;
  ret doublePercentRatio(repeated, total);
}

Author comment

Began life as a copy of #1030217

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030218
Snippet name: repetitionPercentage
Eternal ID of this version: #1030218/1
Text MD5: fdefc718eb13493bf81b3097b4aa3de1
Transpilation MD5: d1e952cc2053fc10a4367da51f18e9c9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-17 11:42:38
Source code size: 223 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 117 / 164
Referenced in: [show references]