Skip to content

Commit a0fe6af

Browse files
committed
色々追加
1 parent 9a88295 commit a0fe6af

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

PythonLatticeLibrary/PythonLatticeLibrary.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
# PLL(Python Lattice Library)
2+
# Python Lattice Library
33
4-
PLM(official name: Python Lattice Module) is a module for lattices.
4+
Python Lattice Library is a module for lattices.
55
66
Provides
77
- lattices and operations on lattices
@@ -160,7 +160,7 @@ def orthogonality_defect(self) -> float:
160160

161161

162162
def size(self) -> np.ndarray:
163-
"""Size-reduction(algorithm is from M. Yasuda and Y. Aoki).
163+
"""Size-reduction(algorithm is from M. Yasuda and Y. Aoki(2019)).
164164
165165
Returns:
166166
np.ndarray: Size-reduced lattice basis matrix.
@@ -175,7 +175,7 @@ def size(self) -> np.ndarray:
175175

176176

177177
def Gauss(self) -> np.ndarray:
178-
"""Gauss reduction
178+
"""Gauss reduction(algorith is from J.-L. Lagrange(1773)).
179179
180180
Returns:
181181
np.ndarray: Gauss reduced lattice basis matrix.
@@ -294,7 +294,7 @@ def DEEP(self, delta: float = 0.99) -> np.ndarray:
294294

295295

296296
def PotLLL(self, delta: float = 0.99) -> np.ndarray:
297-
"""Potential-LLL-reduces the lattice basis matrix.
297+
"""Potential-LLL-reduces the lattice basis matrix(algorithm is from F. Fontein, M. Schneider and U. Wagner(2013)).
298298
299299
Args:
300300
delta (float, optional): Reduction parameter. Defaults to 0.99.
@@ -326,7 +326,7 @@ def PotLLL(self, delta: float = 0.99) -> np.ndarray:
326326

327327

328328
def DualDeepLLL(self, delta : float = 0.99) -> np.ndarray:
329-
"""Dual Deep-LLL-reduction.
329+
"""Dual Deep-LLL-reduction(algorithm is from M. Yasuda, J. Yamaguchi and M. Ooka(2018)).
330330
331331
Args:
332332
delta (float, optional): Reduction parameter. Defaults to 0.99.
@@ -429,24 +429,6 @@ def SVP(self) -> np.ndarray:
429429
return self.ENUM_SVP()
430430

431431

432-
def project_basis(self, k: int, l: int) -> np.ndarray:
433-
"""Computes a projected lattice basis matrix.
434-
435-
Args:
436-
k (int): _description_
437-
l (int): _description_
438-
439-
Returns:
440-
np.ndarray: Projected basis.
441-
"""
442-
self.basis_star, self.mu = self.GSO()
443-
pi_b = np.zeros((l - k + 1, self.ncols))
444-
for i in range(k, l + 1):
445-
for j in range(k, self.nrows):
446-
pi_b[i - k] += np.dot(self.basis[i], self.basis_star[j]) / np.dot(self.basis_star[j], self.basis_star[j]) * np.copy(self.basis_star[j])
447-
return pi_b
448-
449-
450432
def Babai(self, w: np.ndarray):
451433
"""Computes an approximate solution of CVP for target w using Babai's nearest plane algorithm(algorithm is from L. Babai(1986)).
452434

0 commit comments

Comments
 (0)