Package org.mcp.core
Class MCPOperableLabel
java.lang.Object
org.mcp.variables.dynamics.OperableLabel
org.mcp.core.MCPOperableLabel
MCPOperableLabel wraps an MCPBitVector and provides set operations (union, intersection, difference)
for use in dynamic symbolic computations.
This class implements the OperableLabel interface, enabling symbolic manipulation of sets of constraints using BDD or SAT representations.
- Since:
- 2025-02-28
- Author:
-
Constructor Summary
ConstructorsConstructorDescriptionMCPOperableLabel(MCPBitVector value) Constructs a new MCPOperableLabel with the given symbolic value.MCPOperableLabel(MCPOperableLabel other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a copy of this MCPOperableLabel.booleanChecks equality with another object.Returns the factory (BDDFactory or FormulaFactory) associated with this label.getValue()Returns the underlying symbolic value.inthashCode()Returns the hash code for this label.inter(OperableLabel other) Returns the intersection of this label and another.booleanisEmpty()Checks if this label represents the empty set.minus(OperableLabel other) Returns the difference of this label and another (this \ other).voidsetFactory(Object factory) Sets the factory (BDDFactory or FormulaFactory) for this label.toString()Returns a string representation of this label.union(OperableLabel other) Returns the union of this label and another.Methods inherited from class org.mcp.variables.dynamics.OperableLabel
clone
-
Constructor Details
-
MCPOperableLabel
Copy constructor.- Parameters:
other- the MCPOperableLabel to copy
-
MCPOperableLabel
Constructs a new MCPOperableLabel with the given symbolic value.- Parameters:
value- the MCPBitVector value
-
-
Method Details
-
copy
Returns a copy of this MCPOperableLabel.- Returns:
- a new MCPOperableLabel with the same value
-
getFactory
Returns the factory (BDDFactory or FormulaFactory) associated with this label.- Returns:
- the factory object
-
setFactory
Sets the factory (BDDFactory or FormulaFactory) for this label.- Parameters:
factory- the factory object
-
union
Returns the union of this label and another.- Specified by:
unionin classOperableLabel- Parameters:
other- the other OperableLabel- Returns:
- a new MCPOperableLabel representing the union
-
inter
Returns the intersection of this label and another.- Specified by:
interin classOperableLabel- Parameters:
other- the other OperableLabel- Returns:
- a new MCPOperableLabel representing the intersection
-
minus
Returns the difference of this label and another (this \ other).- Specified by:
minusin classOperableLabel- Parameters:
other- the other OperableLabel- Returns:
- a new MCPOperableLabel representing the difference
-
getValue
Returns the underlying symbolic value.- Specified by:
getValuein classOperableLabel- Returns:
- the MCPBitVector value
-
equals
Checks equality with another object.- Specified by:
equalsin classOperableLabel- Parameters:
o- the object to compare- Returns:
- true if equal, false otherwise
-
hashCode
public int hashCode()Returns the hash code for this label.- Specified by:
hashCodein classOperableLabel- Returns:
- the hash code
-
toString
Returns a string representation of this label.- Specified by:
toStringin classOperableLabel- Returns:
- a string representation
-
isEmpty
public boolean isEmpty()Checks if this label represents the empty set.- Specified by:
isEmptyin classOperableLabel- Returns:
- true if empty, false otherwise
-