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
StringTools[Permute] - apply a given permutation to a string
Calling Sequence
Permute( s, perm )
Parameters
s
-
Maple string
perm
list of integers; permutation of 1 .. length(s)
Description
The Permute(s, perm) command applies a given permutation perm to the string s.
The permutation perm must be a permutation of the integer , given as a list.
Examples
Error, (in StringTools:-Permute) [2, 1, 4, 3] is not a permutation of 1 .. 3
Error, (in StringTools:-Permute) [2, 3, 3] is not a permutation of 1 .. 3
Using combinat[permute] you can construct all permutations of a string.
AllPermutations := proc( s::string ) local p; seq( StringTools:-Permute( s, p ), p = combinat[ 'permute' ]( length( s ) ) ) end proc:
See Also
string, StringTools
Download Help Document