From 45f25bd7afca9067a7e2f4a460f43e2699f955f6 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Tue, 8 Oct 2024 18:16:27 +0200 Subject: [PATCH] add note about potentially using LLL-reduction in `nigglibasis` one day --- Bravais/src/niggli.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Bravais/src/niggli.jl b/Bravais/src/niggli.jl index cf116fee..937f7600 100644 --- a/Bravais/src/niggli.jl +++ b/Bravais/src/niggli.jl @@ -74,6 +74,14 @@ function nigglibasis( # tolerance D = 3 # algorithm assumes 3D setting (TODO: extend to 2D?) ϵ = rtol * abs(volume(Rs))^(1/D) + + # NB: it would make sense in principle to start by doing a conventional lattice + # reduction step here, e.g., `lll` from LLLplus.jl, to make sure we have a good + # "starting point" for the algorithm; this would mean we'd need to do fewer of the + # iterations below, especially for very skewed input. But LLLplus.jl is not very + # fast - usually slower than `nigglibasis` itself, so don't do it for now. + # Rs_lll = lll(stack(Rs))[1] # LLL-reduced basis + # Rs = DirectBasis(eachcol(Rs)) # initialization A, B, C, ξ, η, ζ = niggli_parameters(Rs)