From 2295d19333458245e659fb37576b80d82e258a7b Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 8 Jun 2021 08:52:40 -0400 Subject: Group diagram layout tweaks --- doc/group.md | 27 +++++++++++++++------------ docs/doc/group.html | 29 +++++++++++++++-------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/doc/group.md b/doc/group.md index 946e7256..dac75506 100644 --- a/doc/group.md +++ b/doc/group.md @@ -16,11 +16,13 @@ dim ← 7‿7.3 sh ← 0.6‿0 rc ← At "class=code|stroke-width=1|rx=12" -g ← "g"At"text-anchor=middle|font-family=BQN,monospace" -tg ← "g"At"font-size=18px" -cg ← "g"At"text-anchor=end|font-size=16px" -lg ← "g"At"class=yellow|stroke-width=1" -bg ← "g"At"class=green|stroke-width=1|style=fill:none" +Ge ← "g"⊸At⊸Enc +g ← "text-anchor=middle|font-family=BQN,monospace" +dg ← "font-size=24px|text-anchor=start|fill=currentColor|opacity=0.9" +tg ← "font-size=18px" +cg ← "font-size=16px|text-anchor=end" +lg ← "class=yellow|stroke-width=2" +bg ← "class=green|stroke-width=1.5|style=fill:none" C ← (↕-2÷˜-⟜1)∘≠ zgp ← (2÷˜»⊸+-⊢´)+`0.6+≠¨zf @@ -28,20 +30,21 @@ zp ← zgp + C¨ zf Text ← ("text" Attr Pos)⊸Enc ty‿txf‿tt ← ⟨ - +`¯2.6‿1‿3‿1.5 + +`¯2.3‿1‿3‿1.3 ⟨C, C, ∾zp, zgp⟩ ⟨wf, xf, ∾zf, Num¨zi⟩ ⟩ tp ← (tx←txf{𝕎𝕩}¨tt)≍¨¨ty lp ← (∾wv⊸⊔)⊸(((0.2‿¯0.5×⌜0‿1)+≍)¨)´1‿2⊏tp -b ← (0.4⌈0.2+≠¨zf) {∾"M vhv"∾¨FmtNum (0‿1‿1‿0‿1⊏d)×(⟨𝕨÷¯2,¯2⟩+𝕩)∾⟨1,𝕨,¯1⟩}¨ 3⊑tp +b ← (0.4⌈0.2+≠¨zf) {∾"M vhv"∾¨FmtNum (0‿1‿1‿0‿1⊏d)×(⟨𝕨÷¯2,¯1.8⟩+𝕩)∾⟨1,𝕨,¯1⟩}¨ 3⊑tp -((∾˜d)×(¯2÷˜sh⊸+)⊸∾1‿0.2+dim) SVG g Enc ⟨ +((∾˜d)×(-⊸∾0‿0.6)+(¯2÷˜sh⊸+)⊸∾1‿0.2+dim) SVG g Ge ⟨ "rect" Elt rc ∾ (Pos -dim÷2)∾"width"‿"height"≍˘FmtNum d×dim-sh - tg Enc ∾tp Text¨○∾ tt - cg Enc ((¯0.8+⊑⊑tx)≍¨3↑ty) Text⟜Highlight¨ "𝕨"‿"𝕩"‿"𝕨⊔𝕩" - lg Enc (<"xy"≍⌜"12") ("line" Elt ≍˘○⥊)⟜(FmtNum d×⍉)¨ lp - bg Enc ("path" Elt "d"≍○<⊢)¨ b + dg Ge (¯1.2+⊑⊑tp) Text "Group" + tg Ge ∾tp Text¨○∾ tt + cg Ge ((¯0.8+⊑⊑tx)≍¨3↑ty) Text⟜Highlight¨ "𝕨"‿"𝕩"‿"𝕨⊔𝕩" + lg Ge (<"xy"≍⌜"12") ("line" Elt ≍˘○⥊)⟜(FmtNum d×⍉)¨ lp + bg Ge ("path" Elt "d"≍○<⊢)¨ b ⟩ --> diff --git a/docs/doc/group.html b/docs/doc/group.html index c4471132..37d5a5ed 100644 --- a/docs/doc/group.html +++ b/docs/doc/group.html @@ -6,24 +6,25 @@

Group

BQN replaces the Key operator from J or Dyalog APL, and many forms of partitioning, with a single (ambivalent) Group function . This function is somewhat related to the K function = of the same name, but results in an array rather than a dictionary.

- + - 0¯1¯120"zero""one""two""three""four""zero""four""three"012 - - 𝕨 - 𝕩 - 𝕨𝕩 + Group + 0¯1¯120"zero""one""two""three""four""zero""four""three"012 + + 𝕨 + 𝕩 + 𝕨𝕩 - - - - + + + + - - - - + + + + -- cgit v1.2.3