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

21
LINES

< > BotCompany Repo | #1011336 // ai_cache_hasTriple

JavaX fragment (include)

1  
sbool ai_cache_hasTriple_debug;
2  
3  
static bool ai_cache_hasTriple(S a, S b, S c) {
4  
  if (a == null || b == null || c == null) false;
5  
  
6  
  if (ai_useThoughtSpaces())
7  
    ret thoughtSpace().hasTriple(symbol(a), symbol(b), symbol(c));
8  
  
9  
  AI_CacheChecker checker = ai_cacheChecker();
10  
  if (checker != null && checker.hasTriple(symbol(a), symbol(b), symbol(c))) true;
11  
12  
  L<Web> webs = ai_fewestIndexedWebs(a, b, c);
13  
  bool x = webs_search_noVar_bool(webFromTriple(a, b, c), webs);
14  
  if (ai_cache_hasTriple_debug)
15  
    print("hasTriple: " + sfuLL(a, b, c, x) + ", searched " + nWebs(webs));
16  
  ret x;
17  
}
18  
19  
static bool ai_cache_hasTriple(T3<S> t) {
20  
  ret ai_cache_hasTriple(t.a, t.b, t.c);
21  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011336
Snippet name: ai_cache_hasTriple
Eternal ID of this version: #1011336/12
Text MD5: 2489a54734725d59f19ef87b38865575
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-13 23:30:23
Source code size: 700 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 563 / 597
Version history: 11 change(s)
Referenced in: [show references]