Class GroundingTools


  • public class GroundingTools
    extends Object
    This class holds common grounding functionality for causal theories using first-order formulas.
    Author:
    Sebastian Homann
    • Constructor Summary

      Constructors 
      Constructor Description
      GroundingTools()  
    • Method Summary

      Modifier and Type Method Description
      static Set<Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant>> getAllSubstitutions​(Set<net.sf.tweety.logics.commons.syntax.Variable> variables)
      Calculates all possible substitutions in the given set of variables using all possible constants of the same sort.
      static Set<Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant>> getAllSubstitutions​(Set<net.sf.tweety.logics.commons.syntax.Variable> variables, Set<net.sf.tweety.logics.commons.syntax.Constant> constants)
      Calculates all possible substitutions of variables for a given set of constants
      static boolean isValidGroundingApplication​(Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant> map, Set<GroundingRequirement> requirements)
      Checks a grounding application for compliance with the grounding requirements.
    • Constructor Detail

      • GroundingTools

        public GroundingTools()
    • Method Detail

      • isValidGroundingApplication

        public static boolean isValidGroundingApplication​(Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant> map,
                                                          Set<GroundingRequirement> requirements)
        Checks a grounding application for compliance with the grounding requirements.
        Parameters:
        map - a map from variables to constants
        requirements - a set of requirements
        Returns:
        true, if map is a valid application of constants to variables.
      • getAllSubstitutions

        public static Set<Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant>> getAllSubstitutions​(Set<net.sf.tweety.logics.commons.syntax.Variable> variables,
                                                                                                                                                    Set<net.sf.tweety.logics.commons.syntax.Constant> constants)
        Calculates all possible substitutions of variables for a given set of constants
        Parameters:
        variables - The set of variables to be substituted.
        constants - The set of constants to be used as substitution for variables.
        Returns:
        A set of maps of possible substitutions.
      • getAllSubstitutions

        public static Set<Map<net.sf.tweety.logics.commons.syntax.Variable,​net.sf.tweety.logics.commons.syntax.Constant>> getAllSubstitutions​(Set<net.sf.tweety.logics.commons.syntax.Variable> variables)
        Calculates all possible substitutions in the given set of variables using all possible constants of the same sort.
        Parameters:
        variables - The set of variables to be substituted.
        Returns:
        A set of maps of possible substitutions.