- Boost : https://www.boost.org/
- GMP : https://gmplib.org/
// foo.cpp
#include "lll.h"
....
....
int main(){
matrix x;
MatrixIp(x); // takes basis for lattice as input
lll(x, fraction(3, 4)); // delta: 𝛿 in Lovasz condition, generally 0.75
// basis matrix is modified to store the reduced basis
MatrixOp(x, "\nReduced Basis:"); // prints reduced basis to cout
}
g++ foo.cpp lll.cpp -lgmp
Enter nrows and ncols: 3 3
Enter Basis 1 : 1 1 1
Enter Basis 2 : -1 0 2
Enter Basis 3 : 3 5 6
Reduced Basis:
[
[ 0 1 -2 ]
[ 1 0 0 ]
[ 0 1 1 ]
]