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 SimpleRealValuedFunction
f
The function that is maximized on the set of probabilistic extensions with minimal distance.protected static long
FIRST_OPTIMIZATION_WEIGHT
Optimizations carried out by ancestors of this class perform a two-level optimization.private RealVectorNorm
norm
The norm used for distance measurement between probabilistic extensions.private PASemantics
semantics
The 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 ProbabilisticExtension
change(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 ProbabilisticExtension
change(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 SimpleRealValuedFunction
getFunction()
Returns the function f.protected RealVectorNorm
getNorm()
Returns the norm.protected PASemantics
getSemantics()
Returns the semantics.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)
-
-
-
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:ChangeOperator
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.- Specified by:
change
in 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:ChangeOperator
Given 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:
change
in 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.
-
-