2

.NET comes with some built in collections (stack, queue, dictionary, list etc.) but others common collections, like priority queues, are missing. There are many third party collection libraries on NuGet but I was wondering if there is an official Microsoft one (like the BCL immutable collections now called System.Collections.Immutable) library with things like (mutable) priorities queues?

EDIT: Important clarification (comment by @rmunn):

This question is not asking to recommend a library for X, it is asking a factual question, "Are there any official Microsoft libraries for X?"

weir
  • 3,914
  • 2
  • 23
  • 36
J D
  • 46,493
  • 12
  • 162
  • 266
  • I searched hard but was not able to find one. But to be honest it's easy to implement yourself, and if you don't want to - it's easy to verify third party implementation makes sense if you have some fears about that. – Evk Mar 02 '17 at 17:46
  • There is no official Microsoft PriorityQueue implementation. Is there some reason you don't want to use a 3rd party version? – Brandon Kramer Mar 02 '17 at 17:48
  • @BrandonKramer: I'm happy to use proprietary third party libraries if there is no official Microsoft solution but I just wanted to make sure there is no official solution before going "off road". – J D Mar 02 '17 at 18:08
  • 1
    Possible duplicate of [Priority queue in .Net](http://stackoverflow.com/questions/102398/priority-queue-in-net) – Anderson Pimentel Mar 02 '17 at 18:15
  • 1
    Ah, that makes sense. I can understand preferring official solutions to 3rd party ones. – Brandon Kramer Mar 02 '17 at 18:23
  • 3
    This question should not have been marked off-topic. It is not asking to recommend a library for X, it is asking a factual question, "Are there any *official* Microsoft libraries for X?". I've voted to reopen it, for that reason. – rmunn Mar 03 '17 at 06:50
  • Of course, that's still asking to "find" an "off-site resource", so I'm not sure that it meets the criteria for reopening... – Heretic Monkey Mar 03 '17 at 22:51

2 Answers2

7

No, not yet, anyway. Here is everything Microsoft offers at the moment.

EDIT: Microsoft has written (and shared online) 2 internal PriorityQueue classes within the .NET Framework. You could use their code.

See also: Priority queue in .Net

EDIT 2: You could also keep your eye on this space in case Microsoft ever publishes the type of NuGet package your question suggested. But at the moment, no dice.

Community
  • 1
  • 1
weir
  • 3,914
  • 2
  • 23
  • 36
0

I'm not sure if you already looked at it, but the System.Collections.Specializednamespace contains quite some hidden gems. Also the System.Linq namespace can be worth a look.

Heinz Kessler
  • 1,410
  • 9
  • 19