Applies the standard formula for computing scaling. This is broken off into its own
function so that it easily invoked if the function above is overridden

@param scaling Vector containing scaling information
540760
public void computeHessianScaling(DMatrixRMaj scaling ) {

		double max = 0;
		for (int i = 0; i < scaling.numRows; i++) {
			// mathematically it should never be negative but...
			double v = scaling.data[i] = sqrt(abs(scaling.data[i]));
			if( v > max )
				max = v;
		}

		// Add this number to avoid divide by zero.
		// Ceres solver just uses 1 no matter what. That's probably not the best approach because if you're doing
		// with very small numbers scaling will be washed out
		max *= 1e-12;
		for (int i = 0; i < scaling.numRows; i++) {
			scaling.data[i] += max;
		}
	}
1062026
@Override public void updateScale(float verticalDragOffset) {
    ViewHelper.setScaleX(getView(), 1 - verticalDragOffset / getXScaleFactor());
    ViewHelper.setScaleY(getView(), 1 - verticalDragOffset / getYScaleFactor());
  }
1044429
private static void scaleUpFiveDestructive(Slice decimal, int fiveScale)
    {
        while (fiveScale > 0) {
            int powerFive = Math.min(fiveScale, MAX_POWER_OF_FIVE_INT);
            fiveScale -= powerFive;
            int multiplier = POWERS_OF_FIVES_INT[powerFive];
            multiplyDestructive(decimal, multiplier);
        }
    }
943640
public static void scale( double alpha , DMatrix3 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
    }
7998
def scale_cb(self, setting, value):
        """"""
        zoomlevel = self.zoom.calc_level(value)
        self.t_.set(zoomlevel=zoomlevel)

        self.redraw(whence=0)
954618
public void scaleAbsoluteWidth(float newWidth) {
		plainWidth = newWidth;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
201858
def scaleField(self, scalingFactor):
        
        oldField = self.fieldReduction.val
        newField = 100.0 * (scalingFactor * (1.0 + oldField/100.0) - 1.0)
        self.fieldReduction = self.fieldReduction._replace(val = newField)
336129
public void setNiceScale(final boolean NICE_SCALE) {
        niceScale = NICE_SCALE;
        if (!niceScale) {
            minorTickSpacing = 1;
            majorTickSpacing = 10;
        }
        calculate();
        validate();
        calcAngleStep();
        fireStateChanged();
    }
256064
public static Relation<NumberVector> applyPrescaling(ScalingFunction scaling, Relation<NumberVector> relation, DBIDs skip) {
    if(scaling == null) {
      return relation;
    }
    NumberVector.Factory<NumberVector> factory = RelationUtil.getNumberVectorFactory(relation);
    DBIDs ids = relation.getDBIDs();
    WritableDataStore<NumberVector> contents = DataStoreUtil.makeStorage(ids, DataStoreFactory.HINT_HOT, NumberVector.class);
    for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
      NumberVector v = relation.get(iter);
      double[] raw = v.toArray();
      if(!skip.contains(iter)) {
        applyScaling(raw, scaling);
      }
      contents.put(iter, factory.newNumberVector(raw, ArrayLikeUtil.DOUBLEARRAYADAPTER));
    }
    return new MaterializedRelation<>(relation.getDataTypeInformation(), ids, "rescaled", contents);
  }
613144
public void scale(double x, double y) {
		xx *= x;
		xy *= x;
		xd *= x;
		yx *= y;
		yy *= y;
		yd *= y;
	}
451490
public static void scale( double alpha , DMatrix4 a ) {
        a.a1 *= alpha;
        a.a2 *= alpha;
        a.a3 *= alpha;
        a.a4 *= alpha;
    }
499803
public static void scale(Image srcImg, File destFile, float scale) throws IORuntimeException {
		write(scale(srcImg, scale), destFile);
	}
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;
                }
            }
        }
    }
705376
public void setScalingPolicies(java.util.Collection<AutoScalingPolicyDescription> scalingPolicies) {
        if (scalingPolicies == null) {
            this.scalingPolicies = null;
            return;
        }

        this.scalingPolicies = new java.util.ArrayList<AutoScalingPolicyDescription>(scalingPolicies);
    }
649698
public void scaleAbsoluteHeight(float newHeight) {
		plainHeight = newHeight;
		float[] matrix = matrix();
		scaledWidth = matrix[DX] - matrix[CX];
		scaledHeight = matrix[DY] - matrix[CY];
		setWidthPercentage(0);
	}
1186362
public void scale(double scale) {
		this.m00 *= scale;
		this.m11 *= scale;
		this.m01 *= scale;
		this.m10 *= scale;
	}
719628
@SuppressWarnings("unchecked")
  public static <E, C extends Counter<E>> C scale(C c, double s) {
    C scaled = (C) c.getFactory().create();
    for (E key : c.keySet()) {
      scaled.setCount(key, c.getCount(key) * s);
    }
    return scaled;
  }