接近点检测

发布于 2024-07-07 20:01:29 字数 646 浏览 8 评论 0原文

我有一大组 3D 三阶多项式。

矩阵形式

Pn = [1,t,t2,t4]*[An]

[Pn][An] 分别是 1xN4xN 矩阵

每个函数都有一个权重 Wn。 我想,对于一些n,m,Tt0找到第一个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] are 1xN and 4xN 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

孤独陪着我 2024-07-14 20:01:30

由于不知道这是否可以通过分析手段解决,因此有许多方法来搜索空间并尝试找到任何满足该标准的 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.

静待花开 2024-07-14 20:01:30

可以播种底池:

  • 使用某种形式的“紧密对查找器”算法在 t0 和其他时间用这些对播种堆。
  • 拉出找到的最接近的一对
  • 如果足够接近并且比迄今为止最好的更快,则
  • ,继续查找它们是否更接近或更远,
  • 将当前对与“较近”一侧的下一对之间的差异分开,并将其添加到堆中。

想法?

OK to seed the pot:

  • Using some form of "close pair finder" algorithm seed a heap with those pairs at t0 and other times.
  • Pull the closest pair found
  • if close enough and sooner than the best so far, keep
  • find if they are closer or further apart
  • split the difference between the current pair and the next one in on the "closer" side and add that the the heap.

Thoughts?

素衣风尘叹 2024-07-14 20:01:30

N 有多大? 详尽的搜索是否可能?

我会在 numpyscipy 讨论区并温习您的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文