net.sf.cpsolver.exam.split

## Class ExamSplitMoves.ExamMergeNeighbour

- java.lang.Object
- - net.sf.cpsolver.ifs.model.Neighbour<Exam,ExamPlacement>
  - - net.sf.cpsolver.exam.split.ExamSplitMoves.ExamMergeNeighbour

- Enclosing class:
    ExamSplitMoves

      protected class ExamSplitMoves.ExamMergeNeighbour
      extends Neighbour<Exam,ExamPlacement>

  Merge two exams that have been split before back into one. This moves the students from the child exam back to its parent and removes the child exam from the problem.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExamMergeNeighbour(Exam exam)` Child exam to be removed.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assign(long iteration)` Perform the merge.
    `Exam` | `exam()` Exam to be merged.
    `int` | `nrStudents()` Number of students that will be moved back to the parent exam or to some other child (if there are any).
    `double` | `value()` Value of the merge.

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

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

- - ### Constructor Detail

    - #### ExamMergeNeighbour

          public ExamMergeNeighbour(Exam exam)

      Child exam to be removed.

  - ### Method Detail

    - #### assign

          public void assign(long iteration)

      Perform the merge.
      Specified by:
        `assign` in class `Neighbour<Exam,ExamPlacement>`

    - #### value

          public double value()

      Value of the merge. This is the weighted sum of all student conflicts that will be added by the merge, minus the weight of the splitter criterion.
      Specified by:
        `value` in class `Neighbour<Exam,ExamPlacement>`

    - #### nrStudents

          public int nrStudents()

      Number of students that will be moved back to the parent exam or to some other child (if there are any).

    - #### exam

          public Exam exam()

      Exam to be merged.