org.cpsolver.ifs.heuristics

## Class BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext

- java.lang.Object
- - org.cpsolver.ifs.heuristics.BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext

- All Implemented Interfaces:
    AssignmentContext
  Enclosing class:
    BacktrackNeighbourSelection<V extends Variable<V,T>,T extends Value<V,T>>

      public class BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext
      extends Object
      implements AssignmentContext

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BacktrackNeighbourSelection.BackTrackNeighbour` | `iBackTrackNeighbour`
    `protected Solution<V,T>` | `iSolution`
    `protected double` | `iValue`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BacktrackNeighbourSelectionContext(Solution<V,T> solution)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Assignment<V,T>` | `getAssignment()`
    `BacktrackNeighbourSelection.BackTrackNeighbour` | `getBackTrackNeighbour()`
    `Model<V,T>` | `getModel()`
    `long` | `getTime()` Time needed to find a neighbour (last call of selectNeighbour method)
    `void` | `incIteration()`
    `boolean` | `isMaxItersReached()` True, if the maximum number of iterations was reached by the last call of selectNeighbour method
    `boolean` | `isTimeoutReached()` True, if timeout was reached during the last call of selectNeighbour method
    `void` | `saveBest(List<V> variables2resolve)`
    `void` | `saveBest(V... variables2resolve)`

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

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

- - ### Field Detail

    - #### iSolution

          protected Solution<V extends Variable<V,T>,T extends Value<V,T>> iSolution

    - #### iBackTrackNeighbour

          protected BacktrackNeighbourSelection.BackTrackNeighbour iBackTrackNeighbour

    - #### iValue

          protected double iValue

  - ### Constructor Detail

    - #### BacktrackNeighbourSelectionContext

          public BacktrackNeighbourSelectionContext(Solution<V,T> solution)

  - ### Method Detail

    - #### getTime

          public long getTime()

      Time needed to find a neighbour (last call of selectNeighbour method)
      Returns:
        search time

    - #### isTimeoutReached

          public boolean isTimeoutReached()

      True, if timeout was reached during the last call of selectNeighbour method
      Returns:
        true if the timeout was reached

    - #### isMaxItersReached

          public boolean isMaxItersReached()

      True, if the maximum number of iterations was reached by the last call of selectNeighbour method
      Returns:
        true if the maximum number of iterations was reached

    - #### getBackTrackNeighbour

          public BacktrackNeighbourSelection.BackTrackNeighbour getBackTrackNeighbour()

    - #### incIteration

          public void incIteration()

    - #### saveBest

          public void saveBest(List<V> variables2resolve)

    - #### saveBest

          public void saveBest(V... variables2resolve)

    - #### getModel

          public Model<V,T> getModel()

    - #### getAssignment

          public Assignment<V,T> getAssignment()