Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions mutable_lattice/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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:
...