Search Results for

    Show / Hide Table of Contents

    Class DynamicPriorityQueue<T>

    Inheritance
    Object
    DynamicPriorityQueue<T>
    Implements
    IEnumerable<T>
    IEnumerable
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public class DynamicPriorityQueue<T> : IEnumerable<T>, IEnumerable where T : DynamicPriorityQueueNode
    Type Parameters
    Name Description
    T

    Constructors

    DynamicPriorityQueue()

    Declaration
    public DynamicPriorityQueue()

    Fields

    EnableDebugChecks

    Declaration
    public bool EnableDebugChecks
    Field Value
    Type Description
    Boolean

    Properties

    Count

    number of nodes currently in queue

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    First

    node at head of queue

    Declaration
    public T First { get; }
    Property Value
    Type Description
    T

    FirstPriority

    Priority of node at head of queue

    Declaration
    public float FirstPriority { get; }
    Property Value
    Type Description
    Single

    Methods

    Clear(Boolean)

    reset the queue to empty state. if bFreeMemory is false, we don't discard internal data structures, so there will be less allocation next time (this does not make a huge difference...)

    Declaration
    public void Clear(bool bFreeMemory = true)
    Parameters
    Type Name Description
    Boolean bFreeMemory

    Contains(T)

    constant-time check to see if node is already in queue

    Declaration
    public bool Contains(T node)
    Parameters
    Type Name Description
    T node
    Returns
    Type Description
    Boolean

    DebugPrint()

    Declaration
    public void DebugPrint()

    Dequeue()

    remove node at head of queue, update queue, and return that node

    Declaration
    public T Dequeue()
    Returns
    Type Description
    T

    Enqueue(T, Single)

    Add node to list w/ given priority Behavior is undefined if you call w/ same node twice

    Declaration
    public void Enqueue(T node, float priority)
    Parameters
    Type Name Description
    T node
    Single priority

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>

    IsValidQueue()

    Check if queue has been corrupted

    Declaration
    public bool IsValidQueue()
    Returns
    Type Description
    Boolean

    Remove(T)

    remove this node from queue. Undefined behavior if called w/ same node twice! Behavior is undefined if you call w/ node that is not in queue

    Declaration
    public void Remove(T node)
    Parameters
    Type Name Description
    T node

    Update(T, Single)

    update priority at node, and then move it to correct position in queue Behavior is undefined if you call w/ node that is not in queue

    Declaration
    public void Update(T node, float priority)
    Parameters
    Type Name Description
    T node
    Single priority

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    In This Article
    Back to top ViRGIS VR GIS