New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement short vector enumeration #15758
Comments
Branch: u/mraum/ticket/15758 |
Commit: |
comment:2
I know it's not needs_review, but you cannot yet rely on C++11. With GCC 4.6.3:
Last 10 new commits:
|
comment:3
On my system, the following changes were needed to make this compile: diff --git a/src/module_list.py b/src/module_list.py
index e3a6ea9..c567ee6 100755
--- a/src/module_list.py
+++ b/src/module_list.py
@@ -1475,9 +1475,9 @@ ext_modules = [
depends = ['sage/quadratic_forms/enumerate_short_vectors/enumerate_short_vectors_boost_python.hpp',
'sage/quadratic_forms/enumerate_short_vectors/enumerate_short_vectors.hpp'],
language = 'c++',
- extra_compile_args=['-std=c++11'],
+ extra_compile_args=["-std=c++0x"],
include_dirs = [SAGE_INC, SAGE_INC + '/python2.7', 'sage/c_libs/include'],
- libraries = ['stdc++', 'boost_python', 'mpfi', 'mpfr', 'gmp']),
+ libraries = ['stdc++', 'boost_python-2.7', 'mpfi', 'mpfr', 'gmp']),
Extension('sage.quadratic_forms.quadratic_form__evaluate',
sources = ['sage/quadratic_forms/quadratic_form__evaluate.pyx']), I don't know if everybody will be happy that the compiler now needs to support |
comment:5
According to the changelog of fpLLL, a "short lattice vector enumeration algorithm" appeared in version 3.0 of fpLLL, which is a standard spkg of Sage. Why not interfacing with this implementation ? |
comment:6
Honestly, before I implemented this (quite some time ago), I didn't find the short vector implementation in fpLLL's documentation. And I still don't. It's a pity for my code, but I'm definitely in favor of wrapping the missing parts of fpLLL instead of my code. Clearly, fpLLL is a much more advanced implementation than I could implement. Does anybody know how to invoke enumeration? It seems that topenum.h contains a class for this, but I can't figure out, what kind of date Enumerator.subTree contains. |
comment:7
See #15976 for an interface to fpLLL's shortest vector implementation. |
comment:10
As far as I know, the fpLLL library only deals with sublattices of Meanwhile, here is a bug report with the QuadraticForm class in this context, since it does not pass the optional flag=2 to pari's qfminim function when the Gram matrix is real:
|
QuadraticForm(...).short_vector_list_up_to_length(...) currently uses PARI, which provides an incorrect implementation (see #13531). Here is a correct one, which is also faster. For comparison, here are the timings before and after
As a big bonus (at least to me), we have a version that doesn't come with conversion to vectors:
This depends on boost::python, which hopefully will be integrated soon. Until then, note that you have to have boost_python library installed (we have the headers already).
CC: @sagetrac-akoutsianas
Component: quadratic forms
Author: Martin Raum
Branch/Commit: u/mraum/ticket/15758 @
5ba169f
Issue created by migration from https://trac.sagemath.org/ticket/15758
The text was updated successfully, but these errors were encountered: