saealib.TruncationSelection¶
- class saealib.TruncationSelection[source]¶
Bases:
SurvivorSelectionTruncation selection operator.
Methods
Method Details
- TruncationSelection.__init__()¶
- TruncationSelection.select(ctx, pool, n_survivors)[source]¶
Select survivors by truncating the sorted pool.
- Parameters:
ctx (OptimizationContext) – Optimization context.
pool (Population) – Selection pool to choose survivors from.
n_survivors (int) – Number of survivors to select.
- Returns:
Indices of selected survivors in the pool.
- Return type:
np.ndarray