Libraryless. Click here for Pure Java version (3450L/21K).
static L<Int> lineComp_replacePairWithUpdatingPairCount(IContentsIndexedList2<Int> l, Int pa, Int pb, Int y, LineComp_PairCounts pairCounts) { int i = 0; while (true) { i = indexOfIntPairInContentsIndexedList(l, pa, pb, i); if (i < 0) break; int to = i+2, to_new = i+1; pairCounts.removeAll(overlappingIntPairs(subList(l, i-1, to+1))); l.set(i, y); l.remove(i+1); pairCounts.addAll(overlappingIntPairs(subList(l, i-1, to_new+1))); i = to_new; } ret l; }
Began life as a copy of #1028216
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: | #1028240 |
| Snippet name: | lineComp_replacePairWithUpdatingPairCount |
| Eternal ID of this version: | #1028240/3 |
| Text MD5: | ac090e2631bc90dce6461dc3cc1cb6d5 |
| Transpilation MD5: | 0b1fac0483d6d9f43a981994889b13fd |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-27 21:50:42 |
| Source code size: | 514 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 356 / 478 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |