| NORSYS SOFTWARE © 2007 | NETICA API | C VERSION 3.25

int SetNetAutoUpdate_bn ( | net_bn* net, int autoupdate )

Pass BELIEF_UPDATE for autoupdate to have the new beliefs of a compiled net calculated immediately whenever new findings are entered, or 0 to inhibit this (in which case they will be calculated when needed, e.g., by GetNodeBeliefs_bn). The old auto-update value of net is returned.

A reason for inhibiting automatic updating is because updating (also known as "propagation") is time and memory consuming, and you may want to enter many findings before doing it. However, an advantage to having updating done after each finding is entered, is that each new finding will be checked for consistency with the findings already entered.

If you are going to be retracting a finding for a node, and then entering a new one, sometimes very significant performance gains can be made by ensuring auto-updating is turned off during the retraction (see example of EnterFinding_bn).

If the net is auto-updating, and you make a call to a single Netica function which enters findings for several nodes at once (e.g., reading a case), then Netica will use just a single updating to account for them all.

If you are turning auto-updating on, and the net is compiled but not updated, then updating will be done before this function returns, which may be time consuming.

It is best to always set auto-updating one way or the other after creating a new net, since the default value may vary between Netica versions.

When a net is written to file, the auto-update value is included.

Version:

This function is available in all versions.
Versions previous to 2.11 expected the autoupdate argument to be 1 instead of BELIEF_UPDATE, and they didn't return anything.

See also:

GetNetAutoUpdate_bn |  | Retrieves value
CompileNet_bn |  | Auto-updating doesn't occur until net is compiled
GetNodeBeliefs_bn |  | Forces a belief update if one is required

Example:

    See EnterFinding_bn for an example of saving and restoring auto-update.