net.sf.cpsolver.exam.neighbours

## Class ExamRoomSwapNeighbour

- java.lang.Object
- - net.sf.cpsolver.ifs.model.Neighbour<Exam,ExamPlacement>
  - - net.sf.cpsolver.exam.neighbours.ExamRoomSwapNeighbour

-     public class ExamRoomSwapNeighbour
      extends Neighbour<Exam,ExamPlacement>

  Swap a room between two assigned exams.
  Version:
    ExamTT 1.2 (Examination Timetabling)
    Copyright (C) 2008 - 2010 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/.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExamRoomSwapNeighbour(ExamPlacement placement, ExamRoomPlacement current, ExamRoomPlacement swap)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assign(long iteration)` Perform assignmnet
    `boolean` | `canDo()`
    `String` | `toString()`
    `protected static String` | `toString(double[] x, double[] y)`
    `double` | `value()` Difference in the evaluation function, if this neighnour is assigned.

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

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

- - ### Constructor Detail

    - #### ExamRoomSwapNeighbour

          public ExamRoomSwapNeighbour(ExamPlacement placement,
                                       ExamRoomPlacement current,
                                       ExamRoomPlacement swap)

  - ### Method Detail

    - #### canDo

          public boolean canDo()

    - #### assign

          public void assign(long iteration)

      Description copied from class: `Neighbour`
      Perform assignmnet
      Specified by:
        `assign` in class `Neighbour<Exam,ExamPlacement>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          protected static String toString(double[] x,
                                           double[] y)

    - #### value

          public double value()

      Description copied from class: `Neighbour`
      Difference in the evaluation function, if this neighnour is assigned.
      Specified by:
        `value` in class `Neighbour<Exam,ExamPlacement>`