Set the strength of the local magnetic field.

        **Call signature**

        *B_G*
          The magnetic field strength, in Gauss
        Returns
          *self* for convenience in chaining.
485875
def set_bfield(self, B_G):
        
        if not (B_G > 0):
            raise ValueError('must have B_G > 0; got %r' % (B_G,))

        self.in_vals[IN_VAL_B] = B_G
        return self
404081
public void setMaterial(GVRMaterial material, int passIndex)
    {
        if (passIndex < mRenderPassList.size())
        {
            mRenderPassList.get(passIndex).setMaterial(material);
        }
        else
        {
            Log.e(TAG, "Trying to set material from invalid pass. Pass " + passIndex + " was not created.");
        }
    }
1012322
void set(final double m, final Object pt) {
		if (m == 0.0) {
			if (count != 0) {
				clusters.space.setToOrigin(m1);
				clusters.space.setToOrigin(m2);
			}
		} else {
			clusters.space.setToScaled(m1, m, pt);
			clusters.space.setToScaledSqr(m2, m, pt);
		}
		count = 1;
		m0 = m;
		var = 0.0;
	}
1217974
public void setOrtho() {
		matrixMode(MatrixMode.PROJECTION);
		resetMatrix();
		gl.glOrtho(0, this.width, 0, this.height, -1.0e10, 1.0e10);
		matrixMode(MatrixMode.MODELVIEW);
		resetMatrix();
	}
1182906
def _call(self, vf, out):
        """"""
        if self.domain.field == ComplexNumbers():
            vf[0].multiply(self._vecfield[0].conj(), out=out)
        else:
            vf[0].multiply(self._vecfield[0], out=out)

        if self.is_weighted:
            out *= self.weights[0]

        if len(self.domain) == 1:
            return

        tmp = self.range.element()
        for vfi, gi, wi in zip(vf[1:], self.vecfield[1:],
                               self.weights[1:]):

            if self.domain.field == ComplexNumbers():
                vfi.multiply(gi.conj(), out=tmp)
            else:
                vfi.multiply(gi, out=tmp)

            if self.is_weighted:
                tmp *= wi
            out += tmp
1089318
def set_U(self, U):
        """"""
        self.Ubg = np.asarray(U)[np.newaxis,...]
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;
        }
    }
797655
def _set_kernel(model, spec):
    
    def gamma_value(model):
        if(model.gamma == 'auto'):
            # auto gamma value is 1/num_features
            return 1/float(len(model.support_vectors_[0]))
        else:
            return model.gamma


    result = None
    if(model.kernel == 'linear'):
        spec.kernel.linearKernel.MergeFromString(b'')  # hack to set kernel to an empty type
    elif(model.kernel == 'rbf'):
            spec.kernel.rbfKernel.gamma = gamma_value(model)
    elif(model.kernel == 'poly'):
        spec.kernel.polyKernel.gamma = gamma_value(model)
        spec.kernel.polyKernel.c = model.coef0
        spec.kernel.polyKernel.degree = model.degree
    elif(model.kernel == 'sigmoid'):
        spec.kernel.sigmoidKernel.gamma = gamma_value(model)
        spec.kernel.sigmoidKernel.c = model.coef0
    else:
        raise ValueError('Unsupported kernel. The following kernel are supported: linear, RBF, polynomial and sigmoid.')
    return result
1143566
def set_local(self, value, variable_name):
        '''
        
        '''
        self.log('assigning %s = %r', variable_name, value)
        self._locals[variable_name] = value
        return value
1058292
def set_parameters(self):
        
        for key in (ADMITTED_STR_PARAMETERS + ADMITTED_FLOAT_PARAMETERS +
                    ADMITTED_SET_PARAMETERS):
            try:
                val = getattr(self.gmpe, key)
            except AttributeError:
                pass
            else:
                setattr(self, key, val)
1192674
def validate(self):
        """"""
        if not isinstance(self.field, LocalField):
            raise TypeError(u'Expected LocalField field, got: {} {}'.format(
                type(self.field).__name__, self.field))

        if not isinstance(self.lower_bound, Expression):
            raise TypeError(u'Expected Expression lower_bound, got: {} {}'.format(
                type(self.lower_bound).__name__, self.lower_bound))

        if not isinstance(self.upper_bound, Expression):
            raise TypeError(u'Expected Expression upper_bound, got: {} {}'.format(
                type(self.upper_bound).__name__, self.upper_bound))
633789
public void set(double x1, double y1, double z1, double w1) {
		double mag = (1.0/Math.sqrt( x1*x1 + y1*y1 + z1*z1 + w1*w1 ));
		this.x = x1*mag;
		this.y = y1*mag;
		this.z = z1*mag;
		this.w = w1*mag;
	}
145988
private void set(Matrix m)
    {
        this.nRows  = this.nCols = Math.min(m.nRows, m.nCols);
        this.values = m.values;
    }
188347
def set_parameters(self):
        
        for key in dir(self):
            if key.startswith('REQUIRES_'):
                setattr(self, key, getattr(self.gmpe, key))
            if key.startswith('DEFINED_'):
                if not key.endswith('FOR_INTENSITY_MEASURE_TYPES'):
                    setattr(self, key, getattr(self.gmpe, key))
275324
private void minmax() {
        gmin = Double.MAX_VALUE;
        gmax = -Double.MAX_VALUE;

        for (SupportVector v : sv) {
            double g = -v.g[0];
            double a = v.alpha[0];
            if (g < gmin && a > 0.0) {
                svmin = v;
                gmin = g;
                gminindex = 0;
            }
            if (g > gmax && a < v.C) {
                svmax = v;
                gmax = g;
                gmaxindex = 0;
            }

            g = v.g[1];
            a = v.alpha[1];
            if (g < gmin && a < v.C) {
                svmin = v;
                gmin = g;
                gminindex = 1;
            }
            if (g > gmax && a > 0.0) {
                svmax = v;
                gmax = g;
                gmaxindex = 1;
            }
        }
    }
85793
public Quaternionf set(Quaternionfc q) {
        if (q instanceof Quaternionf)
            MemUtil.INSTANCE.copy((Quaternionf) q, this);
        else {
            this.x = q.x();
            this.y = q.y();
            this.z = q.z();
            this.w = q.w();
        }
        return this;
    }
960017
public Matrix4x3f set(Matrix4x3fc m) {
        if (m instanceof Matrix4x3f) {
            MemUtil.INSTANCE.copy((Matrix4x3f) m, this);
        } else {
            setMatrix4x3fc(m);
        }
        properties = m.properties();
        return this;
    }