net.sf.cpsolver.ifs.heuristics

## Class BacktrackNeighbourSelection.BackTrackNeighbour

- java.lang.Object
- - net.sf.cpsolver.ifs.model.Neighbour<V,T>
  - - net.sf.cpsolver.ifs.heuristics.BacktrackNeighbourSelection.BackTrackNeighbour

- Enclosing class:
    BacktrackNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>

      public class BacktrackNeighbourSelection.BackTrackNeighbour
      extends Neighbour<V,T>

  Backtracking neighbour

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackTrackNeighbour(List<V> resolvedVariables)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assign(long iteration)` Assign the neighbour
    `int` | `compareTo(Solution<V,T> solution)` Compare two neighbours
    `List<T>` | `getAssignments()` Neighbour assignments
    `double` | `getTotalValue()` Neighbour value (solution total value if the neighbour is applied).
    `String` | `toString()`
    `double` | `value()` Sum of values of variables from the neighbour that change their values

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

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

- - ### Constructor Detail

    - #### BackTrackNeighbour

          public BackTrackNeighbour(List<V> resolvedVariables)

      Constructor
      Parameters:
        `resolvedVariables` - variables that has been changed

  - ### Method Detail

    - #### getTotalValue

          public double getTotalValue()

      Neighbour value (solution total value if the neighbour is applied).

    - #### value

          public double value()

      Sum of values of variables from the neighbour that change their values
      Specified by:
        `value` in class `Neighbour<V extends Variable<V,T>,T extends Value<V,T>>`

    - #### getAssignments

          public List<T> getAssignments()

      Neighbour assignments

    - #### assign

          public void assign(long iteration)

      Assign the neighbour
      Specified by:
        `assign` in class `Neighbour<V extends Variable<V,T>,T extends Value<V,T>>`

    - #### compareTo

          public int compareTo(Solution<V,T> solution)

      Compare two neighbours

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`