the constructor of Operator (to decode operands).
483603
static Selector decodeSubtree(ObjectInput buf) throws ClassNotFoundException, IOException
  {
    int type = buf.readByte();
    if (type < IDENTIFIER)
      return new LiteralImpl(buf);
    else
      if (type == IDENTIFIER)
        return new IdentifierImpl(buf);
      else
        if (type == LIKE)
          return new LikeOperatorImpl(buf);
        else
          return new OperatorImpl(buf);
  }
1109657
int decode(Buffer b) {
        int ptr = 0;
        DecodeAux t = decode_tree;
        int lok = b.look(t.tabn);

        if (lok >= 0) {
            ptr = t.tab[lok];
            b.adv(t.tabl[lok]);
            if (ptr <= 0) {
                return -ptr;
            }
        }
        do {
            switch (b.read1()) {
                case 0:
                    ptr = t.ptr0[ptr];
                    break;
                case 1:
                    ptr = t.ptr1[ptr];
                    break;
                case -1:
                default:
                    return (-1);
            }
        } while (ptr > 0);
        return (-ptr);
    }
527103
int decodevs(float[] a, int index, Buffer b, int step, int addmul) {
        int entry = decode(b);
        if (entry == -1) {
            return (-1);
        }
        switch (addmul) {
            case -1:
                for (int i = 0, o = 0; i < dim; i++, o += step) {
                    a[index + o] = valuelist[entry * dim + i];
                }
                break;
            case 0:
                for (int i = 0, o = 0; i < dim; i++, o += step) {
                    a[index + o] += valuelist[entry * dim + i];
                }
                break;
            case 1:
                for (int i = 0, o = 0; i < dim; i++, o += step) {
                    a[index + o] *= valuelist[entry * dim + i];
                }
                break;
            default:
            //System.err.println("CodeBook.decodeves: addmul="+addmul); 
        }
        return (entry);
    }
1073742
def construct_func_expr(n):
    
    op = n[0]
    if op.startswith('_') and op.endswith('_'):
        op = op.strip('_')
        if op == 'var':
            return Var(str(n[1]))
        elif op == 'literal':
            if isinstance(n[1], basestring):
                raise "not implemented"
            return Constant(n[1])
        elif op == 'cast':
            raise "not implemented"
    elif op in '+-/*':
        return ArithErrFunc(op, *map(construct_func_expr,n[1:]))
    else:
        klass = __agg2f__.get(op, None)
        if klass:
            return klass(map(construct_func_expr, n[1:]))
        raise "no klass"
155903
function processOperators (ops) {
    if (!ops) return {};
    var operators = {};
    for (var i=0,k,prec;prec=ops[i]; i++) {
        for (k=1;k < prec.length;k++) {
            operators[prec[k]] = {precedence: i+1, assoc: prec[0]};
        }
    }
    return operators;
}
20912
def adjoint(self):
        """"""
        if not self.is_linear:
            raise NotImplementedError('this operator is not linear and '
                                      'thus has no adjoint')

        forward_op = self

        class ResizingOperatorAdjoint(ResizingOperatorBase):

            """Adjoint of `ResizingOperator`.

            See `the online documentation
            <https://odlgroup.github.io/odl/math/resizing_ops.html>`_
            on resizing operators for mathematical details.
            """

            def _call(self, x, out):
                """Implement ``self(x, out)``."""
                with writable_array(out) as out_arr:
                    resize_array(x.asarray(), self.range.shape,
                                 offset=self.offset, pad_mode=self.pad_mode,
                                 pad_const=0, direction='adjoint',
                                 out=out_arr)

            @property
            def adjoint(self):
                """Adjoint of the adjoint, i.e. the original operator."""
                return forward_op

            @property
            def inverse(self):
                """(Pseudo-)Inverse of this operator.

                Note that in axes where ``self`` extends, the returned operator
                acts as a proper inverse, while in restriction axes, the
                operation is not invertible.
                """
                return ResizingOperatorAdjoint(
                    domain=self.range, range=self.domain,
                    pad_mode=self.pad_mode)

        return ResizingOperatorAdjoint(domain=self.range, range=self.domain,
                                       pad_mode=self.pad_mode)
181366
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The Power operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyNumeric() === false) {
            $msg = "The Power operator only accepts operands with a baseType of integer or float.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand1 = $operands[0];
        $operand2 = $operands[1];
        $raised = pow($operand1->getValue(), $operand2->getValue());

        if (is_nan($raised)) {
            return null;
        }

        // If the first operand was not 0 but the result is 0, it means
        // we are subject to a lower overflow.
        if ($operand1->getValue() != 0 && $raised == 0) {
            return null;
        }

        // If the first and the second operands are not infinite but the result is infinite
        // it means we are subject to an upper overflow.
        if (!is_infinite($operand1->getValue()) && !is_infinite($operand2->getValue()) && is_infinite($raised)) {
            return null;
        }

        // pow() returns integers as much as it can, so we must cast.
        // If the casted value cannot be contained in a float, we are
        // subject to an overflow/underflow.
        $floatval = floatval($raised);
        if ($raised != 0 && $floatval == 0) {
            // underflow
            return null;
        } elseif (!is_infinite($raised) && is_infinite($floatval)) {
            // overflow
            return null;
        } else {
            return new QtiFloat($floatval);
        }
    }
