MetaOnly

Revision as of 20:40, 23 February 2007 by Lchrisman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


(new to 4.0) -- not present prior to 4.0.0.35.

Attribute MetaOnly

When this attribute is set to True for an Index object, associative lookup (A[I=x]) or @[I=x]) does not evaluate the index elements, and associative lookup matches only to the raw unevaluated index elements.

This alters the behavior of associative lookup when index items consist of object identifiers or expressions. This alteration in behavior is often needed when performing Meta-Inference, that is, algorithms that reason about or alter the objects and structure of the model itself. Meta-Inference is an advanced Analytica modeling topic.

(TBD: Fill in the core details, examples, here. For now, please refer to the section on this topic on theSubscript/Slice Operator page. )

Caveats

If you set the MetaOnly attribute on an index object (or equivalently, use the MetaIndex..Do declaration to define a local index), you should be aware that associative indexing will not find certain system variable constants in the form you might expect. For example, if a global index is defined as a list with the MetaOnly attribute set:

Index I With SysVar Elements.jpg

Then these subscript operations won't find the value:

@[I=Null] → 0         {not found}
@[I=Inf] → 0
@[I=Pi] → 0
@[I=True] → 0

The values can be located using:

@[I=VarTerm(Null)] → 1
@[I=VarTerm(Inf)] → 2
@[I=VarTerm(Pi)] → 4
@[I=VarTerm(True)] → 6

See Also

Comments


You are not allowed to post comments.