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

15
LINES

< > BotCompany Repo | #1032423 // distanceToProbability - synonym of genericDistanceToProbability

JavaX fragment (include)

// properties:
// -yields a proper probability (0 < p <= 1)
// -distance 0 has probability 1
// -function is monotonically decreasing
//    (greater distance = lower probability)
// -negative distances are interpreted as positive
static double distanceToProbability(double distance) {
  ret genericDistanceToProbability(distance);
}



static double distanceToProbability(double a, double b) {
  ret genericDistanceToProbability(a, b);
}

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