1 #ifndef GENESIS_SEQUENCE_KMER_MICROVARIANT_SCANNER_H_
2 #define GENESIS_SEQUENCE_KMER_MICROVARIANT_SCANNER_H_
55 template<
typename Tag>
112 static_assert( std::is_same<WordType, std::uint64_t>::value,
"Kmer::WordType != uint64_t" );
128 auto cycle_ = [&](
size_t pos,
size_t& cnt )
131 WordType
const xor_val = ( cnt % 2 == 0 ? 0x1 : 0x3 );
132 kmer_.value() ^= ( xor_val << ( 2 * pos ));
137 cycle_( pos_, cnt_ );
144 assert( kmer_.k() > 0 );
145 if( pos_ < kmer_.k() - 1 ) {
148 cycle_( pos_, cnt_ );
150 pos_ = std::numeric_limits<size_t>::max();
151 cnt_ = std::numeric_limits<size_t>::max();
167 return ( pos_ == other.pos_ ) && ( cnt_ == other.cnt_ );
172 return !( other == *this );
202 size_t pos_ = std::numeric_limits<size_t>::max();
203 size_t cnt_ = std::numeric_limits<size_t>::max();
211 template<
typename Tag>
223 #endif // include guard