Scale based on min,max

@param dataFrame the dataframe to scale
@param min       the minimum value
@param max       the maximum value
@return the normalized dataframe per column
511540
public static DataRowsFacade normalize(DataRowsFacade dataFrame, double min, double max) {
        return normalize(dataFrame, min, max, Collections.<String>emptyList());
    }
867462
public static DMatrixRMaj insideSpan(DMatrixRMaj[] span , double min , double max , Random rand ) {
        DMatrixRMaj A = new DMatrixRMaj(span.length,1);

        DMatrixRMaj B = new DMatrixRMaj(span[0].getNumElements(),1);

        for( int i = 0; i < span.length; i++ ) {
            B.set(span[i]);
            double val = rand.nextDouble()*(max-min)+min;
            CommonOps_DDRM.scale(val,B);

            CommonOps_DDRM.add(A,B,A);

        }

        return A;
    }
343356
@SuppressWarnings("rawtypes")
	public Set zrangeByScore(Object key, double min, double max) {
		Jedis jedis = getJedis();
		try {
			Set<byte[]> data = jedis.zrangeByScore(keyToBytes(key), min, max);
			Set<Object> result = new LinkedHashSet<Object>();	// 有序集合必须 LinkedHashSet
			valueSetFromBytesSet(data, result);
			return result;
		}
		finally {close(jedis);}
	}
317253
public static void scaleMinMax(double min, double max, INDArray toScale) {
        //X_std = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) X_scaled = X_std * (max - min) + min

        INDArray min2 = toScale.min(0);
        INDArray max2 = toScale.max(0);

        INDArray std = toScale.subRowVector(min2).diviRowVector(max2.sub(min2));

        INDArray scaled = std.mul(max - min).addi(min);
        toScale.assign(scaled);
    }
485727
@Override
	public void setZ(double min, double max) {
		if (min <= max) {
			this.minz = min;
			this.maxz = max;
		} else {
			this.minz = max;
			this.maxz = min;
		}
	}
1105627
public void setMaxSize( int maxRows , int maxCols )
    {
        this.maxRows = maxRows; this.maxCols = maxCols;

        Q = new DMatrixRMaj(maxRows,maxRows);
        R = new DMatrixRMaj(maxRows,maxCols);

        Y = new DMatrixRMaj(maxRows,1);
        Z = new DMatrixRMaj(maxRows,1);
    }
1117155
public static Pair<Schema, JavaRDD<List<Writable>>> toRecords(DataRowsFacade dataFrame) {
        Schema schema = fromStructType(dataFrame.get().schema());
        return new Pair<>(schema, dataFrame.get().javaRDD().map(new ToRecord(schema)));
    }
1017665
public AABBf setMax(float maxX, float maxY, float maxZ) {
        this.maxX = maxX;
        this.maxY = maxY;
        this.maxZ = maxZ;
        return this;
    }
431523
public static double nextDouble(Random random, final double min, final double max) {
		Validate.isTrue(max >= min, "Start value must be smaller or equal to end value.");
		MoreValidate.nonNegative("min", min);

		if (Double.compare(min, max) == 0) {
			return min;
		}

		return min + ((max - min) * random.nextDouble());
	}
871218
def merge_dfs(dfs, resample=None, do_mean=False, do_sum=False, do_min=False, do_max=False):
    
    if len(dfs) == 0:
        raise Exception("No dataframes provided")
    df = dfs.values()[0]
    name = dfs.keys()[0]
    df.columns = map(lambda x: name+"_"+x if not x.startswith(name) else x, df.columns)
    if resample is not None:
        df = df.resample(resample)
        if do_mean: df = df.mean()
        elif do_sum: df = df.sum()
        elif do_min: df = df.min()
        elif do_max: df = df.max()
        else: df = df.mean()
    if len(dfs) > 1:
        for name, newdf in dfs.items()[1:]:
            if resample is not None:
                newdf = newdf.resample(resample)
                if do_mean: newdf = newdf.mean()
                elif do_sum: newdf = newdf.sum()
                elif do_min: newdf = newdf.min()
                elif do_max: newdf = newdf.max()
                else: newdf = newdf.mean()
            newdf.columns = map(lambda x: name+"_"+x if not x.startswith(name) else x, newdf.columns)
            df = df.merge(newdf, left_index=True, right_index=True, how='outer')
    return df
