Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the weight associated with some criterion.
- Each weighting is quantified by some
Fractional
value in the closed unit-interval; negative values aren't permitted. - If a concept is of no significance, then its weight can be set to minBound, whilst concepts of great significance can be set to maxBound.
CAVEAT
- While this data-type could implement the classes
Functor
,Num
,Fractional
&Real
, these interfaces allow one to construct invalid instances.
Synopsis
- class CriterionWeights a where
- areAllZero :: a -> Bool
- data CriterionWeight w
- mkCriterionWeight :: Real w => w -> CriterionWeight w
Type-classes
class CriterionWeights a where Source #
An interface to which a collection of criteria-weights may conform.
:: a | |
-> Bool | True if all the weights are zero. |
Instances
(Bounded a, Eq a) => CriterionWeights [a] Source # | |
Defined in WeekDaze.ExecutionConfiguration.CriterionWeight areAllZero :: [a] -> Bool Source # | |
(Eq criterionWeight, Num criterionWeight) => CriterionWeights (LessonCriteriaWeights criterionWeight) Source # | |
Defined in WeekDaze.ExecutionConfiguration.LessonCriteriaWeights areAllZero :: LessonCriteriaWeights criterionWeight -> Bool Source # | |
(Eq criterionWeight, Num criterionWeight) => CriterionWeights (TimetableCriteriaWeights criterionWeight) Source # | |
Defined in WeekDaze.ExecutionConfiguration.TimetableCriteriaWeights areAllZero :: TimetableCriteriaWeights criterionWeight -> Bool Source # |
Types
Data-types
data CriterionWeight w Source #
- Quantifies the relative significance, of criteria used to assess the desirability of a resource.
- The larger the value, the more significant the criterion; relative to other criteria applicable to the same resource.
Instances
Functions
Constructor
mkCriterionWeight :: Real w => w -> CriterionWeight w Source #
Smart constructor.