Libraryless. Click here for Pure Java version (2686L/17K).
static <A> S renderUniquenessRatio(Cl<A> entries) { if (empty(entries)) ret "no data"; int total = l(entries), unique = countUniques(entries); ret "Uniqueness ratio: " + formatDouble(doubleRatio(total, unique), 1) + spaceRoundBracket(joinWithComma( n2(total, "total entry", "total entries"), n2(unique, "unique entry", "unique entries"))); }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030215 |
| Snippet name: | renderUniquenessRatio |
| Eternal ID of this version: | #1030215/4 |
| Text MD5: | fa2a6f1eb6e2d4840dc1699a0720f73a |
| Transpilation MD5: | bd0f2c1e179353d5fb10f88781012aad |
| 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:25:49 |
| Source code size: | 370 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 467 / 611 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |