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

12
LINES

< > BotCompany Repo | #1010397 // webFromTriples

JavaX fragment (include)

static Web webFromTriples(Symbol... l) {
  Web web = simpleWeb();
  for (int i = 0; i < l(l); i += 3) {
    S a = unnull(asString(get(l, i))), b = unnull(asString(get(l, i+1))), c = unnull(asString(get(l, i+2)));
    web_addRelation(web, a, c, b);
  }
  ret web;
}

static Web webFromTriples(L<Symbol> l) {
  ret webFromTriples(toSymbolArray(l));
}

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: #1010397
Snippet name: webFromTriples
Eternal ID of this version: #1010397/6
Text MD5: 70286139d822e91eaced2f030a5eadd7
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-10 07:43:07
Source code size: 359 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 480 / 513
Version history: 5 change(s)
Referenced in: [show references]