root/src/BRAINSFramework/PriorityQueue.cs

113
1
//****************************************************************//
1
2
//********************copyright Rik Dodsworth 2009****************//
3
//****************************************************************//
4
//***************************free to use**************************//
5
//****************************************************************//
6
//*******************please just leave this header****************//
7
//*************************for recognition************************//
8
//****************************************************************//
9
//****************************************************************//
10
using System;
2
using System;
11
using System.Collections.Generic;
3
using System.Collections.Generic;
12
using System.Text;
4
using System.Text;
13
using System.Collections;
5
using System.Collections;
14
using System.Runtime.InteropServices;
6
using System.Runtime.InteropServices;
15
7
16
namespace AIFamework
8
namespace Brains.Framework
17
{
9
{
18
    /// <summary>
10
    /// <summary>
19
    /// Represents an item stored in a priority queue.
11
    /// Represents an item stored in a priority queue.
...
...
21
    /// <typeparam name="TValue">The type of object in the queue.</typeparam>
13
    /// <typeparam name="TValue">The type of object in the queue.</typeparam>
22
    /// <typeparam name="TPriority">The type of the priority field.</typeparam>
14
    /// <typeparam name="TPriority">The type of the priority field.</typeparam>
23
    [Serializable]
15
    [Serializable]
24
    [ComVisible(false)]
25
    public struct PriorityQueueItem<TValue, TPriority>
16
    public struct PriorityQueueItem<TValue, TPriority>
26
    {
17
    {
27
        private TValue value;
18
        private TValue value;