Add p and k variants with offset
parent
d93f2b9c64
commit
43d12171d0
10
dfs.tidal
10
dfs.tidal
|
|
@ -73,11 +73,13 @@ instrument g e = case edgeType g e of
|
|||
L -> "sn"
|
||||
NE -> " " -- let super collider deal with it
|
||||
-- complete graph
|
||||
k n = buildG (1,n) [(u,v)|u <- [1..n],v <- [1..n]]
|
||||
k n = k' n 0
|
||||
-- complete graph with offset to all nodes
|
||||
k' n o = buildG (1+o,n+o) [(u,v)|u <- [1..n],v <- [1+o..n+o]]
|
||||
-- path
|
||||
p n = buildG (1,n) [(u,u+1)|u <- [1..n-1]]
|
||||
-- reversed path TODO function to reverse all edges for arbitary graphs
|
||||
p' n = buildG (1,n) [(u+1,u)|u <- [1..n-1]]
|
||||
p n = p' n 0
|
||||
-- path with offset to all nodes
|
||||
p' n o = buildG (1 + o, n + o) [(u,u + 1)|u <- [1+o..n-1+o]]
|
||||
|
||||
-- TODO Tiefe
|
||||
-- TODO Wurzel betonen
|
||||
|
|
|
|||
Loading…
Reference in New Issue