summaryrefslogtreecommitdiff
path: root/boost/accumulators/statistics/p_square_quantile.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/accumulators/statistics/p_square_quantile.hpp')
-rw-r--r--boost/accumulators/statistics/p_square_quantile.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/boost/accumulators/statistics/p_square_quantile.hpp b/boost/accumulators/statistics/p_square_quantile.hpp
index 844dfa7728..636fea7f23 100644
--- a/boost/accumulators/statistics/p_square_quantile.hpp
+++ b/boost/accumulators/statistics/p_square_quantile.hpp
@@ -44,7 +44,7 @@ namespace impl
For further details, see
- R. Jain and I. Chlamtac, The P^2 algorithmus fordynamic calculation of quantiles and
+ R. Jain and I. Chlamtac, The P^2 algorithm for dynamic calculation of quantiles and
histograms without storing observations, Communications of the ACM,
Volume 28 (October), Number 10, 1985, p. 1076-1085.
@@ -54,7 +54,7 @@ namespace impl
struct p_square_quantile_impl
: accumulator_base
{
- typedef typename numeric::functional::average<Sample, std::size_t>::result_type float_type;
+ typedef typename numeric::functional::fdiv<Sample, std::size_t>::result_type float_type;
typedef array<float_type, 5> array_type;
// for boost::result_of
typedef float_type result_type;
@@ -69,7 +69,7 @@ namespace impl
{
for(std::size_t i = 0; i < 5; ++i)
{
- this->actual_positions[i] = i + 1;
+ this->actual_positions[i] = i + 1.;
}
this->desired_positions[0] = 1.;
@@ -105,7 +105,7 @@ namespace impl
{
std::size_t sample_cell = 1; // k
- // find cell k such that heights[k-1] <= args[sample] < heights[k] and ajust extreme values
+ // find cell k such that heights[k-1] <= args[sample] < heights[k] and adjust extreme values
if (args[sample] < this->heights[0])
{
this->heights[0] = args[sample];