Multiply modules with one source (or even zero sources) work, but aren't particularly useful.
If you are using the included XML noise configuration system, Multiply modules can be declared as
<multiply> ...source modules... </multpliy>
44454647484950
* @throws BuilderException * if any of the source modules throws an exception. * @see ModuleBuilder#createModule() */ public Multiply createModule () throws BuilderException { return new Multiply (createSources ()); }
398399400401402403404405406407408
} else if (expr instanceof E_Multiply) { expr.getArg1().visit(this) ; expr.getArg2().visit(this) ; Expression e2 = expression.pop(); Expression e1 = expression.pop(); expression.push(new Multiply(e1, e2)); } else if (expr instanceof E_Divide) { expr.getArg1().visit(this) ; expr.getArg2().visit(this) ; Expression e2 = expression.pop(); Expression e1 = expression.pop();
2728293031323334
.predicate(Playground.AGE, "?person", "?age").predicate(new LT(), "?age", 30)); } public static void doubleAges() { Api.execute(new StdoutTap(), new Subquery("?person", "?double-age") .predicate(Playground.AGE, "?person", "?age").predicate(new Multiply(), "?age", 2) .out("?double-age")); }
34353637383940414243
Var y = new Var(i2,new TypeName(type)) ; MethodDef md = new MethodDef(new TypeName(ret),"meth",x,y) ; md = md.addInstructions( new Load(x), new Load(y), new Multiply(TypeCode.getType(type)), new Return(TypeCode.getType(ret)) ) ; return cd.addMethod(md) ; }
1661166216631664166516661667
} } private static final class MulInPlaceConverter extends InBinopPlaceOp<MulInPlaceExpr> { @Override public Inst createOp(StubResolver tc) { return new Multiply(tc.getTypeCode()) ; }
2667266826692670267126722673
} } private static final class MulConverter extends ArithOp<MulExpr> { @Override public Inst createOp(TypeCode tc) { return new Multiply(tc) ; }
573574575576577578579
* * @param d Multiplication factor. * @return {@code this}. */ public RealVector mapMultiplyToSelf(double d){ return mapToSelf(FunctionUtils.fix2ndArgument(new Multiply(), d)); }
533534535536537538539
574575576577578579580
152153154155156157158159160161
UnivariateFunction id = new Identity(); UnivariateFunction m = new Minus(); UnivariateFunction c = FunctionUtils.combine(bi, id, m); Assert.assertEquals(0, c.value(2.3456), EPS); bi = new Multiply(); UnivariateFunction inv = new Inverse(); c = FunctionUtils.combine(bi, id, inv); Assert.assertEquals(1, c.value(2.3456), EPS); }