Commit 452118a7 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Add branch test

parent 2b706e8a
Pipeline #96670 passed with stages
in 1 minute and 10 seconds
......@@ -38,9 +38,6 @@ bool testPHistogram(){
}
std::cout << hist4 << std::endl;
PHistogram<float> emptyHist;
std::cout << emptyHist << std::endl;
PHistogram<float> singleValueHist(1lu);
std::cout << singleValueHist << std::endl;
......@@ -70,6 +67,14 @@ bool testPHistogram2(){
}
std::cout << hist4 << std::endl;
PHistogram<float> emptyHist;
std::cout << emptyHist << std::endl;
emptyHist.addValue(42.0f);
emptyHist.addAmplitude(3.0f, 4.0f);
emptyHist.setValueRange(tabValue, 14lu);
emptyHist.addValue(tabValue, 14lu);
return b;
}
......
......@@ -108,7 +108,6 @@ void PHistogram<T>::addValue(T value){
return;
}
size_t pos(((value - p_xMin)*((double)p_nbValue))/p_xRange);
if(pos >= p_nbValue) return;
p_value[pos]++;
++p_nbTirIn;
}
......@@ -151,7 +150,6 @@ void PHistogram<T>::addAmplitude(T value, T amplitude){
return;
}
size_t pos(((value - p_xMin)*((double)p_nbValue))/p_xRange);
if(pos >= p_nbValue){return;}
p_value[pos] += amplitude;
++p_nbTirIn;
}
......
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