package mutable
Type Members
-
abstract
class
PriorityQueueAggregator
[A, +C] extends MonoidAggregator[A, PriorityQueue[A], C]
This gives you the
max
smallest items.This gives you the
max
smallest items. If you want the biggest reverse the Ordering. Note that PriorityQueue is mutable so it is a good idea to copy this into an immutable view before using it, as is done in PriorityQueueToListAggregator -
class
PriorityQueueMonoid
[K] extends Monoid[PriorityQueue[K]]
for sort-with take and better performance over large values The priority queues should be MAX queues, i.e.
for sort-with take and better performance over large values The priority queues should be MAX queues, i.e. the ones we want least should be in the .peek position This is MUCH Faster for Top-K algorithms Note this is MUTABLE. When you put something in plus, it is changed!
-
class
PriorityQueueToListAggregator
[A] extends PriorityQueueAggregator[A, List[A]]
Should probably be your default Top-K implementation