src/main/java/Alergia.java
private boolean compatibilityTest(FptaNode a, FptaNode b){
        if(modelType != ModelType.SMM && !a.output.equals(b.output))
            return false;

        if(a.children.values().isEmpty() || b.children.values().isEmpty())
            return true;

        if(!compatibilityChecker.checkDifferance(a,b))
            return false;

        Set<String> intersection  = new HashSet<>(a.children.keySet());
        intersection.retainAll(b.children.keySet());
        for (String child : intersection){
            if(!compatibilityTest(a.children.get(child), b.children.get(child)))
                return false;
        }

        return true;
    }
/**
     * Check compatibility between nodes and their children.
     * @param a Fpta node
     * @param b Fpta node
     * @return True if a and b are compatible
     */
Check compatibility between nodes and their children.
@param a Fpta node
@param b Fpta node
@return True if a and b are compatible
Check compatibility between nodes and their children . @param a Fpta node @param b Fpta node @return True if a and b are compatible
private boolean compatibilityTest(FptaNode a, FptaNode b){
        if(modelType != ModelType.SMM && !a.output.equals(b.output))
            return false;
        if(a.children.values().isEmpty() || b.children.values().isEmpty())
            return true;
        if(!compatibilityChecker.checkDifferance(a,b))
            return false;
        Set<String> intersection  = new HashSet<>(a.children.keySet());
        intersection.retainAll(b.children.keySet());
        for (String child : intersection){
            if(!compatibilityTest(a.children.get(child), b.children.get(child)))
                return false;
        }
        return true;
    }
private boolean compatibilityTest ( FptaNode a , FptaNode b ) { if ( modelType != ModelType . SMM && ! a . output . equals ( b . output ) ) return false ; if ( a . children . values ( ) . isEmpty ( ) || b . children . values ( ) . isEmpty ( ) ) return true ; if ( ! compatibilityChecker . checkDifferance ( a , b ) ) return false ; Set < String > intersection = new HashSet < > ( a . children . keySet ( ) ) ; intersection . retainAll ( b . children . keySet ( ) ) ; for ( String child : intersection ) { if ( ! compatibilityTest ( a . children . get ( child ) , b . children . get ( child ) ) ) return false ; } return true ; }
Check compatibility between nodes and their children.
Check compatibility between nodes and their children .