Libraryless. Click here for Pure Java version (1832L/12K).
svoid extendStreaksInBitSet(BitSet bs, int pre, int post, int n) { for (IntRange r : bitSetStreaks(bs)) { bs.set(max(r.start-pre, 0), r.start, true); bs.set(r.end, min(r.end+post, n), true); } }
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: | #1024615 |
Snippet name: | extendStreaksInBitSet |
Eternal ID of this version: | #1024615/1 |
Text MD5: | 29c3fe2852e94e9ec7a8730daad06f8a |
Transpilation MD5: | 250b761dc0330a9a33f055ff0cc4fc06 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-20 13:22:20 |
Source code size: | 211 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 205 / 287 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |