nthash.hpp
// canonical ntHash for sliding k-mers, using rotate ops
canonical ntHash for sliding k-mers, using rotate ops
canonical ntHash for sliding k - mers using rotate ops
inline uint64_t NTC64(const unsigned char charOut, const unsigned char charIn, const unsigned k, uint64_t& fhVal, uint64_t& rhVal) {
    fhVal = rol1(fhVal) ^ rol(seedTab[charOut], k) ^ seedTab[charIn];
    rhVal = ror1(rhVal) ^ ror1(seedTab[charOut&cpOff]) ^ rol(seedTab[charIn&cpOff], k-1);
    return (rhVal<fhVal)? rhVal : fhVal;
}
inline uint64_t NTC64 ( const unsigned char charOut , const unsigned char charIn , const unsigned k , uint64_t & fhVal , uint64_t & rhVal ) { fhVal = rol1 ( fhVal ) ^ rol ( seedTab [ charOut ] , k ) ^ seedTab [ charIn ] ; rhVal = ror1 ( rhVal ) ^ ror1 ( seedTab [ charOut & cpOff ] ) ^ rol ( seedTab [ charIn & cpOff ] , k - 1 ) ; return ( rhVal < fhVal ) ? rhVal : fhVal ; }
canonical ntHash for sliding k-mers, using rotate ops
canonical ntHash for sliding k - mers using rotate ops