An Algorithm for an Approximate Inverse of Large Sparse Matrices