Difference between revisions of "Ensuring Array Abstraction"
Jhernandez3 (talk | contribs) (Created page with "Category: Analytica User Guide <breadcrumbs> Analytica User Guide > {{PAGENAME}}</breadcrumbs><br /> The vast majority of the elements of the Analytica language (operator...") |
Jhernandez3 (talk | contribs) m |
||
Line 10: | Line 10: | ||
* The While loop (page 386), which requires its termination condition to be an atom. | * The While loop (page 386), which requires its termination condition to be an atom. | ||
* If b Then c Else d (page 386), when condition b is an array, and c or d can give an evaluation error. | * If b Then c Else d (page 386), when condition b is an array, and c or d can give an evaluation error. | ||
− | * Functions with an optional index parameter that is omitted (page 387), such as Sum(x), Product, Max, Min, Average, Argmax, SubIndex, ChanceDist, CumDist, and ProbDist. | + | * Functions with an optional index parameter that is omitted (page 387), such as Sum(x), Product, Max, Min, Average, Argmax, SubIndex, ChanceDist, CumDist, and ProbDist.<br /> |
When using these constructs, you must take special care to ensure that your model is fully arrayabstractable. Here we explain how to do this for each of these five types. | When using these constructs, you must take special care to ensure that your model is fully arrayabstractable. Here we explain how to do this for each of these five types. |
Revision as of 04:37, 16 December 2015
The vast majority of the elements of the Analytica language (operators, functions, and control constructs) fully support Intelligent Arrays — that is, they can handle operands or parameters that are arrays with any number of indexes, and generate a result with the appropriate dimensions. Thus, most models automatically obtain the benefits of array abstraction with no special care.
There are just a few elements that do not inherently enable Intelligent Arrays — i.e., support array abstraction. They fall into these main types:
- Functions whose parameters must be atoms (not arrays), including Sequence, m..n, and SplitText. See below.
- Functions whose parameter must be a vector (an array with just one index), such as CopyIndex, SortIndex, Subset, Unique, and Concat when called with two parameters.
- The While loop (page 386), which requires its termination condition to be an atom.
- If b Then c Else d (page 386), when condition b is an array, and c or d can give an evaluation error.
- Functions with an optional index parameter that is omitted (page 387), such as Sum(x), Product, Max, Min, Average, Argmax, SubIndex, ChanceDist, CumDist, and ProbDist.
When using these constructs, you must take special care to ensure that your model is fully arrayabstractable. Here we explain how to do this for each of these five types.
Comments
Enable comment auto-refresher