Libraryless. Click here for Pure Java version (5427L/30K).
1 | // implements BitMatrix |
2 | persistable sclass BitSetMatrix extends AbstractMatrix<Bool> { |
3 | new BitSet bs; |
4 | |
5 | *(int *w, int *h) {} |
6 | *(int *w, int *h, BitSet *bs) {} |
7 | |
8 | public Bool get(int x, int y) { ret bs.get(y*w+x); } |
9 | public void set(int x, int y, Bool a default true) { bs.set(y*w+x, a); } |
10 | } |
Began life as a copy of #1033112
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033581 |
Snippet name: | BitSetMatrix - simple BitSet-based implementation of BitMatrix |
Eternal ID of this version: | #1033581/6 |
Text MD5: | 3a92f7287ba1af267390dceea9aa040b |
Transpilation MD5: | 6dd618600caa103003b404f8bbbe394c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-12-25 17:30:39 |
Source code size: | 306 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 189 / 290 |
Version history: | 5 change(s) |
Referenced in: | [show references] |