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

18
LINES

< > BotCompany Repo | #1032045 // URecognizerRun

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

Libraryless. Click here for Pure Java version (5845L/33K).

srecord noeq URecognizerRun<A>(IIIRecognizer<A> recognizer, IIntegralImage img) implements IF0<A> {
  int maxResults = 10;
  
  new ProbabilisticScheduler ps;
  new L<WithProbability<A>> results;
  bool hasRun;
  
  selfType run() {
    set hasRun;
    psCollect(ps, results, maxResults, out -> recognizer.run(ps, img, out));
    this;
  }
  
  public A get() {
    if (!hasRun) run();
    ret getVar(first(results));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032045
Snippet name: URecognizerRun
Eternal ID of this version: #1032045/3
Text MD5: 0c34f3ecad06c76703df59f289a82bd1
Transpilation MD5: f8675c4050765386c1652cc815e9f8f8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-11 05:53:26
Source code size: 440 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 182 / 312
Version history: 2 change(s)
Referenced in: [show references]