Skip to content

Commit

Permalink
use the factory configuration for the CC encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
czengler committed May 27, 2016
1 parent 3ef1b3c commit c7afcd2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
package org.logicng.cardinalityconstraints;

import org.logicng.collections.ImmutableFormulaList;
import org.logicng.configurations.Configuration;
import org.logicng.configurations.ConfigurationType;
import org.logicng.formulas.CType;
import org.logicng.formulas.FType;
import org.logicng.formulas.Formula;
Expand Down Expand Up @@ -81,7 +83,10 @@ public CCEncoder(final FormulaFactory f, final CCConfig config) {
*/
public CCEncoder(final FormulaFactory f) {
this.f = f;
this.config = new CCConfig.Builder().build();
Configuration ccConfig = f.configurationFor(ConfigurationType.CC_ENCODER);
if (ccConfig == null)
ccConfig = new CCConfig.Builder().build();
this.config = (CCConfig) ccConfig;
}

/**
Expand Down

0 comments on commit c7afcd2

Please sign in to comment.