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

19
LINES

< > BotCompany Repo | #1009963 // calToWeb

JavaX fragment (include)

static Web calToWeb(CirclesAndLines cal) {
  new Web web;
  web.globalID = cal.globalID;
  web_useCLParse(web, false);
  web.title = cal.title;
  web.created = cal.created;
  new HashMap<Circle, WebNode> map;
  for (Circle c : cal.circles) {
    WebNode node = web.newNode(c.text);
    copyFields(c, node, 'x, 'y);
    node.visInfo(c.quickvis);
    map.put(c, node);
  }
  for (Line l : cal.lines) {
    WebNode rel = web.getRelation(assertNotNull(map.get(l.a)), assertNotNull(map.get(l.b)));
    rel.addLabel(l.text);
  }
  ret web;
}

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: #1009963
Snippet name: calToWeb
Eternal ID of this version: #1009963/10
Text MD5: 7b0d705340ab1dc8c59f3ec866f5fa68
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-27 17:46:33
Source code size: 553 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 513 / 538
Version history: 9 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1010340 - calToWeb_vis