Libraryless. Click here for Pure Java version (5412L/30K).
persistable sclass ArrayMatrix<A> extends AbstractMatrix<A> { A[] data; *(int *w, int *h) { data = (A[]) new O[w*h]; } *(int *w, int *h, A[] *data) {} public A get(int x, int y) { ret data[y*w+x]; } public void set(int x, int y, A a) { data[y*w+x] = a; } }
Began life as a copy of #1033111
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033112 |
| Snippet name: | ArrayMatrix - simple array-based implementation of Matrix |
| Eternal ID of this version: | #1033112/4 |
| Text MD5: | f7d61c0e4a4cd02c4a890af958170586 |
| Transpilation MD5: | 5601cf35883c56d189dd291f601c7fd9 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-11-04 03:43:50 |
| Source code size: | 278 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 422 / 601 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |