Open slel opened 3 years ago
The complexity of a symbolic expression can be measured by the size of its expression tree.
We add a tree_size method to symbolic expressions to count the nodes of the expression tree.
tree_size
Requested at
In Maple and Mathematica this is called "leaf count", although it counts tree nodes, rather than only leaves.
Other measures of complexity of a symbolic expression:
CC: @slel
Component: symbolics
Keywords: expression, size, tree
Issue created by migration from https://trac.sagemath.org/ticket/32144
+1 for adding this
The complexity of a symbolic expression can be measured by the size of its expression tree.
We add a
tree_size
method to symbolic expressions to count the nodes of the expression tree.Requested at
In Maple and Mathematica this is called "leaf count", although it counts tree nodes, rather than only leaves.
Other measures of complexity of a symbolic expression:
CC: @slel
Component: symbolics
Keywords: expression, size, tree
Issue created by migration from https://trac.sagemath.org/ticket/32144