Subspace-preserving sparsification of matrices with minimal perturbation to the near null-space. Part II: Approximation and Implementation

This is the second of two papers to describe a matrix sparsification algorithm that takes a general real or complex matrix as input and produces a sparse output matrix of the same size. The first paper presented the original algorithm, its features, and theoretical results. Since the output of this sparsification algorithm is a matrix rather than a vector, it can be costly in memory and run-time if an implementation does not exploit the structural properties of the algorithm and the matrix. Here we show how to modify the original algorithm to increase its efficiency. This is possible by computing an approximation to the exact result. We introduce extra constraints that are automatically determined based on the input matrix. This addition reduces the number of unknown degrees of freedom but still preserves many matrix subspaces. We also describe our open-source library that implements this sparsification algorithm and has interfaces in C++, C, and MATLAB.