Function Utils::isZero(const arma::mat&, double)

Function Documentation

bool Utils::isZero(const arma::mat &M, double tol = 1e-6) noexcept

Checks if a matrix is a zero matrix.

Parameters
  • M – The input matrix

  • tol – A numerical tolerance

Returns

True if all elements are zero