kdtree 中边界框之间的最小距离
我需要找到欧几里德空间中同一棵树的两个 kdtree 边界框的最小黑白距离。假设每个盒子维护5个元素。我需要使用java的最小欧几里得距离。
double QHRect[][] = QNode.m_NodesRectBounds;
double RHRect[][] = RNode.m_NodesRectBounds;
QHRect[][]: 5.74842E-4,7.76626E-5,6.72655E-4,
0.5002329025,0.2499048942,0.25046735625
RHRect[][]:
0.75006193275,0.7495593574,0.75005675875,
0.999890963,0.999386589,0.99985146
I need to find the minimum distance b/w two kdtree bounding box's of same tree in euclidean space. Suppose each box maintain a 5 elements. I need the minimum Euclidean distance using java.
double QHRect[][] = QNode.m_NodesRectBounds;
double RHRect[][] = RNode.m_NodesRectBounds;
QHRect[][]: 5.74842E-4,7.76626E-5,6.72655E-4,
0.5002329025,0.2499048942,0.25046735625
RHRect[][]:
0.75006193275,0.7495593574,0.75005675875,
0.999890963,0.999386589,0.99985146
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这方面,与任何其他语言相比,Java 实现没有什么棘手的地方。您需要了解处理此类问题的通用算法。我相信是这样的:
在问题的一般版本中,您还必须检查两个边界框是否也相交。
There is nothing tricky about a Java implementation compared with any other language in this matter. You need to know the general algorithm to handle a problem like this. I believe it is this:
In the general version of the problem, you would also have to check for if the two bounding boxes intersect as well.