Exemple #1
0
        private FaultSet CollectSubsumedFaultsTransitive()
        {
            IEnumerable <Fault> currentFaults = new[] { this };
            var subsumed = new FaultSet(this);

            uint oldCount;

            do             // fixed-point iteration
            {
                oldCount      = subsumed.Cardinality;
                currentFaults = currentFaults.SelectMany(fault => fault.SubsumedFaults);
                subsumed      = subsumed.GetUnion(new FaultSet(currentFaults));
            } while (oldCount < subsumed.Cardinality);

            return(subsumed);
        }