Microsimulation API: ssim::heap< T > Class Template Reference

Microsimulation API

Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ssim::heap< T > Class Template Reference

`#include <heap.h>`

## Public Types
typedef std::vector< T >::size_type | size_type
typedef std::vector< T >::iterator | iterator
typedef std::vector< T >::const_iterator | const_iterator

## Public Member Functions
bool | empty () throw ()
iterator | begin () throw ()
iterator | end () throw ()
const_iterator | begin () const throw ()
const_iterator | end () const throw ()
void | clear () throw ()
iterator | erase (iterator first, iterator last) throw ()
void | insert (const T &x) throw ()
T | pop_first () throw ()

## Private Member Functions
size_type | last () const throw ()

## Static Private Member Functions
static void | swap (T &first, T &second) throw ()
static size_type | left (size_type pos) throw ()
static size_type | right (size_type pos) throw ()
static size_type | parent (size_type pos) throw ()

## Private Attributes
std::vector< T > | a

## Static Private Attributes
static const size_type | FIRST = 0

## Detailed Description

### template<typename T>
class ssim::heap< T >

Definition at line 40 of file heap.h.

## Member Typedef Documentation

## ◆ const_iterator

template<typename T >

typedef std::vector<T>::const_iterator ssim::heap< T >::const_iterator

Definition at line 44 of file heap.h.

## ◆ iterator

template<typename T >

typedef std::vector<T>::iterator ssim::heap< T >::iterator

Definition at line 43 of file heap.h.

## ◆ size_type

template<typename T >

typedef std::vector<T>::size_type ssim::heap< T >::size_type

Definition at line 42 of file heap.h.

## Member Function Documentation

## ◆ begin() [1/2]

template<typename T >

iterator ssim::heap< T >::begin | ( |  | ) |
throw | ( |
| ) |  |
| inline

Definition at line 67 of file heap.h.

## ◆ begin() [2/2]

template<typename T >

const_iterator ssim::heap< T >::begin | ( |  | ) | const
throw | ( |
| ) |  |
| inline

Definition at line 69 of file heap.h.

## ◆ clear()

template<typename T >

void ssim::heap< T >::clear | ( |  | ) |
throw | ( |
| ) |  |
| inline

Definition at line 71 of file heap.h.

## ◆ empty()

template<typename T >

bool ssim::heap< T >::empty | ( |  | ) |
throw | ( |
| ) |  |
| inline

Definition at line 66 of file heap.h.

## ◆ end() [1/2]

template<typename T >

iterator ssim::heap< T >::end | ( |  | ) |
throw | ( |
| ) |  |
| inline

Definition at line 68 of file heap.h.

## ◆ end() [2/2]

template<typename T >

const_iterator ssim::heap< T >::end | ( |  | ) | const
throw | ( |
| ) |  |
| inline

Definition at line 70 of file heap.h.

## ◆ erase()

template<typename T >

iterator ssim::heap< T >::erase | ( | iterator | first,
|  | iterator | last
| ) |  |
throw | ( |
| ) |  |
| inline

Definition at line 72 of file heap.h.

## ◆ insert()

template<typename T >

void ssim::heap< T >::insert | ( | const T & | x | ) |
throw | ( |
| ) |  |
| inline

Definition at line 74 of file heap.h.

## ◆ last()

template<typename T >

size_type ssim::heap< T >::last | ( |  | ) | const
throw | ( |
| ) |  |
| inlineprivate

Definition at line 60 of file heap.h.

## ◆ left()

template<typename T >

static size_type ssim::heap< T >::left | ( | size_type | pos | ) |
throw | ( |
| ) |  |
| inlinestaticprivate

Definition at line 61 of file heap.h.

## ◆ parent()

template<typename T >

static size_type ssim::heap< T >::parent | ( | size_type | pos | ) |
throw | ( |
| ) |  |
| inlinestaticprivate

Definition at line 63 of file heap.h.

## ◆ pop_first()

template<typename T >

T ssim::heap< T >::pop_first | ( |  | ) |
throw | ( |
| ) |  |
| inline

Definition at line 89 of file heap.h.

## ◆ right()

template<typename T >

static size_type ssim::heap< T >::right | ( | size_type | pos | ) |
throw | ( |
| ) |  |
| inlinestaticprivate

Definition at line 62 of file heap.h.

## ◆ swap()

template<typename T >

static void ssim::heap< T >::swap | ( | T & | first,
|  | T & | second
| ) |  |
throw | ( |
| ) |  |
| inlinestaticprivate

Definition at line 48 of file heap.h.

## Member Data Documentation

## ◆ a

template<typename T >

std::vector<T> ssim::heap< T >::a
| private

Definition at line 47 of file heap.h.

## ◆ FIRST

template<typename T >

const size_type ssim::heap< T >::FIRST = 0
| staticprivate

Definition at line 59 of file heap.h.

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

- /home/marcle/src/R/microsimulation/inst/include/heap.h