Main Content

scramble

準乱数点集合をスクランブル

説明

ps = scramble(p,type) は、type で指定されたスクランブルのタイプを使用して作成した、点集合 p をスクランブルしたコピー ps を返します。点集合 phaltonset または sobolset オブジェクトであり、点集合のタイプによりサポートされるスクランブルのタイプが異なります。

スクランブルされた点集合 ps は、p と同じ種類のオブジェクトになります。

ps = scramble(p,'clear') は、スクランブルの設定を p から削除し、結果を ps に返します。

ps = scramble(p) は、既存のスクランブル設定を p に再適用します。スクランブル アルゴリズムにはランダム性があるので、通常は異なる点集合が生成されます。

すべて折りたたむ

3 次元のハルトン点集合を生成し、最初の 1000 個の値をスキップしてから、101 番目ごとの点を保持します。

p = haltonset(3,'Skip',1e3,'Leap',1e2)
p = 
Halton point set in 3 dimensions (89180190640991 points)

Properties:
              Skip : 1000
              Leap : 100
    ScrambleMethod : none

scramble を使用して、基数反転スクランブルを適用します。

p = scramble(p,'RR2')
p = 
Halton point set in 3 dimensions (89180190640991 points)

Properties:
              Skip : 1000
              Leap : 100
    ScrambleMethod : RR2

net を使用して、最初の 4 つの点を生成します。

X0 = net(p,4)
X0 = 4×3

    0.0928    0.6950    0.0029
    0.6958    0.2958    0.8269
    0.3013    0.6497    0.4141
    0.9087    0.7883    0.2166

かっこでインデックスを指定して、11 番目の点まで 3 つごとに点を生成します。

X = p(1:3:11,:)
X = 4×3

    0.0928    0.6950    0.0029
    0.9087    0.7883    0.2166
    0.3843    0.9840    0.9878
    0.6831    0.7357    0.7923

5 次元のソボル点集合を作成してスクランブルします。スクランブルのタイプとして 'MatousekAffineOwen' を指定します。

p = sobolset(5);
ps = scramble(p,'MatousekAffineOwen');

2 つの点集合における最初の 4 つの点を比較します。

X = net(p,4)
X = 4×5

         0         0         0         0         0
    0.5000    0.5000    0.5000    0.5000    0.5000
    0.2500    0.7500    0.2500    0.7500    0.2500
    0.7500    0.2500    0.7500    0.2500    0.7500

X2 = net(ps,4)
X2 = 4×5

    0.6681    0.2784    0.2476    0.5688    0.0513
    0.4485    0.6735    0.5417    0.3285    0.9719
    0.9940    0.9606    0.3515    0.1586    0.4742
    0.1550    0.1202    0.9226    0.9262    0.5491

'clear' オプションを使用して、スクランブル設定を ps から削除します。点集合 clearps は、元の点集合 p と一致します。

clearps = scramble(ps,'clear');
clearX = net(clearps,4)
clearX = 4×5

         0         0         0         0         0
    0.5000    0.5000    0.5000    0.5000    0.5000
    0.2500    0.7500    0.2500    0.7500    0.2500
    0.7500    0.2500    0.7500    0.2500    0.7500

他の入力引数を指定せずに、ps を関数 scramble に渡します。スクランブル設定が ps から削除され、再適用されます。スクランブル アルゴリズムにはランダム性があるので、新しいスクランブル点集合 newps は元のスクランブル点集合 ps と異なります。

newps = scramble(ps);
newX = net(newps,4)
newX = 4×5

    0.6882    0.6261    0.9298    0.3314    0.4169
    0.2442    0.1978    0.4307    0.6286    0.8666
    0.7827    0.2868    0.5172    0.8430    0.1261
    0.2772    0.8576    0.0164    0.1404    0.5905

入力引数

すべて折りたたむ

点集合。haltonset または sobolset オブジェクトを指定します。

例: sobolset(5)

スクランブルのタイプ。'RR2' または 'MatousekAffineOwen' を指定します。次の表に示されているように、サポートされるスクランブルのタイプは点集合によって異なります。

オブジェクトスクランブルのタイプ
haltonset

'RR2' — 基数反転を可能な限りすべての係数値に適用することによって駆動される累乗根逆係数の順列。スクランブルについては、[2] で説明します。

sobolset

'MatousekAffineOwen' — ランダム デジタル シフトと組み合わされたランダム線形スクランブル。スクランブルについては、[1]で説明します。

参照

[1] Hong, H. S., and F. J. Hickernell. “Algorithm 823: Implementing Scrambled Digital Sequences.” ACM Transactions on Mathematical Software. Vol. 29, No. 2, 2003, pp. 95–109.

[2] Kocis, L., and W. J. Whiten. “Computational Investigations of Low-Discrepancy Sequences.” ACM Transactions on Mathematical Software. Vol. 23, No. 2, 1997, pp. 266–294.

[3] Matousek, J. “On the L2-Discrepancy for Anchored Boxes.” Journal of Complexity. Vol. 14, No. 4, 1998, pp. 527–556.

バージョン履歴

R2008a で導入