Skip to main content
. 2018 Jan 19;18(1):283. doi: 10.3390/s18010283
Algorithm 3: The n-LLL reduction with pivoted reflection
Set R=B and Q=Im×m
(Move the shortest vector to r1)
Find the shortest vector rs in R
Swap(ri,rs) of R
Calculate H1 for R
Set R=H1·R and Q=Q·H1
Set i = 2
While im           (Pivoted reflection and reduction process)
Find the shortest vector rsi in Ri
Swap(ri, ri+s1) of R
Set temp = i
For j = i − 1 down to 1
  Set rk = ri[rj,irj,j]round·rj                (Size reduction)
  If δ·rj,j2>btempj+1j2 and ij < n then   (Extended Lovász condition)
   Swap (rj, rtemp)                   (Swap process)
   Set temp = j
  End
End
Calculate Htemp for R
Set R=Htemp·R and Q=Q·Htemp
If i ! = temp then
  i = temp
Else
  Set i = i + 1
End
End