Skip to content
Permalink
Browse files
Remove un-necessary if statement
  • Loading branch information
b20n committed Nov 17, 2013
1 parent 1a902e8 commit f5e777d711008068ca15a48f95c20b44946995ef
Showing 1 changed file with 9 additions and 15 deletions.
@@ -98,21 +98,15 @@ get_statistics(Values) when is_list(Values) ->

get_statistics_subset([_,_,_,_,_|_] = Values, Items) ->
Length = length(Values),
if Length < ?STATS_MIN ->
[I || {K,_} = I <- get_statistics([]),
lists:member(K, Items) orelse K==percentiles];
true ->
SortedValues = lists:sort(Values),
Steps = calc_steps(Items),
Scan_res = if Steps > 1 -> scan_values(Values);
true -> []
end,
Scan_res2 = if Steps > 2 -> scan_values2(Values, Scan_res);
true -> []
end,
report_subset(Items, Length,
SortedValues, Scan_res, Scan_res2)
end;
SortedValues = lists:sort(Values),
Steps = calc_steps(Items),
Scan_res = if Steps > 1 -> scan_values(Values);
true -> []
end,
Scan_res2 = if Steps > 2 -> scan_values2(Values, Scan_res);
true -> []
end,
report_subset(Items, Length, SortedValues, Scan_res, Scan_res2);
get_statistics_subset(Values, Items) when is_list(Values) ->
get_null_statistics_subset(Items, []).

0 comments on commit f5e777d

Please sign in to comment.