|
EMAN2
|
Template class for a priority queue. More...
#include <priority_queue.h>
Public Member Functions | |
| PriorityQueue (int max) | |
| Constructor. More... | |
| ~PriorityQueue () | |
| Destructor. More... | |
| int | getLength () |
| Get current length. More... | |
| bool | isEmpty () |
| Test whether empty. More... | |
| bool | isFull () |
| Test whether full. More... | |
| void | add (ValueT *v, KeyT k) |
| Add an element. More... | |
| void | remove (ValueT *&v, KeyT &k) |
| Remove an element. More... | |
Public Attributes | |
| int | queueLength |
| Number of elements in queue. More... | |
| int | maxLength |
| Maximum number of elements int he queue. More... | |
| ValueT ** | valueQueue |
| Queue of elements. More... | |
| KeyT * | keyQueue |
| Queue of keys. More... | |
Template class for a priority queue.
The smallest element is at the front
Definition at line 17 of file priority_queue.h.
|
inline |
Constructor.
Definition at line 37 of file priority_queue.h.
|
inline |
Destructor.
Definition at line 49 of file priority_queue.h.
References EMAN::PriorityQueue< ValueT, KeyT >::keyQueue, EMAN::PriorityQueue< ValueT, KeyT >::queueLength, and EMAN::PriorityQueue< ValueT, KeyT >::valueQueue.
|
inline |
Add an element.
Definition at line 86 of file priority_queue.h.
References EMAN::PriorityQueue< ValueT, KeyT >::isFull(), EMAN::PriorityQueue< ValueT, KeyT >::keyQueue, EMAN::PriorityQueue< ValueT, KeyT >::queueLength, and EMAN::PriorityQueue< ValueT, KeyT >::valueQueue.
Referenced by wustl_mm::SkeletonMaker::Volume::curveSkeleton(), wustl_mm::SkeletonMaker::Volume::curveSkeleton2D(), wustl_mm::SkeletonMaker::Volume::skeleton(), and wustl_mm::SkeletonMaker::Volume::surfaceSkeletonPres().
|
inline |
Get current length.
Definition at line 62 of file priority_queue.h.
References EMAN::PriorityQueue< ValueT, KeyT >::queueLength.
|
inline |
Test whether empty.
Definition at line 70 of file priority_queue.h.
Referenced by wustl_mm::SkeletonMaker::Volume::curveSkeleton(), wustl_mm::SkeletonMaker::Volume::curveSkeleton2D(), EMAN::PriorityQueue< ValueT, KeyT >::remove(), wustl_mm::SkeletonMaker::Volume::skeleton(), and wustl_mm::SkeletonMaker::Volume::surfaceSkeletonPres().
|
inline |
Test whether full.
Definition at line 78 of file priority_queue.h.
Referenced by EMAN::PriorityQueue< ValueT, KeyT >::add().
|
inline |
Remove an element.
Definition at line 120 of file priority_queue.h.
References EMAN::PriorityQueue< ValueT, KeyT >::isEmpty(), EMAN::PriorityQueue< ValueT, KeyT >::keyQueue, EMAN::PriorityQueue< ValueT, KeyT >::queueLength, and EMAN::PriorityQueue< ValueT, KeyT >::valueQueue.
Referenced by wustl_mm::SkeletonMaker::Volume::curveSkeleton(), wustl_mm::SkeletonMaker::Volume::curveSkeleton2D(), wustl_mm::SkeletonMaker::Volume::skeleton(), and wustl_mm::SkeletonMaker::Volume::surfaceSkeletonPres().
| KeyT* EMAN::PriorityQueue< ValueT, KeyT >::keyQueue |
Queue of keys.
Definition at line 30 of file priority_queue.h.
Referenced by EMAN::PriorityQueue< ValueT, KeyT >::add(), EMAN::PriorityQueue< ValueT, KeyT >::remove(), and EMAN::PriorityQueue< ValueT, KeyT >::~PriorityQueue().
| int EMAN::PriorityQueue< ValueT, KeyT >::maxLength |
Maximum number of elements int he queue.
Definition at line 24 of file priority_queue.h.
| int EMAN::PriorityQueue< ValueT, KeyT >::queueLength |
Number of elements in queue.
Definition at line 21 of file priority_queue.h.
Referenced by EMAN::PriorityQueue< ValueT, KeyT >::add(), EMAN::PriorityQueue< ValueT, KeyT >::getLength(), EMAN::PriorityQueue< ValueT, KeyT >::remove(), and EMAN::PriorityQueue< ValueT, KeyT >::~PriorityQueue().
| ValueT** EMAN::PriorityQueue< ValueT, KeyT >::valueQueue |
Queue of elements.
Definition at line 27 of file priority_queue.h.
Referenced by EMAN::PriorityQueue< ValueT, KeyT >::add(), EMAN::PriorityQueue< ValueT, KeyT >::remove(), and EMAN::PriorityQueue< ValueT, KeyT >::~PriorityQueue().