MCPcopy Create free account
hub / github.com/antlr/codebuff / median

Method median

src/org/antlr/codebuff/misc/BuffUtils.java:122–126  ·  view source on GitHub ↗
(List<T> data)

Source from the content-addressed store, hash-verified

120 }
121
122 public static <T> T median(List<T> data) {
123 Collections.sort((List)data);
124 int n = data.size();
125 return data.get(n/2);
126 }
127
128 public static double max(List<Double> data) {
129 Collections.sort(data);

Callers 4

checkStabilityMethod · 0.95
mainMethod · 0.95
validateDocumentsMethod · 0.45
computeConsistencyMethod · 0.45

Calls 3

sortMethod · 0.80
sizeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected