code: private int ssMedian3(int Td, int PA, int v1, int v2, int v3) {
          if (T[start + Td + SA[PA + SA[v1]]] > T[start + Td + SA[PA + SA[v2]]]) {
              int t = v1;
              v1 = v2;
              v2 = t;
          }
          if (T[start + Td + SA[PA + SA[v2]]] > T[start + Td + SA[PA + SA[v3]]]) {
              if (T[start + Td + SA[PA + SA[v1]]] > T[start + Td + SA[PA + SA[v3]]]) {
                  return v1;
              } else {
                  return v3;
              }
          }
          return v2;
      }
docs: Returns the median of three elements.