Adds a parameterized, unreplicated factor to the model being constructed.
The factor will match only the variables which it is defined over.

@param factor
498140
public void addUnreplicatedFactor(String factorName, BoostingFactorFamily factor) {
    super.addUnreplicatedFactor(factorName, factor, factor.getVariables());
  }
1374355
public void rescore(double factor) {
    for (int i = 0; i < this.prior.size(); i++)
      this.prior.set(i, this.prior.get(i) * factor);
  }
614842
public Factor getFactorByName(String name) {
    int index = getFactorIndexByName(name);
    if (index == -1) {
      return null;
    }
    return factors[index];
  }
562293
protected UnitFactorMap add(Unit unit, String n, Unit base) {
    check(unit);
    check(base);
    if (unit == base) {
      throw new IllegalArgumentException("Attempt to define a unit " + unit + " in terms of itself.");
    }

    // Set the factor and its inverse if nothing already exists.
    Rational rational = new Rational(n);
    set(unit, rational, base, true);
    return this;
  }
813320
public void addConstantFactor(String factorName, PlateFactor factor) {
    constantFactors.add(factor);
    constantFactorNames.add(factorName);
  }
372823
public D multipliedBy(int factor) {

        switch (factor) {
            case -1:
                return this.inverse();
            case 1:
                return this.self();
            default:
                return this.with(MathUtils.safeMultiply(this.amount, factor));
        }

    }
511105
public FactorGraph addFactor(String factorName, Factor factor) {
    Preconditions.checkArgument(getVariables().containsAll(factor.getVars()));

    Factor[] newFactors = Arrays.copyOf(factors, factors.length + 1);
    String[] newFactorNames = Arrays.copyOf(factorNames, factorNames.length + 1);
    ;
    newFactors[factors.length] = factor;
    newFactorNames[factors.length] = factorName;
    return new FactorGraph(variables, newFactors, newFactorNames, conditionedVariables,
        conditionedValues, inferenceHint);
  }
1255959
@Override
    public void addVariable(String varName, Object value) {
        synchronized (mGlobalVariables) {
            mGlobalVariables.put(varName, value);
        }
        refreshGlobalBindings();
    }
40383
public void copyFactor(DDF ddf, List<String> columns)  throws DDFException {

    // if there is no columns to recompute factor info
    if (columns == null) {
      columns = new ArrayList<String>();
    }

    for (Schema.Column col : ddf.getSchema().getColumns()) {
      if (this.getDDF().getColumn(col.getName()) != null && col.getColumnClass() == Schema.ColumnClass.FACTOR) {
        // Set corresponding column as factor
        this.getDDF().getSchemaHandler().setAsFactor(col.getName());
        // if not in list of columns to re-compute factors
        // then we just copy existing factor info to the new ones
        if (!columns.contains(col.getName())) {
          // copy existing factor column info
          this.getDDF().getSchemaHandler().setFactorLevels(col.getName(), col.getOptionalFactor());
        }
      }
    }
    this.getDDF().getSchemaHandler().computeFactorLevelsAndLevelCounts();
  }
723032
public void addParameter(String... paras) {

		for (String parameter : paras) {
			for (String knownDef : parameters) {
				if (parameter.equals(knownDef)) {
					throw new FuzzerException(name + ": parameter '" + parameter + "' already defined");
				}
			}
			parameters.add(parameter);
		}
	}
1194185
public void addParameter(String key, String value) {

        if (CmsStringUtil.isNotEmpty(key)) {
            key = key.trim();
        }
        if (CmsStringUtil.isNotEmpty(value)) {
            value = value.trim();
        }
        m_parameters.put(key, value);
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_ADD_MOD_PARAM_KEY_2, key, value));
        }
    }
798947
public static void scaleArray(final double[] array, final double factor){
		for(int i = 0; i < array.length; i++){
			array[i] *= factor;
		}
	}
815155
public void divBP(VarTensor f) {
    	VarTensor newFactor = applyBinOp(this, f, new AlgebraLambda.DivBP());
        internalSet(newFactor);
    }
1283614
public static void addParameter(MethodDeclaration method, Parameter parameter) {
        List<Parameter> parameters = method.getParameters();
        if (parameters == null) {
            parameters = new ArrayList<Parameter>();
            method.setParameters(parameters);
        }
        parameters.add(parameter);
    }
1279954
private static void putConvertion( HashMap<String, Double> group, String unit, double factor ) {
        UNIT_CONVERSIONS.put(unit, group );
        group.put( unit, factor );
    }
334306
private void addClauseSetWithRelaxation(final Variable relaxationVar, final Formula formula) {
        switch (formula.type()) {
            case TRUE:
                break;
            case FALSE:
            case LITERAL:
            case OR:
                this.addClauseWithRelaxation(relaxationVar, formula);
                break;
            case AND:
                for (final Formula op : formula) { this.addClauseWithRelaxation(relaxationVar, op); }
                break;
            default:
                throw new IllegalArgumentException("Input formula ist not a valid CNF: " + formula);
        }
    }
1350437
private void initModelAllExtension(Model model, double progressFactor) {
        double factorPerc = progressFactor / getExtensionCount();
        
        for (int i = 0; i < getExtensionCount(); i++) {
            Extension extension = getExtension(i);
            try {
                extension.initModel(model);
                if (view != null) {
                    view.addSplashScreenLoadingCompletion(factorPerc);
                }
                
            } catch (Exception e) {
                logExtensionInitError(extension, e);
            }
        }
    }