r"""Force balanced lamination parameters

        The lamination parameters `\xi_{A2}` and `\xi_{A4}` are set to null
        to force a balanced laminate.
343923
def force_balanced_LP(self):
        

        """
        dummy, xiA1, xiA2, xiA3, xiA4 = self.xiA
        self.xiA = np.array([1, xiA1, 0, xiA3, 0], dtype=np.float64)
        self.calc_ABDE_from_lamination_parameters()
5392
public static void requireArgMax(@NotNull final String name, @NotNull final long value, final long max)
            throws ConstraintViolationException {
        // CHECKSTYLE:ON
        if (value > max) {
            throw new ConstraintViolationException("Max value of argument '" + name + "' is " + max + ", but was: " + value);
        }
    }
1333854
def control_force(self,c):
        ''''''
        
        # bring instance variables into local scope
        g = self.g
        s = self.s
        
        return g * (2/π) * arctan((s/g) * c)
1086914
def apply_plot_params(plot_params,ax):
    """"""
    
    import matplotlib.pyplot as plt

    if plot_params['xlim'] is not None: 
        ax.set_xlim(plot_params['xlim'])
        
        if plot_params['reverse_x'] and plot_params['xlim'][0] < plot_params['xlim'][1]:
            ax.invert_xaxis()            
            
    elif plot_params['reverse_x']:
        ax.invert_xaxis()
    
    if plot_params['ylim'] is not None: ax.set_ylim(plot_params['ylim'])
        
    ax.grid(plot_params['grid'])
    ax.set_title(plot_params['title'],fontsize=plot_params['fontsize'],y=1.02)
    ax.set_xlabel(plot_params['xlabel'],fontsize=plot_params['tick_fontsize'])
    ax.set_ylabel(plot_params['ylabel'],fontsize=plot_params['tick_fontsize'])
    ax.set_axis_bgcolor(plot_params['axis_bg_color'])
    
    # Apply some properties to the line(s)
    line_handles = ax.get_lines()
    plt.setp(line_handles, lw=plot_params['line_width'], ls=plot_params['line_style'],
             marker=plot_params['marker'])
    
    if plot_params['line_color'] is not 'default':
        plt.setp(line_handles,'color', plot_params['line_color'])

    
    # Autoscale data on the y-axis to reflect changes to the x-axis
    if plot_params['autoscale_y']:
        ax = autoscale_y(ax,margin=0.05)
    
    if plot_params['use_sci_format_yaxis']:
        # Use scientific notation for the y-axis labels
        ax.ticklabel_format(axis='y',style='sci',scilimits=(-2,2))
    
    if plot_params['use_sci_format_xaxis']:
        # Use scientific notation for the x-axis labels
        ax.ticklabel_format(axis='x',style='sci',scilimits=(-2,2))
    
    ax.tick_params(labelsize=plot_params['tick_fontsize'])
        
    return ax
306039
def setWorkingStandingZeroPoseToRawTrackingPose(self):
        """"""

        fn = self.function_table.setWorkingStandingZeroPoseToRawTrackingPose
        pMatStandingZeroPoseToRawTrackingPose = HmdMatrix34_t()
        fn(byref(pMatStandingZeroPoseToRawTrackingPose))
        return pMatStandingZeroPoseToRawTrackingPose
1031964
public static <T> void bindArguments(T target, Bundle bundle) {
        @SuppressWarnings("unchecked")
        BundleBinding<T> binding = (BundleBinding<T>) getBundleBinding(target.getClass().getClassLoader(), target.getClass());
        if (binding != null) {
            binding.bindArguments(target, bundle);
        }
    }
238493
def fix_parameters(self):
        """"""
        for W, b in zip(self.W_list, self.b_list):
            W.fix()
            b.fix()
1016539
public void EBEsAssignAxialForces(int hi){

    AxialForcei_ = new double[numberOfElements_];
    AxialForcej_ = new double[numberOfElements_];

    for(int el=0;el<numberOfElements_;el++){
      AxialForcei_[el] = Efforti_[aX_][el][hi];
      AxialForcej_[el] = Effortj_[aX_][el][hi];
    }
  }
