3 ms·
Trees are not graphs. You have to un-circularize your objects before stringifying.
by wruza 8y ago
Trees are not graphs. You have to un-circularize your objects before stringifying.
- chc 8y agoIt's true that you need to remove cycles before you can create a tree, but acyclic graphs are still graphs (and most relevantly they're probably the kind of graph you want your config to be). And YAML actually can contain cycles, so even if you only want to consider cyclic graphs, YAML still qualifies.
- wruza 8y agoYes, that’s what I meant.
- user5994461 8y agoTrees are always graphs. A tree is a an acyclic graph with a node designated as root.
- frutiger 8y agoYou can have unrooted trees. See the second paragraph at https://en.wikipedia.org/wiki/Tree_(graph_theory)#Rooted_tree https://en.wikipedia.org/wiki/Tree_(graph_theory)#Rooted_tre....