Multiplies scalar @a by the group generator using @relicGenMultiplyFunc
    and returns the result of type @element.
179547
def _genMultiply(a, element, n, relicGenMultiplyFunc):
    
    # Ensure the scalar is a BigInt
    a = coerceBigInt(a)
    if not a:
        return NotImplemented

    # Shrink large scalars.
    a %= n

    result = element()
    relicGenMultiplyFunc(byref(result), byref(a))
    return result
882494
def multiply_and_add(n):
    ''''''
    multiplier, offset = di.resolver.unpack(multiply_and_add)
    return (multiplier * n) + offset
1332388
def _scalar_to_vector(self, m):
        
        if not isinstance(m.y0, numbers.Number):
            return m
        else:
            m = copy.deepcopy(m)
            t0 = 0.0
            if isinstance(m.y0, numbers.Integral):
                numtype = np.float64
            else:
                numtype = type(m.y0)
            y0_orig = m.y0
            m.y0 = np.array([m.y0], dtype=numtype)
            def make_vector_fn(fn):
                def newfn(y, t):
                    return np.array([fn(y[0], t)], dtype=numtype)
                newfn.__name__ = fn.__name__
                return newfn
            def make_matrix_fn(fn):
                def newfn(y, t):
                    return np.array([[fn(y[0], t)]], dtype=numtype)
                newfn.__name__ = fn.__name__
                return newfn
            def make_coupling_fn(fn):
                def newfn(source_y, target_y, weight):
                    return np.array([fn(source_y[0], target_y[0], weight)])
                newfn.__name__ = fn.__name__
                return newfn
            if isinstance(m.f(y0_orig, t0), numbers.Number):
                m.f = make_vector_fn(m.f)
            if hasattr(m, 'G') and isinstance(m.G(y0_orig,t0), numbers.Number):
                m.G = make_matrix_fn(m.G)
            if (hasattr(m, 'coupling') and
                    isinstance(m.coupling(y0_orig, y0_orig, 0.5),
                               numbers.Number)):
                m.coupling = make_coupling_fn(m.coupling)
            return m
1047448
def _conj(self, f):
        """"""
        def f_conj(x, **kwargs):
            result = np.asarray(f(x, **kwargs),
                                dtype=self.scalar_out_dtype)
            return result.conj()

        if is_real_dtype(self.out_dtype):
            return f
        else:
            return self.element(f_conj)
339878
function getMultiplier(_ref2) {
  var operator_keyword = _ref2.operator_keyword,
      post_keyword = _ref2.post_keyword;
  return operator_keyword === '-' || post_keyword === 'ago' ? -1 : 1;
}
663170
def p_static_scalar_unary_op(p):
    ''''''
    p[0] = ast.UnaryOp(p[1], p[2], lineno=p.lineno(1))
476805
@Override
    public Vector3D mult(Vector3D source) {

        Vector3D result = new Vector3D();
        result.setX(m00 * source.getX() + m01 * source.getY() + m02 * source.getZ() + m03);
        result.setY(m10 * source.getX() + m11 * source.getY() + m12 * source.getZ() + m13);
        result.setZ(m20 * source.getX() + m21 * source.getY() + m22 * source.getZ() + m23);

        return result;
    }
1262595
public final int incMultiplicity(O object) throws ParameterException {
		Validate.notNull(object);
		if (!multiplicities.containsKey(object)) {
			multiplicities.put(object, 1);
			incMultiplicityCount(1);
		} else {
			Integer oldMultiplicity = multiplicities.get(object);
			multiplicities.put(object, oldMultiplicity + 1);
			decMultiplicityCount(oldMultiplicity);
			incMultiplicityCount(oldMultiplicity + 1);
		}
		return multiplicity(object);
	}
795160
private String doubleErasure(TypeMirror elementType) {
    String name = typeUtils.erasure(elementType).toString();
    int typeParamStart = name.indexOf('<');
    if (typeParamStart != -1) {
      name = name.substring(0, typeParamStart);
    }
    return name;
  }
1363837
def scalar_term(self, st):
        """"""
        if isinstance(st, binary_type):
            return _ScalarTermS(st, self._jinja_sub)
        elif isinstance(st, text_type):
            return _ScalarTermU(st, self._jinja_sub)
        elif st is None:
            return _ScalarTermU(u(''), self._jinja_sub)
        else:
            return st
590373
def __recognize_scalar(self, node: yaml.Node,
                           expected_type: Type) -> RecResult:
        
        logger.debug('Recognizing as a scalar')
        if (isinstance(node, yaml.ScalarNode)
                and node.tag == scalar_type_to_tag[expected_type]):
            return [expected_type], ''
        message = 'Failed to recognize a {}\n{}\n'.format(
            type_to_desc(expected_type), node.start_mark)
        return [], message
1009290
public static BigDecimal sum(final Iterable<? extends Number> target) {
        Validate.notNull(target, "Cannot aggregate on null");
        Validate.containsNoNulls(target, "Cannot aggregate on iterable containing nulls");
        BigDecimal total = BigDecimal.ZERO;
        int size = 0;
        for (final Number element : target) {
            total = total.add(toBigDecimal(element));
            size++;
        }
        if (size == 0) {
            return null;
        }
        return total;
    }
