SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TStrHashF_OldGLib Class Reference

#include <hash.h>

List of all members.

Static Public Member Functions

static int GetPrimHashCd (const char *p)
static int GetSecHashCd (const char *p)
static int GetPrimHashCd (const TStr &s)
static int GetSecHashCd (const TStr &s)

Detailed Description

Definition at line 1119 of file hash.h.


Member Function Documentation

static int TStrHashF_OldGLib::GetPrimHashCd ( const char *  p) [inline, static]

Definition at line 1121 of file hash.h.

                                                 {
    const int MulBy = 16;  // even older version used MulBy=2
    int HashCd = 0;
    while (*p) { HashCd = (MulBy * HashCd) + *p++; HashCd &= 0x0FFFFFFF; }
    return HashCd; }
static int TStrHashF_OldGLib::GetPrimHashCd ( const TStr s) [inline, static]

Definition at line 1131 of file hash.h.

{ return GetPrimHashCd(s.CStr()); }
static int TStrHashF_OldGLib::GetSecHashCd ( const char *  p) [inline, static]

Definition at line 1126 of file hash.h.

                                                {
    const int MulBy = 16;  // even older version used MulBy=2
    int HashCd = 0;
    while (*p) { HashCd = (MulBy * HashCd) ^ *p++; HashCd &= 0x0FFFFFFF; }
    return HashCd; }
static int TStrHashF_OldGLib::GetSecHashCd ( const TStr s) [inline, static]

Definition at line 1132 of file hash.h.

{ return GetSecHashCd(s.CStr()); }

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