Coverage for src\pqlattice\linalg\__init__.py: 88%

8 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2026-01-11 23:45 +0100

1from .. import settings 

2from ..typing import Matrix, SquareMatrix 

3from ._linalg import cofactor, cofactor_matrix, det, left_kernel, left_nullity, minor, rank, right_kernel, right_nullity 

4from ._modint import mod_left_kernel, mod_left_nullity, mod_matinv, mod_ref, mod_right_kernel, mod_right_nullity, mod_rref 

5from ._utils import norm, norm2, per_row_norm, per_row_norm2, row_add, row_scale, row_swap 

6 

7 

8def hnf(matrix: SquareMatrix) -> tuple[Matrix, SquareMatrix]: 

9 return settings.get_backend().hnf(matrix) 

10 

11 

12__all__ = [ 

13 "hnf", 

14 "det", 

15 "left_kernel", 

16 "right_kernel", 

17 "left_nullity", 

18 "right_nullity", 

19 "rank", 

20 "minor", 

21 "cofactor", 

22 "cofactor_matrix", 

23 "norm", 

24 "norm2", 

25 "per_row_norm", 

26 "per_row_norm2", 

27 "row_add", 

28 "row_scale", 

29 "row_swap", 

30 "mod_ref", 

31 "mod_rref", 

32 "mod_right_kernel", 

33 "mod_left_kernel", 

34 "mod_left_nullity", 

35 "mod_right_nullity", 

36 "mod_matinv", 

37]