Commit 9b02d34a authored by Mikaël Salson's avatar Mikaël Salson

Kmer: getNull() is used to know if a kmer has already been used

parent 9e082191
......@@ -152,6 +152,10 @@ bool KmerAffect::isAmbiguous() const {
return affect_strand(affect) == 1 && affect_char(affect) == AFFECT_AMBIGUOUS_CHAR;
}
bool KmerAffect::isNull() const {
return isUnknown();
}
bool KmerAffect::isUnknown() const {
return affect.c == (int) AFFECT_UNKNOWN_CHAR;
}
......
......@@ -135,6 +135,11 @@ public:
*/
bool isUnknown() const;
/**
* @return true iff the value is the same as the one given by default constructor
*/
bool isNull() const;
string toString() const;
string toStringValues()const;
string toStringSigns() const;
......
......@@ -46,6 +46,10 @@ bool Kmer::hasRevcompSymetry() {
return true;
}
bool Kmer::isNull() {
return count == 0;
}
ostream &operator<<(ostream &os, const Kmer &kmer) {
os << kmer.count << ",";
return os;
......
......@@ -24,6 +24,11 @@ public:
Kmer &operator+=(const Kmer &);
static bool hasRevcompSymetry();
/**
* @return true if the element is the same as when initialised with default constructor.
*/
bool isNull();
} ;
ostream &operator<<(ostream &os, const Kmer &kmer);
......
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