Set the variance of bobblin' in each direction.
979317
public void setVariance (int dx, int dy)
    {
        if ((dx < 0) || (dy < 0) || ((dx == 0) && (dy == 0))) {
            throw new IllegalArgumentException(
                "Variance values must be positive, and at least one must be non-zero.");
        } else {
            _dx = dx;
            _dy = dy;
        }
    }
1004205
def _setsie(self, i):
        """"""
        if not i:
            self._setbin_unsafe('1')
        else:
            self._setuie(abs(i))
            self._append(Bits([i < 0]))
567487
private void makeCardinalityVariables() {
        vmsCountOnNodes = new ArrayList<>(nodes.size());
        int nbVMs = vms.size();
        for (Node n : nodes) {
            vmsCountOnNodes.add(csp.intVar(makeVarLabel("nbVMsOn('", n, "')"), 0, nbVMs, true));
        }
        vmsCountOnNodes = Collections.unmodifiableList(vmsCountOnNodes);
    }
814801
def vary_radius(dt):
	""""""
	global time
	time += dt
	disc.inner_radius = disc.outer_radius = 2.5 + math.sin(time / 2.0) * 1.5
635241
def set_vflip(self, val):
        """"""
        self.__vertical_flip = val
        for image in self.images:
            image.v_flip = val
1089318
def set_U(self, U):
        """"""
        self.Ubg = np.asarray(U)[np.newaxis,...]
1098475
def random_val(index, tune_params):
    """"""
    key = list(tune_params.keys())[index]
    return random.choice(tune_params[key])
1335020
def setIV(self, IV):
		""""""
		_baseDes.setIV(self, IV)
		for key in (self.__key1, self.__key2, self.__key3):
			key.setIV(IV)
838795
def propose(self):
        

        # Locally store size of matrix
        dims = self.stochastic.value.shape

        # Add normal deviate to value and symmetrize
        dev = rnormal(
            0,
            self.adaptive_scale_factor *
            self.proposal_sd,
            size=dims)
        symmetrize(dev)

        # Replace
        self.stochastic.value = dev + self.stochastic.value
936123
def _vars(ftype, name, *dims):
    """"""
    shape = _dims2shape(*dims)
    objs = list()
    for indices in itertools.product(*[range(i, j) for i, j in shape]):
        objs.append(_VAR[ftype](name, indices))
    return farray(objs, shape, ftype)
358227
def pstdev(data):
    """"""
    #: http://stackoverflow.com/a/27758326
    n = len(data)
    if n < 2:
        raise ValueError('variance requires at least two data points')
    ss = _ss(data)
    pvar = ss/n  # the population variance
    return pvar**0.5
1090314
def setgraphval(delta, graph, key, val):
    """"""
    delta.setdefault(graph, {})[key] = val
1024687
def var(inlist):
    
    n = len(inlist)
    mn = mean(inlist)
    deviations = [0] * len(inlist)
    for i in range(len(inlist)):
        deviations[i] = inlist[i] - mn
    return ss(deviations) / float(n - 1)
1069724
def propose(self):
        """"""

        # Generate uniform variate to choose kernel
        self.current_kernel = sum(self.cum_probs < random())
        kernel = self.kernels[self.current_kernel]

        # Parameters to move
        self.phi = (random(self._len) < self.p)

        # Propose new value
        kernel()
820239
public static float Variance(ImageSource fastBitmap, float mean, int startX, int startY, int width, int height) {

        float sum = 0;
        if (fastBitmap.isGrayscale()) {
            for (int i = startX; i < height; i++) {
                for (int j = startY; j < width; j++) {
                    sum += Math.pow(fastBitmap.getRGB(j, i) - mean, 2);
                }
            }
            return sum / (float) ((width * height) - 1);
        } else {
            throw new IllegalArgumentException("ImageStatistics: Only compute variance in grayscale images.");
        }
    }
138084
function( c, num, variance ){
            if( arguments.length < 3 ){
                variance = ColorRange.DEFAULT_VARIANCE;
            }
            if( arguments.length === 1 ){
                num = c;
                c = undefined;
            }
            var list = new ColorList();
            for( var i=0; i<num; i++){
                list.add(this.getColor(c, variance));
            }
            return list;
        }
525808
def _calc_var_theta(self):
        """"""
        if self.decaying_prior:
            n_sampled = np.clip(self.alpha_ + self.beta_, 1, np.inf)
            prior_weight = 1/n_sampled
            alpha = self.alpha_ + prior_weight * self.alpha_0
            beta = self.beta_ + prior_weight * self.beta_0
        else:
            alpha = self.alpha_ + self.alpha_0
            beta = self.beta_ + self.beta_0
        # Variance of Beta-distributed rv
        self.var_theta_ = ( alpha * beta /
                            ((alpha + beta)**2 * (alpha + beta + 1)) )