nthash.hpp
// canonical ntHash for sliding k-mers
canonical ntHash for sliding k-mers
canonical ntHash for sliding k - mers
inline uint64_t NTPC64(const unsigned char charOut, const unsigned char charIn, const unsigned k, uint64_t& fhVal, uint64_t& rhVal) {
    fhVal = rol1(fhVal) ^ msTab[charOut][k%64] ^ msTab[charIn][0];
    rhVal = ror1(rhVal) ^ msTab[charOut&cpOff][63] ^ msTab[charIn&cpOff][(k-1)%64];
    return (rhVal<fhVal)? rhVal : fhVal;
}
inline uint64_t NTPC64 ( const unsigned char charOut , const unsigned char charIn , const unsigned k , uint64_t & fhVal , uint64_t & rhVal ) { fhVal = rol1 ( fhVal ) ^ msTab [ charOut ] [ k % 64 ] ^ msTab [ charIn ] [ 0 ] ; rhVal = ror1 ( rhVal ) ^ msTab [ charOut & cpOff ] [ 63 ] ^ msTab [ charIn & cpOff ] [ ( k - 1 ) % 64 ] ; return ( rhVal < fhVal ) ? rhVal : fhVal ; }
canonical ntHash for sliding k-mers
canonical ntHash for sliding k - mers