Package net.sf.tweety.arg.prob.dynamics
Class AbstractPAChangeOperator
- java.lang.Object
-
- net.sf.tweety.arg.prob.dynamics.AbstractPAChangeOperator
-
- All Implemented Interfaces:
ChangeOperator
- Direct Known Subclasses:
PARevisionOperator,PAUpdateOperator
public abstract class AbstractPAChangeOperator extends java.lang.Object implements ChangeOperator
Provides common functionality for change operators based on probabilistic semantics.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description private SimpleRealValuedFunctionfThe function that is maximized on the set of probabilistic extensions with minimal distance.protected static longFIRST_OPTIMIZATION_WEIGHTOptimizations carried out by ancestors of this class perform a two-level optimization.private RealVectorNormnormThe norm used for distance measurement between probabilistic extensions.private PASemanticssemanticsThe semantics used for change.
-
Constructor Summary
Constructors Constructor Description AbstractPAChangeOperator(PASemantics semantics, RealVectorNorm norm, SimpleRealValuedFunction f)Creates a new change operator for the given semantics that uses the specified norm for distance measuring and the given function for optimizing.
-
Method Summary
Modifier and Type Method Description ProbabilisticExtensionchange(ProbabilisticExtension p, DungTheory theory)Given a probabilistic extension and an argumentation theory, compute the closest probabilistic extension that is adequate for observing the theory in the state p.abstract ProbabilisticExtensionchange(PartialProbabilityAssignment ppa, DungTheory theory)Given a partial probability assignment ppa and an argumentation theory, compute the closest probabilistic extension that is adequate for observing the theory in the state ppa.protected SimpleRealValuedFunctiongetFunction()Returns the function f.protected RealVectorNormgetNorm()Returns the norm.protected PASemanticsgetSemantics()Returns the semantics.protected voidprepareOptimizationProblem(PartialProbabilityAssignment ppa, DungTheory theory, OptimizationProblem problem, java.util.Map<java.util.Collection<Argument>,FloatVariable> varsComp, java.util.Map<java.util.Collection<Argument>,FloatVariable> varsSem, java.util.Vector<Term> varsCompVector, java.util.Vector<Term> varsSemVector)
-
-
-
Field Detail
-
FIRST_OPTIMIZATION_WEIGHT
protected static final long FIRST_OPTIMIZATION_WEIGHT
Optimizations carried out by ancestors of this class perform a two-level optimization. First, one function is minimized and then a second one is maximized. In order to avoid solving two consecutive optimization problems both target functions are combined and the first one is weighted by this factor to give preference.- See Also:
- Constant Field Values
-
semantics
private PASemantics semantics
The semantics used for change.
-
norm
private RealVectorNorm norm
The norm used for distance measurement between probabilistic extensions.
-
f
private SimpleRealValuedFunction f
The function that is maximized on the set of probabilistic extensions with minimal distance.
-
-
Constructor Detail
-
AbstractPAChangeOperator
public AbstractPAChangeOperator(PASemantics semantics, RealVectorNorm norm, SimpleRealValuedFunction f)
Creates a new change operator for the given semantics that uses the specified norm for distance measuring and the given function for optimizing.- Parameters:
semantics- the semantics used for change.norm- the norm used for distance measurement between probabilistic extensions.f- the function that is maximized on the set of probabilistic extensions with minimal distance.
-
-
Method Detail
-
getSemantics
protected PASemantics getSemantics()
Returns the semantics.- Returns:
- the semantics.
-
getNorm
protected RealVectorNorm getNorm()
Returns the norm.- Returns:
- the norm.
-
getFunction
protected SimpleRealValuedFunction getFunction()
Returns the function f.- Returns:
- the function f.
-
change
public abstract ProbabilisticExtension change(PartialProbabilityAssignment ppa, DungTheory theory)
Description copied from interface:ChangeOperatorGiven a partial probability assignment ppa and an argumentation theory, compute the closest probabilistic extension that is adequate for observing the theory in the state ppa.- Specified by:
changein interfaceChangeOperator- Parameters:
ppa- some partial probability assignment.theory- some theory.- Returns:
- the closest probabilistic extension that is adequate for observing the theory in the state ppa.
-
prepareOptimizationProblem
protected void prepareOptimizationProblem(PartialProbabilityAssignment ppa, DungTheory theory, OptimizationProblem problem, java.util.Map<java.util.Collection<Argument>,FloatVariable> varsComp, java.util.Map<java.util.Collection<Argument>,FloatVariable> varsSem, java.util.Vector<Term> varsCompVector, java.util.Vector<Term> varsSemVector)
-
change
public ProbabilisticExtension change(ProbabilisticExtension p, DungTheory theory)
Description copied from interface:ChangeOperatorGiven a probabilistic extension and an argumentation theory, compute the closest probabilistic extension that is adequate for observing the theory in the state p.- Specified by:
changein interfaceChangeOperator- Parameters:
p- some probabilistic extension.theory- some theory.- Returns:
- the closest probabilistic extension that is adequate for observing the theory in the state p.
-
-