V
- VariableT
- Valuepublic class DefaultParallelAssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>> extends AssignmentContextHolderMap<V,T>
DefaultParallelAssignment
class.
CanHoldContext
are used when possible, storing contexts in arrays, on the
DefaultParallelAssignment.getIndex()
position.AssignmentContext
,
AssignmentContextReference
,
AssignmentContextHolder
Modifier and Type | Field and Description |
---|---|
protected int |
iIndex |
iContexts
Constructor and Description |
---|
DefaultParallelAssignmentContextHolder(int threadIndex) |
Modifier and Type | Method and Description |
---|---|
<C extends AssignmentContext> |
clearContext(AssignmentContextReference<V,T,C> reference)
Clear an assignment context that is associated with the given a reference.
|
<U extends AssignmentContext> |
getAssignmentContext(Assignment<V,T> assignment,
AssignmentContextReference<V,T,U> reference)
Return assignment context for the given assignment and reference.
|
protected int iIndex
public DefaultParallelAssignmentContextHolder(int threadIndex)
public <U extends AssignmentContext> U getAssignmentContext(Assignment<V,T> assignment, AssignmentContextReference<V,T,U> reference)
AssignmentContextHolder
getAssignmentContext
in interface AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>>
getAssignmentContext
in class AssignmentContextHolderMap<V extends Variable<V,T>,T extends Value<V,T>>
U
- assignment context typeassignment
- current assignment (there is only one assignment associated with one holder, but
the assignment is passed so that HasAssignmentContext.createAssignmentContext(Assignment)
can be called if neededreference
- a reference created by calling Model.createReference(HasAssignmentContext)
public <C extends AssignmentContext> void clearContext(AssignmentContextReference<V,T,C> reference)
AssignmentContextHolder
clearContext
in interface AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>>
clearContext
in class AssignmentContextHolderMap<V extends Variable<V,T>,T extends Value<V,T>>
C
- assignment context typereference
- a reference (which can be stored within the model, e.g., as an instance variable of a constraint)