Example #1
0
def ihs(num_points, num_dim, seed=None, duplication=5):
    """
    Generate the improved distributed hypercube sequence.

    Parameters
    ----------
    num_points  :   int
                    The number of points to be generated.
    num_dim     :   int
                    The number of dimensions.
    seed        :   int
                    A seed for the random number generator.
    duplication :   int
                    See ihs.f90.

    Returns
    -------
    points      :   (num_points, num_dim) ndarray
                    The first num_points of the num_dim-dimensional.

    """
    if seed is None:
        seed = design.get_seed()
    return design.ihs(num_dim, num_points, seed=seed,
                      duplication=duplication).T
def ihs(num_points, num_dim, seed=None, duplication=5):
    """
    Generate the improved distributed hypercube sequence.

    Parameters
    ----------
    num_points  :   int
                    The number of points to be generated.
    num_dim     :   int
                    The number of dimensions.
    seed        :   int
                    A seed for the random number generator.
    duplication :   int
                    See ihs.f90.

    Returns
    -------
    points      :   (num_points, num_dim) ndarray
                    The first num_points of the num_dim-dimensional.

    """
    if seed is None:
        seed = design.get_seed()
    return design.ihs(num_dim, num_points, seed=seed,
                      duplication=duplication).T
Example #3
0
def _check_args(num_points, num_dim, seed):
    """Check if the arguments to the latin_*() functions are ok."""
    if seed is None:
        seed = design.get_seed()
    seed = int(seed)
    num_points = int(num_points)
    num_dim = int(num_dim)
    assert seed > 0
    assert num_points >= 1
    assert num_dim >= 1
    return num_points, num_dim, seed
def _check_args(num_points, num_dim, seed):
    """Check if the arguments to the latin_*() functions are ok."""
    if seed is None:
        seed = design.get_seed()
    seed = int(seed)
    num_points = int(num_points)
    num_dim = int(num_dim)
    assert seed > 0
    assert num_points >= 1
    assert num_dim >= 1
    return num_points, num_dim, seed