net.sf.cpsolver.coursett.custom

## Class DeterministicStudentSectioning.DeterministicInitialSectioning

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

- All Implemented Interfaces:
    Comparator<Student>
  Enclosing class:
    DeterministicStudentSectioning

      public 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 net.sf.cpsolver.coursett.model.InitialSectioning

      `InitialSectioning.Group`

  - ### Field Summary

    - ### Fields inherited from class net.sf.cpsolver.coursett.model.InitialSectioning

      `iGroups, iOfferingId, iProgress, iStudents`

  - ### 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 net.sf.cpsolver.coursett.model.InitialSectioning

      `addStudent, initialSectioningCfg, moveIntoOneStudent`

    - ### 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>`