Blender V2.61 - r43446
Typedefs | Functions

BLI_heap.h File Reference

A heap / priority queue ADT. More...

Go to the source code of this file.

Typedefs

typedef struct Heap Heap
typedef struct HeapNode HeapNode
typedef void(* HeapFreeFP )(void *ptr)

Functions

HeapBLI_heap_new (void)
void BLI_heap_free (Heap *heap, HeapFreeFP ptrfreefp)
HeapNodeBLI_heap_insert (Heap *heap, float value, void *ptr)
void BLI_heap_remove (Heap *heap, HeapNode *node)
int BLI_heap_empty (Heap *heap)
int BLI_heap_size (Heap *heap)
HeapNodeBLI_heap_top (Heap *heap)
void * BLI_heap_popmin (Heap *heap)
float BLI_heap_node_value (HeapNode *heap)
void * BLI_heap_node_ptr (HeapNode *heap)

Detailed Description

A heap / priority queue ADT.

Definition in file BLI_heap.h.


Typedef Documentation

typedef struct Heap Heap

Definition at line 38 of file BLI_heap.h.

typedef void(* HeapFreeFP)(void *ptr)

Definition at line 41 of file BLI_heap.h.

typedef struct HeapNode HeapNode

Definition at line 39 of file BLI_heap.h.


Function Documentation

int BLI_heap_empty ( Heap heap)

Definition at line 164 of file BLI_heap.c.

References Heap::size.

Referenced by edgetag_shortest_path(), and select_vertex_path_exec().

void BLI_heap_free ( Heap heap,
HeapFreeFP  ptrfreefp 
)
HeapNode* BLI_heap_insert ( Heap heap,
float  value,
void *  ptr 
)
Heap* BLI_heap_new ( void  )
void* BLI_heap_node_ptr ( HeapNode heap)

Definition at line 217 of file BLI_heap.c.

References HeapNode::ptr.

float BLI_heap_node_value ( HeapNode heap)

Definition at line 212 of file BLI_heap.c.

References HeapNode::value.

Referenced by shortestPathsFromVert().

void* BLI_heap_popmin ( Heap heap)
void BLI_heap_remove ( Heap heap,
HeapNode node 
)

Definition at line 198 of file BLI_heap.c.

References BLI_heap_popmin(), HEAP_PARENT, HEAP_SWAP, i, HeapNode::index, and p.

Referenced by p_chart_fill_boundary().

int BLI_heap_size ( Heap heap)

Definition at line 169 of file BLI_heap.c.

References Heap::size.

Referenced by shortestPathsFromVert().

HeapNode* BLI_heap_top ( Heap heap)

Definition at line 174 of file BLI_heap.c.

References Heap::tree.

Referenced by shortestPathsFromVert().