Add tests for rational load factor resizing policy
authorMike Krinkin <krinkin.m.u@gmail.com>
Sun, 26 Apr 2015 07:27:25 +0000 (10:27 +0300)
committerMike Krinkin <krinkin.m.u@gmail.com>
Sun, 26 Apr 2015 10:15:42 +0000 (13:15 +0300)
This patch adds tests for striped and refinable sets with rational
load factor resizing policy. Set adapters expect denominator of
rational load factor, so test output (LoadFactor=i) can be a bit
misleading, for all tests with the 'rational' in the name it means
LoadFactor=1/i.

tests/unit/set2/set_defs.h
tests/unit/set2/set_type_striped.h

index 030eaa9e6b48cd894950b850f2a0c38ff02e4c75..969ebc8245f654bce18602d1fff271cea01a8695 100644 (file)
     CDSUNIT_DECLARE_TEST(StripedSet_vector) \
     CDSUNIT_DECLARE_TEST(StripedSet_set) \
     CDSUNIT_DECLARE_TEST(StripedSet_hashset) \
-    CDSUNIT_DECLARE_TEST(StripedSet_boost_unordered_set)
+    CDSUNIT_DECLARE_TEST(StripedSet_boost_unordered_set) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_list) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_vector) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_set) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_hashset) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_unordered_set)
 
 #define CDSUNIT_DEFINE_StripedSet_common( IMPL, C ) \
     TEST_SET(IMPL, C, StripedSet_list) \
     TEST_SET(IMPL, C, StripedSet_vector) \
     TEST_SET(IMPL, C, StripedSet_set) \
     TEST_SET(IMPL, C, StripedSet_hashset) \
-    TEST_SET(IMPL, C, StripedSet_boost_unordered_set)
+    TEST_SET(IMPL, C, StripedSet_boost_unordered_set) \
+    TEST_SET(IMPL, C, StripedSet_rational_list) \
+    TEST_SET(IMPL, C, StripedSet_rational_vector) \
+    TEST_SET(IMPL, C, StripedSet_rational_set) \
+    TEST_SET(IMPL, C, StripedSet_rational_hashset) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_unordered_set)
 
 #define CDSUNIT_TEST_StripedSet_common \
     CPPUNIT_TEST(StripedSet_list) \
     CPPUNIT_TEST(StripedSet_vector) \
     CPPUNIT_TEST(StripedSet_set) \
     CPPUNIT_TEST(StripedSet_hashset) \
-    CPPUNIT_TEST(StripedSet_boost_unordered_set)
+    CPPUNIT_TEST(StripedSet_boost_unordered_set) \
+    CPPUNIT_TEST(StripedSet_rational_list) \
+    CPPUNIT_TEST(StripedSet_rational_vector) \
+    CPPUNIT_TEST(StripedSet_rational_set) \
+    CPPUNIT_TEST(StripedSet_rational_hashset) \
+    CPPUNIT_TEST(StripedSet_rational_boost_unordered_set)
 
 #if BOOST_VERSION >= 104800
 #   define CDSUNIT_DECLARE_StripedSet_boost_container \
     CDSUNIT_DECLARE_TEST(StripedSet_boost_slist) \
     CDSUNIT_DECLARE_TEST(StripedSet_boost_vector) \
     CDSUNIT_DECLARE_TEST(StripedSet_boost_stable_vector) \
-    CDSUNIT_DECLARE_TEST(StripedSet_boost_set)
+    CDSUNIT_DECLARE_TEST(StripedSet_boost_set) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_list) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_slist) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_vector) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_stable_vector) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_set)
 
 #   define CDSUNIT_DEFINE_StripedSet_boost_container( IMPL, C ) \
     TEST_SET(IMPL, C, StripedSet_boost_list) \
     TEST_SET(IMPL, C, StripedSet_boost_slist) \
     TEST_SET(IMPL, C, StripedSet_boost_vector) \
     TEST_SET(IMPL, C, StripedSet_boost_stable_vector) \
