Ejemplo n.º 1
0
        /// <summary>
        /// [ REFS: '', DEREFS:]
        /// </summary>
        /// <param name="allProb"></param>
        /// <param name="state"></param>
        public double GetMaxProb(CUDDNode allProb, CUDDNode filter)
        {
            double result = 0;

            CUDD.Ref(filter, reach);
            CUDDNode newFilter = CUDD.Function.And(filter, reach);

            if (newFilter.Equals(CUDD.ZERO))
            {
                result = double.MinValue;
            }
            else
            {
                CUDD.Ref(newFilter, allProb);
                CUDDNode tmp = CUDD.Function.ITE(newFilter, allProb, CUDD.MinusInfinity());

                result = CUDD.FindMax(tmp);
                CUDD.Deref(tmp);
            }

            CUDD.Deref(newFilter);

            return(result);
        }