| 1 |
<html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 |
<title>Index: To Permutation...</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 |
Index: To Permutation... |
| 13 |
</b></font></table></table> |
| 14 |
<p>Generates a <a href="Permutation.html">Permutation</a> from the selected <a href="Index.html">Index</a> by randomly permuting blocks of equivalent elements.</p> |
| 15 |
<p>Suppose your data consists of groups of equivalent elements and the number of elements in the groups are not equal. You want to make random ordering of your data such that the elements in a group stay together. The following example shows you how.</p> |
| 16 |
<h2>Setting</h2> |
| 17 |
<dl> |
| 18 |
<dt><b>Permute within classes</b> |
| 19 |
<dd>determines whether the elements within a class will be randomly permuted.</dd> |
| 20 |
</dl> |
| 21 |
<h2>Example</h2> |
| 22 |
<p>Suppose your data, for example a <a href="Strings.html">Strings</a>, consists of groups of equivalent elements and the number of elements in the groups are not equal. You want to make a random ordering of your data such that the elements in a group stay together. The following example shows you how.</p> |
| 23 |
<p>We start from the following Strings:</p> |
| 24 |
<code> 6 (number of strings)<br></code> |
| 25 |
<code> "hallo"<br></code> |
| 26 |
<code> "dag allemaal"<br></code> |
| 27 |
<code> "hallo"<br></code> |
| 28 |
<code> "tot morgen"<br></code> |
| 29 |
<code> "hallo"<br></code> |
| 30 |
<code> "tot morgen"<br></code> |
| 31 |
<p>We choose <a href="Strings__To_Index.html">To Index</a> which will give us the following <b>Index</b>:</p> |
| 32 |
<code> 1 (number of columns) "" (no column name)<br></code> |
| 33 |
<code> "dag allemaal"<br></code> |
| 34 |
<code> "hallo"<br></code> |
| 35 |
<code> "tot morgen"<br></code> |
| 36 |
<code> 6 (number of elements)<br></code> |
| 37 |
<code> 2<br></code> |
| 38 |
<code> 1<br></code> |
| 39 |
<code> 2<br></code> |
| 40 |
<code> 3<br></code> |
| 41 |
<code> 2<br></code> |
| 42 |
<code> 3<br></code> |
| 43 |
<p>We choose <b>To Permutation</b> and with <b>Permute within classes</b> <i>off</i>, this might generate the permutation (2,4,6,1,3,5).</p> |
| 44 |
<p>Selecting the Permutation and the Strings together and choosing <a href="Strings___Permutation__Permute_strings.html">Permute strings</a> will generate the following Strings:</p> |
| 45 |
<code> "dag allemaal"<br></code> |
| 46 |
<code> "tot morgen"<br></code> |
| 47 |
<code> "tot morgen"<br></code> |
| 48 |
<code> "hallo"<br></code> |
| 49 |
<code> "hallo"<br></code> |
| 50 |
<code> "hallo"<br></code> |
| 51 |
<p>We see that the permutation always keeps identical strings together.</p> |
| 52 |
<hr> |
| 53 |
<address> |
| 54 |
<p>© djmw 20050725</p> |
| 55 |
</address> |
| 56 |
</body> |
| 57 |
</html> |