diff --git a/mutable_lattice/__init__.pyi b/mutable_lattice/__init__.pyi new file mode 100644 index 0000000..27c6734 --- /dev/null +++ b/mutable_lattice/__init__.pyi @@ -0,0 +1,61 @@ +from typing import overload + +class Vector: + def __new__(cls, data: list[int], /) -> Vector: ... + def __add__(self, other: Vector, /) -> Vector: ... + def __iadd__(self, other: Vector, /) -> Vector: ... + def __sub__(self, other: Vector, /) -> Vector: ... + def __isub__(self, other: Vector, /) -> Vector: ... + def __mul__(self, other: int, /) -> Vector: ... + def __imul__(self, other: int, /) -> Vector: ... + def __neg__(self, /) -> Vector: ... + def __len__(self, /) -> int: ... + def __getitem__(self, i: int, /) -> int: ... + def __setitem__(self, i: int, v: int, /) -> None: ... + def tolist(self, /) -> list[int]: ... + def copy(self, /) -> Vector: ... + @classmethod + def zero(cls, N: int, /): ... + @overload + def shuffled_by_action(self, action: Vector, /) -> Vector: ... + @overload + def shuffled_by_action(self, action: Vector, result_length: int, /) -> Vector: ... + +class Lattice: + ambient_dimension: int + maxrank: int + rank: int + HNF_policy: int + def __new__(cls, data: list[Vector | list[int]], /, *, HNF_policy=1, maxrank=-1) -> Lattice: ... + def clear(self,) -> None: ... + def copy(self) -> Lattice: ... + def add_vector(self, v: Vector) -> None: ... + def get_basis(self) -> list[Vector]: ... + def tolist(self) -> list[list[int]]: ... + def HNFify(self) -> None: ... + def invariants(self) -> list[int]: ... + def nonzero_invariants(self) -> list[int]: ... + def is_full(self) -> bool: ... + @classmethod + def full(cls, N: int) -> Lattice: ... + def coefficients_of(self, v: Vector) -> Vector: ... + def linear_combination(self, w: Vector) -> Vector: ... + def decompose(self, keep_together: list=[]) -> tuple[list[list[int]], list[Lattice]]: ... + def __contains__(self, v: Vector, /) -> bool: ... + def __iadd__(self, other: Lattice, /) -> Lattice: ... + def __add__(self, other: Lattice, /) -> Lattice: ... + def __and__(self, other: Lattice, /) -> Lattice: ... + +def row_op(v: Vector, w: Vector, k: int, /) -> None: + ... +def generalized_row_op(v: Vector, w: Vector, a: int, b: int, c: int, d: int, /) -> None: + ... +def xgcd(a: int, b: int, /) -> tuple[int, int, int]: + ... + +def transpose(N: int, vectors: list[Vector], /) -> list[Vector]: + ... + +def relations_among(vectors: list[Vector], /) -> Lattice: + ... +