Libraryless. Click here for Pure Java version (1832L/12K).
1 | svoid extendStreaksInBitSet(BitSet bs, int pre, int post, int n) { |
2 | for (IntRange r : bitSetStreaks(bs)) { |
3 | bs.set(max(r.start-pre, 0), r.start, true); |
4 | bs.set(r.end, min(r.end+post, n), true); |
5 | } |
6 | } |
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: | 204 / 287 |
Referenced in: | [show references] |