schedule-planner

Copyright(c) Justus Adam, 2015
LicenseLGPL-3
Maintainerdevelopment@justusadam.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

SchedulePlanner.Calculator.Scale

Description

This module is used to weigh a list of lessons according to rules.

Synopsis

Documentation

weigh :: [Rule] -> [Lesson s] -> [Lesson s]

Main function of the module.

This funcion calculates weights the Lessons provided applying the Rules provided.

Resulting Lessons are exactly the same, except for the weight component which is the old weight + the weight calculated from the rules

data Rule

Weight increase by severity for all Lessons in target

Constructors

Rule 

Fields

target :: Target
 
severity :: Int
 

Instances

data Target

The scope and target a Rule whishes to influence

Constructors

Slot Int 
Day Int 
Cell Int Int 

calcMaps :: [Rule] -> WeightMap

Contruct a scope -> weight increase map for more efficient weighing afterwards

type WeightMap = Map Target Int

Type alias for more expressive function signature