MCPcopy Create free account
hub / github.com/BaseXdb/basex / median

Method median

basex-core/src/main/java/org/basex/util/list/IntList.java:696–700  ·  view source on GitHub ↗

Returns the index of the median of the three indexed integers. @param a first offset @param b second offset @param c thirst offset @return median

(final int a, final int b, final int c)

Source from the content-addressed store, hash-verified

694 * @return median
695 */
696 private int median(final int a, final int b, final int c) {
697 return list[a] < list[b] ?
698 list[b] < list[c] ? b : list[a] < list[c] ? c : a :
699 list[b] > list[c] ? b : list[a] > list[c] ? c : a;
700 }
701
702 @Override
703 public boolean equals(final Object obj) {

Callers 1

sortMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected