diff --git a/dfs.tidal b/dfs.tidal index bada178..3930be1 100644 --- a/dfs.tidal +++ b/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