fix file formatting

This commit is contained in:
bharatnc 2020-08-16 13:36:46 -07:00
parent 6782f5de1d
commit dd3068e2bb

View File

@ -250,7 +250,8 @@ struct QuantileExactLow : public QuantileExact<Value>
size_t n = level < 1 ? level * array.size() : (array.size() - 1); 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 // if level is 0.5 then compute the "low" median of the sorted array
// by the method of rounding. // by the method of rounding.
if (level == 0.5) { if (level == 0.5)
{
auto s = array.size(); auto s = array.size();
if (s % 2 == 1) if (s % 2 == 1)
{ {
@ -281,7 +282,8 @@ struct QuantileExactLow : public QuantileExact<Value>
size_t n = level < 1 ? level * array.size() : (array.size() - 1); 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 // if level is 0.5 then compute the "low" median of the sorted array
// by the method of rounding. // by the method of rounding.
if (level == 0.5) { if (level == 0.5)
{
auto s = array.size(); auto s = array.size();
if (s % 2 == 1) if (s % 2 == 1)
{ {
@ -322,7 +324,8 @@ struct QuantileExactHigh : public QuantileExact<Value>
size_t n = level < 1 ? level * array.size() : (array.size() - 1); 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 // if level is 0.5 then compute the "high" median of the sorted array
// by the method of rounding. // by the method of rounding.
if (level == 0.5){ if (level == 0.5)
{
auto s = array.size(); auto s = array.size();
return array[static_cast<size_t>(floor(s / 2))]; return array[static_cast<size_t>(floor(s / 2))];
} }
@ -345,7 +348,8 @@ struct QuantileExactHigh : public QuantileExact<Value>
size_t n = level < 1 ? level * array.size() : (array.size() - 1); 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 // if level is 0.5 then compute the "high" median of the sorted array
// by the method of rounding. // by the method of rounding.
if (level == 0.5) { if (level == 0.5)
{
auto s = array.size(); auto s = array.size();
result[indices[i]] = array[static_cast<size_t>(floor(s / 2))]; result[indices[i]] = array[static_cast<size_t>(floor(s / 2))];
} }