Let M
be a sparse $n\times m$ integral matrix, where $nm$ is very large. The goal is to compute its invariant factors. The naïve approach Diagonal[SmithDecomposition[M][[2]]]
is presumably not ideal, as it is computing more information than what I acctually need. Is there a better approach?
Note: I only care about the non-zero factors; does this simplify the problem?