Naanou.Common
Class PriorityQueue

Field Summary
System.Collections.IComparer comp
Naanou.Common.NodeSequence s

Constructor Summary
PriorityQueue(System.Collections.IComparer comp)
PriorityQueue()
        Initializes a new instance of the PriorityQueue class.

Property Summary
int Count
         Returns count
bool IsEmpty
         Is list empty

Method Summary
void Add(object key, object elem)
         Adds a new item
object Key(Naanou.Common.DNode pos)
object MinKey()
         Returns the minimum key
object RemoveMin()
         Removes the minimum element and returns it
object Value(Naanou.Common.DNode pos)

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

comp

protected System.Collections.IComparer comp


s

protected Naanou.Common.NodeSequence s

Constructor Detail

PriorityQueue

public PriorityQueue(System.Collections.IComparer comp)


PriorityQueue

public PriorityQueue()

Initializes a new instance of the PriorityQueue class.

Property Detail

Count

public int Count

Returns count


IsEmpty

public bool IsEmpty

Is list empty

Method Detail

Add

public void Add(object key,
                object elem)

Adds a new item

Parameters:
key - Key
elem - Element

Key

protected object Key(Naanou.Common.DNode pos)


MinKey

public object MinKey()

Returns the minimum key

Returns:

RemoveMin

public object RemoveMin()

Removes the minimum element and returns it

Returns:

Value

protected object Value(Naanou.Common.DNode pos)