designs
Designs
¶
Super class for all design classes (factorial and space-filling).
Attributes:
Name | Type | Description |
---|---|---|
designs |
List
|
A list of design instances. |
k |
int
|
The dimension of the design. |
seed |
int
|
The seed for the random number generator. |
rng |
Generator
|
A random number generator instance. |
Source code in spotpython/design/designs.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
__init__(k, seed=123)
¶
Initializes a Designs object with the given dimension and seed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
k |
int
|
The dimension of the design. |
required |
seed |
int
|
The seed for the random number generator. Defaults to 123. |
123
|
Raises:
Type | Description |
---|---|
ValueError
|
If ‘k’ is not an integer. |
Examples:
>>> from spotpython.design.designs import Designs
>>> designs = Designs(k=2, seed=123)
>>> designs.get_dim()
2
Source code in spotpython/design/designs.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
get_dim()
¶
Returns the dimension of the design.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The dimension of the design. |
Source code in spotpython/design/designs.py
41 42 43 44 45 46 47 48 |
|