Set (Assignment, Evidence)


Description

In a Assignment or Evidence  collection, set a node to one of its states (or alternatively to nothing).

Syntax

aCollection.Set(indexNode, indexState)

 

Parameter

Description

aCollection

a Assignment or Evidence  collection.

indexNode

An integer, or a string, or a Node object specifying the Node object to add to the collection. The zero-based integer is a index into the ModelNodes collection. Likewise, the Node object must be in the ModelNodes collection and the string must be the name of a Node object in the ModelNodes collection.

indexState

An integer, or a string, or a State object specifying a State or Nothing. If a State object is specified it must be in the Node object's States collection. If Nothing is specified and if the node is in the collection, it will be removed. If Nothing is specified and if the node is not currently in the collection, the collection stays the same.

Remarks

If the collection stays the same (for example, a node is set to the state to which it is already set), then no event is raised.

Example

See: Inference: an Overview

Return Value

None.

Applies To

Assignment, Evidence