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

19
LINES

< > BotCompany Repo | #1024051 // ai_powerWordsExpand

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Compilation Failed (2641L/17K).

1  
static Collection<S> ai_powerWordsExpand(ParsedPowerWords ppw, Collection<S> words) {
2  
  if (ppw == null) null;
3  
  Set<S> seen = cloneCISet(words);
4  
  new LS out;
5  
  LPair<LS> equations = ai_parsedPowerWordEquations(ppw);
6  
  while licensed {
7  
    bool change = false;
8  
    fOr (Pair<LS> eq : equations) {
9  
      if (containsAll(seen, eq.a))
10  
        for (S s : eq.b)
11  
          if (seen.add(s)) {
12  
            out.add(s);
13  
            set change;
14  
          }
15  
    }
16  
    if (!change) break;
17  
  }
18  
  ret out;
19  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024051
Snippet name: ai_powerWordsExpand
Eternal ID of this version: #1024051/10
Text MD5: 92bc4b06bdcd211bd0ce2a6cb939962a
Transpilation MD5: 07da5bae010898ee860a25af46e3c876
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-18 16:49:19
Source code size: 511 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 194 / 296
Version history: 9 change(s)
Referenced in: [show references]