Fantasy
搜索结果

    显示/隐藏目录

    PriorityQueue<TElement, TPriority> 类

    优先队列

    继承
    object
    PriorityQueue<TElement, TPriority>
    继承成员
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.DataStructure.PriorityQueue
    程序集: Fantasy.Net.dll
    语法
    public sealed class PriorityQueue<TElement, TPriority> where TPriority : IComparable<TPriority>
    类型参数
    名称 描述
    TElement

    节点数据

    TPriority

    排序的类型、

    构造函数

    | 编辑本文 查看源代码

    PriorityQueue(int)

    声明
    public PriorityQueue(int initialCapacity = 16)
    参数
    类型 名称 描述
    int initialCapacity

    属性

    | 编辑本文 查看源代码

    Count

    声明
    public int Count { get; }
    属性值
    类型 描述
    int

    方法

    | 编辑本文 查看源代码

    Dequeue()

    声明
    public TElement Dequeue()
    返回
    类型 描述
    TElement
    | 编辑本文 查看源代码

    Enqueue(TElement, TPriority)

    声明
    public void Enqueue(TElement element, TPriority priority)
    参数
    类型 名称 描述
    TElement element
    TPriority priority
    | 编辑本文 查看源代码

    Peek()

    声明
    public TElement Peek()
    返回
    类型 描述
    TElement
    | 编辑本文 查看源代码

    TryDequeue(out TElement)

    声明
    public bool TryDequeue(out TElement element)
    参数
    类型 名称 描述
    TElement element
    返回
    类型 描述
    bool

    扩展方法

    JsonHelper.ToJson<T>(T)
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX