Changes between Version 1 and Version 2 of Ticket #29866
- Timestamp:
- 06/16/20 00:49:18 (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #29866
- Property Cc slelievre added
-
Ticket #29866 – Description
v1 v2 1 in this example a closest vector in L is not in L: 1 In this example we compute `v`, the closest vector to the vector `u` that lies in the integer lattice `L`. 2 3 Problem: `v` is not in `L`. 2 4 {{{ 3 5 sage: from sage.modules.free_module_integer import IntegerLattice 4 ....: L0 = matrix(ZZ,[[20957228, -4966110],[ 9411844, 19625639]]) 5 ....: L = IntegerLattice(L0) 6 ....: v0 = vector([-423434678248195, -18882583298608161305227077482]) 7 ....: cv = L.closest_vector(v0) 8 ....: print(cv in L) 9 ....: 6 sage: M = matrix(ZZ, [[20957228, -4966110], [9411844, 19625639]]) 7 sage: L = IntegerLattice(M) 8 sage: u = vector([-423434678248195, -18882583298608161305227077482]) 9 sage: v = L.closest_vector(u) 10 sage: print(v in L) 10 11 False 11 12 }}}