FixedPointGraph
is a nice simplification. It wasn’t clear to me if duplicating branches was desired. Using
inverseCollatz
with
NestTree
results in duplicated branches:
In[]:=
NestTree[inverseCollatz,1,10]
Out[]=
In[]:=
NestTree[anticollatz,1,10]
Out[]=
It makes no difference in
NestGraph
since vertex names are unique in a
Graph
object, unlike the data in
Tree
object:
In[]:=
NestGraph[anticollatz,1,10]===EdgeDelete[NestGraph[inverseCollatz,1,10],21]
Out[]=
True
NestTreeInteractive uses a
Button
in
TreeElementShapeFunction
similar to how you use
EventHandler
inside
VertexShapeFunction
. Unfortunately,
NestTreeInteractive
resets when the notebook is closed because of a dynamic scoping issue I haven’t found a solution for.