nthash.hpp
// canonical multihash ntHash for sliding k-mers
canonical multihash ntHash for sliding k-mers
canonical multihash ntHash for sliding k - mers
inline void NTMC64(const unsigned char charOut, const unsigned char charIn, const unsigned k, const unsigned m, uint64_t& fhVal, uint64_t& rhVal, uint64_t *hVal) {
    uint64_t bVal=0, tVal=0;
    bVal = NTPC64(charOut, charIn, k, fhVal, rhVal);
    hVal[0] = bVal;
    for(unsigned i=1; i<m; i++) {
        tVal = bVal * (i ^ k * multiSeed);
        tVal ^= tVal >> multiShift;
        hVal[i] =  tVal;
    }
}
inline void NTMC64 ( const unsigned char charOut , const unsigned char charIn , const unsigned k , const unsigned m , uint64_t & fhVal , uint64_t & rhVal , uint64_t * hVal ) { uint64_t bVal = 0 , tVal = 0 ; bVal = NTPC64 ( charOut , charIn , k , fhVal , rhVal ) ; hVal [ 0 ] = bVal ; for ( unsigned i = 1 ; i < m ; i ++ ) { tVal = bVal * ( i ^ k * multiSeed ) ; tVal ^= tVal >> multiShift ; hVal [ i ] = tVal ; } }
canonical multihash ntHash for sliding k-mers
canonical multihash ntHash for sliding k - mers