Let $A$ be a positive definite, real $n \times n$ matrix. This defines a norm on $\mathbb{R}^n$. Now I have a given point $p \in \mathbb{R}^n$ and I want to find the lattice point $x \in \mathbb{Z}^n$ that is closest to $p$ with respect to this norm. This is commonly known as the **Closest Vector Problem** (CVP) and seems to be very important. So I guess algorithms to solve this should be implemented somewhere. However, I was not able to find something.


Is this there a package for solving this problem for some common mathematical software like Maple, Mathematica, Sage, etc?


Note that I am not interested in some approximation using LLL or so, I want really the (or one) closest vector!



Package for the Closest Vector Problem (CVP)?
`fplll` (available here: <https://github.com/fplll/fplll>), a C++ implementation of a selection of lattice algorithms, has a CVP solver:



> 
> It also includes a floating-point implementation of the Kannan-Fincke-Pohst algorithm [K83,FP85] that finds a shortest non-zero lattice vector. For the same task, the GaussSieve algorithm [MV10] is also available in fplll. Finally, it contains a variant of the enumeration algorithm that computes a lattice vector closest to a given vector belonging to the real span of the lattice.
> 
> 
> 


Magma has a CVP solver. Details here: <https://magma.maths.usyd.edu.au/magma/overview/2/17/9/>



> 
> Magma includes a highly optimized algorithm for enumerating all short vectors in a lattice with given norm. This algorithm, developed by Damien Stehlë, is used for computing the minimum, the shortest vectors, short vectors in a given range, and vectors close to or closest to a given vector (possibly) outside the lattice.
> 
> 
> 


