Libraryless. Click here for Pure Java version (32L/1K).
1 | static BitSet intArrayToBitSet(int[] array) {
|
2 | if (array == null) null; |
3 | int n = array.length; |
4 | new BitSet bs; |
5 | for (int i : array) bs.set(i); |
6 | ret bs; |
7 | } |
Began life as a copy of #1029066
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1029071 |
| Snippet name: | intArrayToBitSet - ints represent the positions of 1 bits |
| Eternal ID of this version: | #1029071/1 |
| Text MD5: | 28912ed476be52b5694df33ab2d3492c |
| Transpilation MD5: | 776b781ebcbb6f88fb6640f1573cbea1 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-18 23:23:40 |
| Source code size: | 164 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 423 / 543 |
| Referenced in: | [show references] |