From 59ab5338d4e23eb108a43f876aa979238ae2490e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 12 Nov 2021 22:15:44 -0500 Subject: Slightly less APL-centric documentation --- docs/doc/search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/search.html') diff --git a/docs/doc/search.html b/docs/doc/search.html index 7834a06d..28e0081d 100644 --- a/docs/doc/search.html +++ b/docs/doc/search.html @@ -146,7 +146,7 @@ "initial set" (¬∊/⊣) "difference" # Remove 𝕩 "tal st" -

These are the APL functions Intersect () and Without (~). Really, only 𝕩 is treated like a set, while the ordering and multiplicity of elements of 𝕨 are maintained. I think the explicit implementations show this well, since 𝕩 is only used as the right argument to , and prefer this clarity to the brevity of a single symbol.

+

These functions appear in APL as Intersect () and Without (~). Really, only 𝕩 is treated like a set, while the ordering and multiplicity of elements of 𝕨 are maintained. I think the explicit implementations show this well, since 𝕩 is only used as the right argument to , and prefer this clarity to the brevity of a single symbol.

Index of

Index of () returns the index of the first occurrence of each entry in 𝕨, or 𝕨 if an entry doesn't appear in 𝕨 at all.

↗️
    "zero""one""two""three"  "one""eight""two"
@@ -178,7 +178,7 @@
     "aabbcc" ((˜=≠)/⊣) "baa"  # Multiset difference
 "bcc"
 
-

This primitive gives an interesting way to implement the ordinals pattern that might be easier to understand than the APL classic ⍋⍋ (it's probably a little slower though). The idea is to use the sorted array as the left argument to . Now the index returned for each cell is just where it ended up in that sorted order. If we used ordinary Index of then equal cells would share the smallest index; Progressive Index of means ties are broken in favor of earlier cells.

+

This primitive gives an interesting way to implement the ordinals pattern that might be easier to understand than the classic ⍋⍋ (it's probably a little slower though). The idea is to use the sorted array as the left argument to . Now the index returned for each cell is just where it ended up in that sorted order. If we used ordinary Index of then equal cells would share the smallest index; Progressive Index of means ties are broken in favor of earlier cells.

↗️
     "adebcedba"
 ⟨ 0 5 7 2 4 8 6 3 1 ⟩
 
-- 
cgit v1.2.3