template_policy.hpp [plain text]
#ifndef PB_DS_TEMPLATE_POLICY_HPP
#define PB_DS_TEMPLATE_POLICY_HPP
#include <ext/typelist.h>
#include <ext/pb_ds/hash_policy.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/list_update_policy.hpp>
namespace pb_ds
{
namespace test
{
template<typename Allocator>
struct direct_mask_range_hashing_t_
: public pb_ds::direct_mask_range_hashing<typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
typedef pb_ds::direct_mask_range_hashing<size_type> base_type;
};
template<typename Allocator>
struct direct_mod_range_hashing_t_
: public pb_ds::direct_mod_range_hashing<typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
typedef pb_ds::direct_mod_range_hashing<size_type> base_type;
};
template<typename Allocator,
typename Allocator::size_type Min_Load_Nom,
typename Allocator::size_type Min_Load_Denom,
typename Allocator::size_type Max_Load_Nom,
typename Allocator::size_type Max_Load_Denom,
bool External_Access>
struct hash_load_check_resize_trigger_t_
: public pb_ds::hash_load_check_resize_trigger<External_Access,
typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
typedef pb_ds::hash_load_check_resize_trigger<External_Access, size_type> base_type;
inline
hash_load_check_resize_trigger_t_()
: base_type(static_cast<float>(Min_Load_Nom) / static_cast<float>(Min_Load_Denom), static_cast<float>(Max_Load_Nom) / static_cast<float>(Max_Load_Denom))
{ }
enum
{
get_set_loads = External_Access,
get_set_load = false
};
};
template<typename Allocator,
typename Allocator::size_type Load_Nom,
typename Allocator::size_type Load_Denom,
bool External_Access>
struct cc_hash_max_collision_check_resize_trigger_t_
: public pb_ds::cc_hash_max_collision_check_resize_trigger<External_Access,
typename Allocator::size_type>
{
typedef typename Allocator::size_type size_type;
typedef pb_ds::cc_hash_max_collision_check_resize_trigger<External_Access, size_type> base_type;
inline
cc_hash_max_collision_check_resize_trigger_t_()
: base_type(static_cast<float>(Load_Nom) / static_cast<float>(Load_Denom))
{ }
enum
{
get_set_load = External_Access,
get_set_loads = false
};
};
struct hash_prime_size_policy_t_ : public pb_ds::hash_prime_size_policy
{ };
template<typename Allocator>
struct hash_exponential_size_policy_t_
: public pb_ds::hash_exponential_size_policy<typename Allocator::size_type>
{ };
template<typename Key, class Allocator>
struct linear_probe_fn_t_
: public pb_ds::linear_probe_fn<typename Allocator::size_type>
{ };
template<typename Key, class Allocator>
struct quadratic_probe_fn_t_
: public pb_ds::quadratic_probe_fn<typename Allocator::size_type>
{ };
template<typename Allocator, typename Allocator::size_type Max_Count>
struct counter_lu_policy_t_
: public pb_ds::counter_lu_policy<Max_Count, Allocator>
{
typedef pb_ds::counter_lu_policy<Max_Count, Allocator> base_type;
};
struct move_to_front_lu_policy_t_
: public pb_ds::move_to_front_lu_policy<>
{ };
} }
#endif