Function nodes

From version 9

For details on the expression language please see Expressions.

Function variables/nodes do not participate in the inference process (i.e. computing the network probabilities and distributions). Instead they are calculated afterwards, but can access the results computed during inference, as well as the results of other function evaluations.

Return types

The following return types are currently supported:

  • double
  • int (32 bit)
  • bool
  • string

Evaluation order

Non-function nodes are queried first. Then function nodes are evaluated in topological order.

If you want a function to be able to use the result of another function, simply add a link.

Availability of queries and log-likelihood

In order to access the results of a query, such as the probability of a state, a mean, or the log-likelihood, those elements must have been computed in the query stage.

For example, if the log-likelihood option has not been turned on, an exception will be raised.