BloombergLP::ball::ManagedAttribute::hash

Return a hash value calculated from the specified attribute using the specified size as the number of slots.

Synopsis

Declared in <ball_managedattribute.h>

static
int
hash(
    ManagedAttribute const& attribute,
    int size);

Description

The hash value is guaranteed to be in the range [0 .. size - 1]. The behavior is undefined unless 0 < size.

Return Value

hash value in the range [0 .. size - 1]

Parameters

NameDescription
attributeattribute to hash
sizenumber of hash slots