org.cpsolver.studentsct.heuristics.selection

## Class BranchBoundSelection.BranchBoundNeighbour

- java.lang.Object
- - org.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.BranchBoundNeighbour

- All Implemented Interfaces:
    Neighbour<Request,Enrollment>
  Enclosing class:
    BranchBoundSelection

      public static class BranchBoundSelection.BranchBoundNeighbour
      extends Object
      implements Neighbour<Request,Enrollment>

  Branch & bound neighbour -- a schedule of a student

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BranchBoundNeighbour(Student student, double value, Enrollment[] assignment)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `assign(Assignment<Request,Enrollment> assignment, long iteration)` Assign the schedule
    `Map<Request,Enrollment>` | `assignments()` Return assignments to be done.
    `Enrollment[]` | `getAssignment()` Assignment
    `Student` | `getStudent()` Student
    `String` | `toString()`
    `double` | `value(Assignment<Request,Enrollment> assignment)` 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

    - #### BranchBoundNeighbour

          public BranchBoundNeighbour(Student student,
                                      double value,
                                      Enrollment[] assignment)

      Constructor
      Parameters:
        `student` - selected student
        `value` - value of the schedule
        `assignment` - enrollments of student's requests

  - ### Method Detail

    - #### value

          public double value(Assignment<Request,Enrollment> assignment)

      Description copied from interface: `Neighbour`
      Difference in the evaluation function, if this neighnour is assigned.
      Specified by:
        `value` in interface `Neighbour<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment
      Returns:
        difference in the solution value when assigned

    - #### getAssignment

          public Enrollment[] getAssignment()

      Assignment
      Returns:
        an enrollment for each request of the student

    - #### getStudent

          public Student getStudent()

      Student
      Returns:
        selected student

    - #### assign

          public void assign(Assignment<Request,Enrollment> assignment,
                             long iteration)

      Assign the schedule
      Specified by:
        `assign` in interface `Neighbour<Request,Enrollment>`
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### assignments

          public Map<Request,Enrollment> assignments()

      Description copied from interface: `Neighbour`
      Return assignments to be done.
      Specified by:
        `assignments` in interface `Neighbour<Request,Enrollment>`
      Returns:
        list of assignments (including unassignments) of this neighbour