Package org.jacop.satwrapper.translation
Class LazyCpVarDomain<E extends IntVar>
- java.lang.Object
-
- org.jacop.satwrapper.translation.SatCPBridge
-
- org.jacop.satwrapper.translation.LazyCpVarDomain<E>
-
- All Implemented Interfaces:
WrapperComponent
@Deprecated public final class LazyCpVarDomain<E extends IntVar> extends SatCPBridge
Deprecated.double linked lazy list, to store boolean variables that represent a range of values for a variable- Version:
- 4.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LazyCpVarDomain.ListNode
Deprecated.a node of the double linked list
-
Field Summary
Fields Modifier and Type Field Description private DomainClausesDatabase
database
Deprecated.LazyCpVarDomain.ListNode
left
Deprecated.private LazyCpVarDomain.ListNode
maxNode
Deprecated.private LazyCpVarDomain.ListNode
minNode
Deprecated.LazyCpVarDomain.ListNode
right
Deprecated.-
Fields inherited from class org.jacop.satwrapper.translation.SatCPBridge
hasSetDomain, initialDomain, max, min, variable, wrapper
-
-
Constructor Summary
Constructors Constructor Description LazyCpVarDomain(IntVar variable)
Deprecated.creates the var list
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
boolVarToCpValue(int literal)
Deprecated.return the value corresponding to given literal (variable)int
cpValueToBoolVar(int value, boolean isEquality)
Deprecated.return the literal that represents the assertion 'var = value'.void
initialize(SatWrapper wrapper)
Deprecated.connect the component to the wrapperboolean
isEqualityBoolVar(int literal)
Deprecated.checks if the literal stands for a 'x=d' proposition, or a 'x<=d' propositionboolean
isTranslated()
Deprecated.predicate for whether this variable should be handled by the DomainClausesDatabase or notvoid
propagate(int literal)
Deprecated.does all propagation required, in a way specific to this range.void
setDomain(int minValue, int maxValue)
Deprecated.set the domain to be between minValue and maxValue.-
Methods inherited from class org.jacop.satwrapper.translation.SatCPBridge
getLeftLimit, getRightLimit, isInThisRange, toString
-
-
-
-
Field Detail
-
left
public LazyCpVarDomain.ListNode left
Deprecated.
-
right
public LazyCpVarDomain.ListNode right
Deprecated.
-
minNode
private LazyCpVarDomain.ListNode minNode
Deprecated.
-
maxNode
private LazyCpVarDomain.ListNode maxNode
Deprecated.
-
database
private DomainClausesDatabase database
Deprecated.
-
-
Constructor Detail
-
LazyCpVarDomain
public LazyCpVarDomain(IntVar variable)
Deprecated.creates the var list- Parameters:
variable
- the variable this list represents
-
-
Method Detail
-
cpValueToBoolVar
public int cpValueToBoolVar(int value, boolean isEquality)
Deprecated.Description copied from class:SatCPBridge
return the literal that represents the assertion 'var = value'. For the proposition 'var<= value', set the isEquality flag to false- Specified by:
cpValueToBoolVar
in classSatCPBridge
- Parameters:
value
- the value for the variable this range representsisEquality
- true if we want the literal for 'x=d
' kind of propositions, false for 'x<=d
'- Returns:
- the literal corresponding to 'var = this value'. If the value is out of the domain of the variable, returns 0.
-
boolVarToCpValue
public int boolVarToCpValue(int literal)
Deprecated.Description copied from class:SatCPBridge
return the value corresponding to given literal (variable)- Specified by:
boolVarToCpValue
in classSatCPBridge
- Parameters:
literal
- the literal standing for 'var = value'- Returns:
- the value such that 'var = value' (or 'var<= value')
-
isEqualityBoolVar
public boolean isEqualityBoolVar(int literal)
Deprecated.Description copied from class:SatCPBridge
checks if the literal stands for a 'x=d' proposition, or a 'x<=d' proposition- Specified by:
isEqualityBoolVar
in classSatCPBridge
- Parameters:
literal
- the literal (among literals from this range)- Returns:
- true if the literal stands for 'x=d', false otherwise
-
setDomain
public void setDomain(int minValue, int maxValue)
Deprecated.Description copied from class:SatCPBridge
set the domain to be between minValue and maxValue. It only does something on the first call.- Overrides:
setDomain
in classSatCPBridge
- Parameters:
minValue
- minimum value of the rangemaxValue
- maximum value of the range
-
propagate
public void propagate(int literal)
Deprecated.Description copied from class:SatCPBridge
does all propagation required, in a way specific to this range. This part may not be used, if the variable is not bound to a DomainClausesDatabase. This will be called only ifthis.isTranslated()
is false.- Specified by:
propagate
in classSatCPBridge
- Parameters:
literal
- the literal that has been asserted
-
isTranslated
public boolean isTranslated()
Deprecated.Description copied from class:SatCPBridge
predicate for whether this variable should be handled by the DomainClausesDatabase or not- Specified by:
isTranslated
in classSatCPBridge
- Returns:
- true if the variable should be handled by the DomainClausesDatabase
-
initialize
public void initialize(SatWrapper wrapper)
Deprecated.Description copied from interface:WrapperComponent
connect the component to the wrapper- Specified by:
initialize
in interfaceWrapperComponent
- Specified by:
initialize
in classSatCPBridge
- Parameters:
wrapper
- the wrapper
-
-