主要内容

haltonset

Halton Quasirandom点套件

描述

haltonsetis a quasirandom point set object that produces points from the Halton sequence. The Halton sequence uses different prime bases in each dimension to fill space in a highly uniform manner.

Creation

描述

p= haltonset(d)构造d-dimensional point setp,这是一个haltonset具有默认属性设置的对象。输入参数dcorresponds to theDimensionsproperty ofp

example

p= haltonset(d,名称,价值)sets特性p使用一个或多个名称值对参数。将每个属性名称包装在报价中。例如,haltonset(5,'leap',2)creates a five-dimensional point set from the first point, fourth point, seventh point, tenth point, and so on.

The returned objectpencapsulates properties of a Halton quasirandom sequence. The point set is finite, with a length determined by the跳过飞跃属性和限制点集索引的大小(最大值253)。每当您访问时就会生成点集值pusingor parenthesis indexing. Values are not stored withinp

Properties

展开全部

此属性仅阅读。

点集中点的尺寸数,指定为正整数标量。例如,点集中的每个点pwithp.dimensions = 5has five values.

Use thed输入参数以指定使用尺寸的数量haltonsetfunction.

Interval between points in the sequence, specified as a positive integer scalar. In other words, the飞跃property of a point set specifies the number of points in the sequence to leap over and omit for every point taken. The default飞跃value is 0, which corresponds to taking every point from the sequence.

跳跃是一种用于提高点集质量的技术。但是,您必须选择飞跃谨慎的价值。许多飞跃值创建的序列无法触及单位超立方体的大型亚hyper矩形,因此无法成为统一的quasirandom点集。有关更多信息,请参阅[1]

选择的一条规则飞跃Halton集的值是将值设置为(n–1), 在哪里nis a prime number that has not been used to generate one of the dimensions. For example, for ad- 维点集,指定(d+1)Th或更大的质量数字n

例子:p = haltonset(2,'Leap',4);(在哪里d = 2n = 5)

例子:p.Leap = 100;

Settings that control the scrambling of the sequence, specified as a structure with these fields:

  • 类型— A character vector containing the name of the scramble

  • Options— A cell array of parameter values for the scramble

Use the争夺object function to set scrambles. For a list of valid scramble types, see the类型输入参数争夺。An error occurs if you set an invalid scramble type for a given point set.

TheScramblemethod属性还接受一个空矩阵作为值。然后,该软件清除了所有争夺,并将属性设置为包含一个0x0结构体。

Number of initial points in the sequence to omit from the point set, specified as a positive integer scalar.

Initial points of a sequence sometimes exhibit undesirable properties. For example, the first point is often(0,0,0,...), which can cause the sequence to be unbalanced because the counterpart of the point,(1,1,1,...), never appears. Also, initial points often exhibit correlations among different dimensions, and these correlations disappear later in the sequence.

例子:p = haltonset(__,'skip',2e3);

例子:p.skip = 1e3;

此属性仅阅读。

quasirandom点设置的序列类型p是基于的,指定为'中断'

Object Functions

生成quasirandom点集
争夺 争夺quasirandom点集

您也可以使用以下MATLAB®功能haltonset目的。该软件将点集对象视为多维点的矩阵。

length 最大阵列尺寸的长度
size Array size

例子

全部收缩

生成一个三维的霍尔顿点集,跳过第一个1000个值,然后保留每101点。

p = haltonset(3,'跳过',1E3,'飞跃',1E2)
p = Halton point set in 3 dimensions (89180190640991 points) Properties: Skip : 1000 Leap : 100 ScrambleMethod : none

通过使用反radix争夺争夺

p = scramble(p,'rr2')
p = Halton point set in 3 dimensions (89180190640991 points) Properties: Skip : 1000 Leap : 100 ScrambleMethod : RR2

通过使用

X0 = net(p,4)
X0 =4×30.0928 0.6950 0.0029 0.6958 0.2958 0.8269 0.3013 0.6497 0.4141 0.9087 0.7883 0.2166

使用括号索引,生成每三个点,直到第十一点。

x = p(1:3:11,:)
X =4×30.0928 0.6950 0.0029 0.9087 0.7883 0.2166 0.3843 0.9840 0.9878 0.6831 0.7357 0.7923

提示

  • The跳过飞跃特性are useful for parallel applications. For example, if you have a Parallel Computing Toolbox™ license, you can partition a sequence of points acrossN使用该功能不同的工人labindex(Parallel Computing Toolbox)。On eachnth worker, set the跳过property of the point set ton- 1和the飞跃property toN- 1。The following code shows how to partition a sequence across three workers.

    nworkers = 3;p = haltonset(10,'飞跃',Nworkers-1);spmd(nworkers)p.skip = labindex -1;% Compute something using points 1,4,7...%或点2,5,8 ...或点3,6,9 ...end

算法

展开全部

参考

[1] Kocis,L。和W. J. Whiten。“低分配序列的计算研究。”ACM Transactions on Mathematical Software。卷。23,第2期,1997年,第266–294页。

Introduced in R2008a