Class Move<S extends Solution<S,I>,I extends Instance>

java.lang.Object
es.urjc.etsii.grafo.solution.Move<S,I>
Direct Known Subclasses:
__RNAME__BaseMove, TestMove, TestMoveWithMultipleObjectives, TSPBaseMove

public abstract class Move<S extends Solution<S,I>,I extends Instance> extends Object
Represents a change for a given solution in a given neighborhood
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final long
    This variable is used internally to check if the current solution has been modified.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Move(S solution)
    Move constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract S
    _execute(S solution)
    Executes the proposed move, to be implemented by each move type
    abstract boolean
    final S
    execute(S solution)
    Executes the proposed move
    abstract int
    abstract String
    Returns a String representation of the current movement.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • solutionVersion

      protected final long solutionVersion
      This variable is used internally to check if the current solution has been modified.
  • Constructor Details

    • Move

      public Move(S solution)
      Move constructor
      Parameters:
      solution - solution
  • Method Details

    • execute

      public final S execute(S solution)
      Executes the proposed move
    • _execute

      protected abstract S _execute(S solution)
      Executes the proposed move, to be implemented by each move type
    • toString

      public abstract String toString()
      Returns a String representation of the current movement. Tip: Default IDEs implementations are usually fine
      Overrides:
      toString in class Object
      Returns:
      human readable string
    • equals

      public abstract boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public abstract int hashCode()
      Overrides:
      hashCode in class Object