cucon/pritree.h: Priority Queues with Explicit Priority

Data Structures

struct  cucon_pritree
struct  cucon_prinode


#define cucon_pritree_front(pritree)   (CU_MARG(cucon_pritree_t, pritree)->front)
#define cucon_pritree_is_empty(pritree)   (CU_MARG(cucon_pritree_t, pritree)->front==NULL)
#define cucon_pritree_size(pritree)   (CU_MARG(cucon_pritree_t, pritree)->size)
#define cucon_prinode_priority(prinode)   (CU_MARG(cucon_prinode_t, prinode)->priority)


void cucon_pritree_init (cucon_pritree_t pritree)
cucon_pritree_t cucon_pritree_new (void)
void cucon_pritree_pop (cucon_pritree_t pritree)
void cucon_pritree_insert_init (cucon_pritree_t pritree, cucon_prinode_t prinode, double priority)
void cucon_pritree_erase (cucon_pritree_t pritree, cucon_prinode_t prinode)
void cucon_pritree_change_priority (cucon_pritree_t pritree, cucon_prinode_t prinode, double priority)
void cucon_pritree_add_to_all_priorities (cucon_pritree_t pritree, double delta)
cu_bool_t cucon_prinode_conj_down_to (cucon_prinode_t prinode, double min_priority, cu_clop(cb, cu_bool_t, cucon_prinode_t))
void cucon_pritree_dump_priorities (cucon_pritree_t pritree, FILE *out)

Define Documentation

#define cucon_prinode_priority ( prinode   )     (CU_MARG(cucon_prinode_t, prinode)->priority)

The priority of prinode.

#define cucon_pritree_front ( pritree   )     (CU_MARG(cucon_pritree_t, pritree)->front)

The front node of pretree.

#define cucon_pritree_is_empty ( pritree   )     (CU_MARG(cucon_pritree_t, pritree)->front==NULL)

True iff pritree is empty.

#define cucon_pritree_size ( pritree   )     (CU_MARG(cucon_pritree_t, pritree)->size)

The number of nodes in pretree.

Function Documentation

cu_bool_t cucon_prinode_conj_down_to ( cucon_prinode_t  prinode,
double  min_priority,
cu_clop(cb, cu_bool_t, cucon_prinode_t  

Sequential conjunction over nodes in order from highest priority down to min_priority.

void cucon_pritree_add_to_all_priorities ( cucon_pritree_t  pritree,
double  delta 

Add a constant to the priorities of all nodes.

void cucon_pritree_change_priority ( cucon_pritree_t  pritree,
cucon_prinode_t  prinode,
double  priority 

Modify the priority of prinode to priority.

void cucon_pritree_dump_priorities ( cucon_pritree_t  pritree,
FILE *  out 

Debug dump.

void cucon_pritree_erase ( cucon_pritree_t  pritree,
cucon_prinode_t  prinode 

Erase prinode from pritree.

void cucon_pritree_init ( cucon_pritree_t  pritree  ) 

Construct an empty tree.

void cucon_pritree_insert_init ( cucon_pritree_t  pritree,
cucon_prinode_t  prinode,
double  priority 

Construct prinode with priority priority and insert it into pritree.

cucon_pritree_t cucon_pritree_new ( void   ) 

Return an empty tree.

void cucon_pritree_pop ( cucon_pritree_t  pritree  ) 

Pop off the front of pretree.

pritree is non-empty.
Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.