接近点检测
我有一大组 3D 三阶多项式。
矩阵形式
Pn = [1,t,t2,t4]*[An]
[Pn]
和[An]
分别是1xN
和4xN
矩阵
每个函数都有一个权重 Wn。 我想,对于一些n,m,T
和t0
找到第一个t
,其中t>t0
这样那
(Wn*Wm) * |Pn-Pm|-2 >
O(n2)“尝试一切”方法之外,我什至不知道从哪里开始,就此而言,即使对于已知的 n,我也不确定如何回答这个问题& 米。
任何想法
编辑:
- 设置大小约为 10-1000
- 权重分布〜对数(很少大,很多小)
- 这个测试将在 n 体模拟器的内部循环中,因此它会运行很多次
- 在一条路径改变后能够很好地找到新答案(摊销)的版本是一件好事。
I have a large set of 3rd order polynomials in 3D.
in matrix form
Pn = [1,t,t2,t4]*[An]
[Pn]
and[An]
are1xN
and4xN
matrices respectively
each function has a weight Wn. I want to, for some n, m, T
and t0
find the first t
where t>t0
such that
(Wn*Wm) * |Pn-Pm|-2 > T
aside from a the O(n2) "try everything" approach I'm not even sure where to start, For that matter, I'm not shure how to answer this even for the known n & m.
Any ideas
Edit:
- the set size is on the order of 10-1000
- the weight's are distributed ~ logarithmically (very few large, many small)
- this test would be in an inner loop of an n-body simulator so it would get run a lot
- versions that do well (amortized) at finding a new answer after one path is altered are a good thing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于不知道这是否可以通过分析手段解决,因此有许多方法来搜索空间并尝试找到任何满足该标准的 t。
遗传算法、模拟退火和其他优化算法浮现在脑海中。
Not knowing if this is solvable through analytic means, there are many approaches to searching a space and trying to find any t that meets that criteria.
Genetic algorithms, simulated annealing and other algorithms for optimization spring to mind.
可以播种底池:
想法?
OK to seed the pot:
Thoughts?
N 有多大? 详尽的搜索是否可能?
我会在 numpy 或 scipy 讨论区并温习您的 Python 技能。 我打赌你可能会把它变成一个最小化问题并使用 fmin 或 BFGS 或其他一些有界拟牛顿算法来找到合理的最小值。 也许最小化 t 和 T 之间的差异。除非你的矩阵中有一些奇怪的东西,否则看起来你的搜索空间至少可能是连续的。
由于您在标题中提到了最近的方法查看此帖子< /a> 在 numpy 板上。
How large is N? Is an exhaustive search even possible?
I'd ask the question on the numpy or scipy discussion boards and brush up on your python skills. My bet is you could probably turn this into a minimisation problem and use fmin or BFGS or some other bounded quasi-Newton algorithm to find a reasonable minimum. Perhaps minimise the difference between t and T. Unless there is something weird in your matrices it looks like your search space may at least be continuous.
Since you mention closest point of approach in your title check this post out on the numpy board.