Commit c2aa9edf authored by Mikaël Salson's avatar Mikaël Salson

Kmer: provide getLength(), isNull() and isUnknown()

Those functions are not really used with Kmer but they are there for
the compatibility with KmerAffect.
parent da43f726
......@@ -42,14 +42,22 @@ Kmer &Kmer::operator+=(const Kmer &kmer) {
return *this;
}
size_t Kmer::getLength() const{
return 10;
Please register or sign in to reply
}
bool Kmer::hasRevcompSymetry() {
return true;
}
bool Kmer::isNull() {
bool Kmer::isNull() const{
return count == 0;
}
bool Kmer::isUnknown() const{
return false;
}
ostream &operator<<(ostream &os, const Kmer &kmer) {
os << kmer.count << ",";
return os;
......
......@@ -25,6 +25,11 @@ public:
Kmer &operator+=(const Kmer &);
/**
* @return the length of the kmer (only there for compatibility with KmerAffect)
*/
size_t getLength() const;
/**
* When indexing revcomp, should the value be the same or not?
* In other words, does the information stored by the class is strand-dependent?
......@@ -34,7 +39,13 @@ public:
/**
* @return true if the element is the same as when initialised with default constructor.
*/
bool isNull();
bool isNull() const;
/**
* @return true iff the kmer is unknown (which doesn't make sense here but
* it only there for a reason of compatibility with KmerAffect)
*/
bool isUnknown() const;
} ;
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