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

12
LINES

< > BotCompany Repo | #1010981 // webFromTriples2

JavaX fragment (include)

// takes S or L<S>
// doesn't reuse nodes so far
static Web webFromTriples2(O... l) {
  Web web = simpleWeb();
  for (int i = 0; i < l(l); i += 3) {
    WebNode a = web.newNode(), b = web.newNode();
    web_addLabels(a, get(l, i));
    web_addLabels(b, get(l, i+2));
    web_addLabels(web_getRelation(a, b), get(l, i+1));
  }
  ret web;
}

Author comment

Began life as a copy of #1010397

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: #1010981
Snippet name: webFromTriples2
Eternal ID of this version: #1010981/2
Text MD5: 3c7f4ea7c6ea5637d8936ff3848fca62
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 01:32:49
Source code size: 349 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 407 / 427
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)