Skip to content

Commit

Permalink
shorten the transitive closure code
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos committed Mar 11, 2023
1 parent 68c916a commit ec5b5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/content/chapter3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -853,14 +853,14 @@ \section{Relations}
... (○← xd (⍴ \⍎ m))
... (○← yd (⍴ m))
... (↕¨
... ((< xd yd) (:(λ x (⍠ x \↑ (- yd xd) '(0))) m))
... ((> xd yd) (⍠ m (⍉↩ (- xd yd) (⌿.⍧ \↑ xd '(0)))))
... ((< xd yd) \:(λ x \⍠ x \↑ (- yd xd) '(0)) m)
... ((> xd yd) \⍠ m \⍉↩ (- xd yd) \⌿.⍧ \↑ xd '(0))
... ((= xd yd) m)))
--> ; Compute the transitive closure.
--> ⍥← transitive-closure x (○⊢¨
... (○← x (sqm (⍸¯¹ x)))
... (⍥← ∨○∧ m ($(⌿.← ∨)%[1] \⌼ ∧ m \⎕⍉ m))
... (⍸ (→≡ [∨ ∨○∧ #0] x)))
... (○← x \sqm \⍸¯¹ x)
... (⍥← ∨○∧ m \$(⌿.← ∨)%[1] \⌼ ∧ m \⎕⍉ m)
... (⍸ \→≡ [∨ ∨○∧ #0] x))
\end{Verbatim}

\section{Graphs}
Expand Down
Binary file modified doc/main.pdf
Binary file not shown.

0 comments on commit ec5b5b7

Please sign in to comment.