PARP Research Group University of Murcia, Spain


examples/OpenCV/siftDetector/hess/minpq.h File Reference

#include <stdlib.h>

Go to the source code of this file.

Classes

struct  pq_node
struct  min_pq

Defines

#define MINPQ_INIT_NALLOCD   512

Functions

struct min_pqminpq_init ()
int minpq_insert (struct min_pq *min_pq, void *data, int key)
void * minpq_get_min (struct min_pq *min_pq)
void * minpq_extract_min (struct min_pq *min_pq)
void minpq_release (struct min_pq **min_pq)


Detailed Description

Functions and structures for implementing a minimizing priority queue.

Copyright (C) 2006-2007 Rob Hess <hess@eecs.oregonstate.edu>

Version:
1.1.1-20070913

Definition in file minpq.h.


Function Documentation

void* minpq_extract_min ( struct min_pq min_pq  ) 

Removes and returns the element of a minimizing priority queue with the smallest key.

Parameters:
min_pq a minimizing priority queue
Returns:
Returns the element of min_pq with the smallest key of NULL if min_pq is empty

Definition at line 129 of file minpq.cpp.

void* minpq_get_min ( struct min_pq min_pq  ) 

Returns the element of a minimizing priority queue with the smallest key without removing it from the queue.

Parameters:
min_pq a minimizing priority queue
Returns:
Returns the element of min_pq with the smallest key or NULL if min_pq is empty

Definition at line 108 of file minpq.cpp.

struct min_pq* minpq_init (  )  [read]

Creates a new minimizing priority queue.

Definition at line 49 of file minpq.cpp.

int minpq_insert ( struct min_pq min_pq,
void *  data,
int  key 
)

Inserts an element into a minimizing priority queue.

Parameters:
min_pq a minimizing priority queue
data the data to be inserted
key the key to be associated with data
Returns:
Returns 0 on success or 1 on failure.

Definition at line 72 of file minpq.cpp.

void minpq_release ( struct min_pq **  min_pq  ) 

De-allocates the memory held by a minimizing priorioty queue

Parameters:
min_pq pointer to a minimizing priority queue

Definition at line 152 of file minpq.cpp.




QVision framework. PARP research group, copyright 2007, 2008.