Uses 652K of libraries. Click here for Pure Java version (52L/1K).
1 | !include once #1035331 // EJML Include (Matrix library) |
2 | |
3 | static double[][] ejmlMatrixToArray(DMatrixRMaj matrix) { |
4 | int w = matrix.getNumCols(), h = matrix.getNumRows(); |
5 | double[][] array = new double[h][w]; |
6 | |
7 | for y to h: |
8 | for x to w: |
9 | array[y][x] = matrix.get(y, x); |
10 | |
11 | ret array; |
12 | } |
Began life as a copy of #1035324
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035364 |
Snippet name: | ejmlMatrixToArray |
Eternal ID of this version: | #1035364/2 |
Text MD5: | 9479ff3aaf20e67d4b9969d99c963edb |
Transpilation MD5: | 0490baac779b0e502e506aff4a44da6f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-02 13:07:59 |
Source code size: | 307 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 132 / 182 |
Version history: | 1 change(s) |
Referenced in: | [show references] |