Open kcrisman opened 4 years ago
Are you looking for the following?
sage: T = BinaryTrees(15).random_element()
sage: T.to_undirected_graph().show(vertex_labels=False, vertex_size=0, layout='tree', tree_root=0)
Launched png viewer for Graphics object consisting of 15 graphics primitives
Yes, something like that. But for some reason not every tree from the combinat had this in the tab-completion.
sage: R = RootedTree([[], [[]]])
sage: R.to_undirected_graph()
---------------------------------------------------------------------------
...
AttributeError: 'RootedTrees_all_with_category.element_class' object has no attribute 'to_undirected_graph'
Since I was looking for a rooted tree, this seemed like something to try ...
Anyway, I'm not necessarily suggesting this is an actual code thing, maybe documentation. Then again, I don't see why a tree couldn't be a tree.
We could have a true tree backend in graphs with implementation of dedicated algorithms and connected to trees in combinat. We already have BipartiteGraph
...
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
As far as I can tell, there is not much connection between the various sage-combinant trees and the "graph theory" ones. E.g. I couldn't figure out how to get
from the combinatorial ones.
This might just be missing documentation, or an enhancement request to connect them more.
CC: @hivert @fchapoton
Component: graph theory
Issue created by migration from https://trac.sagemath.org/ticket/29270