distribution#

Defines an abstract definition of Distribution.

class Distribution(*args, **kwargs)#

Bases: Protocol[T]

A Distribution presents a set of values a property can have.

Note

If no explicit way for sampling with the hypercube, the following code-snippet can probably be used: ``` exactness = 1000 vals = self.get_random_values(n * exactness) vals = np.sort(vals) return [

np.random.choice(vals[i:i+exactness ]) for i in range(0, len(vals), exactness)]

```

get_random_values(n: int) list[T]#

Samples a random value due to the type of Distribution.

Parameters:

n – The number of values.

get_samples_from_hypercube(n: int) list[T]#

Samples n values from a hypercube.

Parameters:

n – the number of samples.