Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
evalindets - transform all subexpressions of a given type
Calling Sequence
evalindets( expr, atype, transformer, rest )
evalindets[flat]( expr, atype, transformer, rest )
Parameters
expr
-
anything; any Maple expression
atype
type; any Maple type expression
transformer
anything; an expression (typically, a procedure) to be called on each subexpression processed
rest
anything; (optional) expression sequence of extra arguments to be passed to transformer
Description
The command evalindets is a particular combination of calls to eval and indets that allows you to efficiently transform all subexpressions of a given type by some algorithm. It encapsulates a common "pattern" used in expression manipulation and transformation.
Each subexpression of type atype is transformed by the supplied transformer procedure to produce a "replacement" for it. Then, each subexpression is replaced in the original expression using eval with the corresponding transformed expression.
The flat option indicates that the subexpressions of expr of type atype are not nested. This provides a hint to Maple that it can use a somewhat faster algorithm in this special case. If the flat option is passed and nesting occurs, unexpected results may be be produced.
Examples
This example changes every call to to a call to .
Shift all symbols by a constant of .
Expand all products in an expression.
Using evalindets, you can avoid expanding things you might not want expanded.
Optional arguments may be passed to the transformer.
See Also
eval, frontend, indets, subs, subsindets, type
Download Help Document