Function Utils::clearMatrix

Function Documentation

arma::sp_mat Utils::clearMatrix(const arma::sp_mat &A, double tol = 1e-6, double percent = 1 - 1e-6)

Given an arma::sp_mat A, returns the same matrix where the entries within a relative and absolute tolerance tol percent are set to zero A The armadillo sparse matrix tol The absolute tolerance percent The relative tolerance.

Returns

The new refactored matrix