Item Amend |
u} _ _ _ |
Amend
|
u} is defined in terms of 名詞 case m} ,
動詞 u applying to 引數or引數to 提供
numeric indices required by it.
|
例如:
x=: 100 + i. 2 4
u=: */@$@] | (5: * i.@$@[)
y=: i. 3 2 4
x ; y ; (x u y) ; (x u} y)
+---------------+-----------+----------+---------------+
|100 101 102 103| 0 1 2 3| 0 5 10 15|100 105 2 3|
|104 105 106 107| 4 5 6 7|20 1 6 11| 4 101 106 7|
| | | | |
| | 8 9 10 11| | 8 9 102 107|
| |12 13 14 15| | 12 13 14 103|
| | | | |
| |16 17 18 19| | 16 17 18 19|
| |20 21 22 23| |104 21 22 23|
+---------------+-----------+----------+---------------+
positions selected by x u} y may be made to depend on
eir or both of 引數 x and y ,
and related 副詞 can be defined for convenient use in common cases.
例如:
A=: @(i.@$@])
u=: (<0 1)&|:
x=: 'DIAG' [ y=: a. {~ (a. i. 'a') + i. 4 5
x;y;(x u A y);(x u A} y)
+----+-----+---------+-----+
|DIAG|abcde|0 6 12 18|Dbcde|
| |fghij| |fIhij|
| |klmno| |klAno|
| |pqrst| |pqrGt|
+----+-----+---------+-----+
Also see case m} for use of 動名詞s.
下個 前個
字彙
索引
主選單