# Package org.cpsolver.ifs.assignment.context

Assignment context can be used by a class (e.g., a constraint, a extension, a neighborhood selection, or a criterion) to contain any assignment dependent data.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  AssignmentConstraintContext<V extends Variable<V,T>,T extends Value<V,T>> | An extension of the simple `AssignmentContext` which is used by the `ConstraintWithContext` class.
  AssignmentContext | An interface marking an assignment context.
  AssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>> | An interface holding all assignment contexts associated with one assignment.
  CanHoldContext | An additional interface that can be implemented by the `HasAssignmentContext` class.
  CanInheritContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | An additional interface that can be implemented by the `HasAssignmentContext` class.
  HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | An interface to be implemented by a class that need an assignment context associated with it.

- Class Summary
  Class | Description
  --- | ---
  AbstractClassWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | An abstract implementation of an assignment context holding class.
  AssignmentContextHelper |
  AssignmentContextHolderArray<V extends Variable<V,T>,T extends Value<V,T>> | A simple assignment context holder implementation using array to store all the assignment contexts.
  AssignmentContextHolderMap<V extends Variable<V,T>,T extends Value<V,T>> | A simple assignment context holder implementation using `HashMap` to store all the assignment contexts.
  AssignmentContextReference<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | A reference to an assignment context.
  BinaryConstraintWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>> | A binary constraint with an assignment context.
  ConstraintWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>> | A constraint with an assignment context.
  DefaultParallelAssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>> | A simple assignment context holder implementation used by the `DefaultParallelAssignment` class.
  DefaultSingleAssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>> | A simple assignment context holder implementation used by the `DefaultSingleAssignment` class.
  ExtensionWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | An extension with an assignment context.
  InheritedAssignmentContextHolder<V extends Variable<V,T>,T extends Value<V,T>> | A variant of the `AssignmentContextHolderMap` that is used by the `InheritedAssignment` class.
  InheritedAssignmentContextHolder.VersionedContext<U extends AssignmentContext> |
  ModelWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentConstraintContext<V,T>> | A model with an assignment context.
  NeighbourSelectionWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | A neighborhood selection with an assignment context.
  VariableWithContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext> | A variable with an assignment context.

- Enum Summary
  Enum | Description
  --- | ---
  ModelWithContext.ContextUpdateType | Defines how the context of the model should be automatically updated (i.e., when `AssignmentConstraintContext.assigned(Assignment, Value)` and `AssignmentConstraintContext.unassigned(Assignment, Value)` are called).

## Package org.cpsolver.ifs.assignment.context Description

Assignment context can be used by a class (e.g., a constraint, a extension, a neighborhood selection, or a criterion) to contain any assignment dependent data. Instead of holding the data directly, the class only holds a reference to the appropriate assignment context, which is stored with the assignment and returned from the assignment using the reference.

Version:
  IFS 1.4 (Instructor Sectioning)
  Copyright (C) 2024 Tomáš Müller
  muller@unitime.org
  http://muller.unitime.org
  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
Author:
  Tomáš Müller