Implicit Dimensions

Revision as of 17:33, 6 September 2007 by Lchrisman (talk | contribs) (Starting with content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Each dimension of an Analytica array is defined by an index. Each dimension of an array is identified by a different index, and when expressions operate over an array, the index can be specified to indicate which dimension is being operated over. We say these indexes are explicit, since these indexes each have a name, giving us a way to identify the dimension of interest in an expression.

In addition to explicit indexes, Analytica arrays may also contain one implicit dimension. An implicit dimension does not correspond to an index, and therefore cannot be identified by name. For this reason, Analytica does not allow more than one implicit index in an array, since this would create an ambiguity.

Implicit dimensions are sometimes also refered to as null-indexes, null-dimensions, or list-dimensions.

Although you cannot identify an implicit dimension by name, in many Analytica functions can be applied across the implicit dimension using variations that omit the index parameter. For example, consider the expression

Max([x,y,z])

The intermediate expression, [x,y,z], evaluates to an array. The brackets introduce an implicit dimension, and if x, y, or z are themselves arrays, the result of [x,y,z] may have multiple dimensions. Because the second index parameter to Max is not specified, the maximum is computed across the implicit dimension.

Multiple Implicit Dimensions Not Allowed

As already mentioned, an Analytica array can have at most one implicit dimension. If you attempt to combine two implicit dimensions, an error will result. For example, when this expression is evaluated

 (1..10) * (1..10)

the following error appears:

Trying to combine two arrays with implicit indexes. An array can contain only one implicit index. One cure might be to define at least one of these as an explicit index.

Promotion to Self-Index

Comments


You are not allowed to post comments.