C# Class MarsRover.PriorityQueue

Inheritance: IQueue
Exibir arquivo Open project: jpadillak/Concordia_Capstone2013-14

Public Methods

Method Description
ClearQueue ( ) : void
Enqueue ( string value, QueuePriorities priority = QueuePriorities.Medium ) : void
PriorityQueue ( int maxCapacity ) : System
TryDequeue ( string &result ) : bool

Private Methods

Method Description
BubbleDown ( int index ) : void
BubbleUp ( int last ) : void
IsLeftNodeHigherPriority ( int leftIndex, int rightIndex ) : bool
Swap ( Node &a, Node &b ) : void

Method Details

ClearQueue() public method

public ClearQueue ( ) : void
return void

Enqueue() public method

public Enqueue ( string value, QueuePriorities priority = QueuePriorities.Medium ) : void
value string
priority QueuePriorities
return void

PriorityQueue() public method

public PriorityQueue ( int maxCapacity ) : System
maxCapacity int
return System

TryDequeue() public method

public TryDequeue ( string &result ) : bool
result string
return bool