Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/sage/modules/free_module_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,25 @@ def shortest_vector(self, update_reduced_basis=True, algorithm='fplll', *args, *
r"""
Return a shortest vector.

.. NOTE::

This method attempts to find an **exact** solution to the
Shortest Vector Problem (SVP) for both algorithms. However:

- The ``'pari'`` algorithm uses PARI's ``qfminim()`` function
which computes exact solutions but may be slow for large
dimensions.

- The ``'fplll'`` algorithm uses fpylll's SVP solver which by
default uses enumeration to find exact solutions. The behavior
can be modified by passing additional parameters through
``*args`` and ``**kwds`` (e.g., ``pruning=True`` for
approximate solutions).

Unlike :meth:`approximate_closest_vector`, this method
prioritizes exactness over speed, which may result in long
computation times for high-dimensional lattices.

INPUT:

- ``update_reduced_basis`` -- boolean (default: ``True``); set this
Expand All @@ -547,7 +566,9 @@ def shortest_vector(self, update_reduced_basis=True, algorithm='fplll', *args, *

- ``**kwds`` -- passed through to underlying implementation

OUTPUT: a shortest nonzero vector for this lattice
OUTPUT:
A shortest nonzero vector for this lattice (exact solution to
SVP with default parameters).

EXAMPLES::

Expand Down