-    TEST_SET(IMPL, C, StripedSet_boost_set)
+    TEST_SET(IMPL, C, StripedSet_boost_set) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_list) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_slist) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_vector) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_stable_vector) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_set)
 
 #   define CDSUNIT_TEST_StripedSet_boost_container \
     CPPUNIT_TEST(StripedSet_boost_list) \
     CPPUNIT_TEST(StripedSet_boost_slist) \
     CPPUNIT_TEST(StripedSet_boost_vector) \
     CPPUNIT_TEST(StripedSet_boost_stable_vector) \
-    CPPUNIT_TEST(StripedSet_boost_set)
+    CPPUNIT_TEST(StripedSet_boost_set) \
+    CPPUNIT_TEST(StripedSet_rational_boost_list) \
+    CPPUNIT_TEST(StripedSet_rational_boost_slist) \
+    CPPUNIT_TEST(StripedSet_rational_boost_vector) \
+    CPPUNIT_TEST(StripedSet_rational_boost_stable_vector) \
+    CPPUNIT_TEST(StripedSet_rational_boost_set)
 #else
 #   define CDSUNIT_DECLARE_StripedSet_boost_container
 #   define CDSUNIT_DEFINE_StripedSet_boost_container( IMPL, C )
 
 #if BOOST_VERSION >= 104800 && defined(CDS_UNIT_SET_TYPES_ENABLE_BOOST_FLAT_CONTAINERS)
 #   define CDSUNIT_DECLARE_StripedSet_boost_flat_container \
-    CDSUNIT_DECLARE_TEST(StripedSet_boost_flat_set)
+    CDSUNIT_DECLARE_TEST(StripedSet_boost_flat_set) \
+    CDSUNIT_DECLARE_TEST(StripedSet_rational_boost_flat_set)
 #   define CDSUNIT_DEFINE_StripedSet_boost_flat_container( IMPL, C ) \
-    TEST_SET(IMPL, C, StripedSet_boost_flat_set)
+    TEST_SET(IMPL, C, StripedSet_boost_flat_set) \
+    TEST_SET(IMPL, C, StripedSet_rational_boost_flat_set)
 #   define CDSUNIT_TEST_StripedSet_boost_flat_container \
-    CPPUNIT_TEST(StripedSet_boost_flat_set)
+    CPPUNIT_TEST(StripedSet_boost_flat_set) \
+    CPPUNIT_TEST(StripedSet_rational_boost_flat_set)
 #else
 #   define CDSUNIT_DECLARE_StripedSet_boost_flat_container
 #   define CDSUNIT_DEFINE_StripedSet_boost_flat_container( IMPL, C )
     CDSUNIT_DECLARE_TEST(RefinableSet_vector) \
     CDSUNIT_DECLARE_TEST(RefinableSet_set) \
     CDSUNIT_DECLARE_TEST(RefinableSet_hashset) \
-    CDSUNIT_DECLARE_TEST(RefinableSet_boost_unordered_set)
+    CDSUNIT_DECLARE_TEST(RefinableSet_boost_unordered_set) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_list) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_vector) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_set) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_hashset) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_unordered_set)
 #define CDSUNIT_DEFINE_RefinableSet_common(IMPL, C) \
     TEST_SET(IMPL, C, RefinableSet_list) \
     TEST_SET(IMPL, C, RefinableSet_vector) \
     TEST_SET(IMPL, C, RefinableSet_set) \
     TEST_SET(IMPL, C, RefinableSet_hashset) \
