예제 #1
0
/**
 * Tests if the first set is greater than the second set.
 */
bool_t set_greater(const set_t* cpset_first, const set_t* cpset_second)
{
    assert(cpset_first != NULL);
    assert(cpset_second != NULL);

#ifdef CSTL_SET_AVL_TREE
    return _avl_tree_greater(&cpset_first->_t_tree, &cpset_second->_t_tree);
#else
    return _rb_tree_greater(&cpset_first->_t_tree, &cpset_second->_t_tree);
#endif
}
예제 #2
0
/**
 * Tests if the first map is greater than the second map.
 */
bool_t map_greater(const map_t* cpmap_first, const map_t* cpmap_second)
{
    assert(cpmap_first != NULL);
    assert(cpmap_second != NULL);
    assert(_pair_is_inited(&cpmap_first->_pair_temp));
    assert(_pair_is_inited(&cpmap_second->_pair_temp));
    assert(_map_same_pair_type_ex(&cpmap_first->_pair_temp, &cpmap_second->_pair_temp));

#ifdef CSTL_MAP_AVL_TREE
    return _avl_tree_greater(&cpmap_first->_t_tree, &cpmap_second->_t_tree);
#else
    return _rb_tree_greater(&cpmap_first->_t_tree, &cpmap_second->_t_tree);
#endif
}
예제 #3
0
/**
 * Tests if the first avl tree is greater than or equal to the second avl tree.
 */
bool_t _avl_tree_greater_equal(const _avl_tree_t* cpt_first, const _avl_tree_t* cpt_second)
{
    return (_avl_tree_greater(cpt_first, cpt_second) || _avl_tree_equal(cpt_first, cpt_second)) ? true : false;
}