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 176 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 200 of file heap.h.

Member Function Documentation

◆ clear()

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

Clears the heap.

Definition at line 225 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 217 of file heap.h.

◆ getMax()

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

Definition at line 399 of file heap.h.

◆ getMin()

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

Definition at line 389 of file heap.h.

◆ insert()

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

Definition at line 230 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 349 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 304 of file heap.h.

◆ size()

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

Definition at line 208 of file heap.h.

Member Data Documentation

◆ capacity_

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

Definition at line 189 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 188 of file heap.h.

◆ size_

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

Definition at line 190 of file heap.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:39:00