|
| 1 | +from __future__ import annotations |
| 2 | + |
| 3 | +from collections.abc import Iterable, Iterator, Sequence |
| 4 | +from typing import overload |
| 5 | + |
| 6 | +from flint.flint_base.flint_base import flint_mat |
| 7 | +from flint.types.fmpz import fmpz |
| 8 | +from flint.types.fmpz_mat import fmpz_mat |
| 9 | +from flint.types.nmod import inmod, nmod |
| 10 | +from flint.types.nmod_poly import nmod_poly |
| 11 | + |
| 12 | +_str = str |
| 13 | + |
| 14 | +inmod_mat = nmod_mat | fmpz_mat | Sequence[Sequence[inmod]] |
| 15 | + |
| 16 | + |
| 17 | +class nmod_mat(flint_mat[nmod]): |
| 18 | + @overload |
| 19 | + def __init__(self, val: nmod_mat, /) -> None: ... |
| 20 | + @overload |
| 21 | + def __init__(self, val: fmpz_mat | Sequence[Sequence[inmod]], mod: int, /) -> None: ... |
| 22 | + @overload |
| 23 | + def __init__(self, m: int, n: int, mod: int, /) -> None: ... |
| 24 | + @overload |
| 25 | + def __init__(self, m: int, n: int, entries: Iterable[inmod], mod: int, /) -> None: ... |
| 26 | + |
| 27 | + def __bool__(self) -> bool: ... |
| 28 | + def __eq__(self, other: object, /) -> bool: ... |
| 29 | + def __ne__(self, other: object, /) -> bool: ... |
| 30 | + |
| 31 | + def nrows(self) -> int: ... |
| 32 | + def ncols(self) -> int: ... |
| 33 | + def modulus(self) -> int: ... |
| 34 | + @classmethod |
| 35 | + def randtest(cls, m: int, n: int, mod: int, /) -> nmod_mat: ... |
| 36 | + |
| 37 | + def __getitem__(self, index: tuple[int, int], /) -> nmod: ... |
| 38 | + def __setitem__(self, index: tuple[int, int], value: inmod, /) -> None: ... |
| 39 | + def __iter__(self) -> Iterator[nmod]: ... |
| 40 | + def entries(self) -> list[nmod]: ... |
| 41 | + def table(self) -> list[list[nmod]]: ... |
| 42 | + def tolist(self) -> list[list[nmod]]: ... |
| 43 | + |
| 44 | + def repr(self) -> _str: ... |
| 45 | + def __str__(self) -> _str: ... |
| 46 | + def __repr__(self) -> _str: ... |
| 47 | + |
| 48 | + def __pos__(self) -> nmod_mat: ... |
| 49 | + def __neg__(self) -> nmod_mat: ... |
| 50 | + def __add__(self, other: inmod_mat, /) -> nmod_mat: ... |
| 51 | + def __radd__(self, other: inmod_mat, /) -> nmod_mat: ... |
| 52 | + def __sub__(self, other: inmod_mat, /) -> nmod_mat: ... |
| 53 | + def __rsub__(self, other: inmod_mat, /) -> nmod_mat: ... |
| 54 | + def __mul__(self, other: inmod_mat | inmod, /) -> nmod_mat: ... |
| 55 | + def __rmul__(self, other: inmod_mat | inmod, /) -> nmod_mat: ... |
| 56 | + def __truediv__(self, other: inmod, /) -> nmod_mat: ... |
| 57 | + def __pow__(self, exponent: int, modulo: None = None, /) -> nmod_mat: ... |
| 58 | + |
| 59 | + def det(self) -> nmod: ... |
| 60 | + def inv(self) -> nmod_mat: ... |
| 61 | + def transpose(self) -> nmod_mat: ... |
| 62 | + def solve(self, other: inmod_mat, /) -> nmod_mat: ... |
| 63 | + def rref(self, inplace: bool = False, /) -> tuple[nmod_mat, int]: ... |
| 64 | + def rank(self) -> int: ... |
| 65 | + def nullspace(self) -> tuple[nmod_mat, int]: ... |
| 66 | + def charpoly(self) -> nmod_poly: ... |
| 67 | + def minpoly(self) -> nmod_poly: ... |
0 commit comments