Class AbstractPafReasonerFactory
java.lang.Object
org.tweetyproject.web.services.paf.AbstractPafReasonerFactory
Abstract factory for building PAF reasoners and frameworks from web request data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault number of Monte Carlo trials when none is specified. -
Method Summary
Modifier and TypeMethodDescriptiongetPaf(int nr_of_arguments, List<Double> argumentProbabilities, List<List<Integer>> attacks, List<Double> attackProbabilities) Builds aProbabilisticArgumentationFrameworkfrom the given parameters.static AbstractPafReasonergetReasoner(Semantics semantics, String solver, int nrOfTrials) Creates a PAF reasoner for the given semantics and solver selection.static Semantics[]Returns the supported semantics for PAF reasoning (reuses Dung semantics).Returns the available solver identifiers.
-
Field Details
-
DEFAULT_NR_OF_TRIALS
public static final int DEFAULT_NR_OF_TRIALSDefault number of Monte Carlo trials when none is specified.- See Also:
-
-
Method Details
-
getPaf
public static ProbabilisticArgumentationFramework getPaf(int nr_of_arguments, List<Double> argumentProbabilities, List<List<Integer>> attacks, List<Double> attackProbabilities) Builds aProbabilisticArgumentationFrameworkfrom the given parameters.Arguments are named "1", "2", ...,
nr_of_arguments. IfargumentProbabilitiesis null or shorter thannr_of_arguments, missing probabilities default to 1.0. Likewise forattackProbabilities.- Parameters:
nr_of_arguments- total number of argumentsargumentProbabilities- existence probability per argument (0-indexed, 1.0 default)attacks- attack pairs [attacker, attacked] (1-based indices)attackProbabilities- existence probability per attack (0-indexed, 1.0 default)- Returns:
- the constructed PAF
-
getSemantics
Returns the supported semantics for PAF reasoning (reuses Dung semantics).- Returns:
- array of supported
Semantics
-
getSolvers
Returns the available solver identifiers.- Returns:
- list of solver ids
-
getReasoner
Creates a PAF reasoner for the given semantics and solver selection.- Parameters:
semantics- Dung semantics to usesolver- "simple" or "montecarlo"nrOfTrials- number of Monte Carlo trials (ignored for "simple")- Returns:
- the reasoner
-