Priority Queue

A simple priority queue designed for use with 1xN matlab vectors where the comparator column can be defined during construction.
550 download
Aggiornato 29 ott 2018

Visualizza la licenza

A simple priority queue designed for use with 1xN matlab vectors where the comparator column can be defined during construction. Utilizes a minheap to ensure quick operations even with queues of larger size (100,000 elements). The following methods are currently implemented: insert, remove, peek, size, clear, contains, elements. Insert allows for 1xN vectors where the only requirement for N is that it must be greater or equal to the comparator column defined during initialization. Remove will remove and return the first element of the queue, or any matching vectors if an input vector is given. Peek returns the first element of queue without removing. Contains returns 1 if a specified vector is found in the queue, 0 otherwise. Elements returns the full queue cell array.

Cita come

Andrew Woodward (2025). Priority Queue (https://it.mathworks.com/matlabcentral/fileexchange/69142-priority-queue), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2015b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Linear Algebra in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.2

bug fix in remove

1.0.1

fixed the bubble down operation in remove

1.0.0