Skip to content

Latest commit

 

History

History
66 lines (40 loc) · 1.74 KB

collections.rst

File metadata and controls

66 lines (40 loc) · 1.74 KB

Collection generators =================

Collection-oriented Generators produce arrays conforming to different constraints depending on the mathematical definition the reproduce. All these Generators require as an input one or more Generators to be used to produce single elements.

Associative arrays

Associative arrays can be generated composing other generators for each of the keys of the desired array, which will contain the specified fixed set of keys and vary the values.

../../examples/AssociativeArrayTest.php

Sequences

Sequences are defined as numeric arrays with a variable amount of elements of a single type. Both the length of the array and its values will be randomly generated.

../../examples/SequenceTest.php

Vectors

Vectors are defined as numeric arrays with a fixed amount of elements of a single type. Only the values contained will be randomly generated.

As an example, consider vectors inside a fixed space such as the set of 2D or 3D points.

../../examples/VectorTest.php

Tuples

Tuples are defined as a small array of fixed size, consiting of a few heteregeneous types.

../../examples/TupleTest.php

Sets

Sets are defined as array with a variable amount of elements of a single type, without any repeated element.

../../examples/SetTest.php

Subsets ----

Subsets are set whose elements are extracted from a fixed universe set, specified as an input.

../../examples/SubsetTest.php