Classes | Public Member Functions | Private Attributes | List of all members
rtflann::IntervalHeap< T > Class Template Reference

#include <heap.h>

Classes

struct  Interval
 

Public Member Functions

void clear ()
 
bool empty ()
 
bool getMax (T &value)
 
bool getMin (T &value)
 
void insert (const T &value)
 
 IntervalHeap (int capacity)
 
bool popMax (T &value)
 
bool popMin (T &value)
 
size_t size ()
 

Private Attributes

size_t capacity_
 
std::vector< Intervalheap
 
size_t size_
 

Detailed Description

template<typename T>
class rtflann::IntervalHeap< T >

Definition at line 207 of file heap.h.

Constructor & Destructor Documentation

◆ IntervalHeap()

template<typename T >
rtflann::IntervalHeap< T >::IntervalHeap ( int  capacity)
inline

Constructor.

Params: size = heap size

Definition at line 231 of file heap.h.

Member Function Documentation

◆ clear()

template<typename T >
void rtflann::IntervalHeap< T >::clear ( )
inline

Clears the heap.

Definition at line 256 of file heap.h.

◆ empty()

template<typename T >
bool rtflann::IntervalHeap< T >::empty ( )
inline

Tests if the heap is empty

Returns
true is heap empty, false otherwise

Definition at line 248 of file heap.h.

◆ getMax()

template<typename T >
bool rtflann::IntervalHeap< T >::getMax ( T value)
inline

Definition at line 430 of file heap.h.

◆ getMin()

template<typename T >
bool rtflann::IntervalHeap< T >::getMin ( T value)
inline

Definition at line 420 of file heap.h.

◆ insert()

template<typename T >
void rtflann::IntervalHeap< T >::insert ( const T value)
inline

Definition at line 261 of file heap.h.

◆ popMax()

template<typename T >
bool rtflann::IntervalHeap< T >::popMax ( T value)
inline

Returns the element of maximum value from the heap

Parameters
value
Returns
false if heap empty

Definition at line 380 of file heap.h.

◆ popMin()

template<typename T >
bool rtflann::IntervalHeap< T >::popMin ( T value)
inline

Returns the node of minimum value from the heap

Parameters
valueout parameter used to return the min element
Returns
false if heap empty

Definition at line 335 of file heap.h.

◆ size()

template<typename T >
size_t rtflann::IntervalHeap< T >::size ( )
inline
Returns
Heap size

Definition at line 239 of file heap.h.

Member Data Documentation

◆ capacity_

template<typename T >
size_t rtflann::IntervalHeap< T >::capacity_
private

Definition at line 220 of file heap.h.

◆ heap

template<typename T >
std::vector<Interval> rtflann::IntervalHeap< T >::heap
private

Storage array for the heap. Type T must be comparable.

Definition at line 219 of file heap.h.

◆ size_

template<typename T >
size_t rtflann::IntervalHeap< T >::size_
private

Definition at line 221 of file heap.h.


The documentation for this class was generated from the following file:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:29