next up previous contents index
Next: Glossary Up: [B/D] operands and operators Previous: Random number generators

Other operators and operands

Belief comparison variance summaries

   


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

tex2html_wrap_inline33806 tex2html_wrap_inline33806

The operator bcd1  returns the ``eigenvalue'' corresponding to the numerator variance matrix for the tex2html_wrap_inline34732 canonical direction for a belief comparison, and the operator bcd2  returns similarly the ``eigenvalue'' corresponding to the denominator variance matrix. It is an error if the index i is smaller than one or greater than the dimension of the variance matrices subjected to the comparison.   

Coefficients of components in assignments
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • ascf  operator; two arguments tex2html_wrap_inline34584 and tex2html_wrap_inline34590 in parenthesis and separated by a comma. tex2html_wrap_inline35788 is the name of an assignment, and tex2html_wrap_inline35608 the name of an element, component, or assignment.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This operator returns the coefficient of the component tex2html_wrap_inline35608 in the assignment tex2html_wrap_inline35788 . For example, suppose that you have assigned tex2html_wrap_inline44314 . Then tex2html_wrap_inline44316 . The operator takes into account any indices and evaluates functional parts accordingly. In cases where the second argument tex2html_wrap_inline35608 is represented more than once in an assignment, the coefficients are accumulated. Where the argument tex2html_wrap_inline34590 is not part of the assignment, a coefficient of zero is returned. The following examples may make clear the use of this operator.

BD>assign : fg.i.j=(11-5+.i+.j)+(4*.j+.i)b.1+(.j)c.12.12+(15)+(.i)+(2+.j)b.i+(.i-2)c.j.i tex2html_wrap_inline33712

BD>print : (ascf (fg.1.7,b.1)) - should be 38 tex2html_wrap_inline33712

BD>print : (ascf (fg.2.7,b.2)) - should be 9 tex2html_wrap_inline33712

BD>print : (ascf (fg.12.12,c.12.12)) - should be 22 tex2html_wrap_inline33712

BD>print : (ascf (fg.1.124,c.124.1)) - should be -1 tex2html_wrap_inline33712

 

Scalar coefficients in assignments
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • ascl  operator; one argument N in parenthesis. N is the name of an assignment.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the scalar part (or zero if there is no scalar part) of the assignment whose name is supplied as the argument. For example, suppose that you have assigned tex2html_wrap_inline44320 and tex2html_wrap_inline44322 . Then tex2html_wrap_inline44324 and tex2html_wrap_inline44326 . The operator takes into account any indices and evaluates functional parts accordingly, as in the following example.

BD>assign : fg.i.j=(11-5+.i+.j)+(4*.j+.i)b.1+(.j)c.12.12+(15)+(.i)+(2+.j)b.i+(.i-2)c.j.i tex2html_wrap_inline33712

BD>print : (ascl (fg.2.3)) - should be 28 tex2html_wrap_inline33712

 

Existence of a base
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • bn  operator; one argument tex2html_wrap_inline34952 in parenthesis. tex2html_wrap_inline34952 is any valid name.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This is a boolean operator which returns the value unity if the argument N is the name of a base, and zero otherwise.  

Elements in a base
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • count  operator; one argument B in parenthesis. B is the name of a base.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of elements, but not bases or data-elements in the base B. If an error occurs whilst the count  operator is being processed, the number returned is zero.  

Elements and bases in a base
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • countb  operator; one argument B in parenthesis. B is the name of a base.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of elements or bases, but not data-elements in the base B. If an error occurs whilst the countb  operator is being processed, the number returned is zero.  

Data carriers in a base
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • countd  operator; one argument B in parenthesis. B is the name of a base.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of data-elements, in the base B. If an error occurs whilst the countd  operator is being processed, the number returned is zero.  

All consituents of a base
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • countany  operator; one argument B in parenthesis. B is the name of a base.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the total number of constituents of the base B, including data-elements, other bases and elements. If an error occurs whilst the countd  operator is being processed, the number returned is zero.  

