Class RpclMeReasoner
java.lang.Object
org.tweetyproject.logics.rpcl.reasoner.RpclMeReasoner
- All Implemented Interfaces:
ModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
,QuantitativeReasoner<RpclBeliefSet,FolFormula>
,Reasoner<Double,RpclBeliefSet,FolFormula>
public class RpclMeReasoner
extends Object
implements QuantitativeReasoner<RpclBeliefSet,FolFormula>, ModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
General ME-reasoner for RPCL.
- Author:
- Matthias Thimm
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
Integer constant for lifted inference.static int
Integer constant for standard inference. -
Constructor Summary
ConstructorDescriptionRpclMeReasoner(RpclSemantics semantics)
Creates a new reasoner.RpclMeReasoner(RpclSemantics semantics, int inferenceType)
Creates a new reasoner. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the inference type of this reasoner, i.e.getModel(RpclBeliefSet bbase)
Returns a single (dedicated) model of the given belief base.getModel(RpclBeliefSet kb, FolSignature signature)
Determines the ME distribution of the given knowlege base wrt.getModels(RpclBeliefSet bbase)
Returns a characterizing model of the given belief basequery(RpclBeliefSet beliefbase, FolFormula formula)
Queries the given belief base for the given formula.query(RpclBeliefSet beliefbase, FolFormula query, FolSignature signature)
Queries the knowledge base wrt.
-
Field Details
-
STANDARD_INFERENCE
public static final int STANDARD_INFERENCEInteger constant for standard inference.- See Also:
- Constant Field Values
-
LIFTED_INFERENCE
public static final int LIFTED_INFERENCEInteger constant for lifted inference.- See Also:
- Constant Field Values
-
-
Constructor Details
-
RpclMeReasoner
Creates a new reasoner.- Parameters:
semantics
- the semantics for this reasoner.inferenceType
- one of RpclMeReasoner.STANDARD_INFERENCE or RpclMeReasoner.LIFTED_INFERENCE
-
RpclMeReasoner
Creates a new reasoner.- Parameters:
semantics
- the semantics for this reasoner.
-
-
Method Details
-
getInferenceType
public int getInferenceType()Returns the inference type of this reasoner, i.e. one of RpclMeReasoner.STANDARD_INFERENCE or RpclMeReasoner.LIFTED_INFERENCE- Returns:
- the inference type of this reasoner.
-
query
Queries the knowledge base wrt. the given signature.- Parameters:
beliefbase
- some knowledge basequery
- some querysignature
- some signature.- Returns:
- the answer to the query
-
query
Description copied from interface:Reasoner
Queries the given belief base for the given formula.- Specified by:
query
in interfaceReasoner<Double,RpclBeliefSet,FolFormula>
- Parameters:
beliefbase
- a belief baseformula
- a formula- Returns:
- the answer to the query
-
getModels
Description copied from interface:ModelProvider
Returns a characterizing model of the given belief base- Specified by:
getModels
in interfaceModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
- Parameters:
bbase
- some belief base- Returns:
- the (selected) models of the belief base
-
getModel
Description copied from interface:ModelProvider
Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.- Specified by:
getModel
in interfaceModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
- Parameters:
bbase
- some belief base- Returns:
- a selected model of the belief base.
-
getModel
Determines the ME distribution of the given knowlege base wrt. the given signature.- Parameters:
kb
- an RPCL knowledge basesignature
- some signature- Returns:
- the ME distribution of the knowledge base
-