Generator Members

The Generator type exposes the following members.

Methods


  Name Description
Public method Static member Aggregate<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Func<(Of <<'(TSource, TSource, TSource>)>>), TSource)
Makes a generator that generates a running aggregate of the source generator.
Public method Static member Aggregate<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Func<(Of <<'(TSource, TSource, TSource>)>>))
Makes a generator that generates a running aggregate of the source generator.
Public method Static member Aggregate<(Of <<'(TSource, TResult>)>>)(IGenerator<(Of <<'(TSource>)>>), Func<(Of <<'(TResult, TSource, TResult>)>>), TResult)
Makes a generator that generates a running aggregate of the source generator.
Public method Static member Apply<(Of <<'(TSource>)>>)
Makes a generator that applies a function on the elements it generates.
Public method Static member Average(IGenerator<(Of <<'(Single>)>>))
Makes a generator the will generate the average of elements generated by another generator.
Public method Static member Average(IGenerator<(Of <<'(Int32>)>>))
Makes a generator the will generate the average of elements generated by another generator.
Public method Static member Cast<(Of <<'(TResult>)>>)
Makes a generator that will generate elements by casting the elements of a source generator.
Public method Static member Choose<(Of <<'(TSource>)>>)(IList<(Of <<'(TSource>)>>), IGenerator<(Of <<'(Int32>)>>))
Makes a generator that chooses elements from a list using an index generator.
Public method Static member Choose<(Of <<'(TSource>)>>)(IList<(Of <<'(IGenerator<(Of <<'(TSource>)>>)>)>>), IGenerator<(Of <<'(Int32>)>>))
Makes a generator that uses an index generator to choose a generator to generate an element from.
Public method Static member ChooseUniformRandom<(Of <<'(TSource>)>>)(IList<(Of <<'(TSource>)>>))
Make a generator that randomly generates elements from a list.
Public method Static member ChooseUniformRandom<(Of <<'(TSource>)>>)(IList<(Of <<'(TSource>)>>), Int32)
Make a generator that randomly generates elements from a list. Can be seeded.
Public method Static member ChooseUniformRandom<(Of <<'(TSource>)>>)(IList<(Of <<'(IGenerator<(Of <<'(TSource>)>>)>)>>))
Makes a generator that selects a random generator from a given element to generate an element from.
Public method Static member ChooseUniformRandom<(Of <<'(TSource>)>>)(array<IGenerator<(Of <<'(TSource>)>>)>[]()[][]) Obsolete.
Chooses the from the given generators selected uniform randomly.
Public method Static member ChooseUniformRandom<(Of <<'(TSource>)>>)(IList<(Of <<'(IGenerator<(Of <<'(TSource>)>>)>)>>), Int32)
Chooses the random.
Public method Static member ClosedSawTooth
Makes a generator that produces evenly spaced floats from 0 to 1, both limits included, and repeats the result.
Public method Static member Combine<(Of <<'(TSource, TResult>)>>)(IEnumerable<(Of <<'(IGenerator<(Of <<'(TSource>)>>)>)>>), Func<(Of <<'(IList<(Of <<'(TSource>)>>), TResult>)>>))
Makes a generator that combines the elements of specified generators.
Public method Static member Combine<(Of <<'(T1, T2, TResult>)>>)(IGenerator<(Of <<'(T1>)>>), IGenerator<(Of <<'(T2>)>>), Func<(Of <<'(T1, T2, TResult>)>>))
Combines the specified generators by applying a result selector function to the elements of each generator.
Public method Static member Combine<(Of <<'(T1, T2, T3, TResult>)>>)(IGenerator<(Of <<'(T1>)>>), IGenerator<(Of <<'(T2>)>>), IGenerator<(Of <<'(T3>)>>), Func<(Of <<'(T1, T2, T3, TResult>)>>))
Combines the specified generators by applying a result selector function to the elements of each generator.
Public method Static member Combine<(Of <<'(T1, T2, T3, T4, TResult>)>>)(IGenerator<(Of <<'(T1>)>>), IGenerator<(Of <<'(T2>)>>), IGenerator<(Of <<'(T3>)>>), IGenerator<(Of <<'(T4>)>>), Func<(Of <<'(T1, T2, T3, T4, TResult>)>>))
Combines the specified generators by applying a result selector function to the elements of each generator.
Public method Static member Constant<(Of <<'(TSource>)>>)
Makes a generator that generates a the same item each time.
Public method Static member Count
Makes a generator that generates consecutive integers starting from zero up to a limit, and repeats the cycle.
Public method Static member Dither
Takes the source generator's output, and generate a dithered sequence of integers in the range 0 to levels - 1. Uses error diffusion.
Public method Static member FrequencyRandomInt(IEnumerable<(Of <<'(Single>)>>))
Generates random integers at relative frequencies provided.
Public method Static member FrequencyRandomInt(IEnumerable<(Of <<'(Single>)>>), Int32)
Generates random integers at relative frequencies provided.
Public method Static member FromFunc<(Of <<'(TResult>)>>)
Makes a new generator from a generator function.
Public method Static member GaussianRandomFloat
Makes a generator that generates floats with a Gaussian distribution.
Public method Static member Group<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), IGenerator<(Of <<'(Int32>)>>))
Makes a generator that generates groups of items from the source generator.
Public method Static member Group<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Int32)
Makes a generator that returns groups of elements from the source generator.
Public method Static member Interleave<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), array<IGenerator<(Of <<'(TSource>)>>)>[]()[][])
Makes a generator that interleaves the elements of the specified generators.
Public method Static member Interleave<(Of <<'(TSource>)>>)(IList<(Of <<'(IGenerator<(Of <<'(TSource>)>>)>)>>))
Makes a generator that interleaves the elements of the specified generators.
Public method Static member Interpolate<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Int32, Func<(Of <<'(TSource, TSource, Single, TSource>)>>))
Makes a generator that interpolates between values of a given generator.
Public method Static member Interpolate<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), IGenerator<(Of <<'(Int32>)>>), Func<(Of <<'(TSource, TSource, Single, TSource>)>>))
Makes a generator that interpolates between values of a given generator.
Public method Static member InterpolateDither<(Of <<'(TSource>)>>)
Interpolates a sequence, but applies dithering.
Public method Static member Iterate<(Of <<'(TSource>)>>)(TSource, Func<(Of <<'(TSource, TSource>)>>))
Makes a generator that returns iterations of the specified initial element.
Public method Static member Iterate<(Of <<'(TSource>)>>)(TSource, TSource, Func<(Of <<'(TSource, TSource, TSource>)>>))
Makes a generator that uses an iterator function to generate elements.
Public method Static member Iterate<(Of <<'(TSource>)>>)(TSource, TSource, TSource, Func<(Of <<'(TSource, TSource, TSource, TSource>)>>))
Makes a generator that uses an iterator function to generate elements.
Public method Static member Iterate<(Of <<'(TSource>)>>)(TSource, TSource, TSource, TSource, Func<(Of <<'(TSource, TSource, TSource, TSource, TSource>)>>))
Makes a generator that uses an iterator function to generate elements.
Public method Static member Iterate<(Of <<'(TSource>)>>)(IEnumerable<(Of <<'(TSource>)>>), Func<(Of <<'(IList<(Of <<'(TSource>)>>), TSource>)>>))
Makes a generator that uses an iterator function to generate elements.
Public method Static member Iterate<(Of <<'(TSource, TSource2>)>>)(TSource, IGenerator<(Of <<'(TSource2>)>>), Func<(Of <<'(TSource, TSource2, TSource>)>>))
Applies a function on the last element to produce the next element. The function takes twp parameters; the second parameter is supplied by a generator.
Public method Static member Log<(Of <<'(TSource>)>>)
A generator that generates the elements of the source generator, but applies a log function to each element as it is generated.
Public method Static member MarkovRandomInt(array<Single,2>[,](,)[,][,])
Generates a Markov chain of integers from a transition table.
Public method Static member MarkovRandomInt(array<Single,2>[,](,)[,][,], Int32)
Generates a Markov chain of integers from a transition table.
Public method Static member MarkovRandomIntStartsWith(array<Single,2>[,](,)[,][,], Int32)
Makes a Markov generator that starts with the given value.
Public method Static member MarkovRandomIntStartsWith(array<Single,2>[,](,)[,][,], Int32, Int32)
Makes a Markov generator that starts with the given value.
Public method Static member MoveNext<(Of <<'(TSource>)>>)
Moves the generator by a specified amount forward.
Public method Static member Next<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>))
Returns the next element of the specified generator.
Public method Static member Next<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Int32)
Returns a list of the next n items from the generator.
Public method Static member NextWhile<(Of <<'(TSource>)>>)
Generates the elements from the generator while the predicate applied to elements hold an return them in an enumerable. After calling this method, the next element returned by Next (or the current value of Current) will not satisfy the predicate.
Public method Static member OfType<(Of <<'(TResult>)>>)
Makes a generator that will generate elements of a source generator that is of the given type.
Public method Static member OpenSawTooth(Int32)
Makes a generator that produces evenly spaced floats from 0 (included) to 1 (excluded), and repeats the result.
Public method Static member OpenSawTooth(IGenerator<(Of <<'(Int32>)>>))
Makes a generator that produces evenly spaced floats from 0 (included) to 1 (excluded), and repeats the result (but with the number of samples each time given by a generator).
Public method Static member Pad<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), IEnumerable<(Of <<'(TSource>)>>))
Pads the specified generator with elements from a given list.
Public method Static member Pad<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), TSource, Int32)
Pads the specified generator with a constant element repeated a specified number of times.
Public method Static member RandomBoolGenerator(Single)
Makes a generator that returns random boolean values, true with the specified probability.
Public method Static member RandomBoolGenerator(Single, Int32)
Makes a generator that returns random boolean values, true with the specified probability.
Public method Static member Repeat<(Of <<'(TSource>)>>)
Makes a generator that repeats elements of the given list over and over.
Public method Static member RepeatEach<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), IGenerator<(Of <<'(Int32>)>>))
Makes a new generator that will repeat each of the given generators elements a number of times.
Public method Static member RepeatEach<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Int32)
Makes a new generator that will repeat each of the given generators elements a number of times.
Public method Static member Select<(Of <<'(TResult>)>>)(IGenerator<(Of <<'(Single>)>>), ResponseCurveBase<(Of <<'(TResult>)>>))
Makes a new generator by transforming the elements of a given float generator using a response curve.
Public method Static member Select<(Of <<'(TSource, TResult>)>>)(IGenerator<(Of <<'(TSource>)>>), Func<(Of <<'(TSource, TResult>)>>))
Makes a generator which generates items that are transformed, generated from a given generator.
Public method Static member SelectMany<(Of <<'(TSource, TResult>)>>)
For each item in the source generator, a list of items is generated, but the items are generated one by one (and not as a list of items).
Public method Static member Skip<(Of <<'(TSource>)>>)
Makes a generator that skips over the specified number of elements from the source generator.
Public method Static member SkipAndTake<(Of <<'(TSource>)>>)
Makes a generator that repeatedly skips over and takes elements from a given generator.
Public method Static member Sum(IGenerator<(Of <<'(Single>)>>))
Makes a generator that will generate partial sums of a given generator.
Public method Static member Sum(IGenerator<(Of <<'(Int32>)>>))
Makes a generator that will generate partial sums of a given generator.
Public method Static member SwitchAfter<(Of <<'(TSource>)>>)
Generates elements from a source generator for the given number of steps, then switches to a second generator.
Public method Static member SwitchWhen<(Of <<'(TSource>)>>)
Generates elements from the source generator until a condition is met, then generate elements from a second generator.
Public method Static member TakeAndSkip<(Of <<'(TSource>)>>)
Makes a generator that repeatedly takes and skips over elements from a given generator.
Public method Static member UniformRandomFloat()()()()
Makes a generator hat generates floats uniformly between 0 and 1.
Public method Static member UniformRandomFloat(Int32)
Makes a generator that generates floats uniformly between 0 and 1.
Public method Static member UniformRandomInt(Int32)
Makes a generator hat generates integers uniformly distributed between 0 (included) and the specified limit (excluded).
Public method Static member UniformRandomInt(Int32, Int32)
Makes a generator hat generates integers uniformly distributed between 0 (included) and the specified limit (excluded).
Public method Static member UniformVector2InCircle
Generates vectors uniformly distributed in a given circle.
Public method Static member UniformVector2InRect
Generates vectors uniformly distributed in a given rectangle.
Public method Static member Where<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), Func<(Of <<'(TSource, Boolean>)>>))
Makes a generator that will only generate elements that pass the predicate.
Public method Static member Where<(Of <<'(TSource>)>>)(IGenerator<(Of <<'(TSource>)>>), IGenerator<(Of <<'(Boolean>)>>))
Makes a generator that will only generate elements that pass the predicate generated by the predicate generator.
Public method Static member Where<(Of <<'(T>)>>)(IGenerator<(Of <<'(T>)>>), Func<(Of <<'(T, Boolean>)>>), Int32)
Makes a generator that will only generate elements that pass the predicate. If the source elements does not provide elements that pass the predicate for the given number of maximum iterations, an exception is thrown. This is to prevent a stalling the generator forever.
Public method Static member Where<(Of <<'(T>)>>)(IGenerator<(Of <<'(T>)>>), IGenerator<(Of <<'(Boolean>)>>), Int32)
Makes a generator that will only generate elements that pass the predicate generated by the predicate generator. If the source elements does not provide elements that pass the predicate for the given number of maximum iterations, an exception is thrown. This is to prevent a stalling the generator forever.
Public method Static member WhereWindow<(Of <<'(TSource>)>>)
Only generates an item if the window of the item passes the predicate.
Public method Static member Window<(Of <<'(TSource>)>>)
Makes a generator that generates a moving window of elements over a given generator.