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

23
LINES

< > BotCompany Repo | #1010979 // chatHistory_peepHole_nodePairs

JavaX fragment (include)

static L<Pair<WebNode>> chatHistory_peepHole_nodePairs() {
  ILister lister = persistentListerReadOnly(chatTheoryModule());
  L<S> msgs = lister.getList('globalIDList);
  Map<S, Web> webs = lister.getHashMap('theoryForLineMap);
  //print("Have " + n(countNotNull(msgs), "msg") + ", " + n(webs, "web"));

  new L<Pair<WebNode>> nodePairs;
  
  for (int i = 1; i+1 < l(msgs); i++) {
    S id1 = msgs.get(i), id2 = msgs.get(i+1);
    if (id1 == null || id2 == null) continue;
    Web a = webs.get(id1);
    Web b = webs.get(id2);
    if (a == null || b == null) {
      print("Missing webs at " + i);
      continue;
    }
    //print("Have " + web_firstNode(a));
    nodePairs.add(pair(web_firstNode(a), web_firstNode(b)));
  }
  
  ret nodePairs;
}

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: #1010979
Snippet name: chatHistory_peepHole_nodePairs
Eternal ID of this version: #1010979/1
Text MD5: 05f3150132fc33690bea4d567048597c
Author: stefan
Category: javax / chat / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 01:13:00
Source code size: 769 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 436 / 475
Referenced in: [show references]