-    TEST_SET(IMPL, C, RefinableSet_boost_unordered_set)
+    TEST_SET(IMPL, C, RefinableSet_boost_unordered_set) \
+    TEST_SET(IMPL, C, RefinableSet_rational_list) \
+    TEST_SET(IMPL, C, RefinableSet_rational_vector) \
+    TEST_SET(IMPL, C, RefinableSet_rational_set) \
+    TEST_SET(IMPL, C, RefinableSet_rational_hashset) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_unordered_set)
 #define CDSUNIT_TEST_RefinableSet_common \
     CPPUNIT_TEST(RefinableSet_list) \
     CPPUNIT_TEST(RefinableSet_vector) \
     CPPUNIT_TEST(RefinableSet_set) \
     CPPUNIT_TEST(RefinableSet_hashset) \
-    CPPUNIT_TEST(RefinableSet_boost_unordered_set)
+    CPPUNIT_TEST(RefinableSet_boost_unordered_set) \
+    CPPUNIT_TEST(RefinableSet_rational_list) \
+    CPPUNIT_TEST(RefinableSet_rational_vector) \
+    CPPUNIT_TEST(RefinableSet_rational_set) \
+    CPPUNIT_TEST(RefinableSet_rational_hashset) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_unordered_set)
 
 #if BOOST_VERSION >= 104800
 #   define CDSUNIT_DECLARE_RefinableSet_boost_container \
     CDSUNIT_DECLARE_TEST(RefinableSet_boost_slist) \
     CDSUNIT_DECLARE_TEST(RefinableSet_boost_vector) \
     CDSUNIT_DECLARE_TEST(RefinableSet_boost_stable_vector) \
-    CDSUNIT_DECLARE_TEST(RefinableSet_boost_set)
+    CDSUNIT_DECLARE_TEST(RefinableSet_boost_set) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_list) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_slist) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_vector) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_stable_vector) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_set)
 #   define CDSUNIT_DEFINE_RefinableSet_boost_container( IMPL, C ) \
     TEST_SET(IMPL, C, RefinableSet_boost_list) \
     TEST_SET(IMPL, C, RefinableSet_boost_slist) \
     TEST_SET(IMPL, C, RefinableSet_boost_vector) \
     TEST_SET(IMPL, C, RefinableSet_boost_stable_vector) \
-    TEST_SET(IMPL, C, RefinableSet_boost_set)
+    TEST_SET(IMPL, C, RefinableSet_boost_set) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_list) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_slist) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_vector) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_stable_vector) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_set)
 #   define CDSUNIT_TEST_RefinableSet_boost_container \
     CPPUNIT_TEST(RefinableSet_boost_list) \
     CPPUNIT_TEST(RefinableSet_boost_slist) \
     CPPUNIT_TEST(RefinableSet_boost_vector) \
     CPPUNIT_TEST(RefinableSet_boost_stable_vector) \
-    CPPUNIT_TEST(RefinableSet_boost_set)
+    CPPUNIT_TEST(RefinableSet_boost_set) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_list) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_slist) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_vector) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_stable_vector) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_set)
 #else
 #   define CDSUNIT_DECLARE_RefinableSet_boost_container
 #   define CDSUNIT_DEFINE_RefinableSet_boost_container( IMPL, C ) \
 
 #if BOOST_VERSION >= 104800 && defined(CDS_UNIT_SET_TYPES_ENABLE_BOOST_FLAT_CONTAINERS)
 #   define CDSUNIT_DECLARE_RefinableSet_boost_flat_container \
-    CDSUNIT_DECLARE_TEST(RefinableSet_boost_flat_set)
+    CDSUNIT_DECLARE_TEST(RefinableSet_boost_flat_set) \
+    CDSUNIT_DECLARE_TEST(RefinableSet_rational_boost_flat_set)
 #   define CDSUNIT_DEFINE_RefinableSet_boost_flat_container( IMPL, C ) \
-    TEST_SET(IMPL, C, RefinableSet_boost_flat_set)
+    TEST_SET(IMPL, C, RefinableSet_boost_flat_set) \
+    TEST_SET(IMPL, C, RefinableSet_rational_boost_flat_set)
 #   define CDSUNIT_TEST_RefinableSet_boost_flat_container \
