concepts.pdsketch.csp_solvers.dpll_sampling.dpll_filter_unused_rhs#
- dpll_filter_unused_rhs(executor, constraints, assignments, index2record)[source]#
Filter out constraints that only appear once in the RHS of the constraints. In this case, the variable can be ignored and the related constraints can be removed.
- Parameters:
executor (PDSketchExecutor) – the executor.
constraints (List[Constraint | GroupConstraint | None]) – the list of constraints.
assignments (Dict[int, Assignment]) – the dictionary of assignments.
index2record (Dict[int, OptimisticValueRecord]) – the dictionary of variable records.
- Returns:
the list of constraints that have not been satisfied, after removing all unused variables.
- Return type:
List[Constraint | GroupConstraint | None]