"行うにはヒープ"の翻訳 英語に:


  辞書 日本-英語

行うにはヒープ - 翻訳 :

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

これらをヒープにし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.
順番にヒープに印をつけていきましょう これらはすべてヒープです
Any leaf, anything that is a leaf already were done. That's our termination condition.
大きなヒープを小さな2つのヒープに分けます
There's a sort of gaping volcanic hole at the top. Whatever will we do to fix this.
ダイクストラ法での実行時間はどうなるでしょう ここで言うヒープとは
What's the running time of Dijkstra in terms of the number of nodes (n) and edges (m) when heaps are used?
これはヒープです
Here is the code for up heapify, right now it is blank.
このアルゴリズム上でヒープをどのように
That seems like the sort of things that a heap would be really good at.
ヒープで行いますのでここはlog n処理です
As I was describing it before, for each node we do this test to find the shortest distance so far.
ヒープを作るためにまずここをヒープにします それが終わったら この値の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.
ノードiをルートとするヒープのプロパティを持つ ヒープに適用します
Down heapify is this notion that we've got.
リスト以外の異なるデータ構造を使って 挿入を行う方法がありこれをヒープと言います ヒープの場合の実行時間はΘ(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.
この部分をヒープにするために置き換えを行います
This is a heap. We'll check them off as we go. This is a heap.
ヒープのプロパティを満たすように値を入れます
Let me show you an example. Here's a balanced binary tree with 20 nodes.
ただ老朽化したヒープのように見えます
Just looks like a dilapidated 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.
ここにヒープ構造があります
Given what we have build up so far, we can actually use the pieces to build a heap from scratch.
ヒープのプロパティを見ていきます 手順はこうです
What if i has two children? So this is some internal node in the tree now. Or possibly a root of a large tree.
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.
down_heapifyを実行できます でも自然なノードの位置はヒープの最後です
Well, it would be nice if we had some kind of node someplace that we could fill in here and then maybe down heapify it.
ヒープ内の床 場所は ロッキングされています 絶対に
The old boy grasped my hand warmly, and that was all that kept me from hitting the floor in a heap.
厳密に言えば ヒープは特定の実行時間を持つ 特定のデータ構造ではありません
Now speaking precisely.
そしてこの新しい値をヒープに挿入します ヒープのプロパティが再確立できました 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.
ヒープの底の右端とすることです ヒープの底がすでに埋まっていたら一番左に置きます
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.
ヒープを使ってできることは挿入と
Notice we didn't use the sort of middle ground at all.
他のヒープ操作と同じくΘ(log n)でしょうか
So what's the running time of this going to be?
複雑なヒープ構造の維持にオーバーヘッドがかかり
I've implemented this in the past. It didn't run so fast for me.
ヒープの最小値の削除の問題はΘ(log n)
Finding the shortest path in a weighted, undirected connected graph took time m times the logarithm of n.
常にソートされています このヒープのプロパティのために
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.
これでヒープのプロパティが回復しました
Right. We're satisfied everywhere except for between i and its children, and i doesn't have any children.
こうなるとヒープのプロパティは 満たされない可能性があります
Well, let's take it to reduce a lot. Let's take it's reduced all the way to 1.
これにはΘ(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.
ただし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.
今の時点ではヒープではありませんが ヒープにすることができます まずルートから見ていきます これをノード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.
リストLを与えLからヒープを作ります
This is sometimes called heap sort. You give it a (L).
ヒープのプロパティを壊す可能性があります
Or, if the heap was already full, then the far left.
他の場合にはとても有用です ではヒープの世界を詳しく見ていきましょう
It doesn't do as well a partition at this particular problem of finding the top k, but it actually is pretty useful for bunch of other things as well so let's dive into the whole universe of heaps now.
ヒープを利用する場合は制限事項があるので 注意が必要です ノードの値を小さくしていく時 ヒープ内の違う箇所を使うかもしれないので
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.
これでツリー全体のヒープが完成しました
We just run down heapify starting from there. When that's done, we can return.
こうしてツリーの中のノードの値が 全部ヒープのプロパティを持ちます
And I'm going to fill values in here that satisfy the heap property.
ヒープに値を挿入します これはkの対数のオペレーションです したがって全体の実行時間は Θ(n log k)になります
So, for each of N times, we do possibly one insert into the heap, which is a log K operation.
ヒープにするために 小さい方の子の13と置き換えます
We need to do this subtree, again same trick. This guys are already heaps.
nの対数になります したがってヒープの高さはΘ(log n)です
How many times can you half (n) before you get down to 1 which is the root?
このポイントでヒープのプロパティが満たされておらず
It's just what we did when we're doing it by hand and then we can return.
down_heapifyが完了しこれもヒープになりました 最後のステップです
To make this into a heap, we have to swap it with the smaller of the children 13.
このノードをルートとする新しいヒープを作ります
Alright. How do we build a heap out of this smaller piece? Well, we can do it again recursively.
ヒープ操作のためのルーチンをいくつか作りました
Let's talk about how we actually will go with this.

 

関連検索 : 行うには - ヒープ - ヒープ - ヒープ - 行うには、左 - で行うには - 行うにはミス - で行うには - のヒープ - ヒープ上 - ヒープ内 - のヒープ - 最初に行うには - 誇りに行うには