Difference between revisions of "Dilate"

From NARS2000
Jump to navigationJump to search
 
Line 13: Line 13:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
   <td><apll>X</apll> is an optional numeric singleton axis with <apll>X∊⍳1+⍴⍴R</apll>. If X is omitted, it defaults to the last axis plus one.</td>
+
   <td><apll>X</apll> is an optional numeric singleton axis with <apll>X∊⍳1+⍴⍴R</apll>. If <apll>[X]</apll> is omitted, the operation applies to the last axis plus one.</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 25: Line 25:
 
<p>For example,</p>
 
<p>For example,</p>
  
<apll>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&gt;23<br />
+
<apll><pre>
23<br />
+
      ⍴⎕←&gt;23
1<br />
+
23
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&gt;2 2⍴⍳4<br />
+
1
1<br />
+
      ⍴⎕←&gt;[1] 23
2<br />
+
23
<br />
+
1
3<br />
+
      ⍴⎕←&gt;2 2⍴⍳4
4<br />
+
1
2 2 1<br />
+
2
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&gt;2 2⍴1<pn>J</pn>2 3<pn>J</pn>4 4<pn>J</pn>3 2<pn>J</pn>1<br />
+
 
1 2<br />
+
3
3 4<br />
+
4
<br />
+
2 2 1
4 3<br />
+
      ⍴⎕←&gt;2 2⍴1<hc>J</hc>2 3<hc>J</hc>4 4<hc>J</hc>3 2<hc>J</hc>1
2 1<br />
+
1 2
2 2 2<br />
+
3 4
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←>[1] 2 2⍴1<pn>J</pn>2 3<pn>J</pn>4 4<pn>J</pn>3 2<pn>J</pn>1<br />
+
 
1 3<br />
+
4 3
4 2<br />
+
2 1
<br />
+
2 2 2
2 4<br />
+
      ⍴⎕←>[1] 2 2⍴1<hc>J</hc>2 3<hc>J</hc>4 4<hc>J</hc>3 2<hc>J</hc>1
3 1<br />
+
1 3
2 2 2<br />
+
4 2
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&gt;2 2⍴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 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<br />
+
 
1 2 3 4<br />
+
2 4
5 6 7 8<br />
+
3 1
<br />
+
2 2 2
8 7 6 5<br />
+
      ⍴⎕←&gt;2 2⍴1<hc>i</hc>2<hc>j</hc>3<hc>k</hc>4 5<hc>i</hc>6<hc>j</hc>7<hc>k</hc>8 8<hc>i</hc>7<hc>j</hc>6<hc>k</hc>5 4<hc>i</hc>3<hc>j</hc>2<hc>k</hc>1
4 3 2 1<br />
+
1 2 3 4
2 2 4 <br />
+
5 6 7 8
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⍴⎕←&gt;2 2⍴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 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<br />
+
 
&nbsp;1&nbsp;&nbsp;2&nbsp;&nbsp;3&nbsp;&nbsp;4&nbsp;&nbsp;5&nbsp;&nbsp;6&nbsp;&nbsp;7&nbsp;&nbsp;8<br />
+
8 7 6 5
&nbsp;9 10 11 12 13 14 15 16<br />
+
4 3 2 1
<br />
+
2 2 4  
16 15 14 13 12 11 10&nbsp;&nbsp;9<br />
+
      ⍴⎕←&gt;2 2⍴1<hc>i</hc>2<hc>j</hc>3<hc>k</hc>4<hc>l</hc>5<hc>ij</hc>6<hc>jk</hc>7<hc>kl</hc>8 9<hc>i</hc>10<hc>j</hc>11<hc>k</hc>12<hc>l</hc>13<hc>ij</hc>14<hc>jk</hc>15<hc>kl</hc>16 16<hc>i</hc>15<hc>j</hc>14<hc>k</hc>13<hc>l</hc>12<hc>ij</hc>11<hc>jk</hc>10<hc>kl</hc>9 8<hc>i</hc>7<hc>j</hc>6<hc>k</hc>5<hc>l</hc>4<hc>ij</hc>3<hc>jk</hc>2<hc>kl</hc>1
