Condense: Difference between revisions
No edit summary |
Sudleyplace (talk | contribs) No edit summary |
||
Line 13: | Line 13: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><apll>X</apll> is an optional numeric singleton axis with <apll>X∊⍳⍴⍴R</apll>. If <apll>X</apll> is omitted, | <td><apll>X</apll> is an optional numeric singleton axis with <apll>X∊⍳⍴⍴R</apll> &mddash; otherwise (including if <apll>R</apll> is a scalar), an <apll>AXIS ERROR</apll> is signalled. If <apll>[X]</apll> is omitted, the operation applies to the last axis.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><apll>R</apll> is an arbitrary Real numeric array | <td><apll>R</apll> is an arbitrary Real numeric array, i.e., Fixed-Precision Boolean, Integer, Floating Point, Arithmetic Progression Array, or Multiple-Precision Integer/Rational or Floating Point — otherwise, a <apll>DOMAIN ERROR</apll> is signalled. The <apll>X</apll>-axis length <apll>(⍴R)[X]</apll> must be <apll>1</apll>, <apll>2</apll>, <apll>4</apll>, or <apll>8</apll> — otherwise, a <apll>LENGTH ERROR</apll> is signalled.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td><apll>Z</apll> is the corresponding Real or Hypercomplex array of shape <apll>(X≠⍳⍴⍴R)/⍴R</apll> using the | <td><apll>Z</apll> is the corresponding Real or Hypercomplex array of shape <apll>(X≠⍳⍴⍴R)/⍴R</apll> using the numbers along the <apll>X</apll>-axis of <apll>R</apll> as the coefficients of the resulting Real or Hypercomplex array. If | ||
<ul> | |||
<li><apll>(⍴R)[X]</apll> is <apll>1</apll>, the result is an array of Real numbers,</li> | |||
<li><apll>(⍴R)[X]</apll> is <apll>2</apll>, the result is an array of Complex numbers,</li> | |||
<li><apll>(⍴R)[X]</apll> is <apll>4</apll>, the result is an array of Quaternion numbers,</li> | |||
<li><apll>(⍴R)[X]</apll> is <apll>8</apll>, the result is an array of Octonion numbers.</li> | |||
</ul> | |||
</td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
Line 25: | Line 32: | ||
<p>For example,</p> | <p>For example,</p> | ||
<apll> <23 | <apll> <23 | ||
23 | 23 | ||
<10 20 | <10 20 | ||
10<pn>J</pn>20 | 10<pn>J</pn>20 | ||
<2 4⍴⍳8 | <2 4⍴⍳8 | ||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4 5<pn>i</pn>6<pn>j</pn>7<pn>k</pn>8< | 1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4 5<pn>i</pn>6<pn>j</pn>7<pn>k</pn>8 | ||
<2 8⍴(⍳8),⌽⍳8 | <[1] 2 4⍴⍳8 | ||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4<pn>l</pn>5<pn>ij</pn>6<pn>jk</pn>7<pn>kl</pn>8 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5<pn>l</pn>4<pn>ij</pn>3<pn>jk</pn>2<pn>kl</pn>1 | 1<pn>J</pn>5 2<pn>J</pn>6 3<pn>J</pn>7 4<pn>J</pn>8 | ||
<[1] 2 8⍴(⍳8),⌽⍳8 | <2 8⍴(⍳8),⌽⍳8 | ||
1<pn>J</pn>8 2<pn>J</pn>7 3<pn>J</pn>6 4<pn>J</pn>5 5<pn>J</pn>4 6<pn>J</pn>3 7<pn>J</pn>2 8<pn>J</pn>1 | 1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4<pn>l</pn>5<pn>ij</pn>6<pn>jk</pn>7<pn>kl</pn>8 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5<pn>l</pn>4<pn>ij</pn>3<pn>jk</pn>2<pn>kl</pn>1 | ||
⍴⎕←<2 3 1⍴⍳6 | <[1] 2 8⍴(⍳8),⌽⍳8 | ||
1 2 3 | 1<pn>J</pn>8 2<pn>J</pn>7 3<pn>J</pn>6 4<pn>J</pn>5 5<pn>J</pn>4 6<pn>J</pn>3 7<pn>J</pn>2 8<pn>J</pn>1 | ||
4 5 6 | ⍴⎕←<2 3 1⍴⍳6 | ||
2 3 | 1 2 3 | ||
⍴⎕←<2 3 2⍴(⍳6),⌽⍳6 | 4 5 6 | ||
1<pn>J</pn>2 3<pn>J</pn>4 5<pn>J</pn>6 | 2 3 | ||
6<pn>J</pn>5 4<pn>J</pn>3 2<pn>J</pn>1< | ⍴⎕←<2 3 2⍴(⍳6),⌽⍳6 | ||
2 | 1<pn>J</pn>2 3<pn>J</pn>4 5<pn>J</pn>6 | ||
⍴⎕←<2 3 4⍴(⍳12),⌽⍳12 | 6<pn>J</pn>5 4<pn>J</pn>3 2<pn>J</pn>1 | ||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4 | 2 3 | ||
12<pn>i</pn>11<pn>j</pn>10<pn>k</pn>9 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5 4<pn>i</pn>3<pn>j</pn>2<pn>k</pn>1 | ⍴⎕←<[1] 2 3 2⍴(⍳6),⌽⍳6 | ||
2 3 | 1<pn>J</pn>6 2<pn>J</pn>5 | ||
⍴⎕←<2 3 8⍴(⍳24),⌽⍳24 | 3<pn>J</pn>4 4<pn>J</pn>3 | ||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4<pn>l</pn>5<pn>ij</pn>6<pn>jk</pn>7<pn>kl</pn>8 9<pn>i</pn>10<pn>j</pn>11<pn>k</pn>12<pn>l</pn>13<pn>ij</pn>14<pn>jk</pn>15<pn>kl</pn>16 17<pn>i</pn>18<pn>j</pn>19<pn>k</pn>20<pn>l</pn>21<pn>ij</pn>22<pn>jk</pn>23<pn>kl</pn>24 | 5<pn>J</pn>2 6<pn>J</pn>1 | ||
24<pn>i</pn>23<pn>j</pn>22<pn>k</pn>21<pn>l</pn>20<pn>ij</pn>19<pn>jk</pn>18<pn>kl</pn>17 16<pn>i</pn>15<pn>j</pn>14<pn>k</pn>13<pn>l</pn>12<pn>ij</pn>11<pn>jk</pn>10<pn>kl</pn>9 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5<pn>l</pn>4<pn>ij</pn>3<pn>jk</pn>2<pn>kl</pn>1 | 3 2 | ||
2 3 | ⍴⎕←<2 3 4⍴(⍳12),⌽⍳12 | ||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4 5<pn>i</pn>6<pn>j</pn>7<pn>k</pn>8 9<pn>i</pn>10<pn>j</pn>11<pn>k</pn>12 | |||
12<pn>i</pn>11<pn>j</pn>10<pn>k</pn>9 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5 4<pn>i</pn>3<pn>j</pn>2<pn>k</pn>1 | |||
2 3 | |||
⍴⎕←<2 3 8⍴(⍳24),⌽⍳24 | |||
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4<pn>l</pn>5<pn>ij</pn>6<pn>jk</pn>7<pn>kl</pn>8 9<pn>i</pn>10<pn>j</pn>11<pn>k</pn>12<pn>l</pn>13<pn>ij</pn>14<pn>jk</pn>15<pn>kl</pn>16 17<pn>i</pn>18<pn>j</pn>19<pn>k</pn>20<pn>l</pn>21<pn>ij</pn>22<pn>jk</pn>23<pn>kl</pn>24 | |||
24<pn>i</pn>23<pn>j</pn>22<pn>k</pn>21<pn>l</pn>20<pn>ij</pn>19<pn>jk</pn>18<pn>kl</pn>17 16<pn>i</pn>15<pn>j</pn>14<pn>k</pn>13<pn>l</pn>12<pn>ij</pn>11<pn>jk</pn>10<pn>kl</pn>9 8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5<pn>l</pn>4<pn>ij</pn>3<pn>jk</pn>2<pn>kl</pn>1 | |||
2 3 | |||
</apll> | </apll> | ||
==Identities== | ==Identities== | ||
<apll>R ←→ < | <apll>R ←→ < > R</apll> for all <apll>R</apll> (see [[Dilate]] for the definition of monadic Right Caret)<br /> | ||
<apll>R ←→ >[X] <[X] R</apll> for all <apll>R</apll> with <apll>(⍴R)[X]∊1 2 4 8</apll><br /> | <apll>R ←→ <[X] >[X] R</apll> for all non-scalar <apll>R</apll><br /> | ||
<apll>R ←→ > < R</apll> for all <apll>R</apll><br /> | |||
<apll>R ←→ >[X] <[X] R</apll> for all non-scalar <apll>R</apll> with <apll>(⍴R)[X]∊1 2 4 8</apll><br /> | |||
== Acknowledgements== | == Acknowledgements== | ||
<p>This symbol and its name were suggested by David A. Rabenhorst.</p> | <p>This symbol and its name were suggested by David A. Rabenhorst.</p> |
Revision as of 13:54, 15 April 2018
|
||||
X is an optional numeric singleton axis with X∊⍳⍴⍴R &mddash; otherwise (including if R is a scalar), an AXIS ERROR is signalled. If [X] is omitted, the operation applies to the last axis. | ||||
R is an arbitrary Real numeric array, i.e., Fixed-Precision Boolean, Integer, Floating Point, Arithmetic Progression Array, or Multiple-Precision Integer/Rational or Floating Point — otherwise, a DOMAIN ERROR is signalled. The X-axis length (⍴R)[X] must be 1, 2, 4, or 8 — otherwise, a LENGTH ERROR is signalled. | ||||
Z is the corresponding Real or Hypercomplex array of shape (X≠⍳⍴⍴R)/⍴R using the numbers along the X-axis of R as the coefficients of the resulting Real or Hypercomplex array. If
|
For example,
<23 23 <10 20 10J20 <2 4⍴⍳8 1i2j3k4 5i6j7k8 <[1] 2 4⍴⍳8 1J5 2J6 3J7 4J8 <2 8⍴(⍳8),⌽⍳8 1i2j3k4l5ij6jk7kl8 8i7j6k5l4ij3jk2kl1 <[1] 2 8⍴(⍳8),⌽⍳8 1J8 2J7 3J6 4J5 5J4 6J3 7J2 8J1 ⍴⎕←<2 3 1⍴⍳6 1 2 3 4 5 6 2 3 ⍴⎕←<2 3 2⍴(⍳6),⌽⍳6 1J2 3J4 5J6 6J5 4J3 2J1 2 3 ⍴⎕←<[1] 2 3 2⍴(⍳6),⌽⍳6 1J6 2J5 3J4 4J3 5J2 6J1 3 2 ⍴⎕←<2 3 4⍴(⍳12),⌽⍳12 1i2j3k4 5i6j7k8 9i10j11k12 12i11j10k9 8i7j6k5 4i3j2k1 2 3 ⍴⎕←<2 3 8⍴(⍳24),⌽⍳24 1i2j3k4l5ij6jk7kl8 9i10j11k12l13ij14jk15kl16 17i18j19k20l21ij22jk23kl24 24i23j22k21l20ij19jk18kl17 16i15j14k13l12ij11jk10kl9 8i7j6k5l4ij3jk2kl1 2 3
Identities
R ←→ < > R for all R (see Dilate for the definition of monadic Right Caret)
R ←→ <[X] >[X] R for all non-scalar R
R ←→ > < R for all R
R ←→ >[X] <[X] R for all non-scalar R with (⍴R)[X]∊1 2 4 8
Acknowledgements
This symbol and its name were suggested by David A. Rabenhorst.