PriorityQueue
Introduction
vtkPriorityQueue is a general object for creating and manipulating lists of object ids (e.g., point or cell ids). Object ids are sorted according to a user-specified priority, where entries at the top of the queue have the smallest values.
Methods
deleteById
Delete an element from the queue by its ID.
| Argument | Type | Required | Description |
|---|---|---|---|
id | Number | Yes | The id of the element. |
extend
Method used to decorate a given object (publicAPI+model) with vtkPriorityQueue characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IPriorityQueueInitialValues | No | (default: {}) |
length
Get the length of the queue.
newInstance
Method used to create a new instance of vtkPriorityQueue
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IPriorityQueueInitialValues | No | for pre-setting some of its content |
pop
push
Push an element to the queue while defining a priority.
| Argument | Type | Required | Description |
|---|---|---|---|
priority | Number | Yes | The priority of the element. |
element | Yes |