-    CPPUNIT_TEST(RefinableSet_boost_flat_set)
+    CPPUNIT_TEST(RefinableSet_boost_flat_set) \
+    CPPUNIT_TEST(RefinableSet_rational_boost_flat_set)
 #else
 #   define CDSUNIT_DECLARE_RefinableSet_boost_flat_container
 #   define CDSUNIT_DEFINE_RefinableSet_boost_flat_container( IMPL, C )
index 1d3332b14be652bc13396d57bb9e0bba926bf38c..7bf31aee4d402af5a4ef675b6fd537d640cde2e0 100644 (file)
@@ -68,6 +68,34 @@ namespace set2 {
             }
         };
 
+        template <class BucketEntry, typename... Options>
+        class StripedHashSet_seq_rational:
+            public cc::StripedSet< BucketEntry,
+                co::mutex_policy< cc::striped_set::striping<> >
+                ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                , Options...
+            >
+        {
+            typedef cc::StripedSet< BucketEntry,
+                co::mutex_policy< cc::striped_set::striping<> >
+                ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                , Options...
+            > base_class;
+            typedef typename base_class::resizing_policy resizing_policy_t;
+
+            resizing_policy_t   m_placeHolder;
+        public:
+            StripedHashSet_seq_rational( size_t nCapacity, size_t nDenominator ) // LoadFactor = 1 / nDenominator
+                : base_class( nCapacity * nDenominator / 16, *(new(&m_placeHolder) resizing_policy_t( 1, nDenominator )) )
+            {}
+
+            template <typename Q, typename Less>
+            bool erase_with( Q const& v, Less /*pred*/ )
+            {
+                return base_class::erase( v );
+            }
+        };
+
         // for non-sequential ordered containers
         template <class BucketEntry, typename... Options>
         class StripedHashSet_ord:
@@ -97,18 +125,58 @@ namespace set2 {
             }
         };
 
+        template <class BucketEntry, typename... Options>
+        class StripedHashSet_ord_rational:
+            public cc::StripedSet< BucketEntry,
+                co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                ,co::mutex_policy< cc::striped_set::striping<> >
+                , Options...
+            >
+        {
+            typedef cc::StripedSet< BucketEntry,
+               co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                ,co::mutex_policy< cc::striped_set::striping<> >
+                , Options...
+            > base_class;
+            typedef typename base_class::resizing_policy resizing_policy_t;
+
+            resizing_policy_t   m_placeHolder;
+        public:
+            StripedHashSet_ord_rational( size_t /*nCapacity*/, size_t nDenominator ) // LoadFactor = 1 / nDenominator
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, nDenominator )) )
+            {}
+
+            template <typename Q, typename Less>
+            bool erase_with( Q const& v, Less /*pred*/ )
+            {
+                return base_class::erase( v );
+            }
+        };
+
         typedef StripedHashSet_seq<
             std::list< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > StripedSet_list;
 
+        typedef StripedHashSet_seq_rational<
+            std::list< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_list;
+
         typedef StripedHashSet_seq<
             std::vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > StripedSet_vector;
 
+        typedef StripedHashSet_seq_rational<
+            std::vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_vector;
+
 #if BOOST_VERSION >= 104800
         typedef StripedHashSet_seq<
             boost::container::slist< key_val >
