| 1 | <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 | <title>Permutation: Permute part...</title> |
| 3 | <style> |
| 4 | td { padding-left: 5pt; padding-right: 5pt; } |
| 5 | th { padding-left: 5pt; padding-right: 5pt; } |
| 6 | code { white-space: pre-wrap; } |
| 7 | dd { white-space: pre-wrap; } |
| 8 | </style> |
| 9 | </head><body bgcolor="#FFFFFF"> |
| 10 | |
| 11 | <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b> |
| 12 | Permutation: Permute part... |
| 13 | </b></font></table></table> |
| 14 | <p>A command to create a new <a href="Permutation.html">Permutation</a> which is a copy of the first selected Permutation but with a part that has been permuted according to a specification given by the second one.</p> |
| 15 | <h2>Settings</h2> |
| 16 | <dl> |
| 17 | <dt><b>Start index</b> |
| 18 | <dd>the position in the first selected Permutation where the modification by the second one should start.</dd> |
| 19 | </dl> |
| 20 | <h2>Examples</h2> |
| 21 | <p>Suppose the first permutation p1 is (1,2,3,4,5,6,7,8,9,10,11) and the second one p2 is (2,3,5,1,4).</p> |
| 22 | <p>1. With <b>Start index</b> set to 1, the newly generated permutation p3 will be ((2,3,5,1,4), 6,7,8,9,10,11). The new p3 will have the same number of elements as p1. The permutation p2 which has 5 elements starts to operate at the first element and will stop after the fifth element. The first five elements in p3 will therefore equal the permuted first five elements of p1, while the last 6 elements of p3 will be a copy of those in p1.</p> |
| 23 | <p>2. With <b>Start index</b> set to 6, the newly generated permutation will be (1,2,3,4,5, (7,8,10,6,9), 11).</p> |
| 24 | <hr> |
| 25 | <address> |
| 26 | <p>© djmw 20220929</p> |
| 27 | </address> |
| 28 | </body> |
| 29 | </html> |