SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TPairHashImpl1 Class Reference

Computes a hash code from a pair of hash codes. More...

#include <bd.h>

Static Public Member Functions

static int GetHashCd (const int hc1, const int hc2)
 

Detailed Description

Computes a hash code from a pair of hash codes.

Both TPairHashImpl1 and TPairHashImpl2 implement the same function: ((a + b) * (a + b + 1) / 2) + a.

Definition at line 577 of file bd.h.

Member Function Documentation

static int TPairHashImpl1::GetHashCd ( const int  hc1,
const int  hc2 
)
inlinestatic

Definition at line 579 of file bd.h.

579  {
580  unsigned long long sum = ((unsigned long long) hc1) + ((unsigned long long) hc2);
581  unsigned long long c = ((sum * (sum + 1)) >> 1) + hc1;
582  return (int) (c % 0x7fffffffULL); }

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