Evidence

 


Description

Retrieves a collection of Node/State settings for an Engine. Specifically, it is a collection of State objects, each indexed by its Node object. It can be thought of as a collection of Node/State pairs or as a partial mapping from Node objects to State objects.

Syntax

anEngine.Evidence(index)

Set anEngine.Evidence(index) =aState

Parameter Description
anEngine an  Engine object.
(index) Optional. An integer, or a string, or a Node object specifying the index of the State object to retrieve. Integer indexes are zero-based, meaning the first state in the collection has index 0. A string index is valid only if the string is the name of a node used to index the collection. A Node object is valid only if it used to index a State object in the Evidence collection.
aState The State objects to which the Node object identified by index should be assigned.

Remarks

Like the Assignment collection, an Evidence collection is a mapping from  Node objects to State objects. Unlike the Assignment collection, however, a Evidence collection is tied to the inference Engine. Also, a model has only one Evidence collection and it can have any number of Assignment collections.

The Evidence collection automatically tracks changes in nodes and states. For example, if a node in the Evidence collection is removed from the model, it will be removed from the Evidence collection. It does not track changes to the name or position of states, since these changes do not effect it.

As with all MSBN3 collections, the elements of this collection can be enumerated. Also, as with other MSBN3 collections, the index numbers, key strings, and key objects of this collection can be enumerated. See "Collections and Maps: an Overview" for details.

Examples

See: Inference: an Overview

Properties

CountCollect, Description, Engine, ExistingKey, Impossible, Item, MayChange, Model, MSBN, Ref

Methods

Add, Remove, Repair, Set

Collections

Indexes, Keys, KeyObjects

Applies To

Engine

Events

These are Model events related to Evidence collection:

EvidenceAdd, EvidenceRemove

Also See:

EvidenceAdd, EvidenceRemove

Assignment

Collections and Maps: an Overview