Class OjAlgoPclUtils


  • public class OjAlgoPclUtils
    extends java.lang.Object
    Provides some utility functions for solving Pcl specific reasoning problems with ojAlgo.
    Author:
    NicoPotyka
    • Constructor Summary

      Constructors 
      Constructor Description
      OjAlgoPclUtils()  
    • Method Summary

      Modifier and Type Method Description
      static 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, java.util.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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OjAlgoPclUtils

        public OjAlgoPclUtils()
    • Method Detail

      • 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,
                                                                               java.util.Set<PossibleWorld> worlds)
        Create constraint matrix for a set of PCL conditionals over a set of possible worlds.
        Parameters:
        beliefSet - a belief set
        worlds - a set of possible worlds
        Returns:
        the constraint matrix