public abstract class DecomposedConstraint<T extends Constraint> extends Object
Modifier and Type | Field and Description |
---|---|
int |
queueIndex
It specifies the queue (index), which is used to record that constraint
needs to be re-evaluated.
|
Constructor and Description |
---|
DecomposedConstraint() |
Modifier and Type | Method and Description |
---|---|
List<Var> |
auxiliaryVariables() |
void |
checkInput(int[] list,
Predicate<Integer> condition,
String conditionDescription) |
<T> void |
checkInput(T[] list,
Predicate<T> condition,
String conditionDescription) |
void |
checkInputForDuplication(String a,
Object[] parameters) |
void |
checkInputForDuplicationSkipSingletons(String a,
Var[] parameters) |
void |
checkInputForNullness(String[] a,
Object[]... parameters) |
void |
checkInputForNullness(String a,
int[] parameters) |
void |
checkInputForNullness(String a,
Object[] parameters) |
abstract List<T> |
decompose(Store store)
It returns an array list of constraint which are used to decompose this
constraint.
|
FloatVar |
derivative(Store store,
FloatVar f,
Set<FloatVar> vars,
FloatVar x) |
static Set<Var> |
getDubletonsSkipSingletons(Var[] parameters) |
abstract void |
imposeDecomposition(Store store)
It imposes the constraint in a given store.
|
void |
imposeDecomposition(Store store,
int queueIndex)
It imposes the constraint and adjusts the queue index.
|
public int queueIndex
Priorytet 0 - O(c), constant execution time, e.g. primitive constraints Priorytet 1 - O(n), linear execution time, e.g. Sum, SumWeight Priorytet 2 - O(n^2) quadratic execution time, e.g. Cumulative Diff2 Priorytet 3 - polynomial execution time Priorytet 4 - execution time can be exponential in worst case, SumWeightDom
public abstract void imposeDecomposition(Store store)
store
- the constraint store to which the constraint is imposed to.public void imposeDecomposition(Store store, int queueIndex)
store
- the constraint store to which the constraint is imposed to.queueIndex
- the index of the queue in the store it is assigned to.public abstract List<T> decompose(Store store)
store
- the constraint store in which context the decomposition takes place.public List<Var> auxiliaryVariables()
public void checkInputForDuplicationSkipSingletons(String a, Var[] parameters)
public void checkInputForNullness(String a, int[] parameters)
public <T> void checkInput(T[] list, Predicate<T> condition, String conditionDescription)
public void checkInput(int[] list, Predicate<Integer> condition, String conditionDescription)
Copyright © 2022. All rights reserved.