cdcontainers  0.1.1
Library of data containers and collections for C programming language.
Functions
Cdc_treap_iter

The cdc_treap_iter is a struct and functions that provide a treap iterator. More...

Functions

void cdc_treap_iter_next (struct cdc_treap_iter *it)
 Advances the iterator to the next element in the treap. More...
 
void cdc_treap_iter_prev (struct cdc_treap_iter *it)
 Advances the iterator to the previous element in the treap. More...
 
static bool cdc_treap_iter_has_next (struct cdc_treap_iter *it)
 Returns true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false. More...
 
static bool cdc_treap_iter_has_prev (struct cdc_treap_iter *it)
 Returns true if there is at least one element behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns false. More...
 
static void * cdc_treap_iter_key (struct cdc_treap_iter *it)
 Returns an item's key. More...
 
static void * cdc_treap_iter_value (struct cdc_treap_iter *it)
 Returns an item's value. More...
 
static struct cdc_pair cdc_treap_iter_key_value (struct cdc_treap_iter *it)
 Returns a pair, where first - key, second - value. More...
 
static bool cdc_treap_iter_is_eq (struct cdc_treap_iter *it1, struct cdc_treap_iter *it2)
 Returns false if the iterator |it1| equal to the iterator |it2|, otherwise returns false. More...
 

Detailed Description

The cdc_treap_iter is a struct and functions that provide a treap iterator.

Function Documentation

◆ cdc_treap_iter_next()

void cdc_treap_iter_next ( struct cdc_treap_iter it)

Advances the iterator to the next element in the treap.

Parameters
[in]it- iterator

◆ cdc_treap_iter_prev()

void cdc_treap_iter_prev ( struct cdc_treap_iter it)

Advances the iterator to the previous element in the treap.

Parameters
[in]it- iterator

◆ cdc_treap_iter_has_next()

static bool cdc_treap_iter_has_next ( struct cdc_treap_iter it)
inlinestatic

Returns true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false.

Parameters
[in]it- iterator
Returns
true if there is at least one element ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns false.

◆ cdc_treap_iter_has_prev()

static bool cdc_treap_iter_has_prev ( struct cdc_treap_iter it)
inlinestatic

Returns true if there is at least one element behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns false.

Parameters
[in]it- iterator
Returns
true if there is at least one element behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns false.

◆ cdc_treap_iter_key()

static void* cdc_treap_iter_key ( struct cdc_treap_iter it)
inlinestatic

Returns an item's key.

Parameters
[in]it- iterator
Returns
the item's key.

◆ cdc_treap_iter_value()

static void* cdc_treap_iter_value ( struct cdc_treap_iter it)
inlinestatic

Returns an item's value.

Parameters
[in]it- iterator
Returns
the item's value.

◆ cdc_treap_iter_key_value()

static struct cdc_pair cdc_treap_iter_key_value ( struct cdc_treap_iter it)
static

Returns a pair, where first - key, second - value.

Parameters
[in]it- iterator
Returns
pair, where first - key, second - value.

◆ cdc_treap_iter_is_eq()

static bool cdc_treap_iter_is_eq ( struct cdc_treap_iter it1,
struct cdc_treap_iter it2 
)
inlinestatic

Returns false if the iterator |it1| equal to the iterator |it2|, otherwise returns false.

Parameters
[in]it1- iterator
[in]it2- iterator
Returns
false if the iterator |it1| equal to the iterator |it2|, otherwise returns false.