#pragma once #include #include #include #include #include #include #include namespace NPrivate { template using TFlatHashMapImpl = NFlatHash::TMap, Alloc>, Probing, NFlatHash::TAndSizeFitter, NFlatHash::TSimpleExpander>; template using TDenseHashMapImpl = NFlatHash::TMap, NFlatHash::NMap::TStaticValueMarker, Alloc>, Probing, NFlatHash::TAndSizeFitter, NFlatHash::TSimpleExpander>; template using TFlatHashSetImpl = NFlatHash::TSet, Probing, NFlatHash::TAndSizeFitter, NFlatHash::TSimpleExpander>; template using TDenseHashSetImpl = NFlatHash::TSet, Alloc>, Probing, NFlatHash::TAndSizeFitter, NFlatHash::TSimpleExpander>; } // namespace NPrivate namespace NFH { /* flat_map: Fast and highly customizable hash map. * * Most features would be available soon. * Until that time we strongly insist on using only class aliases listed below. */ /* Simpliest open addressing hash map. * Uses additional array to denote status of every bucket. * Default probing is linear. * Currently available probings: * * TLinearProbing * * TQuadraticProbing * * TDenseProbing */ template , class KeyEqual = std::equal_to<>, class Probing = NFlatHash::TLinearProbing, class Alloc = std::allocator>> using TFlatHashMap = NPrivate::TFlatHashMapImpl; /* Open addressing table with user specified marker for empty buckets. * Currently available probings: * * TLinearProbing * * TQuadraticProbing * * TDenseProbing */ template , class KeyEqual = std::equal_to<>, class Probing = NFlatHash::TDenseProbing, class Alloc = std::allocator>> using TDenseHashMapStaticMarker = NPrivate::TDenseHashMapImpl; /* flat_set: Fast and highly customizable hash set. * * Most features would be available soon. * Until that time we strongly insist on using only class aliases listed below. */ /* Simpliest open addressing hash map. * Uses additional array to denote status of every bucket. * Default probing is linear. * Currently available probings: * * TLinearProbing * * TQuadraticProbing * * TDenseProbing */ template , class KeyEqual = std::equal_to<>, class Probing = NFlatHash::TLinearProbing, class Alloc = std::allocator> using TFlatHashSet = NPrivate::TFlatHashSetImpl; /* Open addressing table with user specified marker for empty buckets. * Currently available probings: * * TLinearProbing * * TQuadraticProbing * * TDenseProbing */ template , class KeyEqual = std::equal_to<>, class Probing = NFlatHash::TDenseProbing, class Alloc = std::allocator> using TDenseHashSetStaticMarker = NPrivate::TDenseHashSetImpl; } // namespace NFH