evaluate

open override fun evaluate(solution: BinarySolution): BinarySolution

Evaluates a solution by computing the natural correlation from the current subset and delegating objective encoding to targetStrategy.

Steps:

  1. Throttled progress logging every loggingEvery iterations.

  2. Incremental SUMS update:

    • Cold start: compute Σ_t APt directly from the bitset.

    • Warm path: apply fixed‑K swap hints or generic diffs vs last mask.

  3. Correlation from SUMS:

    • Fill per-thread means buffer xMeans = SUMS / K.

    • Call Pearson or Kendall τ‑b backend.

  4. Objective encoding via targetStrategy (e.g., BEST encodes +K, -corr).

  5. Streaming bookkeeping is handled elsewhere (no retention here).

Return

The same solution instance, after objectives are set.

Parameters

solution

The solution to evaluate (must be a BestSubsetSolution).