saealib.space.VectorSpace#
- class saealib.space.VectorSpace(dim, lb, ub, *, atol=1e-16, rtol=0.0)[source]#
Bases:
objectA search space for continuous numeric vectors defined by variable bounds.
- Parameters:
dim (int) – Dimension of the vector space.
lb (Sequence[float] | np.ndarray) – Lower bounds per dimension.
ub (Sequence[float] | np.ndarray) – Upper bounds per dimension.
atol (float, optional) – Absolute tolerance for approximate equivalence matching (default: 1e-16).
rtol (float, optional) – Relative tolerance for approximate equivalence matching (default: 0.0).
Methods
Sample n random genomes uniformly within bounds. |
|
Check if genomes batch is well-formed and within bounds. |
Method Details
- VectorSpace.__init__(dim, lb, ub, *, atol=1e-16, rtol=0.0)[source]#
- Parameters:
dim (int)
lb (Sequence[float] | ndarray)
ub (Sequence[float] | ndarray)
atol (float)
rtol (float)
- Return type:
None
- VectorSpace.sample(n, rng=None)[source]#
Sample n random genomes uniformly within bounds.
- Parameters:
n (int)
rng (Generator | None)
- Return type:
DenseVectorBatch