designs
designs
¶
Super class for all design classes (factorial and spacefilling).
Attributes:
Name | Type | Description |
---|---|---|
designs |
List
|
A list of designs. |
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 |
|
__init__(k=2, seed=123)
¶
Initializes a Designs object with the given dimension and seed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
k |
int
|
The dimension of the design. Defaults to 2. |
2
|
seed |
int
|
The seed for the random number generator. Defaults to 123. |
123
|
Examples: >>> designs = designs(k=2, seed=123) >>> designs.get_dim() 2
Source code in spotpython/design/designs.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
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
40 41 42 43 44 45 46 47 |
|