src/main/java/org/thegalactic/rule/ImplicationalSystem.java
public boolean isDirect() {
        for (Rule rule1 : this.sigma) {
            TreeSet<Comparable> onePass = new TreeSet(rule1.getPremise());
            for (Rule rule2 : this.sigma) {
                if (rule1.getPremise().containsAll(rule2.getPremise())) {
                    onePass.addAll(rule2.getConclusion());
                }
            }
            if (!onePass.equals(this.closure(rule1.getPremise()))) {
                return false;
            }
        }
        return true;
    }
/**
     * Returns true if this component is direct.
     *
     * This test is perfomed in O(|Sigma|^2|S|) by testing if closure of the
     * premisse of each conclusion can be obtained by only one iteration on the
     * set of rules.
     *
     * @return true if this component is direct.
     */
Returns true if this component is direct.
This test is perfomed in O(|Sigma|^2|S|) by testing if closure of the
premisse of each conclusion can be obtained by only one iteration on the
set of rules.

@return true if this component is direct.
Returns true if this component is direct . This test is perfomed in O ( |Sigma|^2|S| ) by testing if closure of the premisse of each conclusion can be obtained by only one iteration on the set of rules . @return true if this component is direct .
public boolean isDirect() {
        for (Rule rule1 : this.sigma) {
            TreeSet<Comparable> onePass = new TreeSet(rule1.getPremise());
            for (Rule rule2 : this.sigma) {
                if (rule1.getPremise().containsAll(rule2.getPremise())) {
                    onePass.addAll(rule2.getConclusion());
                }
            }
            if (!onePass.equals(this.closure(rule1.getPremise()))) {
                return false;
            }
        }
        return true;
    }
public boolean isDirect ( ) { for ( Rule rule1 : this . sigma ) { TreeSet < Comparable > onePass = new TreeSet ( rule1 . getPremise ( ) ) ; for ( Rule rule2 : this . sigma ) { if ( rule1 . getPremise ( ) . containsAll ( rule2 . getPremise ( ) ) ) { onePass . addAll ( rule2 . getConclusion ( ) ) ; } } if ( ! onePass . equals ( this . closure ( rule1 . getPremise ( ) ) ) ) { return false ; } } return true ; }
Returns true if this component is direct.
Returns true if this component is direct .