Libraryless. Click here for Pure Java version (2867L/17K).
1 | // Search for some words in some texts and return a total score |
2 | static double scoredSearch_scoreWeighted2(Cl<Pair<S, Double>> l, LS words) {
|
3 | double score = 0; |
4 | if (l != null) for (S s, double weight : unpair l) |
5 | score += scoredSearch_score(s, words)*weight; |
6 | ret score; |
7 | } |
Began life as a copy of #1030973
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030974 |
| Snippet name: | scoredSearch_scoreWeighted2 - where each field has a weight |
| Eternal ID of this version: | #1030974/3 |
| Text MD5: | dce067dad82624ea3937bf6b6ed38d1b |
| Transpilation MD5: | f4e2f767f843108ea2d47ef58b8acdf3 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-04-17 14:07:40 |
| Source code size: | 284 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 370 / 499 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |