From df6d6a0fa85c07c67eaa40a097953e3290f5d356 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 7 Jul 2021 19:59:57 -0400 Subject: Continued editing and links --- docs/doc/replicate.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc/replicate.html') diff --git a/docs/doc/replicate.html b/docs/doc/replicate.html index 2f81bce5..746062ea 100644 --- a/docs/doc/replicate.html +++ b/docs/doc/replicate.html @@ -157,7 +157,7 @@ 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 ┘ -

Above, both elements of 𝕨 are enclosed numbers. An individual element doesn't have to be enclosed, but I don't recommend this, since if none of them are enclosed, then 𝕨 will have depth 1 and it will be interpreted as replicating along the first axis only.

+

Above, both elements of 𝕨 are enclosed numbers. An individual element doesn't have to be enclosed, but I don't recommend this, since if none of them are enclosed, then 𝕨 will have depth 1 and it will be interpreted as replicating along the first axis only.

↗️
    2,3 / b
 ┌─           
 ╵ 0 1 2 3 4  
@@ -173,7 +173,7 @@
 1
 

Indices

-

The monadic form of / is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. 𝕩 must be a list of natural numbers, and /𝕩 is the list 𝕩/↕≠𝕩. Its elements are the indices for 𝕩, with index i repeated i𝕩 times.

+

The monadic form of / is much simpler than the dyadic one, with no multidimensional case or mismatched argument ranks. 𝕩 must be a list of natural numbers, and /𝕩 is the list 𝕩/↕≠𝕩. Its elements are the indices for 𝕩, with index i repeated i𝕩 times.

↗️
    / 3012
 ⟨ 0 0 0 2 3 3 ⟩
 
@@ -183,14 +183,14 @@ ⟨ "AB" "CDEFG" ⟨⟩ "H" ⟩

This function will fail to include trailing empty arrays; the modification (/∾1) fixes this and ensures the result always has as many elements as 𝕨.

-

If 𝕩 is boolean then /𝕩 contains all the indices where a 1 appears in 𝕩. Applying -» to the result gives the distance from each 1 to the previous, or to the start of the list, another potentially useful function.

+

If 𝕩 is boolean then /𝕩 contains all the indices where a 1 appears in 𝕩. Applying -» to the result gives the distance from each 1 to the previous, or to the start of the list, another potentially useful function.

↗️
    / 0101000010
 ⟨ 1 3 8 ⟩
 
     -» / 0101000010
 ⟨ 1 2 5 ⟩
 
-

With more effort we can also use / to analyze groups of 1s in the argument (and of course all these methods can be applied to 0s instead, by first flipping the values with ¬). First we highlight the start and end of each group by comparing the list with a shifted copy of itself. Or rather, we'll first place a 0 at the front and then at the end, in order to detect when a group starts at the beginning of the list or ends at the end (there's also a shift-based version, «0𝕩).

+

With more effort we can also use / to analyze groups of 1s in the argument (and of course all these methods can be applied to 0s instead, by first flipping the values with ¬). First we highlight the start and end of each group by comparing the list with a shifted copy of itself. Or rather, we'll first place a 0 at the front and then at the end, in order to detect when a group starts at the beginning of the list or ends at the end (there's also a shift-based version, «0𝕩).

↗️
    0 (∾≍∾˜) 01110010110
 ┌─                         
 ╵ 0 0 1 1 1 0 0 1 0 1 1 0  
-- 
cgit v1.2.3