File: HashIndexT.h

package info (click to toggle)
perm 0.4.0-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 976 kB
  • sloc: cpp: 13,499; makefile: 98; sh: 12
file content (26 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (5)
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
#pragma once
/*****
*	This class is a Index table for Hash Table.
*	When building the table, we hash
*	Before building the index, we will do a counting for the first run and set the index
*	When there is a record (Query), they will look up the index and bucket to a range and than do binary search
*/
class CHashIndexT
{
public:
    CHashIndexT(void);
    CHashIndexT(unsigned int uiBucketSize);
    ~CHashIndexT(void);

    unsigned int uiSize;
    unsigned int uiWindowSize;//The # of base we need to use as hash key
    unsigned int* aiIndexTable;//Just use a integer as index;
    int Counter2Index(void);
    static const unsigned int INDEX_BASES_LIMIT;
private:
    unsigned int HashFunction(char* Kmer) const;
    int initialization(unsigned int BucketSize);
};