Move constraints to set
[satune.git] / src / Collections / hashset.h
index 9282de97c359dd5f7cc2b9b1e38e27a25497e939..087046fd933bb8b3abdda9c2f5008f7ff4874961 100644 (file)
@@ -41,7 +41,8 @@
        typedef struct HashSet ## Name HashSet ## Name;                       \
                                                                         \
        HashSet ## Name * allocHashSet ## Name (unsigned int initialcapacity, double factor); \
-       void deleteHashSet ## Name(struct HashSet ## Name *set);               \
+       HashSet ## Name * allocDefHashSet ## Name ();                                                                                                   \
+       void deleteHashSet ## Name(struct HashSet ## Name *set);                                                        \
        HashSet ## Name * copyHashSet ## Name(HashSet ## Name * set);                \
        void resetHashSet ## Name(HashSet ## Name * set);                         \
        bool addHashSet ## Name(HashSet ## Name * set,_Key key);                     \
                _Key k = hsit->last->key;                                             \
                removeHashSet ## Name(hsit->set, k);                                    \
        }                                                                     \
-                                                                        \
+                                                                                                                                                                                                                                                                                               \
+       HashSet ## Name * allocDefHashSet ## Name () {                                                                                          \
+               return allocHashSet ## Name(16, 0.25);                                                                                                          \
+       }                                                                                                                                                                                                                                                                                       \
+                                                                                                                                                                                                                                                                                               \
        HashSet ## Name * allocHashSet ## Name (unsigned int initialcapacity, double factor) { \
                HashSet ## Name * set = (HashSet ## Name *)ourmalloc(sizeof(struct HashSet ## Name));  \
                set->table = allocHashTable ## Name ## Set(initialcapacity, factor);          \