Add function to generate paths

master
loooph 2023-02-22 19:25:33 +01:00
parent 7b3dffc6ad
commit 94d7472c03
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ instrument g e
--
-- complete graph
k n = buildG (1,n) [(u,v)|u <- [1..n],v <- [1..n]]
-- 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]]
-- TODO Tiefe
-- TODO Wurzel betonen