Talk:Nub Sieve: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
m (make wording more clear for others)
 
Line 3: Line 3:
<syntaxhighlight lang=apl inline>(⍳⍤≢=⍳⍨)⍤(∪⍳1/⊢) ⍝ Pre-correction of bad meme (⍳≢⍵)=⍵⍳⍵</syntaxhighlight>‬
<syntaxhighlight lang=apl inline>(⍳⍤≢=⍳⍨)⍤(∪⍳1/⊢) ⍝ Pre-correction of bad meme (⍳≢⍵)=⍵⍳⍵</syntaxhighlight>‬


Also, a related question about the <syntaxhighlight lang=apl inline>1/⊢</syntaxhighlight>‬ part: why make a scalar probe into a vector before searching in the Unique/Nub? I see that doing the search without increasing the probe to rank 1, as in <syntaxhighlight lang=apl inline>(∪⍳⊢)'A'</syntaxhighlight>‬, does not give an error…
Also, a related question about the <syntaxhighlight lang=apl inline>1/⊢</syntaxhighlight>‬ part: why turn a scalar probe into a singleton vector probe before searching in the Unique/Nub? I see that doing the search without increasing the probe to rank 1, as in <syntaxhighlight lang=apl inline>(∪⍳⊢)'A'</syntaxhighlight>‬, does not give an error… [[User:⊂⍺m|⊂⍺m]] ([[User talk:⊂⍺m|talk]])
:Nub-sieve used to be computed like that, but it was a mistake. (∪⍳⊢)'A' would give a scalar, which then errors in ⍳⍨ [[Adám Brudzewsky]] 14:54, 29 June 2023 (UTC)
:Nub-sieve used to be computed like that, but it was a mistake. (∪⍳⊢)'A' would give a scalar, which then errors in ⍳⍨ [[Adám Brudzewsky]] 14:54, 29 June 2023 (UTC)


:"Bad meme" is what Roger Hui called it. The term probably made it into some of his publications (Tolerant Unique?), and could be cited if so; otherwise it should be removed. I think I copied a lot of this page from implementor-targetted material I had from proposing Unique Mask at Dyalog, so it's not all the best presentation for a wiki. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 18:26, 29 June 2023 (UTC)
:"Bad meme" is what Roger Hui called it. The term probably made it into some of his publications (Tolerant Unique?), and could be cited if so; otherwise it should be removed. I think I copied a lot of this page from implementor-targetted material I had from proposing Unique Mask at Dyalog, so it's not all the best presentation for a wiki. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 18:26, 29 June 2023 (UTC)


:: Ah. So, ok, that explains the <syntaxhighlight lang=apl inline>1/⊢</syntaxhighlight>… but why do index-in-nub before doing <syntaxhighlight lang=apl inline>⍳⍤≢=⍳⍨</syntaxhighlight>? why not just the naive <syntaxhighlight lang=apl inline>(⍳⍤≢=⍳⍨)⍤(1/⊢)</syntaxhighlight>?"
:: Ah. So, ok, that explains the <syntaxhighlight lang=apl inline>1/⊢</syntaxhighlight>… but why do index-in-nub before doing <syntaxhighlight lang=apl inline>⍳⍤≢=⍳⍨</syntaxhighlight>? why not just the naive <syntaxhighlight lang=apl inline>(⍳⍤≢=⍳⍨)⍤(1/⊢)</syntaxhighlight>?" [[User:⊂⍺m|⊂⍺m]] ([[User talk:⊂⍺m|talk]])


::: Compare results on <syntaxhighlight lang=apl inline>3+⎕CT×⍳10</syntaxhighlight>: the value indicated by <syntaxhighlight lang=apl inline>⍳⍤≢=⍳⍨</syntaxhighlight> doesn't match all argument elements, so it can't be said to reduce the entire argument to unique values. There's a short section on this [[Unique#Tolerant_comparison|for Unique]]. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 14:13, 21 July 2023 (UTC)
::: Compare results on <syntaxhighlight lang=apl inline>3+⎕CT×⍳10</syntaxhighlight>: the value indicated by <syntaxhighlight lang=apl inline>⍳⍤≢=⍳⍨</syntaxhighlight> doesn't match all argument elements, so it can't be said to reduce the entire argument to unique values. There's a short section on this [[Unique#Tolerant_comparison|for Unique]]. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 14:13, 21 July 2023 (UTC)

Latest revision as of 10:58, 26 August 2023

Question: what’s meant by “pre-correction of bad meme” here?

(⍳⍤≢=⍳⍨)⍤(∪⍳1/⊢) ⍝ Pre-correction of bad meme (⍳≢⍵)=⍵⍳⍵

Also, a related question about the 1/⊢‬ part: why turn a scalar probe into a singleton vector probe before searching in the Unique/Nub? I see that doing the search without increasing the probe to rank 1, as in (∪⍳⊢)'A'‬, does not give an error… ⊂⍺m (talk)

Nub-sieve used to be computed like that, but it was a mistake. (∪⍳⊢)'A' would give a scalar, which then errors in ⍳⍨ Adám Brudzewsky 14:54, 29 June 2023 (UTC)
"Bad meme" is what Roger Hui called it. The term probably made it into some of his publications (Tolerant Unique?), and could be cited if so; otherwise it should be removed. I think I copied a lot of this page from implementor-targetted material I had from proposing Unique Mask at Dyalog, so it's not all the best presentation for a wiki. --Marshall (talk) 18:26, 29 June 2023 (UTC)
Ah. So, ok, that explains the 1/⊢… but why do index-in-nub before doing ⍳⍤≢=⍳⍨? why not just the naive (⍳⍤≢=⍳⍨)⍤(1/⊢)?" ⊂⍺m (talk)
Compare results on 3+⎕CT×⍳10: the value indicated by ⍳⍤≢=⍳⍨ doesn't match all argument elements, so it can't be said to reduce the entire argument to unique values. There's a short section on this for Unique. --Marshall (talk) 14:13, 21 July 2023 (UTC)