/** * @param model * @param sbase * @param useId */ public VectorCompiler(Model model, NamedSBase sbase, boolean useId) { this.model = model; node = new ASTNode(); this.useId = useId; this.sbase = sbase; isSetIdToVector = false; }
/** * @param model * @param useId */ public VectorCompiler(Model model, boolean useId) { this.model = model; node = new ASTNode(); this.useId = useId; isSetIdToVector = false; }
final public ASTNode parse() throws ParseException { ASTNode2 node = null; node = Expression(); {if (true) return new ASTNode(node);} throw new Error("Missing return statement in function"); }
@Override public ASTNodeValue root(double rootExponent, ASTNode radiant) throws SBMLException { return function("root", new ASTNode(rootExponent), radiant); }
@Override public ASTNodeValue compile(double real, String units) { setNode(new ASTNode(real)); return dummy; }
final public ASTNode parse() throws ParseException { ASTNode2 node = null; node = Expression(); {if (true) return new ASTNode(node);} throw new Error("Missing return statement in function"); }
@Override public ASTNodeValue unknownValue() throws SBMLException { setNode(new ASTNode("unknown")); return dummy; }
@Override final public ASTNode parse() throws ParseException { ASTNode2 node = null; node = Expression(); {if (true) { return new ASTNode(node); }} throw new Error("Missing return statement in function"); }
final public ASTNode parse() throws ParseException { ASTNode2 node = null; node = Expression(); {if (true) return new ASTNode(node);} throw new Error("Missing return statement in function"); }
@Override public ASTNodeValue compile(int integer, String units) { setNode(new ASTNode(integer)); return dummy; }
@Override public ASTNodeValue getConstantAvogadro(String name) { ASTNode avogNode = new ASTNode(ASTNode.Type.REAL); avogNode.setValue(Math.pow(6.02214179, Math.pow(10, 23))); setNode(avogNode); return dummy; }
/** * Returns a new {@link ASTNode} that represents Euler's constant raised by the * power of the given exponent. * * @param exponent the exponent * @return a new {@link ASTNode} that represents Euler's constant raised by the * power of the given exponent. */ public static ASTNode exp(ASTNode exponent) { ASTNode e = new ASTNode(Type.CONSTANT_E, exponent.getParentSBMLObject()); return e.raiseByThePowerOf(exponent); }
/** * Adds a number to this node. * * @param real * a double number. * @return the current node for convenience. */ public ASTNode plus(double real) { plus(new ASTNode(real, getParentSBMLObject())); return this; }
/** * Creates a root {@link ASTNode}. * * @param radicand * @return a root {@link ASTNode}. */ public static ASTNode sqrt(ASTNode radicand) { return root(new ASTNode(2, radicand.getParentSBMLObject()), radicand); }
/** * Multiplies this {@link ASTNode} with the given SBML element. * * @param nsb * an SBML element that can be represented by a value. * @return the current node for convenience. */ public ASTNode multiplyWith(CallableSBase nsb) { return multiplyWith(new ASTNode(nsb, getParentSBMLObject())); }
/** * Raises this ASTNode by the power of the value of this named SBase object. * * @param nsb * an SBML element that can be represented by a value. * @return the current node for convenience. */ public ASTNode raiseByThePowerOf(CallableSBase nsb) { return raiseByThePowerOf(new ASTNode(nsb, getParentSBMLObject())); }
@Override public ASTNodeValue getConstantFalse() { ASTNode falseNode = new ASTNode(0); falseNode.setType(ASTNode.Type.CONSTANT_FALSE); setNode(falseNode); return dummy; }
/** * Subtracts the given number from this node. * * @param real * a double number. * @return the current node for convenience. */ public ASTNode minus(double real) { minus(new ASTNode(real, getParentSBMLObject())); return this; }
/** * Adds an SBML element to this node. * * @param nsb * an SBML element that can be represented by a value. * @return the current node for convenience. */ public ASTNode plus(CallableSBase nsb) { plus(new ASTNode(nsb, getParentSBMLObject())); return this; }
@Override public ASTNodeValue root(ASTNode rootExponent, ASTNode radiant) throws SBMLException { frac(new ASTNode(1), rootExponent); rootExponent = getNode(); pow(rootExponent, radiant); return dummy; }