Libraryless. Click here for Pure Java version (2309L/14K).
1 | static <A> Pair<A, Double> searchForMostSimilarByteArrayInMultiMap(MultiMap<A, byte[]> mm, byte[] a) { |
2 | new Lowest<A> lowest; |
3 | for (A key : keys(mm)) |
4 | for (byte[] b : mm.get(key)) |
5 | lowest.put(key, byteArraysTotalDiff(a, b)); |
6 | ret lowest.pair(); |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024743 |
Snippet name: | searchForMostSimilarByteArrayInMultiMap |
Eternal ID of this version: | #1024743/3 |
Text MD5: | c06d05650eb95ddcbc5d45fe1706895d |
Transpilation MD5: | 7c1b734ec21f8ec5b7f4f3f9f705ffbc |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-24 15:55:26 |
Source code size: | 263 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 196 / 270 |
Version history: | 2 change(s) |
Referenced in: | [show references] |