【发布时间】:2017-11-14 15:42:04
【问题描述】:
我正在使用 C++ 进行研究。我很想知道如何使用 NTL 中的 LLL 函数来找到最短向量。我的代码如下;
#include <NTL/ZZ.h>
#include <NTL/matrix.h>
#include <NTL/mat_ZZ.h>
#include <NTL/vector.h>
using namespace std;
using namespace NTL;
int main()
{
Mat<ZZ> B;
cin >> B;
cout << B << "\n";
long LLL(ZZ& det2, mat_ZZ& B, long verbose = 0);
cout << B << "\n";
}
但是,我输入到 B 中的矩阵并没有减少。怎么了?
【问题讨论】:
-
这是我的第二个 Google 结果,这有帮助吗? shoup.net/ntl/doc/LLL.cpp.html
-
谢谢。我也找到了。它是一个文档,但没有关于如何正确实现 LLL 算法的示例。
标签: c++ ntl mathematical-lattices