Craig's Utility Library  4.0 Beta
Utilities.DataTypes.PriorityQueue< T > Class Template Reference

Helper class that implements a priority queue More...

Inheritance diagram for Utilities.DataTypes.PriorityQueue< T >:

Public Member Functions

 PriorityQueue ()
 Constructor More...
 
virtual void Add (int Key, T Value)
 Adds an item to the mapping More...
 
virtual void Add (KeyValuePair< int, ICollection< T >> item)
 Adds a key value pair More...
 
virtual void Add (int Key, ICollection< T > Value)
 Adds a list of items to the mapping More...
 
virtual void Clear ()
 Clears all items from the listing More...
 
virtual bool Contains (KeyValuePair< int, ICollection< T >> item)
 Does this contain the key value pairs? More...
 
virtual bool Contains (int Key, ICollection< T > Values)
 Does the list mapping contain the key value pairs? More...
 
bool Contains (int Key, T Value)
 Does the list mapping contain the key value pair? More...
 
virtual bool ContainsKey (int key)
 Determines if a key exists More...
 
void CopyTo (KeyValuePair< int, ICollection< T >>[] array, int arrayIndex)
 Not implemented More...
 
IEnumerator< KeyValuePair< int, ICollection< T > > > GetEnumerator ()
 Gets the enumerator More...
 
virtual T Peek ()
 Peek at the next thing in the queue More...
 
virtual T Pop ()
 Removes an item from the queue and returns it More...
 
virtual bool Remove (int key)
 Remove a list of items associated with a key More...
 
virtual bool Remove (KeyValuePair< int, ICollection< T >> item)
 Removes a key value pair from the list mapping More...
 
virtual bool Remove (int Key, T Value)
 Removes a key value pair from the list mapping More...
 
virtual bool TryGetValue (int Key, out ICollection< T > Value)
 Tries to get the value associated with the key More...
 

Properties

virtual int Count [get]
 The number of items in the listing More...
 
bool IsReadOnly [get]
 Not read only More...
 
virtual ICollection< int > Keys [get]
 The list of keys within the mapping More...
 
ICollection< ICollection< T > > Values [get]
 List that contains the list of values More...
 
virtual int HighestKey [get, set]
 Highest value key More...
 
IDictionary< int, ICollection< T > > Items [get]
 Container holding the data More...
 
virtual ICollection< T > this[int key] [get, set]
 Gets a list of values associated with a key More...
 

Detailed Description

Helper class that implements a priority queue

Template Parameters
TThe type of the values placed in the queue

Definition at line 33 of file PriorityQueue.cs.

Constructor & Destructor Documentation

Constructor

Definition at line 38 of file PriorityQueue.cs.

Member Function Documentation

virtual void Utilities.DataTypes.PriorityQueue< T >.Add ( int  Key,
Value 
)
virtual

Adds an item to the mapping

Parameters
KeyKey value
ValueThe value to add

Definition at line 108 of file PriorityQueue.cs.

virtual void Utilities.DataTypes.PriorityQueue< T >.Add ( KeyValuePair< int, ICollection< T >>  item)
virtual

Adds a key value pair

Parameters
itemKey value pair to add

Definition at line 119 of file PriorityQueue.cs.

virtual void Utilities.DataTypes.PriorityQueue< T >.Add ( int  Key,
ICollection< T >  Value 
)
virtual

Adds a list of items to the mapping

Parameters
KeyKey value
ValueThe values to add

Definition at line 131 of file PriorityQueue.cs.

virtual void Utilities.DataTypes.PriorityQueue< T >.Clear ( )
virtual

Clears all items from the listing

Definition at line 141 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.Contains ( KeyValuePair< int, ICollection< T >>  item)
virtual

Does this contain the key value pairs?

Parameters
itemKey value pair to check
Returns
True if it exists, false otherwise

Definition at line 151 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.Contains ( int  Key,
ICollection< T >  Values 
)
virtual

