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

7
LINES

< > BotCompany Repo | #1006148 // appendBits - append contents of one Bits to another one

JavaX fragment (include)

1  
static void appendBits(Bits a, Bits b) {
2  
  int n = a.n;
3  
  BitSet bs = b.bs, bs2 = a.bs;
4  
  for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1))
5  
    bs2.set(n+i);
6  
  a.n += b.n;
7  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006148
Snippet name: appendBits - append contents of one Bits to another one
Eternal ID of this version: #1006148/1
Text MD5: 1055f218a27d771abbdeeea6995dbe27
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-21 16:53:35
Source code size: 192 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 539 / 543
Referenced in: [show references]