# PriorityQueueIntDouble class

Namespace: [Grasshopper2.Collections](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.collections.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class PriorityQueueIntDouble
```

A specialized min-priority queue that stores (int Element, double Priority) pairs, always ordering by the smallest `Priority` first.

## Constructors

- [PriorityQueueIntDouble](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/ctor.md): Initializes a new instance of the specialized priority queue.

## Properties

- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/count.md): Gets the current number of elements contained in the queue.

## Methods

- [Enqueue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/enqueue.md): Adds the specified `element` with associated `priority` to the queue.
- [RemoveElements](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/removeelements.md): Remove all the given elements in the queue. This is a relatively expensive method, best avoid calling it too often.
- [TryDequeue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/trydequeue.md): Try and dequeue the element with the highest priority.
- [TryPeek](https://developer.rhino3d.com/api/gh2/type/grasshopper2.collections.priorityqueueintdouble/trypeek.md): Try and peek at the element with the highest priority.
