-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathKmerIterator.h
executable file
·49 lines (32 loc) · 1.03 KB
/
KmerIterator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef KMER_ITERATOR_H
#define KMER_ITERATOR_H
using encode_type = unsigned long int;
template <typename T>
class KmerIterator;
template <typename T>
KmerIterator<T> get_begin(T *str, int k);
template <typename T>
KmerIterator<T> get_end(T *str, int length, int k);
template <typename T>
encode_type kmer_encode(KmerIterator<T> start, KmerIterator<T> end);
template <typename T>
class KmerIterator{
public:
KmerIterator(const T *str, int k);
~KmerIterator() = default;
KmerIterator operator+=(int val);
KmerIterator &operator++();
KmerIterator operator++(int val);
encode_type operator*();
encode_type operator|(encode_type val);
T operator->();
bool operator==(const KmerIterator& rhs);
bool operator!=(const KmerIterator& rhs);
KmerIterator operator+(int integer_value);
KmerIterator operator-(int integer_value);
private:
T const * ptr;
int k;
};
#include "KmerIterator.cpp"
#endif