Skip to content

Commit

Permalink
Fix base case zero configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhorcas committed May 27, 2024
1 parent a3160b4 commit 8977ed1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def feature_inclusion_probability(bdd_model: BDDModel,
n_configs_op = BDDConfigurationsNumber()
n_configs_op.set_partial_configuration(config)
total_configs = n_configs_op.execute(bdd_model).get_result()
if total_configs == 0:
return {feature: 0.0 for feature in bdd_model.variables}

prob: dict[Any, float] = defaultdict(float)
if config is None:
Expand Down

0 comments on commit 8977ed1

Please sign in to comment.