weekdaze-0.0.0.3: A school-timetable problem-solver.

Safe HaskellNone
LanguageHaskell2010

WeekDaze.Aggregate.StudentBodyRegister

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Provides a catalogue of student-profiles, indexed by the student-body by whom it's shared.
Synopsis

Types

Type-synonyms

type StudentBodyRegister level stream teachingRatio = ResourceMap StudentBody (Profile level stream teachingRatio) Source #

A map indexed by student-body, of profiles shared amongst students in the body.

type KnowledgeByStudentBody level = Map StudentBody (Knowledge level) Source #

Knowlege-requirement, indexed by student-body.

Constants

tag :: String Source #

Used to qualify XML.

Functions

countAvailableStudentDays :: StudentBodyRegister level stream teachingRatio -> NDays Source #

The sum of the number of days worked by each student.

countSubjectsRequired :: KnowledgeByStudentBody level -> Int Source #

Count the total number of subjects required by all students.

extractDistinctSubjects :: Ord level => StudentBodyRegister level stream teachingRatio -> Knowledge level Source #

Extracts the set of distinct subjects required, gathered from all students.

reduce :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> Writer [[StudentBody]] (StudentBodyRegister level stream teachingRatio) Source #

  • Merges those student-bodies whose profiles are identical, into a single larger student-body.
  • Writes the lists of merged student-bodies.
  • Checks that any new mnemonics, composed from those of student-bodies with identical profiles, differ from existing ones. This shouldn't matter, because the key of StudentBodyRegister is the whole student-body not just the mnemonic, regrettably, for efficiency, StudentBody implements Eq & Ord using only the mnemonic.

reduce' :: (Ord level, Ord stream, Ord teachingRatio) => MnemonicSeparator -> StudentBodyRegister level stream teachingRatio -> StudentBodyRegister level stream teachingRatio Source #

Merges those student-bodies whose profiles are identical, into a single larger student-body.

Accessors

getStudentBodies :: StudentBodyRegister level stream teachingRatio -> [StudentBody] Source #

Accessor.

Predicates

hasAnyFreePeriodPreference :: RealFrac teachingRatio => StudentBodyRegister level stream teachingRatio -> Bool Source #

True if any student-body has specified a free-period preference.

hasAnyCoreKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool Source #

True if any student-body has specified a core subject in their knowledge-requirements.

hasAnyOptionalKnowledgeRequirements :: StudentBodyRegister level stream teachingRatio -> Bool Source #

True if any student-body has specified an optional subject in their knowledge-requirements.