Condense: Difference between revisions

From NARS2000
Jump to navigationJump to search
No edit summary
No edit summary
Line 25: Line 25:
23<br />
23<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;10 20<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;10 20<br />
10J20<br />
10<pn>J</pn>20<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;2 4⍴⍳8<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;2 4⍴⍳8<br />
1i2j3k4 5i6j7k8<br />
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<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;2 8⍴(⍳8),⌽⍳8<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;2 8⍴(⍳8),⌽⍳8<br />
1i2j3k4l5ij6jk7kl8 8i7j6k5l4ij3jk2kl1<br />
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<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 1⍴⍳6<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 1⍴⍳6<br />
1 2 3<br />
1 2 3<br />
Line 35: Line 35:
2 3<br />
2 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 2⍴(⍳6),⌽⍳6<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 2⍴(⍳6),⌽⍳6<br />
1J2&nbsp;3J4&nbsp;5J6<br />
1<pn>J</pn>2&nbsp;3<pn>J</pn>4&nbsp;5<pn>J</pn>6<br />
6J5&nbsp;4J3&nbsp;2J1<br />
6<pn>J</pn>5&nbsp;4<pn>J</pn>3&nbsp;2<pn>J</pn>1<br />
2 3<br />
2 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 4⍴(⍳12),⌽⍳12<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 4⍴(⍳12),⌽⍳12<br />
1i2j3k4&nbsp;&nbsp;&nbsp;&nbsp;5i6j7k8&nbsp;9i10j11k12<br />
1<pn>i</pn>2<pn>j</pn>3<pn>k</pn>4&nbsp;&nbsp;&nbsp;&nbsp;5<pn>i</pn>6<pn>j</pn>7<pn>k</pn>8&nbsp;9<pn>i</pn>10<pn>j</pn>11<pn>k</pn>12<br />
12i11j10k9&nbsp;8i7j6k5&nbsp;4i3j2k1<br />
12<pn>i</pn>11<pn>j</pn>10<pn>k</pn>9&nbsp;8<pn>i</pn>7<pn>j</pn>6<pn>k</pn>5&nbsp;4<pn>i</pn>3<pn>j</pn>2<pn>k</pn>1<br />
2 3<br />
2 3<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 8⍴(⍳24),⌽⍳24<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&lt;2 3 8⍴(⍳24),⌽⍳24<br />
&nbsp;1i2j3k4l5ij6jk7kl8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9i10j11k12l13ij14jk15kl16&nbsp;17i18j19k20l21ij22jk23kl24<br />
&nbsp;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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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<br />
24i23j22k21l20ij19jk18kl17&nbsp;16i15j14k13l12ij11jk10kl9&nbsp;&nbsp;&nbsp;8i7j6k5l4ij3jk2kl1<br />
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&nbsp;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&nbsp;&nbsp;&nbsp;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<br />
2 3<br />
2 3<br />
</apll>
</apll>

Revision as of 17:50, 9 April 2017

Z←<R converts R to a Hypercomplex array if (≢R)∊2 4 8 or a Real array if 1=≢R.
R is an arbitrary Real numeric array (BOOL, INT, FLT, APA, RAT, VFP — otherwise, DOMAIN ERROR) whose number of columns (≢R) is 1, 2, 4, or 8 — otherwise, LENGTH ERROR.
Z is the corresponding Real or Hypercomplex array of shape ¯1↓⍴R using the columns of R as the coefficients of the resulting Real or Hypercomplex array. If ≢R is 1, the result is the Real array (¯1↓⍴R)⍴R, if ≢R is 2, the result is a Complex array, if ≢R is 4, the result is a Quaternion array, and if ≢R is 8, the result is an Octonion array.


For example,

      <23
23
      <10 20
10J20
      <2 4⍴⍳8
1i2j3k4 5i6j7k8
      <2 8⍴(⍳8),⌽⍳8
1i2j3k4l5ij6jk7kl8 8i7j6k5l4ij3jk2kl1
      ⍴⎕←<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
      ⍴⎕←<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 ←→ ><R   for all R with (¯1↑⍴R)∊1 2 4 8

Acknowledgements

This symbol and its name were suggested by David A. Rabenhorst.