Ensure that the given formula is installed.

@param  string  $formula
@param  array  $options
@param  array  $taps
@return void
13233
function ensureInstalled($formula, $options = [], $taps = [])
    {
        if (! $this->installed($formula)) {
            $this->installOrFail($formula, $options, $taps);
        }
    }
1229677
public void addSoftFormula(final Formula formula, int weight) {
    if (this.result != UNDEF)
      throw new IllegalStateException("The MaxSAT solver does currently not support an incremental interface.  Reset the solver.");
    if (weight < 1)
      throw new IllegalArgumentException("The weight of a formula must be > 0");
    this.addCNF(formula.cnf(), weight);
  }
22010
public function write_formula($row, $col, $formula, $format = null) {
        $this->worksheet->setCellValueExplicitByColumnAndRow($col, $row+1, $formula, PHPExcel_Cell_DataType::TYPE_FORMULA);
        $this->apply_format($row, $col, $format);
    }
217126
public function validateCreate(&$submitted, $options = array())
    {
        $this->options = $options;
        $this->submitted = &$submitted;

        $this->validateNameCreate();
        $this->validateDestinationCreate();

        return $this->getResult();
    }
1318070
public function stepInstall($step)
    {
        $this->data_step = $step;
        $this->data_install = $this->session->get('install');
        $this->data_handler = $this->install->getHandler('base');

        $this->controlAccessStepInstall();
        $this->submitStepInstall();

        $this->setData('status', $this->data_status);
        $this->setData('handler', $this->data_handler);
        $this->setData('install', $this->data_install);
        $this->setData('demo_handlers', $this->install_model->getDemoHandlers());

        $this->setJsStepInstall();
        $this->setCssStepInstall();

        $this->setTitleStepInstall();
        $this->outputStepInstall();
    }
718746
def __set_formulas(self, formulas):
        
        # Tuple of tuples is required
        array = tuple(tuple(self._clean_formula(col) for col in row) for row in formulas)
        self._get_target().setFormulaArray(array)
440498
public function setup(array $options)
    {
        foreach ($options as $method => $value) {
            $method = 'set' . ucfirst($method);
            if (method_exists($this, $method)) {
                $this->{$method}($value);
            }
        }
    }
957029
private void addClause(final Formula formula, int weight) {
    this.result = UNDEF;
    final LNGIntVector clauseVec = new LNGIntVector((int) formula.numberOfAtoms());
    for (Literal lit : formula.literals()) {
      Integer index = this.var2index.get(lit.variable());
      if (index == null) {
        index = this.solver.newLiteral(false) >> 1;
        this.var2index.put(lit.variable(), index);
        this.index2var.put(index, lit.variable());
      }
      int litNum = lit.phase() ? index * 2 : (index * 2) ^ 1;
      clauseVec.push(litNum);
    }
    if (weight == -1) {
      this.solver.addHardClause(clauseVec);
    } else {
      this.solver.setCurrentWeight(weight);
      this.solver.updateSumWeights(weight);
      this.solver.addSoftClause(weight, clauseVec);
    }
  }
440443
public function select($options = [])
    {
        $source = [];

        foreach ($options as $key => $value) {
            $source[] = [
                'value' => $key,
                'text' => $value,
            ];
        }

        $this->addOptions(['source' => $source]);
    }
48885
protected function assignOptions($query, Options $options)
    {
        if ($options->hasLimit()) {
            /*
             * For mysql queries, to allow counting rows we must prepend
             * SQL_CALC_FOUND_ROWS to the select quantifiers
             */
            if ($options->getLimit() > 0) {
                $calc_found_rows = 'SQL_CALC_FOUND_ROWS';
                if (!preg_match("/$calc_found_rows/", $query)) {
                    $q = trim($query);
                    $query = preg_replace('/^select\b/i', "SELECT $calc_found_rows", $q);
                }
            }

            // mysql only, @todo make it rule everything (use traits)
            $replace_regexp = "LIMIT[\s]+[\d]+((\s*,\s*\d+)|(\s+OFFSET\s+\d+)){0,1}";

            $search_regexp = "$replace_regexp";
            if (!preg_match("/$search_regexp$/i", $query)) {
                // Limit is not already present
                $query .= ' LIMIT ' . $options->getLimit();
            } else {
                $query = preg_replace("/($replace_regexp)/i", 'LIMIT ' . $options->getLimit(), $query);
            }

            if ($options->hasOffset()) {
                $query .= ' OFFSET ' . $options->getOffset();
            }
        }

        return $query;
    }
365476
public function install(array $options = null, OutputInterface $output = null) {
		return $this->call_command('install', $this->prepare_array_input_args($options), $output);
	}
112928
function add(string $name, string $namespace = '\\CismonX\\CaptchaQueue\\Rules') {
        if (isset($this->_formulaList[$name]))
            Console::warning("Overwriting formula \"$name\".");
        $class_name = $namespace . '\\' . $name;
        if (!class_exists($class_name)) {
            Console::warning("Invalid formula \"$name\".");
            return;
        }
        $this->_formulaList[$name] = new $class_name;
        self::enable($name);
    }
242141
public function task($name, array $options = [])
    {
        $this->taskProcessor->setOutput($this);
        $this->taskProcessor->execute($name, $options);
    }
303543
protected function scopes($scopes, array $options = [])
    {
        $scopes = $this->getPropertyValue($scopes);

        $this->scopes[] = \compact('scopes', 'options');
    }
629457
public function calc_formula($formula, $params=false) {
        debugging('Use of class name as constructor is deprecated', DEBUG_DEVELOPER);
        self::__construct($formula, $params);
    }
998829
public function message($message, $options = null) {
		$options = $this->_mergeOptions($options);

		$this->set($message, $options);

		$this->_assertSessionStackSize($options);
	}
1193799
public function open(array $options = array(), $rules = null)
	{
		$this->setValidation($rules);
		
		return parent::open($options);
	}