1 | static long ai_hasTriple_vary_worstCase; |
2 | |
3 | static bool ai_hasTriple_vary(S a, S b, S c) {
|
4 | // TODO: optimize! |
5 | L<S> x = ai_variationsOf(a); |
6 | L<S> y = ai_variationsOf(b); |
7 | L<S> z = ai_variationsOf(c); |
8 | int n = l(x)*l(y)*l(z); |
9 | ai_hasTriple_vary_worstCase = max(ai_hasTriple_vary_worstCase, n); |
10 | |
11 | for (S xx : x) for (S yy : y) for (S zz : z) |
12 | if (ai_hasTriple(xx, yy, zz)) true; |
13 | false; |
14 | } |
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: | 653 / 685 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |