ml-matrix
Version:
Matrix manipulation and computation library
17 lines (13 loc) • 368 B
JavaScript
import BaseView from './base';
export default class MatrixTransposeView extends BaseView {
constructor(matrix) {
super(matrix, matrix.columns, matrix.rows);
}
set(rowIndex, columnIndex, value) {
this.matrix.set(columnIndex, rowIndex, value);
return this;
}
get(rowIndex, columnIndex) {
return this.matrix.get(columnIndex, rowIndex);
}
}