scalarDivide method

Matrix scalarDivide(
  1. double x
)

Divide the matrix by a scalar

  • x The scalar to divide by
  • Returns The new matrix

Implementation

Matrix scalarDivide(double x) {
  Matrix matrixB = Matrix(_row, _col);
  matrixB.fill(1 / x);
  return hadamardProduct(matrixB);
}