C# 클래스 MinHeap, Corsair

Minimum Heap
파일 보기 프로젝트 열기: Final-Parsec/Corsair 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
heap List

공개 메소드들

메소드 설명
Add ( Node, element ) : void

Adds an element to the heap and bubbles up.

Count ( ) : int
GetRoot ( ) : Node,

Gets the root.

MinHeap ( Node, root ) : System
MinHeapify ( int index ) : void

Mins the heapify.

Peek ( ) : Node,
Reevaluate ( Node, element ) : void

비공개 메소드들

메소드 설명
BubbleUp ( int index ) : void
Swap ( int a, int b ) : void

Swap the specified list items, a and b.

메소드 상세

Add() 공개 메소드

Adds an element to the heap and bubbles up.
public Add ( Node, element ) : void
element Node, element to add
리턴 void

Count() 공개 메소드

public Count ( ) : int
리턴 int

GetRoot() 공개 메소드

Gets the root.
public GetRoot ( ) : Node,
리턴 Node,

MinHeap() 공개 메소드

public MinHeap ( Node, root ) : System
root Node,
리턴 System

MinHeapify() 공개 메소드

Mins the heapify.
public MinHeapify ( int index ) : void
index int Index.
리턴 void

Peek() 공개 메소드

public Peek ( ) : Node,
리턴 Node,

Reevaluate() 공개 메소드

public Reevaluate ( Node, element ) : void
element Node,
리턴 void

프로퍼티 상세

heap 공개적으로 프로퍼티

public List heap
리턴 List