BinaryPruningCrossover

class BinaryPruningCrossover(probability: Double) : CrossoverOperator<BinarySolution>

BinaryPruningCrossover — logical pruning crossover operator for binary masks.

Given two parent topic masks (true = topic selected), produces two children:

  • Selective child: bit = ParentA AND ParentB (intersection of selected topics).

  • Inclusive child: bit = ParentA OR ParentB (union of selected topics).

Behavior:

  • Each child has exactly N bits, where N = totalNumberOfBits().

  • If a child mask is all-false, one random bit is flipped to true to ensure feasibility.

  • Operates in place on BestSubsetSolution copies.

Robustness:

  • jMetal may pass DefaultBinarySolution instances. This operator lifts them into BestSubsetSolution objects (bitset and objectives copied, labels synthesized).

Determinism:

  • All randomness goes through jMetal’s JMetalRandom singleton for reproducibility.

Complexity:

  • O(N) bitwise operations per crossover.

Parameters

probability

Per-pair crossover probability. If the random draw is >= probability, no crossover is performed and the children are normalized clones of the parents.

Constructors

Link copied to clipboard
constructor(probability: Double)

Functions

Link copied to clipboard
open override fun crossoverProbability(): Double

jMetal 6.x operator API: returns the configured crossover probability.

Link copied to clipboard
open override fun execute(parents: MutableList<BinarySolution>): MutableList<BinarySolution>

Executes the pruning crossover on the given parents.

Link copied to clipboard
open override fun numberOfGeneratedChildren(): Int

Always generates 2 children.

Link copied to clipboard
open override fun numberOfRequiredParents(): Int

Always requires 2 parents.