commands → latticereduce
latticereduce(A)
The latticereduce command performs lattice basis reduction.
A should be a matrix of integers.
Examples
A = [[1,1,0,1],[1,2,-1,1],[1,-1,3,1]];
latticereduce(A);
[[0, 1, 0, 0], [1, 0, 0, 1], [0, 0, -1, 0]]
Algorithm
The command uses a fraction-free version of the Lenstra-Lenstra-Lovasz algorithm.
References
Cohen, Henri. A Course in Computational Algebraic Number Theory. Springer, 1993.