Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 628994ac authored by ROUZAUD-CORNABAS Jonathan's avatar ROUZAUD-CORNABAS Jonathan
Browse files

Add a sort algorithm for Protein (as in Victor branch)

parent a2f5886a
No related branches found
No related tags found
No related merge requests found
......@@ -756,6 +756,15 @@ void Protein::save(gzFile backup_file)
AA->save(backup_file);
}
// =================================================================
// Overloaded Operators
// =================================================================
bool Protein::operator<(const Protein & other){
return (height_ < other.height_)
|| (height_ == other.height_ && mean_ < other.mean_)
|| (height_ == other.height_ && mean_ == other.mean_ && width_ < other.width_);
}
// =================================================================
// Protected Methods
// =================================================================
......
......@@ -118,6 +118,7 @@ class Protein
void add_RNA(Rna * rna);
char* AA_sequence(char separator = ' ') const; // WARNING : creates a new char[...] (up to you to delete it!)
virtual void save(gzFile backup_file);
bool operator<(const Protein & other);
// =================================================================
// Public Attributes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment