Package org.mcp.core
Class ECEngine
java.lang.Object
org.mcp.core.ECEngine
A utility class for computing Equivalence Classes (ECs) from a set of labels.
ECs are the minimal set of labels such that:
- No EC is logically false.
- The disjunction of all ECs is logically true.
- Each EC is disjoint from all others.
- Each label is equivalent to a disjunction of some subset of the ECs.
- Since:
- 2025-02-28
- Author:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a mapping from EC indices to their semantic representations.getECs()Returns a mapping from each label to the set of EC indices it covers.intReturns the number of computed ECs.
-
Constructor Details
-
ECEngine
Constructs ECs for the given set of labels.- Parameters:
labels- the set of labels to compute ECs fortrueLabel- a label representing logical "true"
-
-
Method Details
-
getNumECs
public int getNumECs()Returns the number of computed ECs.- Returns:
- the number of ECs
-
getECAutomata
Returns a mapping from EC indices to their semantic representations.- Returns:
- a map from EC index to OperableLabel
-
getECs
Returns a mapping from each label to the set of EC indices it covers.- Returns:
- a map from Label to set of EC indices
-