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)

1  
static L<Pair<WebNode>> chatHistory_peepHole_nodePairs() {
2  
  ILister lister = persistentListerReadOnly(chatTheoryModule());
3  
  L<S> msgs = lister.getList('globalIDList);
4  
  Map<S, Web> webs = lister.getHashMap('theoryForLineMap);
5  
  //print("Have " + n(countNotNull(msgs), "msg") + ", " + n(webs, "web"));
6  
7  
  new L<Pair<WebNode>> nodePairs;
8  
  
9  
  for (int i = 1; i+1 < l(msgs); i++) {
10  
    S id1 = msgs.get(i), id2 = msgs.get(i+1);
11  
    if (id1 == null || id2 == null) continue;
12  
    Web a = webs.get(id1);
13  
    Web b = webs.get(id2);
14  
    if (a == null || b == null) {
15  
      print("Missing webs at " + i);
16  
      continue;
17  
    }
18  
    //print("Have " + web_firstNode(a));
19  
    nodePairs.add(pair(web_firstNode(a), web_firstNode(b)));
20  
  }
21  
  
22  
  ret nodePairs;
23  
}

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: 438 / 479
Referenced in: [show references]