code: public static double[] zmbd(double[] lower, double[] upper, double targetMean, RandomGenerator randomGenerator) {
          // Check dimension match:
          if (lower.length != upper.length) {
              throw new IllegalArgumentException("Lower and upper bounds must be of same length.");
          }
  
          // Check for that lower bounds must be equal to or less than upper bounds.
          for (int i = 0; i < lower.length; i++) {
              if (lower[i] > upper[i]) {
                  throw new IllegalArgumentException("Lower bounds must be equal to or less than upper bounds.");
              }
          }
  
          // Get indices and shuffle:
          final int[] indices = DMatrixUtils.shuffleIndices(lower.length, randomGenerator);
  
          // Call auxiliary function:
          final double[] zmbdValues = DMatrixUtils._zmbdInner(
                  DMatrixUtils.applyIndices(lower, indices),
                  DMatrixUtils.applyIndices(upper, indices),
                  targetMean,
                  randomGenerator);
  
          // Reapply original indices and return:
          return DMatrixUtils.applyIndices(zmbdValues, DMatrixUtils.getOrder(indices));
      }
docs: Computes the zero-mean bounded distribution for the provided distances.
  
  <p>
  
  Note that if {@code targetMean} is not zero, then the logic is not zero-mean but target-mean bounded.
  
  @param lower Lower distances.
  @param upper Upper distances.
  @param targetMean The target mean (ie. not zero-mean, but target-mean bounded...).
  @param randomGenerator Random number generator.
  @return The zero-mean bounded uniform distribution.