50607
function scaleColumns(colsByGroup, maxWidth, totalFlexGrow) {
    // calculate total width and flexgrow points for coulumns that can be resized
    for (var attr in colsByGroup) {
        for (var _i = 0, _a = colsByGroup[attr]; _i < _a.length; _i++) {
            var column = _a[_i];
            if (!column.canAutoResize) {
                maxWidth -= column.width;
                totalFlexGrow -= column.flexGrow ? column.flexGrow : 0;
            }
            else {
                column.width = 0;
            }
        }
    }
    var hasMinWidth = {};
    var remainingWidth = maxWidth;
    // resize columns until no width is left to be distributed
    do {
        var widthPerFlexPoint = remainingWidth / totalFlexGrow;
        remainingWidth = 0;
        for (var attr in colsByGroup) {
            for (var _b = 0, _c = colsByGroup[attr]; _b < _c.length; _b++) {
                var column = _c[_b];
                // if the column can be resize and it hasn't reached its minimum width yet
                if (column.canAutoResize && !hasMinWidth[column.prop]) {
                    var newWidth = column.width + column.flexGrow * widthPerFlexPoint;
                    if (column.minWidth !== undefined && newWidth < column.minWidth) {
                        remainingWidth += newWidth - column.minWidth;
                        column.width = column.minWidth;
                        hasMinWidth[column.prop] = true;
                    }
                    else {
                        column.width = newWidth;
                    }
                }
            }
        }
    } while (remainingWidth !== 0);
}
818634
public function orWhereBetween(string $column, int $min, int $max)
    {
        $instance = $this->whereStrategyInstance();

        $instance->whereStrategy()->orWhereBetween($column, $min, $max);

        return $instance;
    }
682550
public void setDimensions(int maxCols, int minCols, int maxRows, int minRows) {
    this.maxCols = maxCols;
    this.minCols = minCols;
    this.maxRows = maxRows;
    this.minRows = minRows;
  }
751549
public static void scale(double[][] x, double lo, double hi) {
        int n = x.length;
        int p = x[0].length;

        double[] min = colMin(x);
        double[] max = colMax(x);

        for (int j = 0; j < p; j++) {
            double scale = max[j] - min[j];
            if (!Math.isZero(scale)) {
                for (int i = 0; i < n; i++) {
                    x[i][j] = (x[i][j] - min[j]) / scale;
                }
            } else {
                for (int i = 0; i < n; i++) {
                    x[i][j] = 0.5;
                }
            }
        }
    }
913112
function MinMaxScalerTransforms(vector = [], nan_value = -1, return_nan=false) {
              const average = avg$2(vector);
              const standard_dev = sd(vector);
              const maximum = max$1(vector);
              const minimum = min$1(vector);
              const scale = (z) => {
                const scaledValue = (z - average) / (maximum - minimum);
                if (isNaN(scaledValue) && return_nan) return scaledValue;
                else if (isNaN(scaledValue) && return_nan === false) return (isNaN(standard_dev)) ? z : standard_dev;
                else return scaledValue;
              }; // equivalent to MinMaxScaler(z)
              const descale = (scaledZ) => {
                const descaledValue = (scaledZ * (maximum - minimum)) + average;
                if (isNaN(descaledValue) && return_nan) return descaledValue;
                else if (isNaN(descaledValue) && return_nan === false) return (isNaN(standard_dev)) ? scaledZ : standard_dev;
                else return descaledValue;
              };
              const values = vector.map(scale)
                .map(val => {
                  if (isNaN(val)) return nan_value;
                  else return val;
                });
              return {
                components: {
                  average,
                  standard_dev,
                  maximum,
                  minimum,
                },
                scale,
                descale,
                values,
              };
            }
997608
public static DataRowsFacade normalize(DataRowsFacade dataFrame, List<String> skipColumns) {
        return normalize(dataFrame, 0, 1, skipColumns);
    }
512557
public void setRange( double minValue , double maxValue ) {
		this.maxValue = maxValue;
		this.minValue = minValue;

		divisor = 1.00001*(maxValue-minValue)/numBins;

		histIndexes.resize(numBins);

		if( histObjs.length < numBins ) {
		histObjs = new FastQueue[ numBins ];
			for (int i = 0; i < numBins; i++) {
				histObjs[i] = new FastQueue<SortableParameter_F64>(SortableParameter_F64.class,true);
			}
		}
	}