%ė VAX-11 Librarian V03-00UwĨM‹@Œˇ‘WM‹ *ę+M Z5/ lFiles Functionals Operations - B: Is the Negation of the elements of B. note.. To negate a 'specific element, use the .NG operator.  A - Bt0 Is the Difference of the elements of A minus B.2 * Signum, Times- A * Bc- Is the product of the elements of A times B. ww ēĢ ”´ųM‹ SCI APLēĢ)`ÅS\M‹ SCI OPERATIONSFilesēĢ@A›M‹ SCI APLēĢ#€€Ä™"M‹ SCI OperationsēĢ#`/Ë"M‹ SCI OPERATIONSēĢ#`ôY­*M‹ SCI OperationsēĢ#ĀžÍS.M‹ SCI OperationsēĢ#€Ûn0M‹ SCI OperationsēĢ# =-W1M‹ SCI OperationsēĢ#`ģĒ1M‹ SCI OperationsēĢ#`ųßį2M‹ SCI OperationsēĢ# ō1-3M‹ SCI OperationsēĢ#™ąS3M‹ SCI OperationsēĢ#€Š­āĒM\M‹ 1 OPERATIONS: This discussyin assumes the use of a "TTY" type terminal.ww­ ¸P\M‹1 Files< The following is a discussion of the APL -- VAX file accessww­ĀXģ™"M‹ 1 OperationsA The following are the Primitive operations, functions available ?in APL. The discussion assumes that the TTY mode is being used.2 + Conjugate, Add + B Is the Same as B. A + B( Is the Sum of the elements of A plus B.2 - Negation, Subtract ­@SR­*M‹ 1 OperationsA The following are the Primitive operations, functions available ?in APL. The discussion assumes that the TTY mode is being used.2 Add,Conjugate +1 A + B .. Is the Sum of the elements of A plus B. + B .. Is the Same as B.2 Subtract,Negative -9 A - B .. Is the Difference of the elements of A minus B.@ - B .. Is the Negation of the elements of B. note.. To negate a(specific element, use the .NG operator. 2 Times,Signum *6 A * B .. Is the Product of the elements of A times B.@ * B .. is the Sign of the elements of B. If B .gt. 0 (+1), if b.eq. 0, (0), if B.lt.0 (-1) 2 Divide,Reciprocal %< A % B .. Is the Dividend of the elements if A divided by B. % B .. Is the Inverse ofwwÆ5M‹ SCI OperationsēĢ# 1:ˇ9M‹ SCI OperationsēĢ#€‡˙ˇ:M‹ SCI OperationsēĢ#`—L>M‹ SCI OperationsēĢ#`=Á•FM‹ SCI OperationsēĢ# IlTM‹ SCI OperationsēĢ# ņĄ™TM‹ SCI OperationsēĢ$ … ģUM‹ SCI FunctionalsēĢ$`bˑWM‹ SCI Functionals­ jģUM‹ 1 Functionals 2 Axis spec ------ Fun [n]2 Inner Product -- Fun1 . Fun22 Outer Product -- .LO . Fun2 Reduction ------ Fun /2 Scan ----------- Fun \wwB .. is the number of combinations of B taken A at a time, e.g. 6 = 2 ! 4.4@ ! B .. is B factorial, i.e. B times B-1 times B-2 ..., if B is 3not an integer than ! B is the GAMMA function of B.B2 Comment `"' | B Any APL line can be commented by preceeding the comment wuth the :double quote, e.g. " , thi­@Œˇ‘WM‹ 1 Functionals2 Axis spec ------ Fun [n]9 The axis specifier can be used to determine which axis a Bfunction operates on. The following functions are sutable for suchtype of specification.2 Inner Product -- Fun1 . Fun2= A fun1 . fun2 B .. is the inner product. It results in first Capplying the fun2, as an outer product to A and B and then reducingethe result via the "fun1".2 Outer Product -- .LO . Fun9 A .lo . Fun B .. is the same as applying A perpindicula­`1™TM‹1 Operations |d2 Add,Conjugate `+' | 2 And `&' | , A & B .. is the logical product of A and B.2 Combin,Factrl `!' | @ A ! B .. is the number of combinations of B taken A at a time, e.g. 6 = 2 ! 4.4@ ! B .. is B factorial, i.e. B times B-1 times B-2 ..., if B is 3not an integer than ! B is the GAMMA function of B.B2 Comment `"' | B Any APL line can be commented by preceeding the comment wuth the :double quote, e.g. " , this is the .Lamp. in standard APL.2 Compress `/' | < A / B .. is the result of taking A[1] copies of B[1], A[2] Bcopies of B[2] ... The zero elements in A result in skipping over Fresepctive elements in B. If B is not a VECTOR, the A / B effects the Hfirst axis of B. to change the axis, use /[n], or .CS for the last axis.2 Concat,Ravel `,' |eA A , B .. is the concatination of B to A, along the last axis of e>A. note. To conacatinate along the first axis use .CC, and to ,concatinate along the "n"-th axis use: ,[n].A If "n" is not an integer, then A and B are joined along an axis ubeteen .FL n and .CE n.e? , B .. is the vector generated by taking the elements of B in sorder.2 Divide,Inverse `%' | ; A % B .. is the divident of A divided by B. note.. 1 = 0%0t1 % B .. is the inverse of b, i.e. 1 divided by B. 2 Equality `=' |d@ A = B .. is 1 if an element of A equals the respective element Eof B, and is 0 otherwise. Note.. if A and B are different type, i.e. h/Numeric and Character then A is not equal to B.c2 Expand '\' |e8 A \ B .. inserts fill values along the first axis of B Heverywhere there are zeros in the A vector. To access the n-th axis use )\[n], and to access the last axis use .CBg2 Residue,Abs_val `|' |f< A | B .. is the remainder of B divided by A. e.g. 3 = 5 | 8# | B .. is the Absolute value of B.a2 Power,Exponent `*' |m' A * B .. is A raised to the B-th power ' * B .. is "e" raised rt@to B. thus instead of doing an element by element operation, and@producing a matrix of the same shape as A and B, this results in3producing a matrix of the concatination of A and B.l2 Reduction ------ Fun /? fun / B .. results in putting the "fun" between te elements ofbCB so that the result is "reduced" by this application. As usual they@operation is along the first axis, unless operridden by the axisHspecifier, e.g. /[n]. The last axis can be chosen via the .CS operation.2 Scan ----------- Fun \= fun \ B .. results in putting the "fun" between the elementsdAof B, and then getting the partial results. Thus the shape is thex@same as B itself. As usual the operation is along the first axisAunless overridden by the axis specifier, e.g. \[n]. The last axise$can be chosen via the .CB operation.wwmainder of B divided by A. e.g. 3 = 5 | 8# | B .. is the Absolute value of B.a2 Power,Exponent `*' |m' A * B .. is A raised to the B-th power ' * B .. is "e" raised to the B-th powern2 Replacement `_' | A A _ B .. causes A to be replaced by the value of the expression B.2 Sub,Negat `-' |j) A - B .. is the difference of A minus B.tB - B .. is the negation of B. note. There is a difference between I- 1 2 3, and .ng 1 2 3. In the first case the operator acts on the total Fvecotor and produces: (-1),(-2),(-3) .. In the second case it acts on &the number, producing: (-1), (2), (3).2 Times,Signum `#' |i& A # B .. is the produce of A times B.? # B .. is the sign of B, i.e. +1 if(B.gt.0), 0 if(b.eq.0), -1 a if(b.lt.0).e2 Take `^' |? A ^ B .. is the result of taking A[1] elements from the first iDaxis fo B, A[2] from the second, and so forth. If there are too few Felement in B, then the rest are the fill elements, i.e. 0 for numeric %arrays, and ' ' for character arrays.eB If an A[i] is negative, then the elements are taken from the end $of B rather than from the beginning.2 .AL  |.2 .BX Quad |i2 .CB Col_Backslash |a7 A .cb B .. inserts fill values where ever A has zeros Cinbetween the respective values of B, along the last axis. This is >#related to the `\' expand operator.L2 .CC Col_Comma | @ A .CC B .. concatinates B to A along the first axis of A. See: Concatinate.2 .CS Col_Slash |o@ A .cs B .. Compresses {see} B along the last axis based on the Hnon-zero elements of A. This is related to the `/' compression operatoto the B-th powern2 Replacement `_' | A A _ B .. causes A to be replaced by the value of the expression B.2 Sub,Negat `-' |j) A - B .. is the difference of A minus B.tB - B .. is the negation of B. note. There is a difference between I- 1 2 3, and .ng 1 2 3. In the first case the operator acts on the total Fvecotor and produces: (-1),(-2),(-3) .. In the second case it acts on &the number, producing: (-1), (2), (3).2 Times,Signum `#' |t& A # B .. is the produce of A times B.? # B .. is the sign of B, i.e. +1 if(B.gt.0), 0 if(b.eq.0), -1 . if(b.lt.0).e2 Take `^' |l? A ^ B .. is the result of taking A[1] elements from the first Daxis fo B, A[2] from the second, and so forth. If there are too few Felement in B, then the rest are the fill elements, i.e. 0 for numeric %arrays, and ' ' for character arrays.iB If an A[i] is negative, then the elements are taken from the end $of B rather than from the beginning.2 .AL  |e2 .BX Quad |a2 .CB Col_Backslash |o7 A .cb B .. inserts fill values where ever A has zeros aCinbetween the respective values of B, along the last axis. This is e#related to the `\' expand operator. 2 .CC Col_Comma |.@ A .CC B .. concatinates B to A along the first axis of A. See: Concatinate.2 .CS Col_Slash |@ A .cs B .. Compresses {see} B along the last axis based on the Hnon-zero elements of A. This is related to the `/' compression operator.2 .CE Celing | & A .ce B .. is the Maximum of A and B.9 .ce B .. is the integer just greater than or equal to B.)2 .CO Contains |A2 .CR Col_Reverse |B2 .DA Drop |A= A .da B .. is the result of dropping A[1] elements from the Hfirst axis of B and so forth. If an A[i] is negative, then elements are 4dropped from the end rather than the beginning of B.2 .DE Decode | 2 .DL Function_def | 2 .DM Diamond | 2 .DQ Matrix_Divide, | ? A .dq B .. is the matrix division, solves the linear equation a6and finds the least squares fit of the equation A = B.$ .dq B .. is the matrix inverse of B2 .DU Down_U |O2 .EN Encode |P2 .FL Floor |Q& A .fl B .. is the Minimum of A and B.6 .fl B .. is the integer just less than or equal to B.2 .FM Format |[B .fm B .. is the character array that results in formatting B for output. 2 .GD Grade_Down |-8 .gd B .. generates the indexes of the Highest, Next to Fhighest... element in B. note.. B[.gd B] will be the elements ib B in decending order.; .gd [n] B .. generates the indexes based on the n-th axis?s2 .GE Greater_or_Equ |o2 .GO Goto |.2 .GU Grade_Up |tA .gu B .. generates the indexes of the Lowest, Next to lowest... aEelement in B. note.. B[.gu B] will be the elements in B in assending .order.: .gu[n] B .. generates the indexes based on the n-th axis.2 .IB I-Beam # | 2 .IO | . .io B .. is the integers from []IO up thru B.2 .IQ |2 .LD Lower_Del |2 .LE Less_than_or_E |2 .LG Logarithm |* A .lg B .. is the Log of B to the base A.8 .lg B .. is the natural log of B, i.e. to the base "e".2 .LO Trig,Pi_Times |< A .lo B .. is the Trig function of B associated with A, as shown in the "More Info" .lo B .. is "PI" times B.3 `A' .lo B |3 `A' .lo B |3 `A'  r.2 .CE Celing |.& A .ce B .. is the Maximum of A and B.9 .ce B .. is the integer just greater than or equal to B.r2 .CO Contains |B2 .CR Col_Reverse |o2 .DA Drop | = A .da B .. is the result of dropping A[1] elements from the Hfirst axis of B and so forth. If an A[i] is negative, then elements are 4dropped from the end rather than the beginning of B.2 .DE Decode |B2 .DL Function_def |A2 .DM Diamond |A2 .DQ Matrix_Div!ide, |A? A .dq B .. is the matrix division, solves the linear equation 6and finds the least squares fit of the equation A = B.$ .dq B .. is the matrix inverse of B2 .DU Down_U | 2 .EN Encode | 2 .FL Floor | & A .fl B .. is the Minimum of A and B.6 .fl B .. is the integer just less than or equal to B.2 .FM Format | B .fm B .. is the character array that results in formatting B for output. 2 .GD Grade_Down |e8 .gd B .. gene"rates the indexes of the Highest, Next to Fhighest... element in B. note.. B[.gd B] will be the elements ib B in decending order.; .gd [n] B .. generates the indexes based on the n-th axis? 2 .GE Greater_or_Equ |a2 .GO Goto |.2 .GU Grade_Up |eA .gu B .. generates the indexes of the Lowest, Next to lowest... kEelement in B. note.. B[.gu B] will be the elements in B in assending .order.: .gu[n] B .. generates the indexes based on the n-th axis.2 .IB I-Beam ' |e2 .IO |.. .io B .. is the integers from []IO up thru B.2 .IQ | 2 .LD Lower_Del | 2 .LE Less_than_or_E |n2 .LG Logarithm |g* A .lg B .. is the Log of B to the base A.8 .lg B .. is the natural log of B, i.e. to the base "e".2 .LO Trig,Pi_Times |< A .lo B .. is the Trig function of B associated with A, as shown in the "More Info" .lo B .. is "PI" times B.3 `A' .lo B |3 `A' .lo B |3 `A' $ .lo B |3 (-7) Arc Tanh B |3 (-6) Arc Cosh B |3 (-5) Arc Sinh B |3 (-4) B*(1-B*(-2)*0.5|3 (-3) Acr Tan B |3 (-2) Arc Cos B |3 (-1) Acr Sin B |3 0 (1-B*2)*0.5 |3 1 Sin B |3 2 Cos B |3 3 Tan B |3 4 (1+B*2)*0.5 |3 5 Sinh B |3 6 Cosh B |3 7 Tanh B |2 .LT Left_Tack |2 .LU Left_U |2 .NE Not_Equal |2 .NG Negation % |2 .NN Nand |2 .NR Nor |2 .OM |2 .OQ |2 .OR Or |2 .PD Protected_Del |2 .QD |2 .QQ A .ro B .. is the "matrix" with dimensions A[1], A[2]... and Ivalues B[1] , B[2] ... note. If there are not enough elements in B, then the elements are re-cycled.B .ro B .. is the dimensions of the "matrix" B. note. If B is null then .ro B is 0.&2 .RT Right_Tack |2 .RU Right_U |2 .RV Reverse |A .rv B .. reverses B along its last axis. note. To reverse along Fthe first axis use .CR, and to reverse along the n-th axis use .rv[n].2 .SO Jot |2 .SQ Squash_Quad |2 .SS Sub_Set |2 .TR Transpose |< .tr B .. transposes the axies of B, e.g. for a 2-d matrix, "interchanges the Rows and Columns.2 .UU Up_U |2 .XQ Execute |@ .xq B .. executes B {character array} as tho it was entered by Ethe user. This is similar to .EP, except that (1) .XQ only returns a Ivalue if the array results in a value. (2) .XQ can execute a branch. (3) .XQ can have its errors trapped.ww( .lo B |3 (-7) Arc Tanh B |3 (-6) Arc Cosh B |3 (-5) Arc Sinh B |3 (-4) B*(1-B*(-2)*0.5|3 (-3) Acr Tan B |3 (-2) Arc Cos B |3 (-1) Acr Sin B |3 0 (1-B*2)*0.5 |3 1 Sin B |3 2 Cos B |3 3 Tan B |3 4 (1+B*2)*0.5 |3 5 Sinh B |3 6 Cosh B |3 7 Tanh B |2 .LT Left_Tack |2 .LU Left_U |2 .NE Not_Equal |2 .NG Negation ) |2 .NN Nand |2 .NR Nor |2 .OM |2 .OQ |2 .OR Or |2 .PD Protected_Del |2 .QD |2 .QQ A .ro B .. is the "matrix" with dimensions A[1], A[2]... and Ivalues B[1] , B[2] ... note. If there are not enough elements in B, then the elements are re-cycled.B .ro B .. is the dimensions of the "matrix" B. note. If B is null then .ro B is 0.*2 .RT Right_Tack |2 .RU Right_U |2 .RV Reverse |A .rv B .. reverses B along its last axis. note. To reverse along Fthe first axis use .CR, and to reverse along the n-th axis use .rv[n].2 .SO Jot |2 .SQ Squash_Quad |2 .SS Sub_Set |2 .TR Transpose |< .tr B .. transposes the axies of B, e.g. for a 2-d matrix, "interchanges the Rows and Columns.2 .UU Up_U |2 .XQ Execute |@ .xq B .. executes B {character array} as tho it was entered by Ethe user. This is similar to .EP, except that (1) .XQ only returns a Ivalue if the array results in a value. (2) .XQ can execute a branch. (3) .XQ can have its errors trapped.ww