heap.h - Online Linux Manual PageSection : 3
Updated : Mon Jan 25 2021
Source : Version 4.0.0
Note : Coin

NAMEheap.h

SYNOPSIS
#include <Inventor/C/basic​.h>

Typedefstypedef int cc_heap_compare_cb(void *o1, void *o2)
typedef struct cc_heap cc_heap

Functionscc_heap * cc_heap_construct (unsigned int size, cc_heap_compare_cb *comparecb, SbBool support_remove)
void cc_heap_destruct (cc_heap *h)
void cc_heap_clear (cc_heap *h)
void cc_heap_add (cc_heap *h, void *o)
void * cc_heap_get_top (cc_heap *h)
void * cc_heap_extract_top (cc_heap *h)
int cc_heap_remove (cc_heap *h, void *o)
unsigned int cc_heap_elements (cc_heap *h)
SbBool cc_heap_empty (cc_heap *h)

Typedef Documentation

int cc_heap_compare_cbA type definition for heap compare callback function​.

struct cc_heap cc_heapA type definition for the cc_heap structure

Function Documentation

cc_heap* cc_heap_construct (unsigned int size, cc_heap_compare_cb * comparecb, SbBool support_remove)Construct a heap​. size is the initial array size​. comparecb should return a negative value if the first element is less than the second, zero if they are equal and a positive value if the first element is greater than the second​. support_remove specifies if the heap should support removal of elements (other than the top element) after they are added; this requires use of a hash table to be efficent, but as a slight runtime overhead will be incurred for the add and extract_top functions the support can be disabled if you don't need it​.

void cc_heap_destruct (cc_heap * h)Destruct the heap h​.

void cc_heap_clear (cc_heap * h)Clear/remove all elements in the heap h​.

void cc_heap_add (cc_heap * h, void * o)Add the element o to the heap h​.

void* cc_heap_get_top (cc_heap * h)Returns the top element from the heap h​. If the heap is empty, NULL is returned​.

void* cc_heap_extract_top (cc_heap * h)Returns and removes the top element from the heap h​. If the heap is empty, NULL is returned​.

int cc_heap_remove (cc_heap * h, void * o)Remove o from the heap h; if present TRUE is returned, otherwise FALSE​. Please note that the heap must have been created with support_remove​.

unsigned int cc_heap_elements (cc_heap * h)Returns the number of elements in the heap h​.

SbBool cc_heap_empty (cc_heap * h)Returns TRUE of the heap h is empty; otherwise FALSE​.

AuthorGenerated automatically by Doxygen for Coin from the source code​.
0
Johanes Gumabo
Data Size   :   13,593 byte
man-heap.h.3coin4Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 168,232
Visitor ID   :     :  
Visitor IP   :   3.145.152.146   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.