next up previous contents
Next: Finding elementary components in Up: Utilities procedures of ALIAS-Maple Previous: Mathematical functions in an   Contents

Ordering a list of variables

The procedure Sort_Variable sort a list of variable in decreasing order according to the number of occurrences of the variable in a given expression. This list may be used as the argument of the Maple procedure convert,horner to convert an expression into a form that is more convenient for interval evaluation. For example consider the expression $x^2+x+y*x$: by using the procedure we get the sorted list [x,y] and

leads to $(1 + y + x) x$ while
leads to $(1 + x) x + y x$ which is less efficient. The number of occurrences of a variable may be found in the global variable ALIAS_OCCURENCES.

Jean-Pierre Merlet 2012-12-20