Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 66739c4e authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/stats.{h,cpp}: remove references to 'length' in the Stats object

We now store information either on lengths (on reads) or on number of reads (on clones).
parent 40729f58
......@@ -3,7 +3,7 @@
Stats::Stats()
{
nb = 0 ;
length = 0 ;
data = 0 ;
}
void Stats::setLabel(string _label)
......@@ -11,15 +11,15 @@ void Stats::setLabel(string _label)
label = _label ;
}
void Stats::insert(int _length)
void Stats::insert(int _data)
{
nb++ ;
length += _length ;
data += _data ;
}
float Stats::getAverageLength()
float Stats::getAverage()
{
return (float) length / nb ;
return (float) data / nb ;
}
ostream &operator<<(ostream &out, Stats &stats)
......@@ -30,7 +30,7 @@ ostream &operator<<(ostream &out, Stats &stats)
out << right << setw(9) << stats.nb ;
out << " " << setw(5) ;
if (stats.nb)
out << fixed << setprecision(1) << stats.getAverageLength() ;
out << fixed << setprecision(1) << stats.getAverage() ;
else
out << "-" ;
......
......@@ -12,14 +12,14 @@ class Stats {
public:
string label;
int nb;
int length;
int data;
public:
Stats();
void setLabel(string _label);
void insert(int _length);
void insert(int _data);
float getAverageLength();
float getAverage();
};
ostream &operator<<(ostream &out, Stats &stats);
......
......@@ -63,7 +63,7 @@ WindowsStorage *WindowExtractor::extract(OnlineFasta *reads, MultiGermline *mult
}
float WindowExtractor::getAverageSegmentationLength(SEGMENTED seg) {
return stats[seg].getAverageLength();
return stats[seg].getAverage();
}
size_t WindowExtractor::getNbReads() {
......
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