English 中文(简体)
position树/qu树的定位
原标题:Performance of positioning voxels in an octree/quadtree

www.un.org/spanish/ecosoc 这是我过去几个小时的想法。 这是一种思想。

因此,我学会了今天的座树! 非常有趣! 我一直在思考如何执行一个决心给一种恶魔的树。

我现在可以总结一下我的头脑,谈谈在树林的立场。

Disclaimer: First, I m going to be using quadtrees in a 2D plane to visualize my problem. Second, I do not understand the correct jargon here, I m going to assume any subdivision in an octree that is a parent is a "branch" and any subdivision that is only a child (in this case it resolves to a voxel) is a "leaf". Third, I m going to number each space in a branch of a quadtree left-to-right top-to-bottom {1,2,3,4}

我要说的是,我拥有一个界定16x16单位空间的四方。 在地点[16,16],我储存了一台 v。

4->4->4->4

现在说,我们增加了一种正统立场[4,4]。 (注,我们以零开始)

1->4->1->1
4->4->4->4

现在我要说的是,我想检查一下是否储存了一台 v。 利用以前的方法,我们将从技术上扭转这些分支:

4->1->1->1

However 4->1 has not been allocated with any data so it is empty. (it does not subdivide because it is not in use).

www.un.org/spanish/ecosoc 我的问题是这样,我如何能够迅速tra笑这块树,以找到ox子?。

我的第一个和最容易的方法是按上述格式缩减各分处。

// Pseudo-code
Class Quadtree {
Quadtree Parent;
Quadtree c[4]; // children
};

Quadtree test1;
test1.c[4].c[4].c[4].c[4];
Quadtree test2;
test2.c[1].c[4].c[1].c[1];

这里的问题是,voxel Array[16][16], voxelArray[4][4],或voxelArray[16] 。 利用大得多的树木(256x256)将加深深度(从4个增加到8个)。 封顶阵列仍然是2个记忆作业。 (说明,对于四方而言,实际上我们将利用某种接触和检查手段确保儿童有有条件的逻辑)

我的第二个想法是把 qua树作为ox子本身。 例如,说我们有2x2阵列,空着它想像的。

{0, 0, 0, 0}

在立场[1,1]上,我们将增加一ox子,它将成为一种ox子。

{0, 0, 0, 1}

如果我们要储存这块树苗,那么它会看像这样的东西。

{1/*q*/, 0, 0, 0, 1}

a 4x4

{0/*q*/, 0, 0, 0, 
 0/*q*/, 0, 0, 0, 
 0/*q*/, 0, 0, 0, 
 1/*q*/, 0, 0, 1}

虽然现在你可以直接获得数据,但你却失去了这块树的记忆,你仍然从事许多逻辑工作。 海事组织只有拥有0和1个大小组群的大面积地区才能很好地发挥作用。

通过将 v积在 qua树/tree树中,你在通过 all子时取得了成绩,但在直接接触时却失去了业绩。

“entergraph

最佳回答

你们可以 comp一把钥匙,然后洗.每 v。 想法是减少层面的复杂性。 比如,你可以看一看 ha路或z曲或休伯特疗法。 这条道路完全绕过了飞机,但从技术上来说,它仍然是曲线。

问题回答

这比回答更长。 不过,这或许有助于你。 也可能不是。 阁下:

{0, 0, 0, 0}

这并不说明一个空洞的树木,它显示了所有4个水体在第一个(仅)层次上的价值0的树苗。 这是:

{}

这表明一块空洞的树。 这是:

{0, 0, 0, {1,0,1,0}}

显示有三根tree树,其中四分之四为零,第四块为一ches(尽管只有一小).)。 这是:

{{1,{1,0,0,0},0,{1,1,1,{0,0,0,1}}}, 0, 0, {1,0,1,0}}

开始trick,但到现在,你们已经走下了。

在某些语言(例如Lisp、Matlab、数学)中,这些插图可以直接实施和操纵。 在许多语言中,你将“三宝树”作为点人和/或价值观集。





相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签