hylar/core/Logics/Fact.js
function() {
        if (this.explicit) {
            return this.valid;
        } else if (this.causedBy === undefined || this.causedBy.length == 0) {
            return undefined;
        } else {
            var valid,
                causes = this.causedBy,
                explicitFact;
            for (var i = 0; i < causes.length; i++) {
                valid = true;
                for (var j = 0; j < causes[i].length; j++) {
                    explicitFact = causes[i][j];
                    valid = valid && explicitFact.valid;
                }
                if (valid) {
                    return true;
                }
            }
            return false;
        }
    }
function() {
        if (this.explicit) {
            return this.valid;
        } else if (this.causedBy === undefined || this.causedBy.length == 0) {
            return undefined;
        } else {
            var valid,
                causes = this.causedBy,
                explicitFact;
            for (var i = 0; i < causes.length; i++) {
                valid = true;
                for (var j = 0; j < causes[i].length; j++) {
                    explicitFact = causes[i][j];
                    valid = valid && explicitFact.valid;
                }
                if (valid) {
                    return true;
                }
            }
            return false;
        }
    }
function ( ) { if ( this . explicit ) { return this . valid ; } else if ( this . causedBy === undefined || this . causedBy . length == 0 ) { return undefined ; } else { var valid , causes = this . causedBy , explicitFact ; for ( var i = 0 ; i < causes . length ; i ++ ) { valid = true ; for ( var j = 0 ; j < causes [ i ] . length ; j ++ ) { explicitFact = causes [ i ] [ j ] ; valid = valid && explicitFact . valid ; } if ( valid ) { return true ; } } return false ; } }
Checks the validity of an implicit fact
by exploring its explicit causes' validity tags.
An implicit fact is valid iff the disjunction of
its explicit causes' validity tags is true, i.e.
if at least one of its causes is valid.
@param fe
@returns {boolean}
Checks the validity of an implicit fact by exploring its explicit causes validity tags . An implicit fact is valid iff the disjunction of its explicit causes validity tags is true i . e . if at least one of its causes is valid .