Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    PriorityQueue<T> Class

    Namespace: Stride.Core.Collections
    Assembly: Stride.Core.dll

    Represents a sorted queue, with logarithmic time insertion and deletion.

    System.Object → PriorityQueue<T>
    Derived from PriorityQueue<T>:

    public class PriorityQueue<T>
    Type Parameters
    Name Description
    T

    The type of the elements in the queue.

    Name Description
    Constructors
    PriorityQueue()
    PriorityQueue(IComparer<T>)
    Properties
    Count
    Empty
    Methods
    Clear()
    Dequeue()

    Removes and returns the object at the beginning of the PriorityQueue<T>.

    Enqueue(T)

    Adds an object to the PriorityQueue<T> and sorts underlying container.

    Peek()

    Returns the object at the beginning of the PriorityQueue<T>, without removing it.

    Remove(T)
    | Improve this Doc View Source

    Constructors


    PriorityQueue()

    public PriorityQueue()

    PriorityQueue(IComparer<T>)

    public PriorityQueue(IComparer<T> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<T> comparer
    | Improve this Doc View Source

    Properties


    Count

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

    Empty

    public bool Empty { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Methods


    Clear()

    public void Clear()

    Dequeue()

    Removes and returns the object at the beginning of the PriorityQueue<T>.

    public T Dequeue()
    Returns
    Type Description
    T

    The object at the beginning of the PriorityQueue<T>.


    Enqueue(T)

    Adds an object to the PriorityQueue<T> and sorts underlying container.

    public void Enqueue(T item)
    Parameters
    Type Name Description
    T item

    The object to add to the queue.


    Peek()

    Returns the object at the beginning of the PriorityQueue<T>, without removing it.

    public T Peek()
    Returns
    Type Description
    T

    The object at the beginning of the PriorityQueue<T>.


    Remove(T)

    public void Remove(T item)
    Parameters
    Type Name Description
    T item

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation