SbHeap - Online Linux Manual Page

Section : 3
Updated : Mon Jan 25 2021
Source : Version 3.1.3
Note : Coin

NAMESbHeap − The SbHeap class is a generic heap class​.

SYNOPSIS
#include <Inventor/SbHeap​.h>

Public Member FunctionsSbHeap (const SbHeapFuncs &SbHeapFuncs, const int initsize=1024)
~SbHeap ()
void emptyHeap (void)
int size (void) const
int add (void *obj)
void remove (const int pos)
void remove (void *obj)
void * extractMin ()
void * getMin ()
void * operator[] (const int idx)
void newWeight (void *obj, int hpos=−1)
SbBool buildHeap (SbBool(*progresscb)(float percentage, void *data)=NULL, void *data=NULL)
SbBool traverseHeap (SbBool(*func)(void *, void *), void *userdata) const

Detailed DescriptionThe SbHeap class is a generic heap class​. FIXME: write doc Note: SbHeap is an extension versus the Open Inventor API​.

Constructor & Destructor Documentation

SbHeap::SbHeap (const SbHeapFuncs & hFuncs, const int initsize = 1024)Constructor​. hFuncs specifies the functions for modifying and returning information about the heap object, initsize specifies the initial number of allocated elements​. This array will automatically grow when necessary, but if you know approximately how many elements the heap will contain, you should supply this to avoid some reallocs​.

SbHeap::~SbHeap (void)Destructor​.

Member Function Documentation

void SbHeap::emptyHeap (void)Removes all the elements from the heap​.

int SbHeap::size (void) constReturns the number of elements in the heap​.

int SbHeap::add (void * obj)Adds an element to the heap​. Returns the element's heap position​.

void SbHeap::remove (const int idx)Removes an element from the heap​.

void SbHeap::remove (void * obj)This is an overloaded member function, provided for convenience​. It differs from the above function only in what argument(s) it accepts​.

void * SbHeap::extractMin (void)Returns and removes the first element in the heap, or NULL if heap is empty​.

void * SbHeap::getMin (void)Returns the first element in the heap, or NULL if heap is empty​.

void * SbHeap::operator[] (const int idx)Returns the heap element at index idx in the heap​.

void SbHeap::newWeight (void * obj, int hpos = −1)Fixes heap if necessary when the element at hpos has changed weight​. If you know the element's heap position you can supply it in hpos​.

SbBool SbHeap::buildHeap (SbBool(*)(float percentage, void *data) progresscb = NULL, void * data = NULL)Builds heap out of randomly ordered data-structure​.

SbBool SbHeap::traverseHeap (SbBool(*)(void *, void *) func, void * userdata) constTraverses each heap elements, and calls func for each element​.

AuthorGenerated automatically by Doxygen for Coin from the source code​.
0
Johanes Gumabo
Data Size   :   15,500 byte
man-SbHeap.3coin3Build   :   2025-03-22, 13:26   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 2,084,062
Visitor ID   :     :  
Visitor IP   :   216.73.216.62   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   37.751000 x -97.822000   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :     :  
Provider Province   :   ,   :   ,
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 - 25.03.22
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 johanesgumabo@gmail.com.
Help me, linux0001.com will expire on July 16, 2025. I have no money to renew it. View detail

If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.