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

6
LINES

< > BotCompany Repo | #1036348 // multiSetAverage

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

Libraryless. Click here for Pure Java version (10095L/55K).

static <A extends Number> Average multiSetAverage(MultiSet<A> ms) {
  new Average a;
  for (key : keys(ms))
    a.add(toDouble(key), ms.get(key));
  ret a;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036348
Snippet name: multiSetAverage
Eternal ID of this version: #1036348/6
Text MD5: f2e1a1ca45bf5f372791c622599cd0e4
Transpilation MD5: a4716abfc5ffa0724773226a1c691bac
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-21 20:45:18
Source code size: 164 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 207
Version history: 5 change(s)
Referenced in: [show references]