Package net.sf.tweety.logics.pcl.util
Class MatlabUtils
- java.lang.Object
-
- net.sf.tweety.logics.pcl.util.MatlabUtils
-
public class MatlabUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MatlabUtils()
-
Method Summary
Modifier and Type Method Description static void
main(java.lang.String[] args)
Simple application example yielding the matlab script for spam example from [Potyka, Thimm, 2014].static void
printAntecedenceVerificationMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print antecedence verification matrix (1 if antecedence is satisfied, 0 otherwise)static void
printConditionalVerificationMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print conditional verification matrix (1 if antecedence and consequence are satisfied, 0 otherwise)static void
printConstraintMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print constraint matrix for belief set and possible worlds to output stream.static void
printMEConsolidationProblem(java.io.PrintStream out, int n, java.lang.String p)
Print optimization problem corresponding to ME consolidation.static void
printMinimumViolationProblem(java.io.PrintStream out, int n, java.lang.String p)
Print optimization problem corresponding to minimal violation measure.
-
-
-
Method Detail
-
printConstraintMatrix
public static void printConstraintMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print constraint matrix for belief set and possible worlds to output stream.- Parameters:
out
- some print streambeliefSet
- some belief setworlds
- a set of possible worlds
-
printConditionalVerificationMatrix
public static void printConditionalVerificationMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print conditional verification matrix (1 if antecedence and consequence are satisfied, 0 otherwise)- Parameters:
out
- some print streambeliefSet
- some belief setworlds
- a set of possible worlds
-
printAntecedenceVerificationMatrix
public static void printAntecedenceVerificationMatrix(java.io.PrintStream out, PclBeliefSet beliefSet, java.util.Set<PossibleWorld> worlds)
Print antecedence verification matrix (1 if antecedence is satisfied, 0 otherwise)- Parameters:
out
- some print streambeliefSet
- some belief setworlds
- a set of possible worlds
-
printMinimumViolationProblem
public static void printMinimumViolationProblem(java.io.PrintStream out, int n, java.lang.String p)
Print optimization problem corresponding to minimal violation measure. Call printConstraintMatrix first to define constraint matrix A.- Parameters:
out
- some print streamn
- number of worldsp
- norm
-
printMEConsolidationProblem
public static void printMEConsolidationProblem(java.io.PrintStream out, int n, java.lang.String p)
Print optimization problem corresponding to ME consolidation. Call printConstraintMatrix and printMinimumViolationProblem first to define constraint matrix A and to compute minimal violation measure.- Parameters:
out
- some print streamn
- number of worldsp
- norm
-
main
public static void main(java.lang.String[] args) throws ParserException, java.io.IOException
Simple application example yielding the matlab script for spam example from [Potyka, Thimm, 2014].- Parameters:
args
- app parameters- Throws:
ParserException
- if parsing failsjava.io.IOException
- if an IO issue occurs.
-
-