libSBML Python API  5.20.2
Loading...
Searching...
No Matches
doc_astnode_types Class Reference

Detailed Description

Every ASTNode has an associated type code to indicate whether, for example, it holds a number or stands for an arithmetic operator.

The type is recorded as a value drawn from a set of static integer constants defined in the class . Their names begin with the characters AST_ 724 727 The list of possible types is quite long, because it covers all the mathematical functions that are permitted in SBML. The values are shown in the following table: astnode-types.html The types have the following meanings: If the node is basic mathematical operator (e.g., "+", then the node's type will be 736 736 736 libsbml#AST_PLUS AST_PLUS , AST_MINUS , AST_TIMES , AST_DIVIDE , or AST_POWER , as appropriate.

  • If the node is a predefined function or operator from SBML Level 1 (in the string-based formula syntax used in Level 1) or SBML Level 2 and 3 (in the subset of MathML used in SBML Levels 2 and 3), then the node's type will be either AST_FUNCTION_X, AST_LOGICAL_X, or AST_RELATIONAL_X, as appropriate. (Examples: AST_FUNCTION_LOG , AST_RELATIONAL_LEQ .)
  • If the node refers to a user-defined function, the node's type will be AST_FUNCTION (because it holds the name of the function).
  • If the node is a lambda expression, its type will be AST_LAMBDA
  • If the node is a predefined constant ("ExponentialE", "Pi", "True" or "False"), then the node's type will be AST_CONSTANT_E , AST_CONSTANT_PI , AST_CONSTANT_TRUE , or AST_CONSTANT_FALSE
  • (Levels 2 and 3 only) If the node is the special MathML csymbol time, the value of the node will be AST_NAME_TIME . (Note, however, that the MathML csymbol delay is translated into a node of type AST_FUNCTION_DELAY . The difference is due to the fact that time is a single variable, whereas delay is actually a function taking arguments.)
  • (Level 3 only) If the node is the special MathML csymbol avogadro, the value of the node will be AST_NAME_AVOGADRO
  • (Level 3 Version 2+ only) If the node is the special MathML csymbol rateOf, the value of the node will be AST_FUNCTION_RATE_OF
  • (Level 3 Version 2+ only) If the node is a MathML operator that originates in a package, it is included in the ASTNodeType_t list, but may not be legally used in an SBML document that does not include that package. This includes the node types from the 'Distributions' package ( AST_DISTRIB_FUNCTION_NORMAL , AST_DISTRIB_FUNCTION_UNIFORM , etc.), and elements from MathML that were not included in core.