code: public static ListDouble rescale(final ListNumber data, final double factor, final double offset) {
          if (factor == 1.0)
              return add(data, offset);
          return new ListDouble() {
  
              @Override
              public double getDouble(int index) {
                  return factor * data.getDouble(index) + offset;
              }
  
              @Override
              public int size() {
                  return data.size();
              }
          };
      }
docs: Performs a linear transformation on the data.
  
  @param data A list of numbers
  @param factor The multiplicative constant
  @param offset The additive constant
  @return result[x] = data[x] * factor + offset