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

16
LINES

< > BotCompany Repo | #1010459 // web_clusterClean - modifies web

JavaX fragment (include)

1  
static Web web_clusterClean(Web web) {
2  
  ret web_clusterClean(web, clustersForWeb(web));
3  
}
4  
  
5  
static Web web_clusterClean(Web web, Clusters<S> clusters) {
6  
  if (empty(clusters)) ret web;
7  
  for (WebNode node : web_nodesAndRelations(web)) {
8  
    new L<Lisp> labels;
9  
    for (Lisp l : node.labels) {
10  
      S s = first(clusters.get(web.unparseLabel(l)));
11  
      setAdd(labels, s != null ? web.parseLabel(s) : l);
12  
    }
13  
    web_setLabels(node, labels);
14  
  }
15  
  ret web;
16  
}

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: #1010459
Snippet name: web_clusterClean - modifies web
Eternal ID of this version: #1010459/3
Text MD5: d5705aa9c221c35f5e41f502869b3af1
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-18 02:43:35
Source code size: 477 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 460 / 489
Version history: 2 change(s)
Referenced in: [show references]