src/main/java/org/thegalactic/rule/ImplicationalSystem.java
public int makeUnary() {
        ImplicationalSystem save = new ImplicationalSystem(this);
        for (Rule rule : save.sigma) {
            if (rule.getConclusion().size() > 1) {
                this.removeRule(rule);
                TreeSet<Comparable> conclusion = rule.getConclusion();
                TreeSet<Comparable> premise = rule.getPremise();
                for (Comparable e : conclusion) {
                    TreeSet<Comparable> newC = new TreeSet();
                    newC.add(e);
                    Rule newRule = new Rule(premise, newC);
                    this.addRule(newRule);
                }
            }
        }
        return save.sizeRules() - this.sizeRules();
    }
/**
     * Makes this component an unary ImplicationalSystem.
     *
     * This treatment is performed in O(|Sigma||S|)
     *
     * A rule with a non singleton as conclusion is replaced with a sets of
     * rule, one rule for each element of the conclusion.
     *
     * This treatment is performed in O(|Sigma||S|).
     *
     * @return the difference between the number of rules of this component
     *         before and after this treatment
     */
Makes this component an unary ImplicationalSystem.
This treatment is performed in O(|Sigma||S|)

A rule with a non singleton as conclusion is replaced with a sets of
rule, one rule for each element of the conclusion.

This treatment is performed in O(|Sigma||S|).

@return the difference between the number of rules of this component
before and after this treatment
Makes this component an unary ImplicationalSystem . This treatment is performed in O ( |Sigma||S| ) A rule with a non singleton as conclusion is replaced with a sets of rule one rule for each element of the conclusion . This treatment is performed in O ( |Sigma||S| ) . @return the difference between the number of rules of this component before and after this treatment
public int makeUnary() {
        ImplicationalSystem save = new ImplicationalSystem(this);
        for (Rule rule : save.sigma) {
            if (rule.getConclusion().size() > 1) {
                this.removeRule(rule);
                TreeSet<Comparable> conclusion = rule.getConclusion();
                TreeSet<Comparable> premise = rule.getPremise();
                for (Comparable e : conclusion) {
                    TreeSet<Comparable> newC = new TreeSet();
                    newC.add(e);
                    Rule newRule = new Rule(premise, newC);
                    this.addRule(newRule);
                }
            }
        }
        return save.sizeRules() - this.sizeRules();
    }
public int makeUnary ( ) { ImplicationalSystem save = new ImplicationalSystem ( this ) ; for ( Rule rule : save . sigma ) { if ( rule . getConclusion ( ) . size ( ) > 1 ) { this . removeRule ( rule ) ; TreeSet < Comparable > conclusion = rule . getConclusion ( ) ; TreeSet < Comparable > premise = rule . getPremise ( ) ; for ( Comparable e : conclusion ) { TreeSet < Comparable > newC = new TreeSet ( ) ; newC . add ( e ) ; Rule newRule = new Rule ( premise , newC ) ; this . addRule ( newRule ) ; } } } return save . sizeRules ( ) - this . sizeRules ( ) ; }
Makes this component an unary ImplicationalSystem.
Makes this component an unary ImplicationalSystem .