Does the list mapping contain the key value pairs?

Parameters
KeyKey value
ValuesValue
Returns
True if it exists, false otherwise

Definition at line 166 of file PriorityQueue.cs.

bool Utilities.DataTypes.PriorityQueue< T >.Contains ( int  Key,
Value 
)

Does the list mapping contain the key value pair?

Parameters
KeyKey
ValueValue
Returns
True if it exists, false otherwise

Definition at line 182 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.ContainsKey ( int  key)
virtual

Determines if a key exists

Parameters
keyKey to check on
Returns
True if it exists, false otherwise

Definition at line 196 of file PriorityQueue.cs.

void Utilities.DataTypes.PriorityQueue< T >.CopyTo ( KeyValuePair< int, ICollection< T >>[]  array,
int  arrayIndex 
)

Not implemented

Parameters
arrayArray to copy to
arrayIndexarray index

Definition at line 206 of file PriorityQueue.cs.

IEnumerator<KeyValuePair<int, ICollection<T> > > Utilities.DataTypes.PriorityQueue< T >.GetEnumerator ( )

Gets the enumerator

Returns
The enumerator for this object

Definition at line 215 of file PriorityQueue.cs.

virtual T Utilities.DataTypes.PriorityQueue< T >.Peek ( )
virtual

Peek at the next thing in the queue

Returns
The next item in queue or default(T) if it is empty

Definition at line 225 of file PriorityQueue.cs.

virtual T Utilities.DataTypes.PriorityQueue< T >.Pop ( )
virtual

Removes an item from the queue and returns it

Returns
The next item in the queue

Definition at line 236 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.Remove ( int  key)
virtual

Remove a list of items associated with a key

Parameters
keyKey to use
Returns
True if the key is found, false otherwise

Definition at line 259 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.Remove ( KeyValuePair< int, ICollection< T >>  item)
virtual

Removes a key value pair from the list mapping

Parameters
itemitems to remove
Returns
True if it is removed, false otherwise

Definition at line 269 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.Remove ( int  Key,
Value 
)
virtual

Removes a key value pair from the list mapping

Parameters
KeyKey to remove
ValueValue to remove
Returns
True if it is removed, false otherwise

Definition at line 285 of file PriorityQueue.cs.

virtual bool Utilities.DataTypes.PriorityQueue< T >.TryGetValue ( int  Key,
out ICollection< T >  Value 
)
virtual

Tries to get the value associated with the key

Parameters
KeyKey value
ValueThe values getting
Returns
True if it was able to get the value, false otherwise

Definition at line 311 of file PriorityQueue.cs.

Property Documentation

virtual int Utilities.DataTypes.PriorityQueue< T >.Count
get

The number of items in the listing

Definition at line 48 of file PriorityQueue.cs.

virtual int Utilities.DataTypes.PriorityQueue< T >.HighestKey
getsetprotected

Highest value key

Definition at line 85 of file PriorityQueue.cs.

bool Utilities.DataTypes.PriorityQueue< T >.IsReadOnly
get

Not read only

Definition at line 56 of file PriorityQueue.cs.

IDictionary<int, ICollection<T> > Utilities.DataTypes.PriorityQueue< T >.Items
getprotected

Container holding the data

Definition at line 90 of file PriorityQueue.cs.

virtual ICollection<int> Utilities.DataTypes.PriorityQueue< T >.Keys
get

The list of keys within the mapping

Definition at line 64 of file PriorityQueue.cs.

virtual ICollection<T> Utilities.DataTypes.PriorityQueue< T >.this[int key]
getset

Gets a list of values associated with a key

Parameters
keyKey to look for
Returns
The list of values

Definition at line 98 of file PriorityQueue.cs.

ICollection<ICollection<T> > Utilities.DataTypes.PriorityQueue< T >.Values
get

List that contains the list of values

Definition at line 72 of file PriorityQueue.cs.


The documentation for this class was generated from the following file: