Hacker News new | ask | show | jobs
by climech 1900 days ago
>prevents diamond shapes

Pretty much this, unless I'm missing something. An earlier version of the program actually used DAGs, but I found it a little underconstrained. I got pretty excited when I discovered multitrees, as it seemed to be exactly what I needed the whole time.

1 comments

Why is the no diamond constraint useful here?
Without it, the structure allowed the user to create a graph like this:

    [x] Task
     ├──[x] Sub-task (1)
     │   ├──[x] Sub-sub-task (2)
     │   └──[x] Sub-sub-task
     ├──[x] Sub-task (3)
     │   ├──[x] Sub-sub-task (2)
     │   └──[x] Sub-sub-task
     └──[x] Sub-task
by creating a link from (3) to (2). The tree command would actually omit the second occurrence of (2), since the algorithm visited each node just once.