org.cpsolver.ifs.assignment

## Class DefaultInheritedAssignment<V extends Variable<V,T>,T extends Value<V,T>>

- java.lang.Object
- - org.cpsolver.ifs.assignment.AssignmentAbstract<V,T>
  - - org.cpsolver.ifs.assignment.DefaultParallelAssignment<V,T>
    - - org.cpsolver.ifs.assignment.DefaultInheritedAssignment<V,T>

- Type Parameters:
    `V` - Variable
    `T` - Value
  All Implemented Interfaces:
    Assignment<V,T>, InheritedAssignment<V,T>

      public class DefaultInheritedAssignment<V extends Variable<V,T>,T extends Value<V,T>>
      extends DefaultParallelAssignment<V,T>
      implements InheritedAssignment<V,T>

  Default inherited assignment. This assignment is based on `DefaultParallelAssignment` and creates a full copy of the given assignment during its creation. This inherited assignment is slower than `OptimisticInheritedAssignment`, but more reliable. Useful for small problems with a lot of constraints.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2014 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.
  See Also:
    `InheritedAssignment`

- - ### Field Summary

    - ### Fields inherited from class org.cpsolver.ifs.assignment.AssignmentAbstract

      `iContexts, iHasInitialzedContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultInheritedAssignment(Solution<V,T> parent, int index)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Assignment<V,T>` | `getParentAssignment()` Return parent assignment.
    `long` | `getVersion()` Version of the assignment (usually the iteration of the parent assignment at the time of creation)

    - ### Methods inherited from class org.cpsolver.ifs.assignment.DefaultParallelAssignment

      `assignedVariables, getIndex, getIteration, getValueInternal, setValueInternal`

    - ### Methods inherited from class org.cpsolver.ifs.assignment.AssignmentAbstract

      `assign, assign, assignedValues, clearContext, ensureInitializedContext, getAssignmentContext, getValue, nrAssignedVariables, nrUnassignedVariables, unassign, unassign, unassignedVariables`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.cpsolver.ifs.assignment.Assignment

      `assign, assignedValues, assignedVariables, clearContext, getAssignmentContext, getIndex, getIteration, getValue, nrAssignedVariables, nrUnassignedVariables, unassign, unassign, unassignedVariables`

- - ### Constructor Detail

    - #### DefaultInheritedAssignment

          public DefaultInheritedAssignment(Solution<V,T> parent,
                                            int index)

  - ### Method Detail

    - #### getParentAssignment

          public Assignment<V,T> getParentAssignment()

      Description copied from interface: `InheritedAssignment`
      Return parent assignment.
      Specified by:
        `getParentAssignment` in interface `InheritedAssignment<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        parent assignment

    - #### getVersion

          public long getVersion()

      Description copied from interface: `InheritedAssignment`
      Version of the assignment (usually the iteration of the parent assignment at the time of creation)
      Specified by:
        `getVersion` in interface `InheritedAssignment<V extends Variable<V,T>,T extends Value<V,T>>`
      Returns:
        version of the inherited assignment