code: public static MutableDoubleTuple normalizeElements(
          DoubleTuple t, DoubleTuple min, DoubleTuple max,
          MutableDoubleTuple result)
      {
          result = validate(t, result);
          for (int i=0; i<result.getSize(); i++)
          {
              double value = t.get(i);
              double minValue = min.get(i);
              double maxValue = max.get(i);
              double alpha = (value - minValue) / (maxValue - minValue);
              double newValue = alpha;
              result.set(i, newValue);
          }
          return result;
      }
docs: Normalize the elements of the given tuple, so that each element
  will be linearly rescaled to the interval defined by the corresponding
  elements of the given minimum and maximum tuple.
  Each element that is equal to the corresponding minimum element will
  be 0.0 in the resulting tuple.
  Each element that is equal to the corresponding maximum element will
  be 1.0 in the resulting tuple.
  Other values will be interpolated accordingly.
  
  @param t The input tuple
  @param min The minimum value
  @param max The maximum value
  @param result The tuple that will store the result
  @return The result tuple
  @throws IllegalArgumentException If the given tuples do not
  have the same {@link Tuple#getSize() size}