Class OjAlgoPclUtils
java.lang.Object
org.tweetyproject.logics.pcl.util.OjAlgoPclUtils
Provides some utility functions for solving Pcl specific reasoning problems with ojAlgo.
- Author:
- NicoPotyka
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addProbabilityNormalizationConstraint
(org.ojalgo.optimisation.ExpressionsBasedModel model) Add probability normalization constraint to model (all probabilities have to sum to 1).static org.ojalgo.matrix.PrimitiveMatrix
createConstraintMatrix
(PclBeliefSet beliefSet, Set<PossibleWorld> worlds) Create constraint matrix for a set of PCL conditionals over a set of possible worlds.static org.ojalgo.optimisation.Variable[]
createVariables
(int noWorlds) Create (non-negative) variables for the probabilities of possible worlds.
-
Constructor Details
-
OjAlgoPclUtils
public OjAlgoPclUtils()
-
-
Method Details
-
addProbabilityNormalizationConstraint
public static void addProbabilityNormalizationConstraint(org.ojalgo.optimisation.ExpressionsBasedModel model) Add probability normalization constraint to model (all probabilities have to sum to 1).- Parameters:
model
- the model
-
createVariables
public static org.ojalgo.optimisation.Variable[] createVariables(int noWorlds) Create (non-negative) variables for the probabilities of possible worlds.- Parameters:
noWorlds
- the number of worlds- Returns:
- the variables
-
createConstraintMatrix
public static org.ojalgo.matrix.PrimitiveMatrix createConstraintMatrix(PclBeliefSet beliefSet, Set<PossibleWorld> worlds) Create constraint matrix for a set of PCL conditionals over a set of possible worlds.- Parameters:
beliefSet
- a belief setworlds
- a set of possible worlds- Returns:
- the constraint matrix
-