UNPKG

ml-matrix

Version:

Matrix manipulation and computation library

17 lines (13 loc) 407 B
import BaseView from './base'; export default class MatrixFlipColumnView extends BaseView { constructor(matrix) { super(matrix, matrix.rows, matrix.columns); } set(rowIndex, columnIndex, value) { this.matrix.set(rowIndex, this.columns - columnIndex - 1, value); return this; } get(rowIndex, columnIndex) { return this.matrix.get(rowIndex, this.columns - columnIndex - 1); } }