Class IteratingMlnReasoner

  • All Implemented Interfaces:
    net.sf.tweety.commons.QuantitativeReasoner<MarkovLogicNetwork,​net.sf.tweety.logics.fol.syntax.FolFormula>, net.sf.tweety.commons.Reasoner<Double,​MarkovLogicNetwork,​net.sf.tweety.logics.fol.syntax.FolFormula>

    public class IteratingMlnReasoner
    extends AbstractMlnReasoner
    This MLN reasoner takes another MLN reasoner and performs several iterations with this one and takes the average result as result.
    Author:
    Matthias Thimm
    • Constructor Detail

      • IteratingMlnReasoner

        public IteratingMlnReasoner​(AbstractMlnReasoner reasoner,
                                    long numberOfIterations)
        Creates a new IteratingMlnReasoner for the given MLN reaasoner.
        Parameters:
        reasoner - some MLN reasoner.
        numberOfIterations - the number of iterations for the reasoner
    • Method Detail

      • doQuery

        protected double doQuery​(MarkovLogicNetwork mln,
                                 net.sf.tweety.logics.fol.syntax.FolFormula query,
                                 net.sf.tweety.logics.fol.syntax.FolSignature signature)
        Description copied from class: AbstractMlnReasoner
        Performs the actual querying.
        Specified by:
        doQuery in class AbstractMlnReasoner
        Parameters:
        mln - an MLN
        query - a fol formula guaranteed to be ground.
        signature - the signature
        Returns:
        the answer of the query.