1
1
"""
2
- # PLL( Python Lattice Library)
2
+ # Python Lattice Library
3
3
4
- PLM(official name: Python Lattice Module) is a module for lattices.
4
+ Python Lattice Library is a module for lattices.
5
5
6
6
Provides
7
7
- lattices and operations on lattices
@@ -160,7 +160,7 @@ def orthogonality_defect(self) -> float:
160
160
161
161
162
162
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) ).
164
164
165
165
Returns:
166
166
np.ndarray: Size-reduced lattice basis matrix.
@@ -175,7 +175,7 @@ def size(self) -> np.ndarray:
175
175
176
176
177
177
def Gauss (self ) -> np .ndarray :
178
- """Gauss reduction
178
+ """Gauss reduction(algorith is from J.-L. Lagrange(1773)).
179
179
180
180
Returns:
181
181
np.ndarray: Gauss reduced lattice basis matrix.
@@ -294,7 +294,7 @@ def DEEP(self, delta: float = 0.99) -> np.ndarray:
294
294
295
295
296
296
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)) .
298
298
299
299
Args:
300
300
delta (float, optional): Reduction parameter. Defaults to 0.99.
@@ -326,7 +326,7 @@ def PotLLL(self, delta: float = 0.99) -> np.ndarray:
326
326
327
327
328
328
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)) .
330
330
331
331
Args:
332
332
delta (float, optional): Reduction parameter. Defaults to 0.99.
@@ -429,24 +429,6 @@ def SVP(self) -> np.ndarray:
429
429
return self .ENUM_SVP ()
430
430
431
431
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
-
450
432
def Babai (self , w : np .ndarray ):
451
433
"""Computes an approximate solution of CVP for target w using Babai's nearest plane algorithm(algorithm is from L. Babai(1986)).
452
434
0 commit comments