Data case existence
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • datain  operator; two arguments tex2html_wrap_inline34952 and I in parenthesis and separated by a comma. tex2html_wrap_inline34952 is any valid name, and I is an integer.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This is a boolean operator which returns the value unity if N is the name of a data-carrier and the data case I has been defined for this data-carrier, and zero otherwise.  

Number of data locations free
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • dfree  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of unused data locations (this calculation may take some time, as it enforces a garbage collection).  

Data carrier existence
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • dn  operator; one argument tex2html_wrap_inline34952 in parenthesis. tex2html_wrap_inline34952 is any valid name.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This is a boolean operator which returns the value unity if the argument N is the name of a data carrier and zero otherwise.  

Data cases selected
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • selection  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of data observations selected according to a SELECT:  command, irrespective of the setting of the autoselect  control.  

Number of element locations free
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • efree  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the number of unused element locations (giving the number of elements that you can still create).  

Element existence
 
tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • en  operator; one argument tex2html_wrap_inline34952 in parenthesis. tex2html_wrap_inline34952 is any valid name.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This is a boolean operator which takes the value unity if the argument N is the name of an element, and zero otherwise.  

Last error number
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • lasterror  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the last error number, or zero if there have been no errors.  

Maximum of two arguments
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • max  operator; two arguments tex2html_wrap_inline36396 and tex2html_wrap_inline36394 , each in parenthesis. tex2html_wrap_inline36396 and tex2html_wrap_inline36394 are any valid equations.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the value of whichever of the two arguments is the larger. The complement to this operator is the min  operator. An example of the use of the command is as follows, where we assume tex2html_wrap_inline44568 to be the name of some constant.

BD>print : (max (23+7)(30+cos (%theta))) tex2html_wrap_inline33712

 

Input channel number
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • mchannel  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns an integer in the range tex2html_wrap_inline44352 representing the current macro channel.  

Minimum of two arguments
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • min  operator; two arguments tex2html_wrap_inline36396 and tex2html_wrap_inline36394 , each in parenthesis. tex2html_wrap_inline36396 and tex2html_wrap_inline36394 are any valid equations.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the value of whichever of the two arguments is the smaller. The complement to this operator is the max  operator. An example of the use of the command is as follows, where we assume tex2html_wrap_inline44568 to be the name of some constant.

BD>print : (min (23+7)(30+sin (%theta))) tex2html_wrap_inline33712

 

Area under a standard Normal curve
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • normal  operator; one argument E in parenthesis, where E is any valid equation.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the area under a standardised Normal tex2html_wrap_inline44284 curve to the left of the argument E, For example, tex2html_wrap_inline44364 . The approximation is accurate to about tex2html_wrap_inline44606 .  

Value of tex2html_wrap_inline44608
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • pi  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the value of tex2html_wrap_inline44608 correct to 11 decimal places.  

Output channel number
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • ochannel  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns an integer in the range tex2html_wrap_inline44366 representing the current output channel.  

Computer platform
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • platform  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This can be used to test for applications for a specific platform. The possible values that could be returned at present, with their implications, are as follows:

1
The [B/D] program has been compiled to run as a UNIX application using the Sun-Berkeley Pascal 2.1 Compiler.
2
The [B/D] program has been compiled to run as a Linux application using the GPP compiler.

3
The [B/D] program has been compiled to run as a WINDOWS  application using Borland Pascal With Objects.

 

Number of belief stores
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • stores  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the current number of belief stores as an integer. This operand might be used with the LOCK:  command, as in the following example which locks all but the first two belief stores:

BD>for : i=3,1,stores  | lock : [i] tex2html_wrap_inline33712

 

Time counter
 


tex2html_wrap_inline33790 tex2html_wrap_inline33790 Usage

  • time  operand.

tex2html_wrap_inline33806 tex2html_wrap_inline33806

This returns the time in seconds since the start of the program. The timing is accurate to the nearest second for the UNIX  implementation, and to the nearest hundredth of a second for the WINDOWS  implementation.  


next up previous contents index
Next: Glossary Up: [B/D] operands and operators Previous: Random number generators

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