microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
21.36k stars 3.14k forks source link

Can we make MinHeap internal? #615

Closed stephentoub closed 1 year ago

stephentoub commented 1 year ago

.NET added a PriorityQueue<> type to its core collections in .NET 6. Can we avoid making Semantic Kernel's MinHeap<> public? It can continue to use it internally when targeting netstandard2.0, but when it eventually multitargets and/or builds for .NET 6+, it can just rely on the built-in implementation.

https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/SemanticKernel/Memory/Collections/MinHeap.cs

dluc commented 1 year ago

@dluc make class internal. For more recent .NET version we should use PriorityQueue<>