@@ -116,23 +184,47 @@ namespace set2 {
             , co::less< less >
         > StripedSet_boost_slist;
 
+        typedef StripedHashSet_seq_rational<
+            boost::container::slist< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_boost_slist;
+
         typedef StripedHashSet_seq<
             boost::container::list< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > StripedSet_boost_list;
 
+        typedef StripedHashSet_seq_rational<
+            boost::container::list< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_boost_list;
+
         typedef StripedHashSet_seq<
             boost::container::vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > StripedSet_boost_vector;
 
+        typedef StripedHashSet_seq_rational<
+            boost::container::vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_boost_vector;
+
         typedef StripedHashSet_seq<
             boost::container::stable_vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > StripedSet_boost_stable_vector;
+
+        typedef StripedHashSet_seq_rational<
+            boost::container::stable_vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > StripedSet_rational_boost_stable_vector;
 #endif
 
         typedef StripedHashSet_ord<
@@ -140,21 +232,41 @@ namespace set2 {
             , co::hash< hash2 >
         > StripedSet_set;
 
+        typedef StripedHashSet_ord_rational<
+            std::set< key_val, less >
+            , co::hash< hash2 >
+        > StripedSet_rational_set;
+
         typedef StripedHashSet_ord<
             std::unordered_set< key_val, hash, equal_to >
             , co::hash< hash2 >
         > StripedSet_hashset;
 
+        typedef StripedHashSet_ord_rational<
+            std::unordered_set< key_val, hash, equal_to >
+            , co::hash< hash2 >
+        > StripedSet_rational_hashset;
+
 #if BOOST_VERSION >= 104800
         typedef StripedHashSet_ord<
             boost::container::set< key_val, less >
             , co::hash< hash2 >
         > StripedSet_boost_set;
 
+        typedef StripedHashSet_ord_rational<
+            boost::container::set< key_val, less >
+            , co::hash< hash2 >
+        > StripedSet_rational_boost_set;
+
         typedef StripedHashSet_ord<
             boost::container::flat_set< key_val, less >
             , co::hash< hash2 >
         > StripedSet_boost_flat_set;
+
+        typedef StripedHashSet_ord_rational<
+            boost::container::flat_set< key_val, less >
+            , co::hash< hash2 >
+        > StripedSet_rational_boost_flat_set;
 #endif
 
         typedef StripedHashSet_ord<
@@ -162,6 +274,11 @@ namespace set2 {
             , co::hash< hash2 >
         > StripedSet_boost_unordered_set;
 
+        typedef StripedHashSet_ord_rational<
+            boost::unordered_set< key_val, hash, equal_to >
+            , co::hash< hash2 >
+        > StripedSet_rational_boost_unordered_set;
+
 
         // ***************************************************************************
         // RefinableSet
@@ -195,6 +312,34 @@ namespace set2 {
             }
         };
 
+        template <class BucketEntry, typename... Options>
+        class RefinableHashSet_seq_rational:
+            public cc::StripedSet< BucketEntry,
+            co::mutex_policy< cc::striped_set::refinable<> >
+            ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+            , Options...
+            >
+        {
+            typedef cc::StripedSet< BucketEntry,
+                co::mutex_policy< cc::striped_set::refinable<> >
+                ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                , Options...
+            > base_class;
+            typedef typename base_class::resizing_policy resizing_policy_t;
+
+            resizing_policy_t   m_placeHolder;
+        public:
+            RefinableHashSet_seq_rational( size_t nCapacity, size_t nDenominator ) // LoadFactor = 1 / nDenominator
+                : base_class( nCapacity * nDenominator / 16, *(new(&m_placeHolder) resizing_policy_t( 1, nDenominator )) )
+            {}
+
+            template <typename Q, typename Less>
+            bool erase_with( Q const& v, Less /*pred*/ )
+            {
+                return base_class::erase( v );
+            }
+        };
+
         // for non-sequential ordered containers
         template <class BucketEntry, typename... Options>
         class RefinableHashSet_ord:
@@ -224,18 +369,58 @@ namespace set2 {
             }
         };
 
+        template <class BucketEntry, typename... Options>
+        class RefinableHashSet_ord_rational:
+            public cc::StripedSet< BucketEntry,
+                co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                ,co::mutex_policy< cc::striped_set::refinable<> >
+                , Options...
+            >
+        {
+            typedef cc::StripedSet< BucketEntry,
+                co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
+                ,co::mutex_policy< cc::striped_set::refinable<> >
+                , Options...
+            > base_class;
+            typedef typename base_class::resizing_policy resizing_policy_t;
+
+            resizing_policy_t   m_placeHolder;
+        public:
+            RefinableHashSet_ord_rational( size_t /*nCapacity*/, size_t nDenominator ) // LoadFactor = 1 / nDenominator
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, nDenominator )) )
+            {}
+
+            template <typename Q, typename Less>
+            bool erase_with( Q const& v, Less /*pred*/ )
+            {
+                return base_class::erase( v );
+            }
+        };
+
         typedef RefinableHashSet_seq<
             std::list< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > RefinableSet_list;
 