261986
function convertMultiplicationToExponent(node) {
  const newNode = clone(node);

  const radicandNode = getRadicandNode(node);

  if (Node.Type.isParenthesis(radicandNode)) {
    const child = radicandNode.content;
    if (isMultiplicationOfEqualNodes(child)) {
      const baseNode = child.args[0];
      const exponentNode = Node.Creator.constant(child.args.length);
      newNode.args[0] = Node.Creator.operator('^', [baseNode, exponentNode]);
      return Node.Status.nodeChanged(
        ChangeTypes.CONVERT_MULTIPLICATION_TO_EXPONENT, node, newNode);
    }
  }
  else if (Node.Type.isOperator(radicandNode, '*')) {
    const children = [];
    radicandNode.args.forEach(child => {
      if (Node.Type.isParenthesis(child)) {
        const grandChild = child.content;
        if (isMultiplicationOfEqualNodes(grandChild)) {
          const baseNode = grandChild.args[0];
          const exponentNode = Node.Creator.constant(grandChild.args.length);
          children.push(Node.Creator.operator('^', [baseNode, exponentNode]));
          return;
        }
      }
      children.push(child);
    });

    newNode.args[0] = Node.Creator.operator('*', children);
    return Node.Status.nodeChanged(
      ChangeTypes.CONVERT_MULTIPLICATION_TO_EXPONENT, node, newNode);
  }

  return Node.Status.noChange(node);
}
8977
public IntegerSize getIntegerSize()
    {
        load_once();
        if (_value_type != IonType.INT || _v.isNull())
        {
            return null;
        }
        return _Private_ScalarConversions.getIntegerSize(_v.getAuthoritativeType());
    }
1224767
def p_scalar_group(self, p):
        
        if len(p) == 2:
            p[0] = (str(p[1]),)

        if len(p) == 3:
            p[0] = p[1] + (str(p[2]),)

        if len(p) == 4:
            p[0] = p[1] + (str(p[3]),)
192159
private String getSourceMultiplicity(final Cardinality cardinality) {

		switch (cardinality) {

			case OneToOne:
			case OneToMany:
				return "1";

			case ManyToOne:
			case ManyToMany:
				return "*";
		}

		return null;
	}
1029908
private ImmutableSetMultimap<Class<? extends Annotation>, Element> validElements(
      ImmutableMap<String, Optional<? extends Element>> deferredElements,
      RoundEnvironment roundEnv) {
    ImmutableSetMultimap.Builder<Class<? extends Annotation>, Element>
        deferredElementsByAnnotationBuilder = ImmutableSetMultimap.builder();
    for (Entry<String, Optional<? extends Element>> deferredTypeElementEntry :
        deferredElements.entrySet()) {
      Optional<? extends Element> deferredElement = deferredTypeElementEntry.getValue();
      if (deferredElement.isPresent()) {
        findAnnotatedElements(
            deferredElement.get(),
            getSupportedAnnotationClasses(),
            deferredElementsByAnnotationBuilder);
      } else {
        deferredElementNames.add(ElementName.forTypeName(deferredTypeElementEntry.getKey()));
      }
    }

    ImmutableSetMultimap<Class<? extends Annotation>, Element> deferredElementsByAnnotation =
        deferredElementsByAnnotationBuilder.build();

    ImmutableSetMultimap.Builder<Class<? extends Annotation>, Element> validElements =
        ImmutableSetMultimap.builder();

    Set<ElementName> validElementNames = new LinkedHashSet<ElementName>();

    // Look at the elements we've found and the new elements from this round and validate them.
    for (Class<? extends Annotation> annotationClass : getSupportedAnnotationClasses()) {
      // This should just call roundEnv.getElementsAnnotatedWith(Class) directly, but there is a bug
      // in some versions of eclipse that cause that method to crash.
      TypeElement annotationType = elements.getTypeElement(annotationClass.getCanonicalName());
      Set<? extends Element> elementsAnnotatedWith =
          (annotationType == null)
              ? ImmutableSet.<Element>of()
              : roundEnv.getElementsAnnotatedWith(annotationType);
      for (Element annotatedElement :
          Sets.union(elementsAnnotatedWith, deferredElementsByAnnotation.get(annotationClass))) {
        if (annotatedElement.getKind().equals(PACKAGE)) {
          PackageElement annotatedPackageElement = (PackageElement) annotatedElement;
          ElementName annotatedPackageName =
              ElementName.forPackageName(annotatedPackageElement.getQualifiedName().toString());
          boolean validPackage =
              validElementNames.contains(annotatedPackageName)
                  || (!deferredElementNames.contains(annotatedPackageName)
                      && validateElement(annotatedPackageElement));
          if (validPackage) {
            validElements.put(annotationClass, annotatedPackageElement);
            validElementNames.add(annotatedPackageName);
          } else {
            deferredElementNames.add(annotatedPackageName);
          }
        } else {
          TypeElement enclosingType = getEnclosingType(annotatedElement);
          ElementName enclosingTypeName =
              ElementName.forTypeName(enclosingType.getQualifiedName().toString());
          boolean validEnclosingType =
              validElementNames.contains(enclosingTypeName)
                  || (!deferredElementNames.contains(enclosingTypeName)
                      && validateElement(enclosingType));
          if (validEnclosingType) {
            validElements.put(annotationClass, annotatedElement);
            validElementNames.add(enclosingTypeName);
          } else {
            deferredElementNames.add(enclosingTypeName);
          }
        }
      }
    }

    return validElements.build();
  }