Class AbstractMusEnumerator<S extends net.sf.tweety.commons.Formula>
- java.lang.Object
-
- net.sf.tweety.logics.commons.analysis.AbstractMusEnumerator<S>
-
- Type Parameters:
S- the type of formulas
- All Implemented Interfaces:
BeliefSetConsistencyTester<S>,ConsistencyTester<net.sf.tweety.commons.BeliefSet<S,?>>,MusEnumerator<S>
- Direct Known Subclasses:
NaiveMusEnumerator
public abstract class AbstractMusEnumerator<S extends net.sf.tweety.commons.Formula> extends Object implements MusEnumerator<S>
Abstract implementation for MUes enumerators.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description AbstractMusEnumerator()
-
Method Summary
Modifier and Type Method Description Collection<Collection<S>>getMiComponents(Collection<S> formulas)Computes the maximal (wrt.booleanisConsistent(Collection<S> formulas)Checks whether the given collection of formulas is consistent.booleanisConsistent(net.sf.tweety.commons.BeliefSet<S,?> beliefSet)Checks whether the given belief base is consistent.booleanisConsistent(S formula)Checks whether the given formula is consistent.Collection<Collection<S>>maximalConsistentSubsets(Collection<S> formulas)This method returns the maximal consistent subsets of the given set of formulasSet<Set<S>>minimalCorrectionSubsets(Collection<S> formulas)This method returns the minimal correction subsets of the given set of formulas (i.e.abstract Collection<Collection<S>>minimalInconsistentSubsets(Collection<S> formulas)This method returns the minimal inconsistent subsets of the given set of formulas.
-
-
-
Method Detail
-
minimalInconsistentSubsets
public abstract Collection<Collection<S>> minimalInconsistentSubsets(Collection<S> formulas)
Description copied from interface:MusEnumeratorThis method returns the minimal inconsistent subsets of the given set of formulas.- Specified by:
minimalInconsistentSubsetsin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formulas- a set of formulas.- Returns:
- the minimal inconsistent subsets of the given set of formulas
-
minimalCorrectionSubsets
public Set<Set<S>> minimalCorrectionSubsets(Collection<S> formulas)
Description copied from interface:MusEnumeratorThis method returns the minimal correction subsets of the given set of formulas (i.e. the complements of maximal consistent subsets)- Specified by:
minimalCorrectionSubsetsin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formulas- a set of formulas- Returns:
- the minimal corrections subsets of the given set of formulas.
-
maximalConsistentSubsets
public Collection<Collection<S>> maximalConsistentSubsets(Collection<S> formulas)
Description copied from interface:MusEnumeratorThis method returns the maximal consistent subsets of the given set of formulas- Specified by:
maximalConsistentSubsetsin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formulas- a set of formulas- Returns:
- the maximal consistent subsets of the given set of formulas.
-
isConsistent
public boolean isConsistent(net.sf.tweety.commons.BeliefSet<S,?> beliefSet)
Description copied from interface:ConsistencyTesterChecks whether the given belief base is consistent.- Specified by:
isConsistentin interfaceBeliefSetConsistencyTester<S extends net.sf.tweety.commons.Formula>- Specified by:
isConsistentin interfaceConsistencyTester<S extends net.sf.tweety.commons.Formula>- Specified by:
isConsistentin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
beliefSet- a belief base.- Returns:
- "true" iff the given belief base is consistent.
-
isConsistent
public boolean isConsistent(S formula)
Description copied from interface:BeliefSetConsistencyTesterChecks whether the given formula is consistent.- Specified by:
isConsistentin interfaceBeliefSetConsistencyTester<S extends net.sf.tweety.commons.Formula>- Specified by:
isConsistentin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formula- a formulas.- Returns:
- "true" iff the formula is consistent.
-
isConsistent
public boolean isConsistent(Collection<S> formulas)
Description copied from interface:BeliefSetConsistencyTesterChecks whether the given collection of formulas is consistent.- Specified by:
isConsistentin interfaceBeliefSetConsistencyTester<S extends net.sf.tweety.commons.Formula>- Specified by:
isConsistentin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formulas- a collection of formulas.- Returns:
- "true" iff the given collection of formulas is consistent.
-
getMiComponents
public Collection<Collection<S>> getMiComponents(Collection<S> formulas)
Description copied from interface:MusEnumeratorComputes the maximal (wrt. cardinality) partitioning {K1,...,Kn} of K (ie. K is a disjoint union of K1,...,Kn) such that MI(K) is a disjoint union of MI(K1),...,MI(Kn).- Specified by:
getMiComponentsin interfaceMusEnumerator<S extends net.sf.tweety.commons.Formula>- Parameters:
formulas- a set of formulas K- Returns:
- the MI components of K
-
-