diff options
Diffstat (limited to 'docs/help/gradeup_binsup.html')
| -rw-r--r-- | docs/help/gradeup_binsup.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/help/gradeup_binsup.html b/docs/help/gradeup_binsup.html new file mode 100644 index 00000000..ef5ac4ba --- /dev/null +++ b/docs/help/gradeup_binsup.html @@ -0,0 +1,28 @@ +<head> + <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/> + <link href="../style.css" rel="stylesheet"/> + <title>BQN: Delta Stile (`⍋`)</title> +</head> +<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">help</a></div> +<h1 id="delta-stile-"><a class="header" href="#delta-stile-">Delta Stile (<code><span class='Function'>⍋</span></code>)</a></h1> +<h2 id="--grade-up"><a class="header" href="#--grade-up"><code><span class='Function'>⍋</span> <span class='Value'>𝕩</span></code>: Grade Up</a></h2> +<p>Indices of <code><span class='Value'>𝕩</span></code> that would sort its major cells in ascending order.</p> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgYSDihpAgM+KAvzLigL8xCgogICDijYsgYQoKICAgKOKNi2EpIOKKjyBh">↗️</a><pre> <span class='Value'>a</span> <span class='Gets'>←</span> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>1</span> + + <span class='Function'>⍋</span> <span class='Value'>a</span> +⟨ 2 1 0 ⟩ + + <span class='Paren'>(</span><span class='Function'>⍋</span><span class='Value'>a</span><span class='Paren'>)</span> <span class='Function'>⊏</span> <span class='Value'>a</span> +⟨ 1 2 3 ⟩ +</pre> +<h2 id="---bins-up"><a class="header" href="#---bins-up"><code><span class='Value'>𝕨</span> <span class='Function'>⍋</span> <span class='Value'>𝕩</span></code>: Bins Up</a></h2> +<p>Binary search for each element of <code><span class='Value'>𝕩</span></code> in <code><span class='Value'>𝕨</span></code>, and return the index found, if any.</p> +<h2 id="-must-be-sorted-in-ascending-order"><a class="header" href="#-must-be-sorted-in-ascending-order"><code><span class='Value'>𝕨</span></code> must be sorted in ascending order.</a></h2> +<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=ICAgM+KAvzTigL814oC/NyDijYsgMgoKICAgM+KAvzTigL814oC/NyDijYsgMuKAvzY=">↗️</a><pre> <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>5</span><span class='Ligature'>‿</span><span class='Number'>7</span> <span class='Function'>⍋</span> <span class='Number'>2</span> +┌· +· 0 + ┘ + + <span class='Number'>3</span><span class='Ligature'>‿</span><span class='Number'>4</span><span class='Ligature'>‿</span><span class='Number'>5</span><span class='Ligature'>‿</span><span class='Number'>7</span> <span class='Function'>⍋</span> <span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>6</span> +⟨ 0 3 ⟩ +</pre> |
