base.GoodLatticePoint

base.GoodLatticePoint(size, h=None, seed=None)

Good Lattice Point (GLP) Design

Parameters

Name Type Description Default
size tuple of ints Output shape of \((n,d)\), where n and d are the number of rows and columns, respectively required
h list of ints A generator vector used to multiply each row of the design. Each element in h must be smaller than and coprime to n None
seed typing.Optional[typing.Union[int, numpy.numpy.random.numpy.random.Generator]] If seedis an integer or None, a new numpy.random.Generator is created using np.random.default_rng(seed). If seed is already a `Generator instance, then the provided instance is used. Defaults to None. None

Returns

Type Description
numpy.numpy.ndarray Generated random \((n x d)\) Good lattice point set, where each column is a random permutation of \(\{0,1, \dots ,n-1 \}\)

Examples:

import pyLHD
pyLHD.GoodLatticePoint(size = (10,4))
array([[1, 3, 7, 9],
       [2, 6, 4, 8],
       [3, 9, 1, 7],
       [4, 2, 8, 6],
       [5, 5, 5, 5],
       [6, 8, 2, 4],
       [7, 1, 9, 3],
       [8, 4, 6, 2],
       [9, 7, 3, 1],
       [0, 0, 0, 0]])
pyLHD.GoodLatticePoint(size = (10,3),seed = 1)
array([[3, 1, 9],
       [6, 2, 8],
       [9, 3, 7],
       [2, 4, 6],
       [5, 5, 5],
       [8, 6, 4],
       [1, 7, 3],
       [4, 8, 2],
       [7, 9, 1],
       [0, 0, 0]])