org.cpsolver.coursett.custom

## Class DeterministicStudentSectioning.DeterministicInitialSectioning

- java.lang.Object
- - org.cpsolver.coursett.model.InitialSectioning
  - - org.cpsolver.coursett.custom.DeterministicStudentSectioning.DeterministicInitialSectioning

- All Implemented Interfaces:
    Comparator<Student>
  Direct Known Subclasses:
    SctSectioning.GroupBasedInitialSectioning
  Enclosing class:
    DeterministicStudentSectioning

      public static class DeterministicStudentSectioning.DeterministicInitialSectioning
      extends InitialSectioning
      implements Comparator<Student>

  Assign students to groups in a deterministic way, i.e., first student to first available group etc.
  Author:
    Tomáš Müller

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.cpsolver.coursett.model.InitialSectioning

      `InitialSectioning.Group`

  - ### Field Summary

    - ### Fields inherited from class org.cpsolver.coursett.model.InitialSectioning

      `iGroups, iMustFollowReservations, iOfferingId, iProgress, iStudents, sNominalWeight`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DeterministicInitialSectioning(Progress progress, Long offeringId, Collection<?> lectureOrConfigurations, Collection<Student> students)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Student s1, Student s2)` Sort students by their curriculum information and id
    `InitialSectioning.Group[]` | `getGroups()`
    `protected void` | `tweakSizes(double total)`

    - ### Methods inherited from class org.cpsolver.coursett.model.InitialSectioning

      `addStudent, getProgress, initialSectioningCfg, isMustFollowReservations, moveIntoOneStudent, setMustFollowReservations`

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

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

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### DeterministicInitialSectioning

          public DeterministicInitialSectioning(Progress progress,
                                                Long offeringId,
                                                Collection<?> lectureOrConfigurations,
                                                Collection<Student> students)

  - ### Method Detail

    - #### tweakSizes

          protected void tweakSizes(double total)

      Overrides:
        `tweakSizes` in class `InitialSectioning`

    - #### getGroups

          public InitialSectioning.Group[] getGroups()

      Overrides:
        `getGroups` in class `InitialSectioning`

    - #### compare

          public int compare(Student s1,
                             Student s2)

      Sort students by their curriculum information and id
      Specified by:
        `compare` in interface `Comparator<Student>`