Assignment

 


Description

A collection of Node/State settings. 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

anAssignment(index)
Set anAssignment(index) =aState

Parameter

Description

anAssignment

an Assignment collection.

(index)

Optional. An integer, or a string, or a Node object specifying the index value 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 Assignment collection.

aState

The State objects to which the Node object identified by index should be assigned.

Remarks

An Assignment collection can be created two ways:

A model can have any number of Assignment collections. The model does not, however, keep track of all its Assignment collection. In other words, the model has no collection of Assignment collections. 

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

The Assignment collection automatically tracks changes in nodes and states. For example, if a node in the Assignment collection is removed from the model, it will be removed from the Assignment 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.

Properties

CountCollect, Description, ExistingKeyItem, Model, MSBN, Ref. StatesIndex

Methods

Add, Copy, Remove, Set

Collections

Indexes, Keys, KeyObjects 

Also See

Evidence

Collections and Maps: an Overview