File: HashTable.cpp

package info (click to toggle)
dasher 4.11%2Bgit20130508.adc653-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 40,248 kB
  • ctags: 5,158
  • sloc: xml: 185,479; cpp: 32,301; sh: 11,207; makefile: 828; ansic: 483
file content (58 lines) | stat: -rw-r--r-- 3,675 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// HashTable.cpp
//
// Copyright (c) 2007 The Dasher Team
//
// This file is part of Dasher.
//
// Dasher is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Dasher is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Dasher; if not, write to the Free Software 
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

#include "HashTable.h"

using namespace Dasher;

/* This is a 'pseudo-random' table used to find a location in the array through a hash function */	
const unsigned int Dasher::CHashTable::Tperm[256] = {175715u,11428377u, 6429025u, 1663333u,23160013u,23383373u,13454579u,21820291u,
			15958541u,25300137u,  829939u,11137997u,32754777u,30169415u, 5850653u,21372299u,
			1936299u,25930603u,28011331u,23806635u,21146549u,11252897u,28614785u,10519007u,
			8511025u,31338949u, 3261913u,29743389u,31005773u,18632081u, 5083357u,26271075u,
			14508753u,23253199u,13684507u,13573115u,18611199u,33291877u,33449115u, 6593227u,
			10144419u,13279781u,10626139u, 2382529u, 5947455u,12599229u, 4176947u,29110999u,
			3331965u,14122125u,24939693u, 9219547u,11394017u,31187013u,31474833u, 4493797u,
			9561129u,31730093u, 2731497u,28174791u,32098091u,29830103u,19650243u,30852053u,
			12833907u,30700077u, 7482489u, 2914805u, 7992485u,32810335u,10837921u,23044107u,
			27265791u, 720783u,16748255u,26140285u,14581007u, 8196081u,17822045u,32595283u,
			22893479u,22259317u,27686021u, 7636277u, 8729813u,20239751u,13993963u,25684823u,
			32200227u,22422391u, 2324333u,24604007u,23946753u,23462375u,  124681u,31918193u,
			17330473u, 7415959u,19437313u, 9896203u,16845629u,17513673u,20760837u,13174013u,
			17104055u,16561691u,11934515u, 1782765u,20180401u,32354743u,28423919u,28765833u,
			15632831u, 9027229u,29269159u,10266289u,10924435u,11637447u,26396405u,13038615u,
			15996601u, 1488961u,12075281u, 4264165u,17884265u,14968853u, 6821141u, 1381437u,
			18103393u, 3957103u, 6385465u,24066119u,20465275u, 4618805u, 8008991u, 3481237u,
			18781687u, 9828029u,32947459u,12387141u,16991359u,21266225u, 8335701u,20009999u,
			22286055u,  976719u,15159267u,22012829u,31693831u,27002669u,  470127u,19689079u,
			7239471u, 7811001u,19904693u,28882027u,11823663u, 6958855u, 3081979u,17234779u,
			16472607u,22683613u, 2088095u,31235775u,10403507u,12497441u,11673811u, 2151187u,
			13833155u,18072513u,29606323u,29471553u,28524619u,20990711u, 4912877u,16182419u,
			15503877u, 9569595u,  342621u,20602089u, 6088723u,15209251u, 1254157u,19074505u,
			17680799u,29990825u,27240853u,27891119u,26586763u,28216267u, 9161271u,30029689u,
			3635335u,24676089u, 8845649u,16339449u,22149205u,33051657u, 5507131u,  539353u,
			3856427u,14167023u, 2879015u,32384923u, 2595407u,26890135u, 5216211u,26726993u,
			30560629u, 5338407u,24455053u,19369345u,26050871u,25245251u,20333385u, 4409727u,
			21593797u,25085337u,12949835u,26823529u,21719275u,23653017u,15374617u,10033225u,
			18368933u, 4826457u,27613267u,22565485u, 5401919u, 7159313u,20844915u, 1143761u,
			24367331u,30466953u,14911951u,25808479u,30301989u, 6235377u,19198055u,15754883u,
			6718009u, 8534305u, 3744253u,19004859u,33405627u,29014907u,12286853u,24872215u,
			25499361u,18276439u,14702223u, 5672667u, 9362289u,14381475u,24224259u,27394735u
			};