Loading [MathJax]/extensions/tex2jax.js
Jolt Physics
A multi core friendly Game Physics Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BinaryHeap.h File Reference

Go to the source code of this file.

Functions

template<typename Iterator , typename Pred >
JPH_NAMESPACE_BEGIN void BinaryHeapPush (Iterator inBegin, Iterator inEnd, Pred inPred)
 
template<typename Iterator , typename Pred >
void BinaryHeapPop (Iterator inBegin, Iterator inEnd, Pred inPred)
 

Function Documentation

◆ BinaryHeapPop()

template<typename Iterator , typename Pred >
void BinaryHeapPop ( Iterator  inBegin,
Iterator  inEnd,
Pred  inPred 
)

Pop an element from a binary max-heap. [inBegin, inEnd) must be a valid heap. The largest element will be removed from the heap. The heap will be [inBegin, inEnd - 1) after this call. inPred is a function that returns true if the first element is less or equal than the second element. See: https://en.wikipedia.org/wiki/Binary_heap

◆ BinaryHeapPush()

template<typename Iterator , typename Pred >
JPH_NAMESPACE_BEGIN void BinaryHeapPush ( Iterator  inBegin,
Iterator  inEnd,
Pred  inPred 
)

Push a new element into a binary max-heap. [inBegin, inEnd - 1) must be a a valid heap. Element inEnd - 1 will be inserted into the heap. The heap will be [inBegin, inEnd) after this call. inPred is a function that returns true if the first element is less or equal than the second element. See: https://en.wikipedia.org/wiki/Binary_heap