A device detection library that is used natively or by 51Degrees products

fiftyoneDegreesGraphNodeHash Struct Reference

Detailed Description

Hash record structure to compare to a substring hash.

In a node whose records are laid out as a hash table (see fiftyoneDegreesGraphNode::modulo) a hash code of zero is reserved as a marker and never identifies a stored hash code. Such a record is instead:

  • the head of a collision bucket, where nodeOffset is greater than zero and is an index into this node's own array of hash records rather than a node offset,
  • an unused slot, where nodeOffset is zero or negative,
  • or the terminator of a collision bucket.

A substring which hashes to zero therefore cannot be matched in a hash table node. The ordered list and single record layouts do not use markers, so a hash code of zero is a genuine value in those.

Data Fields

uint32_t hashCode
 Hash code to compare.
int32_t nodeOffset
 Offset of the node to use if this hash code is a match.

The documentation for this struct was generated from the following file: