/*
 * An NTL LLL interpreter
 * Copyright 2013, Daniel Loebenberger
 */
#include <iostream>
#include <NTL/mat_ZZ.h>
#include <NTL/LLL.h>

NTL_CLIENT

int main()
{
   int d;
   int i;
   cout << "*** Welcome to the NTL LLL interpreter! ***" << endl;
   
   mat_ZZ B;
   ZZ det2;

   cout << "Please input the basis of the form [[b11 b12 ..] .. [bl1 bl2 ..]]: ";
   cin >> B;

   mat_ZZ redB(B);


   d = LLL(det2, redB);

   cout << "The lattice given by your basis has" << endl;

   cout << "- dimension " << d << endl;
   cout << "- volume sqrt(" << det2 << ")" << endl << endl;
   cout << "A reduced basis of the lattice is " << endl;
   cout << redB << endl; 

   cout << "Goodbye." << endl;

   exit(0);
}
