SolveTools
SortByComplexity
sort expressions by their complexity
Calling Sequence
Parameters
Description
Examples
SortByComplexity(exprs)
exprs
-
list or set of expressions
The SortByComplexity command sorts the list (or set) of expressions exprs in descending order of their complexity. The result is returned as a sorted list of expressions.
The complexity of the expressions are compared by using SolveTools[GreaterComplexity].
This function is part of the SolveTools package, and so it can be used in the form SortByComplexity(..) only after executing the command with(SolveTools). However, it can always be accessed through the long form of the command by using SolveTools[SortByComplexity](..).
with⁡SolveTools:
SortByComplexity⁡x,y,x⋅3y,exp⁡x
ⅇx,3⁢xy,x,y
SortByComplexity⁡a⁢b⁢RootOf⁡x2+1,sin⁡log⁡exp⁡x,x3+x2+5⁢x−1
sin⁡ln⁡ⅇx,a⁢b⁢RootOf⁡_Z2+1,x3+x2+5⁢x−1
See Also
SolveTools[Complexity]
SolveTools[GreaterComplexity]
Download Help Document