Skip to content

tuple_randTupleRandTupleRandtuple_randtuple_rand🔗

説明🔗

tuple_randTupleRandTupleRandtuple_randtuple_rand — 0 から 1 の間の乱数の tuple を返す。

書式🔗

tuple_rand( number Length, out number Rand )void TupleRand( const HTuple& Length, HTuple* Rand )static void HOperatorSet.TupleRand( HTuple length, out HTuple rand )def tuple_rand( length: int ) -> Sequence[float]

def tuple_rand_s( length: int ) -> floatHerror tuple_rand( const Hlong Length, double* Rand )

Herror T_tuple_rand( const Htuple Length, Htuple* Rand )

static HTuple HTuple::TupleRand( const HTuple& Length )

static HTuple HTuple.TupleRand( HTuple length )

説明🔗

オペレーター tuple_randTupleRand は、0 から 1 の区間に一様に分布し た乱数の tuple を返します。パラメーター Lengthlengthlength は、出力 tuple の長さを指定します。つまり、乱数をいくつ生成するかを指定しま す。

乱数はC 言語の関数”drand48()”を使用して生成されます。 使用する乱数シードについては、 set_systemSetSystem のパラメータ 'seed_rand'"seed_rand" を参照してください。

HDevelopインライン演算🔗

HDevelopは tuple_randTupleRand の代わりとなるインライン演算を備えており、以下の構文形式で使 用することができます::

Rand := rand(Length)

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

Lengthlengthlength (input_control) number → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

生成する tuple の長さ

Randrandrand (output_control) number(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

乱数の tuple

他のオペレーターとの組み合わせ🔗

組み合わせ

関連項目

tuple_gen_constTupleGenConst

モジュール🔗

Foundation