Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1020586 // bitSetToIntList

JavaX fragment (include)

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;
}

Author comment

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: 209 / 234
Version history: 2 change(s)
Referenced in: [show references]