Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

Basic structural optimization of expressions
Author

Terry Robb
Organization: RMIT University
Department: Department of Mathematics
Revision date

2004-09-21
Description

Basic structural optimization of expressions.

A classic program written in Mathematica version 2, and still working unchanged in Mathematica version 5.

In 19 lines, the definition of the Optimize[expr_] function manages to use no less that 28 diverse Mathematica functions including: Append, Apply, Count, DeleteCases, Depth, Drop, First, Flatten, Fold, FoldList, Last, Length, Level, List, Literal, Map, MapIndexed, Partition, Position, ReplaceAll, Reverse, Rule, Select, Table, Take, Transpose, and Union.

All it all does something very useful.
Subject

*Mathematica Technology > Programming
Keywords

optimize, efficiency, compiling, optimization, expression, syntactic optimization, structural optimization
Downloads Download Wolfram CDF Player

Download
Optimize.m (7.4 KB) - Mathematica Package