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

7
LINES

< > BotCompany Repo | #1031382 // scorePtDistances

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

Libraryless. Click here for Pure Java version (3331L/19K).

svoid scorePtDistances(Scorer scorer, LPair<Pt> l, double maxDistanceAllowed) {
  fOr (Pair<Pt> p : l)
    if (p.a == null || p.b == null)
      scorer.addError();
    else
      scorer.add(1.0-ptDistance(p.a, p.b)/maxDistanceAllowed);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031382
Snippet name: scorePtDistances
Eternal ID of this version: #1031382/2
Text MD5: e13ed41194482a374ad2f9817939032e
Transpilation MD5: 1666a61196c0d248323b68c9077eaf6a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-07 15:20:59
Source code size: 243 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 191
Version history: 1 change(s)
Referenced in: [show references]