4,494
edits
(TAM) |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
Line 32: | Line 32: | ||
=== Supported Operations === | === Supported Operations === | ||
Values can be transferred using the <source lang=apl inline>←</ | Values can be transferred using the <source lang=apl inline>←</syntaxhighlight> operator. | ||
The MLIM natively supports the monadic operations: | The MLIM natively supports the monadic operations: | ||
<source lang=apl inline>(A,B,C,T)←~(A,B,C,T)</ | <source lang=apl inline>(A,B,C,T)←~(A,B,C,T)</syntaxhighlight> | ||
and the dyadic operations: | and the dyadic operations: | ||
<source lang=apl> | <source lang=apl> | ||
Line 46: | Line 46: | ||
(C,A)←(A,C)=B | (C,A)←(A,C)=B | ||
(C,A)←(A,C)>B | (C,A)←(A,C)>B | ||
</ | </syntaxhighlight> | ||
The operations can be combined to create the following operations: | The operations can be combined to create the following operations: | ||
<source lang=apl> | <source lang=apl> | ||
Line 73: | Line 73: | ||
M⍱N | M⍱N | ||
M⍲N | M⍲N | ||
</ | </syntaxhighlight> | ||
The masking functionality of the RL combined with the native ability for [[Scan]] (reduce while reading the output in between each step) and [[Reduce]] (<source lang=apl inline>\</ | The masking functionality of the RL combined with the native ability for [[Scan]] (reduce while reading the output in between each step) and [[Reduce]] (<source lang=apl inline>\</syntaxhighlight> and <source lang=apl inline>/</syntaxhighlight> respectively) allows for [[Index Generator]] (monadic <source lang=apl inline>⍳</syntaxhighlight>) to be defined, while its generalized indexing functionality allows [[Reverse]] and [[Transpose]] (monadic <source lang=apl inline>⌽</syntaxhighlight> and <source lang=apl inline>⍉</syntaxhighlight>) to be defined. [[Shape]] and [[Ravel]] (monadic <source lang=apl inline>⍴</syntaxhighlight> and <source lang=apl inline>,</syntaxhighlight>) can also be defined by using the RL and PP in parallel. Thus, a list of complex operators can be defined: | ||
<source lang=apl> | <source lang=apl> | ||
⍳N | ⍳N | ||
Line 94: | Line 94: | ||
M∘.b N | M∘.b N | ||
M[N] | M[N] | ||
</ | </syntaxhighlight> | ||
This paper does not outline floating point arithmetic. Many functions may be missing because floating point arithmetic has not been defined. | This paper does not outline floating point arithmetic. Many functions may be missing because floating point arithmetic has not been defined. | ||