"のヒープ"の翻訳 英語に:


  辞書 日本-英語

のヒープ - 翻訳 : のヒープ - 翻訳 :

  例 (レビューされていない外部ソース)

大きなヒープを小さな2つのヒープに分けます
There's a sort of gaping volcanic hole at the top. Whatever will we do to fix this.
ノードiをルートとするヒープのプロパティを持つ ヒープに適用します
Down heapify is this notion that we've got.
これはヒープです
Here is the code for up heapify, right now it is blank.
これらをヒープにしdown_heapifyを実行します 単独の2つのノードはすでにヒープです
We can say to build a heap, rooted at this node, make this new heap, make this new heap and then down heapify.
このアルゴリズム上でヒープをどのように
That seems like the sort of things that a heap would be really good at.
順番にヒープに印をつけていきましょう これらはすべてヒープです
Any leaf, anything that is a leaf already were done. That's our termination condition.
これでヒープのプロパティが回復しました
Right. We're satisfied everywhere except for between i and its children, and i doesn't have any children.
ヒープの最小値の削除の問題はΘ(log n)
Finding the shortest path in a weighted, undirected connected graph took time m times the logarithm of n.
ヒープの底の右端とすることです ヒープの底がすでに埋まっていたら一番左に置きます
The idea is that the new element that we're going to insert we stick at the sort of bottom right corner of the heap.
ヒープのプロパティを壊す可能性があります
Or, if the heap was already full, then the far left.
ここにヒープ構造があります
Given what we have build up so far, we can actually use the pieces to build a heap from scratch.
ヒープを作るためにまずここをヒープにします それが終わったら この値のdown_heapifyを実行します この小さい部分のヒープを作るには 再帰的に処理します
We're going to start of at the root, which is node zero and we're going to say, okay, well, to make this into a heap, well first magically make this into a heap and make this into a heap and once we're done then we could do down heapify on this value and everything will be fine.
down_heapifyが完了しヒープになりました こちらのサブツリーにも同じ操作をします これらのノードはヒープです
So 88 gets swap, this is down heapify 88 gets swap with 30 because 30 is the smaller of the children and now that down heapify is completed this whole thing is a heap.
このポイントでヒープのプロパティが満たされておらず
It's just what we did when we're doing it by hand and then we can return.
これでツリー全体のヒープが完成しました
We just run down heapify starting from there. When that's done, we can return.
複雑なヒープ構造の維持にオーバーヘッドがかかり
I've implemented this in the past. It didn't run so fast for me.
ヒープのプロパティを満たすように値を入れます
Let me show you an example. Here's a balanced binary tree with 20 nodes.
ただ老朽化したヒープのように見えます
Just looks like a dilapidated heap
常にソートされています このヒープのプロパティのために
That's the heap property so what that causes is that as we traverse down the tree we're always traversing down the sorted list.
ヒープ操作のためのルーチンをいくつか作りました
Let's talk about how we actually will go with this.
そしてこの新しい値をヒープに挿入します ヒープのプロパティが再確立できました down_heapifyを使うこともできます
So we delete min, and we insert the new value that we just got into the heap and reestablish the heap property by well, we could do it as a down heapify, actually, because we deleted the node from the top.
ヒープのプロパティを見ていきます 手順はこうです
What if i has two children? So this is some internal node in the tree now. Or possibly a root of a large tree.
このノードをルートとする新しいヒープを作ります
Alright. How do we build a heap out of this smaller piece? Well, we can do it again recursively.
ヒープで行いますのでここはlog n処理です
As I was describing it before, for each node we do this test to find the shortest distance so far.
のヒープ操作と同じくΘ(log n)でしょうか
So what's the running time of this going to be?
ヒープ内の床 場所は ロッキングされています 絶対に
The old boy grasped my hand warmly, and that was all that kept me from hitting the floor in a heap.
ヒープを使ってできることは挿入と
Notice we didn't use the sort of middle ground at all.
リストLを与えLからヒープを作ります
This is sometimes called heap sort. You give it a (L).
具体例を挙げてヒープのプロパティ問題を説明します
let's say, we have this one, is suddenly reduced.
ただしiとそのすぐ下の子は ヒープのプロパティを満たしていないようです ヒープのプロパティが満たされていれば適用できます
We apply this in the notion where we've got a heap rooted at node i that satisfies the heap property except perhaps i to its children, to its immediate children.
ヒープから離れても全体の構造を傷つけません
The natural place to get that node though is right there. The very last element to the heap.
これがnの対数時間で完結しヒープができます
We can move it to the tippy top and run down heapify.
こうしてツリーの中のノードの値が 全部ヒープのプロパティを持ちます
And I'm going to fill values in here that satisfy the heap property.
ヒープにするために 小さい方の子の13と置き換えます
We need to do this subtree, again same trick. This guys are already heaps.
つまりn個の要素があるヒープを作る時間のことです
The whole thing is a heap. We made a heap. Woohoo!
この部分をヒープにするために置き換えを行います
This is a heap. We'll check them off as we go. This is a heap.
down_heapifyが完了しこれもヒープになりました 最後のステップです
To make this into a heap, we have to swap it with the smaller of the children 13.
隣接するノードの値をアップデートした場合 ヒープを更新してプロパティを
In your implementation, the thing you're going to have to really watch out for is making sure that when you update the value of the neighbor, you can find it in the heap.
これにはΘ(log n)時間かかり ヒープのプロパティも満たします
If we run up heapify on this heap with a pointer to (I), what it's going to do is bubble this small value up as high as it needs to be in the tree.
今の時点ではヒープではありませんが ヒープにすることができます まずルートから見ていきます これをノード0とします
In this case, with seven nodes and we filled them in with this random two digit numbers and it's not heap at the moment, but we can make the heap property be satisfied and this the way we're going to do it.
リストからヒープを作り最小値を除いてください
We'll give you down heapify and the build heap algorithm so that you can take a list, create a heap out of it and then remove the min from it.
ノードがn個エッジがm個ある場合ヒープを用いると
Let's look right now at the analysis of the algorithm.
リスト以外の異なるデータ構造を使って 挿入を行う方法がありこれをヒープと言います ヒープの場合の実行時間はΘ(n log k)になります
The algorithm that I have found very useful in practice is to use the selection insertion approach but to use a different data structure than just a list to do the insertions into and that's a heap.
それではdown_heapifyの実行時間は どれぐらいになるでしょうか ヒープの大きさはnで一番上のノードを除いて 他はヒープのプロパティを満たしています
Now that you've simulated and simulated the down heapify algorithm on an example and you've seen what the code looks like, tell me what the running time of down heapify would be if you have the heap of size n where the top node might be violating the heap property but it satisfied everyone else.
ヒープを利用する場合は制限事項があるので 注意が必要です ノードの値を小さくしていく時 ヒープ内の違う箇所を使うかもしれないので
Then we check each of its neighbors possibly reducing the distance which wasn't a really big deal before, but it actually matters in the heap of limitation because once we reduced the value associated with the node, it needs to maybe be some place different in the heap.

 

関連検索 : ヒープ - ヒープ - ヒープ - 砂のヒープ - トラブルのヒープ - 上のヒープ - 石のヒープ - ヒープ上 - ヒープ内 - 全体のヒープ - 土壌のヒープ - 遺跡のヒープ - ヒープ領域