---
name: "SbHeapFuncs"
section: "3"
platform: "linux"
package: "coin"
version: "1:4.0.10-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SbHeapFuncs"
---

# SbHeapFuncs(3)

The SbHeapFuncs struct is used to specify functions on heap elements.

## NAME

SbHeapFuncs - The **SbHeapFuncs** struct is used to specify functions on heap elements.

## SYNOPSIS

\#include \<Inventor/SbHeap.h\>

### Public Attributes

float(\* **eval\_func** )(void \*)\
 int(\* **get\_index\_func** )(void \*)\
 void(\* **set\_index\_func** )(void \*, int)\

## Detailed Description

The **SbHeapFuncs** struct is used to specify functions on heap elements.

## Member Data Documentation

### float(\* SbHeapFuncs::eval\_func) (void \*)

The *eval\_func* member is a pointer to a function that should return a weight-value for a heap element. Smaller elements are extracted first from the heap.

### int(\* SbHeapFuncs::get\_index\_func) (void \*)

*get\_index\_func* is a pointer to a function which should return the element's heap index. If you want to remove an element from the heap (other than the first element), or change the weight for a heap element, you must supply the two index functions. Each element must then store its heap index in its own data structures.

### void(\* SbHeapFuncs::set\_index\_func) (void \*, int)

*set\_index\_func* is used to set this index value, and will be called whenever the element is moved in the heap.

## Author

Generated automatically by Doxygen for Coin from the source code.
