CreateRandomValueGenerator

摘要

CreateRandomValueGenerator 函数用于创建随机数生成器。

说明

旧版本:

ArcGIS Pro 2.0 起不再支持 arcgis.rand()arcgis.rand() 函数主要用于支持通过计算值计算字段工具、随机数生成器环境设置以及 CreateRandomValueGenerator 函数创建随机值。应使用利用 Python random 模块的类似函数。

语法

CreateRandomValueGenerator (seed, distribution)
参数说明数据类型
seed

Initializes the random number generator.

Integer
distribution

Specifies the random generation algorithm that will be used.

  • ACM599The ACM collected algorithm 599 will be used.
  • MERSENNE_TWISTERThe Mersenne Twister mt19937 algorithm will be used.
  • STANDARD_CThe Standard C Rand algorithm will be used.

(默认值为 ACM599)

String
返回值
数据类型说明
Object

RandomNumberGenerator 对象。

相关主题