869411
private void setCommonParameters() {

        m_checkinBean.setPullBefore(m_pullFirst.getValue().booleanValue());
        m_checkinBean.setPullAfter(m_pullAfterCommit.getValue().booleanValue());
        m_checkinBean.setPush(m_pushAutomatically.getValue().booleanValue());
        m_checkinBean.setExcludeLibs(m_excludeLib.getValue().booleanValue());
        m_checkinBean.setCommit(m_addAndCommit.getValue().booleanValue());
        m_checkinBean.setIgnoreUnclean(m_ignoreUnclean.getValue().booleanValue());
        m_checkinBean.setCopyAndUnzip(m_copyAndUnzip.getValue().booleanValue());
        m_checkinBean.setGitUserEmail(m_emailField.getValue());
        m_checkinBean.setGitUserName(m_userField.getValue());
        String commitMessage = m_commitMessage.getValue();
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(commitMessage)) {
            m_checkinBean.setCommitMessage(commitMessage);
        }
    }
71759
def _set_params(self, x):
        """"""
        assert x.size == self.num_params
        self.varianceU = x[0]
        self.varianceY = x[1]
        self.lengthscaleU = x[2]
        self.lengthscaleY = x[3]
63689
def _force(self,obj,objtype=None):
        """"""
        gen=super(Dynamic,self).__get__(obj,objtype)

        if hasattr(gen,'_Dynamic_last'):
            return self._produce_value(gen,force=True)
        else:
            return gen
1153587
private static void validateSetting(ConfigurationSetting setting) {
        Objects.requireNonNull(setting);

        if (setting.key() == null) {
            throw new IllegalArgumentException("Parameter 'key' is required and cannot be null.");
        }
    }
1142692
@Override
  public DynamicFactorGraph getModelFromParameters(SufficientStatistics parameters) {
    List<SufficientStatistics> parameterList = parameters.coerceToList().getStatistics();
    Preconditions.checkArgument(parameterList.size() == parametricFactors.size());
    List<PlateFactor> plateFactors = Lists.newArrayList();
    for (int i = 0; i < parameterList.size(); i++) {
      plateFactors.add(new ReplicatedFactor(
          parametricFactors.get(i).getModelFromParameters(parameterList.get(i)),
          factorPatterns.get(i)));
    }
    return baseFactorGraph.addPlateFactors(plateFactors, factorNames.items());
  }
1357244
def set_parameter_scale(self, name, par, scale):
        """"""
        name = self.roi.get_source_by_name(name).name
        idx = self.like.par_index(name, par)
        current_bounds = list(self.like.model[idx].getBounds())
        current_scale = self.like.model[idx].getScale()
        current_value = self.like[idx].getValue()

        self.like[idx].setScale(scale)
        self.like[idx].setValue(current_value * current_scale / scale)
        self.like[idx].setBounds(current_bounds[0] * current_scale / scale,
                                 current_bounds[1] * current_scale / scale)
        self._sync_params(name)
954475
@Override
    public void setDouble(int parameterIndex, double x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x;
    }
1127282
def _set_params(self, p):
        
        if self.force_norm:
            params = [value.n for key, value in p.items()]
        else:
            params = [value for key, value in p.items()]
        return params
709799
@Check
	public void checkDefaultValueTypeCompatibleWithParameterType(SarlFormalParameter param) {
		final XExpression defaultValue = param.getDefaultValue();
		if (defaultValue != null) {
			final JvmTypeReference rawType = param.getParameterType();
			assert rawType != null;
			final LightweightTypeReference toType = toLightweightTypeReference(rawType, true);
			if (toType == null) {
				error(MessageFormat.format(
						Messages.SARLValidator_20,
						param.getName()),
						param,
						XtendPackage.Literals.XTEND_PARAMETER__PARAMETER_TYPE,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						INVALID_TYPE);
				return;
			}
			LightweightTypeReference fromType = getExpectedType(defaultValue);
			if (fromType == null) {
				fromType = getActualType(defaultValue);
				if (fromType == null) {
					error(MessageFormat.format(
							Messages.SARLValidator_21,
							param.getName()),
							param,
							SARL_FORMAL_PARAMETER__DEFAULT_VALUE,
							ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
							INVALID_TYPE);
					return;
				}
			}
			if (!Utils.canCast(fromType, toType, true, false, true)) {
				error(MessageFormat.format(
						Messages.SARLValidator_38,
						getNameOfTypes(fromType), canonicalName(toType)),
						param,
						SARL_FORMAL_PARAMETER__DEFAULT_VALUE,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						INCOMPATIBLE_TYPES,
						canonicalName(fromType),
						canonicalName(toType));
			}
		}
	}