The reported bin positions were off by half of the original bin size
from what they actually contained. This was apparent when the RDF code
started actually using the code.
Change-Id: I651c1f1359430047acc83ca15e9c31087b22d845
AverageHistogramPointer dest(
new StaticAverageHistogram(
AverageHistogramPointer dest(
new StaticAverageHistogram(
- histogramFromBins(xstart(), nbins, 2*xstep())
+ histogramFromBins(settings().firstEdge(), nbins, 2*xstep())
.integerBins(bIntegerBins)));
dest->setColumnCount(columnCount());
dest->allocateValues();
.integerBins(bIntegerBins)));
dest->setColumnCount(columnCount());
dest->allocateValues();
/*! \brief
* Creates a copy of the histogram with double the bin width.
*
/*! \brief
* Creates a copy of the histogram with double the bin width.
*
+ * \param[in] bIntegerBins If `true`, the first bin in the result will
+ * cover the first bin from the source. Otherwise, the first bin
+ * will cover first two bins from the source.
* \throws std::bad_alloc if out of memory.
*
* The caller is responsible of deleting the returned object.
* \throws std::bad_alloc if out of memory.
*
* The caller is responsible of deleting the returned object.
</AnalysisData>
<AnalysisData Name="ResampledHistogram">
<DataFrame Name="Frame0">
</AnalysisData>
<AnalysisData Name="ResampledHistogram">
<DataFrame Name="Frame0">
- <Real Name="X">1.5</Real>
+ <Real Name="X">1.25</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</DataValues>
</DataFrame>
<DataFrame Name="Frame1">
</DataValues>
</DataFrame>
<DataFrame Name="Frame1">
- <Real Name="X">2.5</Real>
+ <Real Name="X">2.25</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</DataValues>
</DataFrame>
<DataFrame Name="Frame2">
</DataValues>
</DataFrame>
<DataFrame Name="Frame2">
- <Real Name="X">3.5</Real>
+ <Real Name="X">3.25</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</AnalysisData>
<AnalysisData Name="ResampledHistogram">
<DataFrame Name="Frame0">
</AnalysisData>
<AnalysisData Name="ResampledHistogram">
<DataFrame Name="Frame0">
- <Real Name="X">1</Real>
+ <Real Name="X">0.75</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</DataValues>
</DataFrame>
<DataFrame Name="Frame1">
</DataValues>
</DataFrame>
<DataFrame Name="Frame1">
- <Real Name="X">2</Real>
+ <Real Name="X">1.75</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</DataValues>
</DataFrame>
<DataFrame Name="Frame2">
</DataValues>
</DataFrame>
<DataFrame Name="Frame2">
- <Real Name="X">3</Real>
+ <Real Name="X">2.75</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
</DataValues>
</DataFrame>
<DataFrame Name="Frame3">
</DataValues>
</DataFrame>
<DataFrame Name="Frame3">
- <Real Name="X">4</Real>
+ <Real Name="X">3.75</Real>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>
<DataValues>
<Int Name="Count">1</Int>
<DataValue>