C# Class CodingPractice.Heap.Heap

Inheritance: IPriorityQueue
显示文件 Open project: cabhishek/algorithms-datastructures

Protected Properties

Property Type Description
elements IComparable[]
lastIndex int
maxIndex int

Public Methods

Method Description
dequeue ( ) : IComparable
enqueue ( IComparable item ) : void
isEmpty ( ) : bool
isFull ( ) : bool

Protected Methods

Method Description
Heap ( ) : System
newHole ( int hole, IComparable item ) : int
reheapDown ( IComparable item ) : void
reheapUp ( IComparable item ) : void

Method Details

Heap() protected method

protected Heap ( ) : System
return System

dequeue() public method

public dequeue ( ) : IComparable
return IComparable

enqueue() public method

public enqueue ( IComparable item ) : void
item IComparable
return void

isEmpty() public method

public isEmpty ( ) : bool
return bool

isFull() public method

public isFull ( ) : bool
return bool

newHole() protected abstract method

protected abstract newHole ( int hole, IComparable item ) : int
hole int
item IComparable
return int

reheapDown() protected method

protected reheapDown ( IComparable item ) : void
item IComparable
return void

reheapUp() protected abstract method

protected abstract reheapUp ( IComparable item ) : void
item IComparable
return void

Property Details

elements protected_oe property

protected IComparable[] elements
return IComparable[]

lastIndex protected_oe property

protected int lastIndex
return int

maxIndex protected_oe property

protected int maxIndex
return int