Commit f9c9f33b authored by Mathieu Giraud's avatar Mathieu Giraud

core/kmeraffect.{h,cpp}: KmerAffect copy constructor, with reverse

parent f62ab84a
......@@ -79,6 +79,12 @@ KmerAffect::KmerAffect(const KmerAffect &ka) {
affect = ka.affect;
}
KmerAffect::KmerAffect(const KmerAffect &ka, bool reverse) {
affect = ka.affect;
if (reverse)
affect.c ^= (1 << 7);
}
KmerAffect::KmerAffect(const string &label,
int strand) {
affect.c = label[0];
......
......@@ -65,6 +65,11 @@ public:
*/
KmerAffect(const KmerAffect &ka);
/*
* Copy constructor, possibly reversing the strand if 'reverse' is true
*/
KmerAffect(const KmerAffect &ka, bool reverse);
/**
* Construct an affectation as stated by the parameters
* @post affect_strand(affect) == strand AND affect_char(affect) == kmer[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment