Huffman Zipper  v-1.0
Data Compression and Decompression using Greedy Huffman Algorithm
HashCode.cpp File Reference

This file exports the definitions of hash code functions used in class HashMap. More...

#include "HashCode.h"

Go to the source code of this file.

Functions

int hashCode (int key)
 Returns a hash code for the specified key, which is always a nonnegative integer. More...
 
int hashCode (bool key)
 
int hashCode (char key)
 
int hashCode (unsigned int key)
 
int hashCode (long key)
 
int hashCode (unsigned long key)
 
int hashCode (short key)
 
int hashCode (unsigned short key)
 
int hashCode (void *key)
 
int hashCode (const char *base, size_t numBytes)
 
int hashCode (const char *str)
 
int hashCode (const std::string &str)
 
int hashCode (double key)
 
int hashCode (float key)
 
int hashCode (long double key)
 

Detailed Description

This file exports the definitions of hash code functions used in class HashMap.

Definition in file HashCode.cpp.

Function Documentation

◆ hashCode() [1/15]

int hashCode ( bool  key)

Definition at line 13 of file HashCode.cpp.

◆ hashCode() [2/15]

int hashCode ( char  key)

Definition at line 17 of file HashCode.cpp.

◆ hashCode() [3/15]

int hashCode ( const char *  base,
size_t  numBytes 
)

Definition at line 52 of file HashCode.cpp.

◆ hashCode() [4/15]

int hashCode ( const char *  str)

Definition at line 60 of file HashCode.cpp.

◆ hashCode() [5/15]

int hashCode ( const std::string &  str)

Definition at line 64 of file HashCode.cpp.

◆ hashCode() [6/15]

int hashCode ( double  key)

Definition at line 68 of file HashCode.cpp.

◆ hashCode() [7/15]

int hashCode ( float  key)

Definition at line 72 of file HashCode.cpp.

◆ hashCode() [8/15]

int hashCode ( int  key)

Returns a hash code for the specified key, which is always a nonnegative integer.


This function is overloaded to support all of the primitive types and the C++ string type.

Definition at line 9 of file HashCode.cpp.

◆ hashCode() [9/15]

int hashCode ( long double  key)

Definition at line 76 of file HashCode.cpp.

◆ hashCode() [10/15]

int hashCode ( long  key)

Definition at line 25 of file HashCode.cpp.

◆ hashCode() [11/15]

int hashCode ( short  key)

Definition at line 33 of file HashCode.cpp.

◆ hashCode() [12/15]

int hashCode ( unsigned int  key)

Definition at line 21 of file HashCode.cpp.

◆ hashCode() [13/15]

int hashCode ( unsigned long  key)

Definition at line 29 of file HashCode.cpp.

◆ hashCode() [14/15]

int hashCode ( unsigned short  key)

Definition at line 37 of file HashCode.cpp.

◆ hashCode() [15/15]

int hashCode ( void *  key)

Definition at line 48 of file HashCode.cpp.