Skip to content
MapRehashWithPolicy

MapRehashWithPolicy

MapRehashWithPolicy

Description

Remap using a specific probing policy.

Parameters

Name Direction Description
m in,out Hash map.
n in Minimum number of entries expected after rehash.
policy in New probing policy copied into this map.

Usage example (Cross-references)

Usage examples (Cross-references)
        MapSetOnlyR(&map, "yellow", "banana");
        MapSetOnlyR(&map, "green", "pear");
        MapRehashWithPolicy(&map, MapPairCount(&map), MisraMapPolicyQuadratic);
    
        bool result = (map.policy.first_index == MisraMapPolicyQuadratic.first_index) &&
        }
    
        MapRehashWithPolicy(&map, MapPairCount(&map), MisraMapPolicyQuadratic);
    
        bool result = (map.policy.first_index == MisraMapPolicyQuadratic.first_index) &&
Last updated on