42 const double structural_fraction = std::clamp(
43 0.45 * changed_fraction * propagation +
44 0.35 * affected_vertex_fraction +
45 0.20 * observed_fraction,
50 const double history_penalty = (1.0 / speedup) * (1.0 + (1.0 - repair_success));
52 const double full =
static_cast<double>(e.
total_edges) +
54 const double inc = full * structural_fraction * history_penalty;
55 const double work_fraction = full == 0.0 ? 0.0 : inc / full;
56 const double confidence = std::clamp(
57 0.5 * repair_success +
58 0.3 * std::min(1.0, speedup / 2.0) +
59 0.2 * (1.0 - std::min(1.0, structural_fraction)),
62 if (inc < 0.65 * full && repair_success >= 0.5) {
64 "affected-work estimate and historical repair behavior favor incremental execution"};
67 "estimated propagation or historical repair risk favors full recomputation"};