让我们更深入地了解这个过程。随机选择是故事中数学上更难的部分(与教练本人相比,合规性将使滑冰场以外领域的问题更加复杂(参考下文))。
所以,让我们接受团队设置是一个静态地图,其中玩家的序号映射到F_line{1..3,1..3}, D_line{1..2,1..2}, G, Rest{1..7}
use Random;
var aRandomTEAM = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ]; // a known, contiguous ENUM of <anonymised_HASH_ID#s>
permutation( aRandomTEAM ); // a known, static MAP of aRandomTEAM -> F_line{1..3}, D_line1{1..2}, G, Rest
for id in {1..13}{
writeln( " a Static MAP position of TEAM[",
id, "]: will be played by anonymised_HASH_ID#( ",
aRandomTEAM[id], " )"
);
}
对于人类可读的检查,这会产生:
a Static MAP position of TEAM[1]: will be played by anonymised_HASH_ID#( 20 )
a Static MAP position of TEAM[2]: will be played by anonymised_HASH_ID#( 5 )
a Static MAP position of TEAM[3]: will be played by anonymised_HASH_ID#( 11 )
a Static MAP position of TEAM[4]: will be played by anonymised_HASH_ID#( 4 )
a Static MAP position of TEAM[5]: will be played by anonymised_HASH_ID#( 15 )
a Static MAP position of TEAM[6]: will be played by anonymised_HASH_ID#( 7 )
a Static MAP position of TEAM[7]: will be played by anonymised_HASH_ID#( 16 )
a Static MAP position of TEAM[8]: will be played by anonymised_HASH_ID#( 12 )
a Static MAP position of TEAM[9]: will be played by anonymised_HASH_ID#( 8 )
a Static MAP position of TEAM[10]: will be played by anonymised_HASH_ID#( 18 )
a Static MAP position of TEAM[11]: will be played by anonymised_HASH_ID#( 19 )
a Static MAP position of TEAM[12]: will be played by anonymised_HASH_ID#( 17 )
a Static MAP position of TEAM[13]: will be played by anonymised_HASH_ID#( 3 )
但是,机器可读的后处理可以将这些映射到请求的数组上,保持敏感的个人详细信息安全和分开,将 GUID#-reference 链接到名称和所有其他详细信息的安全。参照完整性既便宜又安全,并且从(有意)连续序数到代理匿名哈希表的静态唯一关联映射的实现是微不足道的(参考 Opaque Domains and Arrays 以获得可能的进一步启发)。
法律警告:
如果在受监管的领域中使用随机化,则应采取适当的谨慎措施,其中必须记录合规性并执行和验证方法稳健性的积极证据。
文档可能会提供有关在某些法律要求严格的领域中使用当前随机化实现的已知风险的更多详细信息:
置换线性同余随机数生成器
该模块提供 PCG 随机数生成例程。请参阅http://www.pcg-random.org/和论文,PCG:ME O'Neill 的一系列简单快速空间高效的随机数生成统计良好算法。
应该特别注意一些已知的潜在限制,例如:
笔记
对于整数,此类使用一种策略来生成特定范围内的值,该值尚未经过严格研究并且可能存在统计问题。
对于实数,此类通过计算 [0,1] 中的随机值并缩放和移动该值来生成 [max, min] 中的随机值。请注意,并非区间 [min, max] 中所有可能的浮点值都可以以这种方式构造。
此类言论应始终引起合规官的应有注意,以便在其预期的(受监管的)问题域强制性实践和受控环境的要求内仔细预先验证使用的可行性。