/** * Returns the index of the median of the three indexed chars. */ private static int med3(float x[], int a, int b, int c, FloatComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(short x[], int a, int b, int c, ShortComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); }
/** * Returns the index of the median of the three indexed chars. */ private static int med3(char x[], int a, int b, int c, CharComparator comp) { int ab = comp.compare(x[a], x[b]); int ac = comp.compare(x[a], x[c]); int bc = comp.compare(x[b], x[c]); return (ab < 0 ? (bc < 0 ? b : ac < 0 ? c : a) : (bc > 0 ? b : ac > 0 ? c : a)); }
/** * Returns the index of the median of the three indexed chars. */ private static int med3(double x[], int a, int b, int c, DoubleComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(byte x[], int a, int b, int c, ByteComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(long x[], int a, int b, int c, LongComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(short x[], int a, int b, int c, ShortComparator comp) { int ab = comp.compare(x[a], x[b]); int ac = comp.compare(x[a], x[c]); int bc = comp.compare(x[b], x[c]); return (ab < 0 ? (bc < 0 ? b : ac < 0 ? c : a) : (bc > 0 ? b : ac > 0 ? c : a)); }
/** * Returns the index of the median of the three indexed chars. */ private static int med3(char x[], int a, int b, int c, CharComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(double x[], int a, int b, int c, DoubleComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(float x[], int a, int b, int c, FloatComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(int x[], int a, int b, int c, IntComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(short x[], int a, int b, int c, ShortComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); }
/** * Returns the index of the median of the three indexed chars. */ private static int med3(char x[], int a, int b, int c, CharComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**
/** * Returns the index of the median of the three indexed chars. */ private static int med3(double x[], int a, int b, int c, DoubleComparator comp) { int ab = comp.compare(x[a], x[b]); int ac = comp.compare(x[a], x[c]); int bc = comp.compare(x[b], x[c]); return (ab < 0 ? (bc < 0 ? b : ac < 0 ? c : a) : (bc > 0 ? b : ac > 0 ? c : a)); }
/** * Returns the index of the median of the three indexed chars. */ private static int med3(int x[], int a, int b, int c, IntComparator comp) { int ab = comp.compare(x[a],x[b]); int ac = comp.compare(x[a],x[c]); int bc = comp.compare(x[b],x[c]); return (ab<0 ? (bc<0 ? b : ac<0 ? c : a) : (bc>0 ? b : ac>0 ? c : a)); } /**