整数关系实现(求实数之间的比率)
谁能给我指出一个具有不错的整数关系实现(最有可能是 PSLQ)的库或模块?
我的目标平台是.NET(C#),但是如果有C/C++、Java等的源代码,甚至是半可理解的算法,那会对我有很大帮助。我在 Google 上找到的只是一些不可读的 Mathematica 代码。
我能够在此处找到算法,我想只要几周时间我也许就能解决这个问题,但考虑到该算法已经成为事实上的标准近 20 年了,肯定有人已经解决了这个问题。
或者,如果有人知道我可以使用的任何更简单的算法,那也可能有帮助。精度不必高得离谱,速度比精度更重要;我正在考虑最粗略的方法,即乘以 10 的某个因子并寻找积分 GCD,但在我确信我已经用尽任何更好的选择之前,我不想这样做。
提前致谢。
Can anyone point me to a library or module with a decent integer relation implementation (most likely PSLQ)?
My target platform is .NET (C#), but if there's source code in C/C++, Java, whatever, even a semi-comprehensible algorithm, that would help me a lot. All I was able to find on Google was some unreadable Mathematica code.
I was able to find an algorithm here, and I suppose given several weeks I might be able to muddle through it, but there's got to be somebody out there who's already tackled this problem, given that the algorithm's been the de facto standard for almost 20 years.
Alternatively, if anyone knows of any simpler algorithms I could use, that might help too. The precision does not have to be ridiculously high and speed is a more important concern than accuracy; I'm half-considering the crudest approach of multiplying by some factor of 10 and looking for an integral GCD, but I don't want to go there until I'm sure I've exhausted any better options.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此处包含一个 BSD 许可的 C++ 实现,包含在列出的第四个软件包 APPREC 中。
There's a BSD licensed C++ implementation here contained within the 4th package listed, APPREC.