Click or drag to resize
Accord.NET (logo)

PriorityQueueT Constructor

Namespace:  Accord.Collections
Assembly:  Accord (in Accord.dll) Version: 3.6.0
Syntax
public PriorityQueue(
	int capacity = 10,
	PriorityOrder order = PriorityOrder.Minimum
)
Request Example View Source

Parameters

capacity (Optional)
Type: SystemInt32
The initial capacity for the queue.
order (Optional)
Type: Accord.CollectionsPriorityOrder
The sort order for the queue. If set to Minimum, items that have a smaller priority number are the next to be dequeued. If set to Maximum, items with larger priority numbers are the ones with higher priority and will be the next to be dequeued. Default is Minimum.
Exceptions
ExceptionCondition
InvalidOperationExceptionNew queue size cannot be smaller than 1.
See Also