Skip to content

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.

ArgumentTypeRequiredDescription
idNumberYesThe id of the element.

extend

Method used to decorate a given object (publicAPI+model) with vtkPriorityQueue characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPriorityQueueInitialValuesNo(default: {})

length

Get the length of the queue.

newInstance

Method used to create a new instance of vtkPriorityQueue

ArgumentTypeRequiredDescription
initialValuesIPriorityQueueInitialValuesNofor pre-setting some of its content

pop

push

Push an element to the queue while defining a priority.

ArgumentTypeRequiredDescription
priorityNumberYesThe priority of the element.
elementYes