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

8
LINES

< > BotCompany Repo | #1028925 // ai_testRuleOfThreeGivingFirst

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

Libraryless. Click here for Pure Java version (3545L/22K).

1  
// db contains multiple lines of logic rules, first rule is used to
2  
// feed, rest to test
3  
svoid ai_testRuleOfThreeGivingFirst(IF2<S> f, S db, O... _) {
4  
  optPar bool dontTestFirst;
5  
  L<BasicLogicRule<S>> l = parseLogicRules_tlft(db);
6  
  for (BasicLogicRule<S> r : dontTestFirst ? dropFirst(l) : l)
7  
    testFunctionValueIC(f, first(tlft(db)), r.lhs, r.rhs);
8  
}

Author comment

Began life as a copy of #1028924

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028925
Snippet name: ai_testRuleOfThreeGivingFirst
Eternal ID of this version: #1028925/5
Text MD5: 8abb47cec09e038125ec47daffb02a24
Transpilation MD5: 05dc17257424b18334c6980335e617f4
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-12 13:08:13
Source code size: 364 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 202 / 278
Version history: 4 change(s)
Referenced in: [show references]