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