C# Class Voronoi.Algorithms.FortuneHelpers.BinaryPriorityQueue

Inheritance: IPriorityQueue, ICollection, ICloneable, IList
Show file Open project: TobieD/City-Generator Class Usage Examples

Protected Properties

Property Type Description
Comparer IComparer
InnerList System.Collections.ArrayList

Private Properties

Property Type Description
IEnumerable IEnumerator
IList int

Public Methods

Method Description
BinaryPriorityQueue ( ) : System
BinaryPriorityQueue ( IComparer c ) : System
BinaryPriorityQueue ( IComparer c, int Capacity ) : System
BinaryPriorityQueue ( int C ) : System
Clear ( ) : void
Clone ( ) : object
Contains ( object value ) : bool
CopyTo ( Array array, int index ) : void
Peek ( ) : object

Get the smallest object without removing it.

Pop ( ) : object

Get the smallest object and remove it.

Push ( object O ) : int

Push an object onto the PQ

ReadOnly ( BinaryPriorityQueue P ) : BinaryPriorityQueue
Syncronized ( BinaryPriorityQueue P ) : BinaryPriorityQueue
Update ( int i ) : void

Notify the PQ that the object at position i has changed and the PQ needs to restore order. Since you dont have access to any indexes (except by using the explicit IList.this) you should not call this function without knowing exactly what you do.

Protected Methods

Method Description
BinaryPriorityQueue ( ArrayList Core, IComparer Comp, bool Copy ) : System
IList ( int index ) : void
IList ( int index, object value ) : void
IList ( object value ) : void
OnCompare ( int i, int j ) : int
SwitchElements ( int i, int j ) : void
this ( int index ) : objectIList.System

Private Methods

Method Description
IEnumerable ( ) : IEnumerator
IList ( object o ) : int

Method Details

BinaryPriorityQueue() public method

public BinaryPriorityQueue ( ) : System
return System

BinaryPriorityQueue() protected method

protected BinaryPriorityQueue ( ArrayList Core, IComparer Comp, bool Copy ) : System
Core System.Collections.ArrayList
Comp IComparer
Copy bool
return System

BinaryPriorityQueue() public method

public BinaryPriorityQueue ( IComparer c ) : System
c IComparer
return System

BinaryPriorityQueue() public method

public BinaryPriorityQueue ( IComparer c, int Capacity ) : System
c IComparer
Capacity int
return System

BinaryPriorityQueue() public method

public BinaryPriorityQueue ( int C ) : System
C int
return System

Clear() public method

public Clear ( ) : void
return void

Clone() public method

public Clone ( ) : object
return object

Contains() public method

public Contains ( object value ) : bool
value object
return bool

CopyTo() public method

public CopyTo ( Array array, int index ) : void
array System.Array
index int
return void

IList() protected method

protected IList ( int index ) : void
index int
return void

IList() protected method

protected IList ( int index, object value ) : void
index int
value object
return void

IList() protected method

protected IList ( object value ) : void
value object
return void

OnCompare() protected method

protected OnCompare ( int i, int j ) : int
i int
j int
return int

Peek() public method

Get the smallest object without removing it.
public Peek ( ) : object
return object

Pop() public method

Get the smallest object and remove it.
public Pop ( ) : object
return object

Push() public method

Push an object onto the PQ
public Push ( object O ) : int
O object The new object
return int

ReadOnly() public static method

public static ReadOnly ( BinaryPriorityQueue P ) : BinaryPriorityQueue
P BinaryPriorityQueue
return BinaryPriorityQueue

SwitchElements() protected method

protected SwitchElements ( int i, int j ) : void
i int
j int
return void

Syncronized() public static method

public static Syncronized ( BinaryPriorityQueue P ) : BinaryPriorityQueue
P BinaryPriorityQueue
return BinaryPriorityQueue

Update() public method

Notify the PQ that the object at position i has changed and the PQ needs to restore order. Since you dont have access to any indexes (except by using the explicit IList.this) you should not call this function without knowing exactly what you do.
public Update ( int i ) : void
i int The index of the changed object.
return void

this() protected method

protected this ( int index ) : objectIList.System
index int
return objectIList.System

Property Details

Comparer protected property

protected IComparer Comparer
return IComparer

InnerList protected property

protected ArrayList,System.Collections InnerList
return System.Collections.ArrayList