+        typedef RefinableHashSet_seq_rational<
+            std::list< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_list;
+
         typedef RefinableHashSet_seq<
             std::vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > RefinableSet_vector;
 
+        typedef RefinableHashSet_seq_rational<
+            std::vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_vector;
+
 #if BOOST_VERSION >= 104800
         typedef RefinableHashSet_seq<
             boost::container::slist< key_val >
@@ -243,23 +428,47 @@ namespace set2 {
             , co::less< less >
         > RefinableSet_boost_slist;
 
+        typedef RefinableHashSet_seq_rational<
+            boost::container::slist< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_boost_slist;
+
         typedef RefinableHashSet_seq<
             boost::container::list< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > RefinableSet_boost_list;
 
+        typedef RefinableHashSet_seq_rational<
+            boost::container::list< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_boost_list;
+
         typedef RefinableHashSet_seq<
             boost::container::vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > RefinableSet_boost_vector;
 
+        typedef RefinableHashSet_seq_rational<
+            boost::container::vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_boost_vector;
+
         typedef RefinableHashSet_seq<
             boost::container::stable_vector< key_val >
             , co::hash< hash2 >
             , co::less< less >
         > RefinableSet_boost_stable_vector;
+
+        typedef RefinableHashSet_seq_rational<
+            boost::container::stable_vector< key_val >
+            , co::hash< hash2 >
+            , co::less< less >
+        > RefinableSet_rational_boost_stable_vector;
 #endif
 
         typedef RefinableHashSet_ord<
@@ -267,27 +476,52 @@ namespace set2 {
             , co::hash< hash2 >
         > RefinableSet_set;
 
+        typedef RefinableHashSet_ord_rational<
+            std::set< key_val, less >
+            , co::hash< hash2 >
+        > RefinableSet_rational_set;
+
         typedef RefinableHashSet_ord<
             std::unordered_set< key_val, hash, equal_to >
             , co::hash< hash2 >
         > RefinableSet_hashset;
 
+        typedef RefinableHashSet_ord_rational<
+            std::unordered_set< key_val, hash, equal_to >
+            , co::hash< hash2 >
+        > RefinableSet_rational_hashset;
+
 #if BOOST_VERSION >= 104800
         typedef RefinableHashSet_ord<
             boost::container::set< key_val, less >
             , co::hash< hash2 >
         > RefinableSet_boost_set;
 
+        typedef RefinableHashSet_ord_rational<
+            boost::container::set< key_val, less >
+            , co::hash< hash2 >
+        > RefinableSet_rational_boost_set;
+
         typedef RefinableHashSet_ord<
             boost::container::flat_set< key_val, less >
             , co::hash< hash2 >
         > RefinableSet_boost_flat_set;
+
+        typedef RefinableHashSet_ord_rational<
+            boost::container::flat_set< key_val, less >
+            , co::hash< hash2 >
+        > RefinableSet_rational_boost_flat_set;
 #endif
 
         typedef RefinableHashSet_ord<
             boost::unordered_set< key_val, hash, equal_to >
             , co::hash< hash2 >
         > RefinableSet_boost_unordered_set;
+
+        typedef RefinableHashSet_ord_rational<
+            boost::unordered_set< key_val, hash, equal_to >
+            , co::hash< hash2 >
+        > RefinableSet_rational_boost_unordered_set;
     };
 
 } // namespace set2