Category:Non parametric generators

From Rosetta Code

A non-parametric generator is an executable entity, function or procedure that contains code that yields a single generation of values from a sequence. Each time a generator is invoked, the next value in the sequence is provided.

Generators are often used in situations where a sequence is potentially infinite, and where it is possible to construct the next value of the sequence with only minimal state.

Examples of generator applications include:

  • Generation of mathematical sequences
  • Generation of unique invoice or ticket numbers
  • Random and pseudorandom number generators

Note that non-parametric generators do not require a parameter to return the next value in sequence. However, there may be a reset mechanism that causes the generator to start again from the beginning of the sequence when next invoked.

Pages in category "Non parametric generators"

This category contains only the following page.