# UnitGaussianElimination¶

References: J-G. Dumas, F. Heckenbach, D. Sauders, V. Welker: Computing simplicial homology based on efficient Smith normal form algorithms. Descrition: Gaussion elimination using only 1 or -1 as pivots
pre_gauss(m) performs Gaussian eliminaton on rows of m using only 1 and -1 as pivots. Note: m is modified in place
pre_lr(m, pi, pj) is like pre_gauss, but records positions of pivots in pi and pj and returns transformation matrix. m, pi, pj are modified in place
pre_smith(m) first performs pre_gauss(m) and then drops all rows and colums of m contaning pivots.