Libraryless. Click here for Pure Java version (2559L/16K).
1 | static <A> double repetitionPercentage(Cl<A> entries) { |
2 | if (empty(entries)) ret 0; |
3 | int total = l(entries), unique = countUniques(entries); |
4 | int repeated = total-unique; |
5 | ret doublePercentRatio(repeated, total); |
6 | } |
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: | 190 / 261 |
Referenced in: | [show references] |