Dyadic
Mixed
Functions Name
Compress
Result
AIB or
A/[Il B or
A/B
The elements from B that correspond
to the 1’s in A.
A\B or
A\[Il B or
AtB
Expand B is expanded to the format specified
by A; 1 in A inserts an element from
B; a 0 in A inserts a 0 or blank element.
A+ B Take
Drop
The number of elements specified by A
are taken from B.
ASB The number of elements specified by A
are dropped from B.
Index of The first occurrence in A of the elements
in B.
A@B or
A@[Il B
or AeB
Rotate The elements of B are rotated as specified
by A. If A is positive, the elements of B
are rotated to the left. If A is negative,
the elements of B are rotated to the right.
Generalized
transpose
Deal
The coordinates of B interchanged as
specified by A.
‘3 1
AIB The number of elements specified by A
are randomly selected from B, without
selecting the same number twice.
AiB Decode
(base value)
The value of argument B expressed in
the number system specified by
argument A.
AT B
AEB
Encode
(representation)
The representation of argument B in
the number system specified by
argument A.
Membership A 1 for each element of A that can be
found in B and a 0 for each element
not found.
ASB Matrix
divide
Solution to one or more sets of linear
equations with coefficient matrix
(matrices) B and right-hand sides A or
the least squares solution to one or
more sets of linear equations.
AvB Format Argument B converted to a character
array in the format specified by
argument A.
74
c
Note: The mixed functions reverse, rotate, compress, and expand, and the operators
(see Operators later in this chapter) reducrion and scan can be applied to a specific
coordinate of an
array. This is done by using an
index entry [I] which indicates the
coordinate to which the mixed function or operator is applied. The value of the
index entry can be from 1 to the number of coordinates in the array; the leftmost
coordinate (first coordinate) has an
index value of 1, the next coordinate has an
index value of 2, and so on. A matrix, for example, has an index value of 1 for the
row coordinate and an
index value of 2 for the column coordinate. If an
index entry
is not specified, the last coordinate (columns) is assumed. If a - (minus) symbol is
overstruck with the function symbol or operator symbol, the first coordinate is
assumed (unless an
index value was also used). When a function or operator is ap-
plied to a specific coordinate, the operation takes place between corresponding ele-
ments in the specified coordinate. For example; assume you have a 3-rank array:
0 When the first coordinate (planes) is specified, the operation takes place between
corresponding elements in each plane.
0 When the second coordinate (rows) is specified, the operation takes place between
the corresponding elements in each row per plane.
When the third coordinate (columns) is specified, the operation takes place be-
tween the corresponding elements in each column per plane.
The p Function: Shape, Reshape (Structure)
Monadic (One-Argument) Form: Shape pB
The shape function result is the shape of the argument; it has one element for each
coordinate of the argument, which indicates the length of that coordinate. The
argument can be
any variable or constant:
A Vector with Four Elements
p ' ABCO 'i
The shape function applied to a scalar yields an empty vector, since a scalar has no
coordinates. An empty vector is indicated by a blank result line:
4 L Blank Result Lines
. PIT'/.
75
Previous Page Next Page