Mercurial > repos > calkan > mrfast
comparison mrfast-2.1.0.5/HashTable.h @ 1:d4054b05b015 default tip
Version update to 2.1.0.5
author | calkan |
---|---|
date | Fri, 09 Mar 2012 07:35:51 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:7b3dc85dc7fd | 1:d4054b05b015 |
---|---|
1 /* | |
2 * Copyright (c) <2008 - 2012>, University of Washington, Simon Fraser University | |
3 * All rights reserved. | |
4 * | |
5 * Redistribution and use in source and binary forms, with or without modification, | |
6 * are permitted provided that the following conditions are met: | |
7 * | |
8 * Redistributions of source code must retain the above copyright notice, this list | |
9 * of conditions and the following disclaimer. | |
10 * - Redistributions in binary form must reproduce the above copyright notice, this | |
11 * list of conditions and the following disclaimer in the documentation and/or other | |
12 * materials provided with the distribution. | |
13 * - Neither the names of the University of Washington, Simon Fraser University, | |
14 * nor the names of its contributors may be | |
15 * used to endorse or promote products derived from this software without specific | |
16 * prior written permission. | |
17 * | |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | |
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 */ | |
30 | |
31 /* | |
32 Authors: | |
33 Farhad Hormozdiari | |
34 Faraz Hach | |
35 Can Alkan | |
36 Emails: | |
37 farhadh AT uw DOT edu | |
38 fhach AT cs DOT sfu DOT ca | |
39 calkan AT uw DOT edu | |
40 */ | |
41 | |
42 | |
43 | |
44 #ifndef __HASH_TABLE__ | |
45 #define __HASH_TABLE__ | |
46 | |
47 typedef struct HashTable | |
48 { | |
49 long long hv; | |
50 int *locs; | |
51 } HashTable; | |
52 | |
53 typedef struct | |
54 { | |
55 unsigned int *locs; | |
56 } IHashTable; | |
57 | |
58 int hashVal(char *seq); | |
59 void configHashTable(); | |
60 char *getRefGenome(); | |
61 char *getRefGenomeName(); | |
62 int getRefGenomeOffset(); | |
63 int initLoadingHashTable(char *fileName); | |
64 HashTable *getHashTable(); | |
65 | |
66 void (*generateHashTable)(char *fileName, char *indexName); | |
67 int (*loadHashTable)(double *loadTime, int errThreshould); | |
68 void (*finalizeLoadingHashTable)(); | |
69 unsigned int *(*getCandidates)(int hv); | |
70 | |
71 #endif |