From dd3068e2bbca7e563fa644682eb13c1d2cbc084b Mon Sep 17 00:00:00 2001 From: bharatnc Date: Sun, 16 Aug 2020 13:36:46 -0700 Subject: [PATCH] fix file formatting --- src/AggregateFunctions/QuantileExact.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/AggregateFunctions/QuantileExact.h b/src/AggregateFunctions/QuantileExact.h index 42700abd0cc..6b6836d4f9f 100644 --- a/src/AggregateFunctions/QuantileExact.h +++ b/src/AggregateFunctions/QuantileExact.h @@ -250,15 +250,16 @@ struct QuantileExactLow : public QuantileExact size_t n = level < 1 ? level * array.size() : (array.size() - 1); // if level is 0.5 then compute the "low" median of the sorted array // by the method of rounding. - if (level == 0.5) { + if (level == 0.5) + { auto s = array.size(); if (s % 2 == 1) { - return array[static_cast(floor(s/2))]; + return array[static_cast(floor(s / 2))]; } else { - return array[static_cast((floor(s/2))-1)]; + return array[static_cast((floor(s / 2)) - 1)]; } } // else quantile is the nth index of the sorted array obtained by multiplying @@ -281,15 +282,16 @@ struct QuantileExactLow : public QuantileExact size_t n = level < 1 ? level * array.size() : (array.size() - 1); // if level is 0.5 then compute the "low" median of the sorted array // by the method of rounding. - if (level == 0.5) { + if (level == 0.5) + { auto s = array.size(); if (s % 2 == 1) { - result[indices[i]] = array[static_cast(floor(s/2))]; + result[indices[i]] = array[static_cast(floor(s / 2))]; } else { - result[indices[i]] = array[static_cast(floor((s/2)-1))]; + result[indices[i]] = array[static_cast(floor((s / 2) - 1))]; } } // else quantile is the nth index of the sorted array obtained by multiplying @@ -322,9 +324,10 @@ struct QuantileExactHigh : public QuantileExact size_t n = level < 1 ? level * array.size() : (array.size() - 1); // if level is 0.5 then compute the "high" median of the sorted array // by the method of rounding. - if (level == 0.5){ + if (level == 0.5) + { auto s = array.size(); - return array[static_cast(floor(s/ 2))]; + return array[static_cast(floor(s / 2))]; } // else quantile is the nth index of the sorted array obtained by multiplying // level and size of array. Example if level = 0.1 and size of array is 10. @@ -345,9 +348,10 @@ struct QuantileExactHigh : public QuantileExact size_t n = level < 1 ? level * array.size() : (array.size() - 1); // if level is 0.5 then compute the "high" median of the sorted array // by the method of rounding. - if (level == 0.5) { + if (level == 0.5) + { auto s = array.size(); - result[indices[i]] = array[static_cast(floor(s/2))]; + result[indices[i]] = array[static_cast(floor(s / 2))]; } // else quantile is the nth index of the sorted array obtained by multiplying // level and size of array. Example if level = 0.1 and size of array is 10.