636096
public function process()
    {
        $operands = $this->getOperands();

        if ($operands->containsNull() === true) {
            return null;
        }

        if ($operands->exclusivelySingle() === false) {
            $msg = "The IntegerToFloat operator only accepts operands with a single cardinality.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_CARDINALITY);
        }

        if ($operands->exclusivelyInteger() === false) {
            $msg = "The IntegerToFloat operator only accepts operands with baseType integer.";
            throw new OperatorProcessingException($msg, $this, OperatorProcessingException::WRONG_BASETYPE);
        }

        $operand = $operands[0];

        return new QtiFloat(floatval($operand->getValue()));
    }
564131
function createOperatorNode(operand, nodes = []) {
  return (scope, opts) => {
    const args = nodes.map(node => node(scope, opts));

    if (typeof operand === 'function') {
      return operand(...args);
    }

    const operator = get(opts.functions, operand);

    if (!operator) {
      throw new ReferenceError(`Function '${operand}' isn't declared`);
    }

    return operator(...args);
  };
}
979983
function JFP_ParseOperandError(operator, operand, message) {
    JFP_Error.call(this, message);
    this.operator = operator;
    this.operand = operand;
}
957067
private FieldTextBuilder binaryOperation(final String operator, final FieldText fieldText) {
        // This should never happen as the AND, OR, XOR and WHEN methods should already have checked this
        Validate.isTrue(fieldText != this);

        // Optimized case when fieldText is a FieldTextBuilder
        if(fieldText instanceof FieldTextBuilder) {
            return binaryOp(operator, (FieldTextBuilder)fieldText);
        }

        // Special case when we're empty
        if(componentCount == 0) {
            fieldTextString.append(fieldText.toString());

            if(fieldText.size() > 1) {
                lastOperator = "";
            }
        } else {
            // Add the NOTs, parentheses and operator
            addOperator(operator);

            // Size 1 means a single specifier, so no parentheses
            if(fieldText.size() == 1) {
                fieldTextString.append(fieldText.toString());
            } else {
                fieldTextString.append('(').append(fieldText.toString()).append(')');
            }
        }

        componentCount += fieldText.size();
        not = false;

        return this;
    }
249973
static public BooleanExpression OR(Collection<? extends BooleanExpression> operands){
		BooleanExpression result = new BooleanExpression(OPERATOR_OR);
		result.addOperand(operands);
		return result;
	}
977065
def defineOperator( self, operator, widget = -1 ):
        
        if ( widget == -1 ):
            widget = QLineEdit
            
        self._operators[nativestring(operator)] = widget
734303
public T decoder(Decoder d) {
        if (!decoders.contains(d)) {
            decoders.add(d);
        }
        return derived.cast(this);
    }
603162
def _make_operator(method_name):
        """"""
        def operator(self, other):
            """Operator delegating to the :class:`float` method `method_name`"""
            float_operator = getattr(float, method_name)
            try:
                float_other = float(other)
            except (ValueError, TypeError):
                return False
            return float_operator(float(self), float_other)
        return operator
645373
def unary_operator(op):
    
    # Only negate is currently supported.
    valid_ops = {'-'}
    if op not in valid_ops:
        raise ValueError("Invalid unary operator %s." % op)

    @with_doc("Unary Operator: '%s'" % op)
    @with_name(unary_op_name(op))
    def unary_operator(self):
        if self.dtype != float64_dtype:
            raise TypeError(
                "Can't apply unary operator {op!r} to instance of "
                "{typename!r} with dtype {dtypename!r}.\n"
                "{op!r} is only supported for Factors of dtype "
                "'float64'.".format(
                    op=op,
                    typename=type(self).__name__,
                    dtypename=self.dtype.name,
                )
            )

        # This can't be hoisted up a scope because the types returned by
        # unary_op_return_type aren't defined when the top-level function is
        # invoked.
        if isinstance(self, NumericalExpression):
            return NumExprFactor(
                "{op}({expr})".format(op=op, expr=self._expr),
                self.inputs,
                dtype=float64_dtype,
            )
        else:
            return NumExprFactor(
                "{op}x_0".format(op=op),
                (self,),
                dtype=float64_dtype,
            )
    return unary_operator
799320
synchronized int decodevs_add(float[] a, int offset, Buffer b, int n) {
        int step = n / dim;
        int entry;
        int i, j, o;

        if (t.length < step) {
            t = new int[step];
        }

        for (i = 0; i < step; i++) {
            entry = decode(b);
            if (entry == -1) {
                return (-1);
            }
            t[i] = entry * dim;
        }
        for (i = 0, o = 0; i < dim; i++, o += step) {
            for (j = 0; j < step; j++) {
                a[offset + o + j] += valuelist[t[j] + i];
            }
        }

        return (0);
    }