1 | // properties: |
2 | // -yields a proper probability (0 < p <= 1) |
3 | // -distance 0 has probability 1 |
4 | // -function is monotonically decreasing |
5 | // (greater distance = lower probability) |
6 | // -negative distances are interpreted as positive |
7 | static double distanceToProbability(double distance) { |
8 | ret genericDistanceToProbability(distance); |
9 | } |
10 | |
11 | |
12 | |
13 | static double distanceToProbability(double a, double b) { |
14 | ret genericDistanceToProbability(a, b); |
15 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032423 |
Snippet name: | distanceToProbability - synonym of genericDistanceToProbability |
Eternal ID of this version: | #1032423/4 |
Text MD5: | 9ddd5bc91301c023919ef3f7bb25f928 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-30 17:05:56 |
Source code size: | 451 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 219 / 271 |
Version history: | 3 change(s) |
Referenced in: | [show references] |