# permaviss.gauss_mod_p.gauss_mod_p¶

gauss_mod_p.py

This module implements Gaussian elimination by columns modulo a prime number p.

Functions

 `gauss_barcodes`(A, row_barcode, col_barcode, …) This function implements the Gaussian elimination by columns, but specialized for columns and rows with arbitrary finite barcodes. `gauss_col`(A, p) This function implements the Gaussian elimination by columns. `gauss_col_rad`(A, R, start_index, p) This function implements the Gaussian elimination by columns, but specialized for columns with birth radius. `index_pivot`(vect) Returns the pivot of a 1D array
`permaviss.gauss_mod_p.gauss_mod_p.``gauss_barcodes`(A, row_barcode, col_barcode, start_index, p)[source]

This function implements the Gaussian elimination by columns, but specialized for columns and rows with arbitrary finite barcodes.

It reduces columns starting from start_index by the previous ones. Returns the combinations that lead to those columns. For each column to reduce, performs gaussian elimination on corresponding submatrix.

ROW AND COLUMN BARCODES HAVE TO BE ORDERED, OTHERWISE THERE WILL BE PROBLEMS, ALMOST SURELY.

Parameters: A (`Numpy Array`) – Matrix to be reduced row_R (`Numpy Array`) – Vector with radius of rows col_R (`Numpy Array`) – Vector with radius of columns start_index (int) – Index at which reduction starts p (int(prime)) – Prime number. The corresponding field will be Z mod p. coefficients – Matrix recording additions performed, so that we obtain the lifts and coefficients. `Numpy Array` ValueError – If reduced columns do not vanish.
`permaviss.gauss_mod_p.gauss_mod_p.``gauss_col`(A, p)[source]

This function implements the Gaussian elimination by columns.

A is reduced by left to right column additions. The reduced matrix has unique column pivots.

Parameters: A (`Numpy Array`) – Matrix to be reduced p (int(prime)) – Prime number. The corresponding field will be Z mod p. R (`Numpy Array`) – Reduced matrix by left to right column additions. T (`Numpy Array`) – Matrix recording additions performed, so that AT = R
`permaviss.gauss_mod_p.gauss_mod_p.``gauss_col_rad`(A, R, start_index, p)[source]

This function implements the Gaussian elimination by columns, but specialized for columns with birth radius.

A is reduced by left to right column additions starting from start_index. Only columns from a lower index are added to columns with a higher index.

Parameters: A (`Numpy Array`) – Matrix to be reduced R (`Numpy Array`) – Vector with radius start_index (int) – Index at which reduction starts p (int(prime)) – Prime number. The corresponding field will be Z mod p. T – Matrix recording additions performed, so that we obtain the lifts and coefficients. `Numpy Array` ValueError – If reduced columns do not vanish.
`permaviss.gauss_mod_p.gauss_mod_p.``index_pivot`(vect)[source]

Returns the pivot of a 1D array

Parameters: vect (`list(int)`) – List of integers to compute pivot from. Index of last nonzero entry on vect. Returns -1 if the list is zero. int