GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-f63024f571
heap.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "type.h"
#include "heap.h"
Include dependency graph for heap.c:

Go to the source code of this file.

Functions

void dglHeapInit (dglHeap_s *pheap)
 
void dglHeapFree (dglHeap_s *pheap, dglHeapCancelItem_fn pfnCancelItem)
 
int dglHeapInsertMin (dglHeap_s *pheap, long key, unsigned char flags, dglHeapData_u value)
 
int dglHeapExtractMin (dglHeap_s *pheap, dglHeapNode_s *pnoderet)
 
int dglHeapInsertMax (dglHeap_s *pheap, long key, unsigned char flags, dglHeapData_u value)
 
int dglHeapExtractMax (dglHeap_s *pheap, dglHeapNode_s *pnoderet)
 

Function Documentation

◆ dglHeapExtractMax()

int dglHeapExtractMax ( dglHeap_s pheap,
dglHeapNode_s pnoderet 
)

Definition at line 134 of file heap.c.

References _dglHeap::index, _dglHeapNode::key, and _dglHeap::pnode.

◆ dglHeapExtractMin()

int dglHeapExtractMin ( dglHeap_s pheap,
dglHeapNode_s pnoderet 
)

Definition at line 76 of file heap.c.

References _dglHeap::index, _dglHeapNode::key, and _dglHeap::pnode.

Referenced by DGL_SPAN_MINIMUM_SPANNING_FUNC().

◆ dglHeapFree()

void dglHeapFree ( dglHeap_s pheap,
dglHeapCancelItem_fn  pfnCancelItem 
)

Definition at line 35 of file heap.c.

References free(), _dglHeap::index, NULL, and _dglHeap::pnode.

Referenced by DGL_SP_CACHE_RELEASE_FUNC(), and DGL_SPAN_MINIMUM_SPANNING_FUNC().

◆ dglHeapInit()

◆ dglHeapInsertMax()

int dglHeapInsertMax ( dglHeap_s pheap,
long  key,
unsigned char  flags,
dglHeapData_u  value 
)

Definition at line 108 of file heap.c.

◆ dglHeapInsertMin()

int dglHeapInsertMin ( dglHeap_s pheap,
long  key,
unsigned char  flags,
dglHeapData_u  value 
)