Uses 11335K of libraries. Click here for Pure Java version (16353L/113K).
static File createSuffixTreeForLCArchive(File archiveFile, File treeFile) { print("Reading " + archiveFile); L<Int> encoding = LineCompReader(archiveFile).encoding(); int endSymbol = -2; IntBuffer buf = new(l(encoding)+1); buf.addAll(encoding); buf.add(endSymbol); encoding = null; print("Symbols: " + l(buf)); time "Make Ukkonen tree" { UkkonenIntSuffixTree uTree = new(buf.asVirtualList()); } time "Convert Ukkonen tree to managed" { IntSuffixTree_managed tree = ukkonenToIntSuffixTree_managed(uTree); } time "Save tree" { tree.saveToFile(treeFile); } ret treeFile; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029268 |
Snippet name: | createSuffixTreeForLCArchive |
Eternal ID of this version: | #1029268/9 |
Text MD5: | ab52a6b2db759eba038c35445481eac3 |
Transpilation MD5: | 754eb386cc64d5210c4dcf8813dcb31c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-29 21:21:45 |
Source code size: | 638 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 286 / 395 |
Version history: | 8 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |