static L<Int> bitSetToIntList(BitSet bs) { if (bs == null) null; L<Int> l = emptyList(bitCount(bs)); for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1)) l.add(i); ret l; }
Began life as a copy of #1006139
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020586 |
Snippet name: | bitSetToIntList |
Eternal ID of this version: | #1020586/3 |
Text MD5: | 225a5097383ddb913584d14df75f5b8f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-27 17:35:57 |
Source code size: | 200 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 282 / 308 |
Version history: | 2 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1020587 - bitSetToByteList - list contains indices of set bits #1029072 - bitSetToIntArray - int array receives the indices of set bits |