nthash.hpp
// ntHash with seeding option, using rotate ops
ntHash with seeding option, using rotate ops
ntHash with seeding option using rotate ops
inline uint64_t NT64(const char * kmerSeq, const unsigned k, const unsigned seed) {
    uint64_t hVal=0;
    for(unsigned i=0; i<k; i++)
        hVal ^= rol(seedTab[(unsigned char)kmerSeq[i]], k-1-i);
    hVal *= seed ^ k * multiSeed;
    hVal ^= hVal >> multiShift;
    return hVal;
}
inline uint64_t NT64 ( const char * kmerSeq , const unsigned k , const unsigned seed ) { uint64_t hVal = 0 ; for ( unsigned i = 0 ; i < k ; i ++ ) hVal ^= rol ( seedTab [ ( unsigned char ) kmerSeq [ i ] ] , k - 1 - i ) ; hVal *= seed ^ k * multiSeed ; hVal ^= hVal >> multiShift ; return hVal ; }
ntHash with seeding option, using rotate ops
ntHash with seeding option using rotate ops