&nbsp;8&nbsp;&nbsp;7&nbsp;&nbsp;6&nbsp;&nbsp;5&nbsp;&nbsp;4&nbsp;&nbsp;3&nbsp;&nbsp;2&nbsp;&nbsp;1<br />
+
1 2 3 4 5 6 7 8
2 2 8<br />
+
9 10 11 12 13 14 15 16
</apll>
+
 
 +
16 15 14 13 12 11 10 9
 +
8 7 6 5 4 3 2 1
 +
2 2 8
 +
</pre></apll>
  
 
==Identities==
 
==Identities==
  
<apll>R ←→ &lt;[X] &gt;[X] R</apll> &nbsp;&nbsp;for all <apll>R</apll> (see [[Condense]] for the definition of monadic Left Caret)<br />
+
<apll> R ←→ &lt;   &gt;   R</apll> &nbsp;&nbsp;for all <apll>R</apll> (see [[Condense]] for the definition of monadic Left Caret)<br />
<apll>R ←→ &gt;[X] &lt;[X] R</apll> &nbsp;&nbsp;for all <apll>R</apll> with <apll>(⍴R)[X]∊1 2 4 8</apll><br />
+
<apll> R ←→ &lt;[X] &gt;[X] R</apll> &nbsp;&nbsp;for all <apll>R</apll><br />
 +
<apll>  R ←→ &gt;    &lt;    R</apll> &nbsp;&nbsp;for all <apll>R</apll> with <apll>(¯1↑⍴  R)∊1 2 4 8</apll><br />
 +
<apll>1/R ←→ &gt;    &lt;    R</apll> &nbsp;&nbsp;for all <apll>R</apll> with <apll>(¯1↑⍴1/R)∊1 2 4 8</apll><br />
 +
<apll>  R ←→ &gt;[X] &lt;[X] R</apll> &nbsp;&nbsp;for all non-scalar <apll>R</apll> with <apll>(⍴R)[X]∊1 2 4 8</apll>
  
 
== 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>

Latest revision as of 21:13, 15 April 2018

Z←>R    or    Z←>[X] R extracts from R its Hypercomplex coefficients.
X is an optional numeric singleton axis with X∊⍳1+⍴⍴R. If [X] is omitted, the operation applies to the last axis plus one.
R is an arbitrary Real or Hypercomplex numeric array — otherwise, DOMAIN ERROR.
Z is the corresponding array of Real numbers of shape ((=R),⍴R)[⍋⍋X≠⍳1+⍴⍴R] where =R is the Hypercomplex dimension of R as in (=R)∊1 2 4 8.


For example,

      ⍴⎕←>23
23
1
      ⍴⎕←>[1] 23
23
1
      ⍴⎕←>2 2⍴⍳4
1
2

3
4
2 2 1
      ⍴⎕←>2 2⍴1J2 3J4 4J3 2J1
1 2
3 4

4 3
2 1
2 2 2
      ⍴⎕←>[1] 2 2⍴1J2 3J4 4J3 2J1
1 3
4 2

2 4
3 1
2 2 2
      ⍴⎕←>2 2⍴1i2j3k4 5i6j7k8 8i7j6k5 4i3j2k1
1 2 3 4
5 6 7 8

8 7 6 5
4 3 2 1
2 2 4 
      ⍴⎕←>2 2⍴1i2j3k4l5ij6jk7kl8 9i10j11k12l13ij14jk15kl16 16i15j14k13l12ij11jk10kl9 8i7j6k5l4ij3jk2kl1
 1  2  3  4  5  6  7  8
 9 10 11 12 13 14 15 16

16 15 14 13 12 11 10  9
 8  7  6  5  4  3  2  1
2 2 8

Identities

R ←→ < > R   for all R (see Condense for the definition of monadic Left Caret)
R ←→ <[X] >[X] R   for all R
R ←→ > < R   for all R with (¯1↑⍴ R)∊1 2 4 8
1/R ←→ > < R   for all R with (¯1↑⍴1/R)∊1 2 4 8
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.