next up previous contents index
Next: Deleting elements Up: Declaring expectations for an Previous: Declaring single expectations

Direct numerical specification of alternative expectations


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Syntax

  1. BD>exp : e(S,B) tex2html_wrap_inline33712

  2. BD>exp : e(S,B) @L tex2html_wrap_inline33712

  3. BD>exp : e(S,B) @L(C) tex2html_wrap_inline33712

  4. BD>exp : e(S,B) (C) tex2html_wrap_inline33712

where tex2html_wrap_inline34520 is the name of a base which must already exist, S is a belief store number, L is the name of a label and tex2html_wrap_inline33870 is a valid input channel number.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

The particular forms for the syntax of the EXP:  command given here all relate to the direct input of a vector of numerical expectation specifications. The number of numerical inputs supplied depends only on the dimension of the base B. The form of the syntax used establishes the place from which the beliefs will be sought: interactively or from a given macro file address.

Firstly we consider the placing of the numerical inputs. Form 1 of the syntax is used when the inputs follow directly afterwards. Therefore, this form of the syntax can be used to obtain expectations interactively from the keyboard. The remaining forms specify an address where the numeric inputs should be found. If form 2 of the syntax is used, with no channel number being specified, the channel number is deduced - [B/D] does not allow duplicate labels. In form 4 of the syntax, the beginning of the file associated with the input channel is indicated. In common with other macro facilities, the channel number can be zero (meaning the keyboard): a label should not be supplied in this case. The channel and label specified or implied must exist at the time the command is issued.

If the base B contains n elements, then the program expects n numbers to be input as their corresponding expectations. These must be supplied according to alphabetical ordering of the elements contained in B, but you are free to split the input over several lines, as many numbers per line as you wish (possibly interspersed with blank lines) subject to the usual limitation of no more than 253 characters per physical line. A number must not be split over two or more lines. Any input on the same physical line as the last number required will be ignored. The numbers are to be in standard numerical format; an error message is printed if the number is invalid, and the command is aborted. It is advisable not to input large vectors interactively. As an example, suppose that tex2html_wrap_inline34980 , with intended expectations 0.1, 0.2, 0.3, 0.4 respectively to be put into expectation store 2. This could be achieved by the following command:

BD>exp  e(2,B) tex2html_wrap_inline33712

0.1 tex2html_wrap_inline33712

0.2 0.3 tex2html_wrap_inline33712

0.4 tex2html_wrap_inline33712

As a second example, suppose that we wish to read the vector of expectations from the file ``test.data''. This might be achieved, for example, by issuing the commands

BD>channel  i3=test.data tex2html_wrap_inline33712

BD>exp  e(2,B)(3) tex2html_wrap_inline33712

 


next up previous contents index
Next: Deleting elements Up: Declaring expectations for an Previous: Declaring single expectations

David Wooff
Wed Oct 21 15:14:31 BST 1998