Beispiel #1
0
        public override Formula RemoveUniversalQuantifiers(List <Constant> lConstants, List <Predicate> lConstantPredicates, Domain d)
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].RemoveUniversalQuantifiers(lConstants, lConstantPredicates, d), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #2
0
        public override Formula PartiallyGround(Dictionary <string, Constant> dBindings)
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].PartiallyGround(dBindings), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #3
0
        public override Formula Reduce(IEnumerable <Predicate> lKnown)
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].Reduce(lKnown), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #4
0
        public override Formula Simplify()
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].Simplify(), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #5
0
        public override Formula Replace(Dictionary <Formula, Formula> dTranslations)
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].Replace(dTranslations), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #6
0
        public override Formula Replace(Formula fOrg, Formula fNew)
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Options.Count; i++)
            {
                pf.AddOption(Options[i].Replace(fOrg, fNew), Probabilities[i]);
            }
            return(pf);
        }
Beispiel #7
0
        public override Formula RemoveNegations()
        {
            ProbabilisticFormula pf = new ProbabilisticFormula();

            for (int i = 0; i < Probabilities.Count; i++)
            {
                Formula fRemoved = Options[i].RemoveNegations();
                if (fRemoved != null)
                {
                    pf.AddOption(fRemoved, Probabilities[i]);
                }
            }
            return(pf);
        }