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

8
LINES

< > BotCompany Repo | #1030215 - renderUniquenessRatio

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

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   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

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: 36 / 64
Version history: 3 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1030215 & http://1030215.tinybrain.de