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

14
LINES

< > BotCompany Repo | #1011649 // ai_hasTriple_vary - vary each node to see if stuff is found

JavaX fragment (include)

static long ai_hasTriple_vary_worstCase;

static bool ai_hasTriple_vary(S a, S b, S c) {
  // TODO: optimize!
  L<S> x = ai_variationsOf(a);
  L<S> y = ai_variationsOf(b);
  L<S> z = ai_variationsOf(c);
  int n = l(x)*l(y)*l(z);
  ai_hasTriple_vary_worstCase = max(ai_hasTriple_vary_worstCase, n);
  
  for (S xx : x) for (S yy : y) for (S zz : z)
    if (ai_hasTriple(xx, yy, zz)) true;
  false;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011649
Snippet name: ai_hasTriple_vary - vary each node to see if stuff is found
Eternal ID of this version: #1011649/2
Text MD5: 75b1fc144d548b2b90276800f4dc8140
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-02 00:45:45
Source code size: 411 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 435 / 454
Version history: 1 change(s)
Referenced in: [show references]