Admin Production ni-theme
Current Publication

RichtmeyerSeq

LabWindows/CVI

RichtmeyerSeq

Advanced Analysis Library Only

AnalysisLibErrType RichtmeyerSeq (ssize_t numberOfElements, double seed, int initialize, double richtmeyerSequence[]);

Purpose

Generates an array containing a quasi-random Richtmeyer sequence, which is a low-discrepancy number sequence that uniformly distributes in the interval [0, 1].

Example Code

/* The following code generates an array containing a Richtmeyer sequence. */
double x[20];
int n;
n = 20;
RichtmeyerSeq (n, sqrt(17), TRUE, x);

Parameters

Input
Name Type Description
numberOfElements ssize_t The number of elements to generate in the Richtmeyer sequence.
seed double The seed value used to generate the random number.

seed must be an irrational number. If seed is negative, this function takes the absolute value.
initialize int Specifies whether to reseed the sequence generator. Specify a nonzero value or select Yes in the function panelto initialize the sequence generator according to the value of seed. Specify 0 or select No in the function panel to resume producing the sequence as a continuation of the previously generated sequence.
Output
Name Type Description
richtmeyerSequence double [] An output array containing the generated Richtmeyer sequence in the interval [0,1].

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 2012 and later