org.cpsolver.coursett.sectioning

## Class SctStudent

- java.lang.Object
- - org.cpsolver.coursett.sectioning.SctStudent

- All Implemented Interfaces:
    Comparable<SctStudent>

      public class SctStudent
      extends Object
      implements Comparable<SctStudent>

  A class wrapping a student, including an ordered set of possible enrollment into a given course.
  Version:
    CourseTT 1.3 (University Course Timetabling)
    Copyright (C) 2017 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/.
  Author:
    Tomáš Müller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SctStudent(SctModel model, Student student)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Student s1, Student s2)` Compare two students using their curriculum information
    `int` | `compareTo(SctStudent s)` Compare two student, using average conflict weight, number of possible enrollments and their curriculum information.
    `double` | `getAverageConflictWeight()` Average conflict weight
    `SctEnrollment` | `getCurrentEnrollment(boolean checkInstructor)` Current enrollment of this student
    `List<SctEnrollment>` | `getEnrollments()` Return all possible enrollments of the given student into the given course
    `List<SctEnrollment>` | `getEnrollments(Comparator<SctEnrollment> cmp)`
    `List<Lecture>` | `getInstructingLectures()` List of lectures of the given course that the student is instructing (if he/she is also an instructor, using `Student.getInstructor()`)
    `double` | `getJenrConflictWeight(Lecture l1, Lecture l2)` Conflict weight of a lecture pair
    `SctModel` | `getModel()` Student sectioning model
    `int` | `getNumberOfEnrollments()` Number of all possible enrollments of the given student into the given course
    `double` | `getOfferingWeight()` Offering weight using `Student.getOfferingWeight(Long)`
    `Student` | `getStudent()` Student for which the possible enrollments are being computed
    `boolean` | `isInstructing()` Is student also an instructor of the given course?
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SctStudent

          public SctStudent(SctModel model,
                            Student student)

      Constructor.
      Parameters:
        `model` - student sectioning model
        `student` - student to represent

  - ### Method Detail

    - #### getModel

          public SctModel getModel()

      Student sectioning model

    - #### getStudent

          public Student getStudent()

      Student for which the possible enrollments are being computed

    - #### getCurrentEnrollment

          public SctEnrollment getCurrentEnrollment(boolean checkInstructor)

      Current enrollment of this student
      Parameters:
        `checkInstructor` - if the student is also instructor and he/she is instructing this class, return classes he/she is instructing instead
      Returns:
        current enrollment of this student into the given course

    - #### getInstructingLectures

          public List<Lecture> getInstructingLectures()

      List of lectures of the given course that the student is instructing (if he/she is also an instructor, using `Student.getInstructor()`)
      Returns:
        list of lectures of the given course that the student is instructing

    - #### isInstructing

          public boolean isInstructing()

      Is student also an instructor of the given course?

    - #### getJenrConflictWeight

          public double getJenrConflictWeight(Lecture l1,
                                              Lecture l2)

      Conflict weight of a lecture pair

    - #### getEnrollments

          public List<SctEnrollment> getEnrollments()

      Return all possible enrollments of the given student into the given course

    - #### getEnrollments

          public List<SctEnrollment> getEnrollments(Comparator<SctEnrollment> cmp)

    - #### getNumberOfEnrollments

          public int getNumberOfEnrollments()

      Number of all possible enrollments of the given student into the given course

    - #### getAverageConflictWeight

          public double getAverageConflictWeight()

      Average conflict weight

    - #### getOfferingWeight

          public double getOfferingWeight()

      Offering weight using `Student.getOfferingWeight(Long)`

    - #### compare

          public int compare(Student s1,
                             Student s2)

      Compare two students using their curriculum information

    - #### compareTo

          public int compareTo(SctStudent s)

      Compare two student, using average conflict weight, number of possible enrollments and their curriculum information. Student that is harder to schedule goes first.
      Specified by:
        `compareTo` in interface `Comparable<SctStudent>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`