()
| 71261 | var _common = require("../../lib/common"); |
| 71262 | class Matrix extends (0, _mathArrayDefault.default) { |
| 71263 | toString() { |
| 71264 | let string = "["; |
| 71265 | if ((0, _common.config).printRowMajor) { |
| 71266 | string += "row-major:"; |
| 71267 | for(let row = 0; row < this.RANK; ++row)for(let col = 0; col < this.RANK; ++col)string += " ".concat(this[col * this.RANK + row]); |
| 71268 | } else { |
| 71269 | string += "column-major:"; |
| 71270 | for(let i = 0; i < this.ELEMENTS; ++i)string += " ".concat(this[i]); |
| 71271 | } |
| 71272 | string += "]"; |
| 71273 | return string; |
| 71274 | } |
| 71275 | getElementIndex(row, col) { |
| 71276 | return col * this.RANK + row; |
| 71277 | } |
no outgoing calls
no test coverage detected