Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the value of a single criterion, which quantifies the significance of some concept; many such criteria may exist, & their weighted-mean drives automated selection of moves.
- Each criterion-value is normalised into the signed closed unit-interval.
CAVEAT
- While this data-type could implement the classes
Num
,Fractional
&Real
, these interfaces would allow one to construct invalid instances.
- data CriterionValue criterionValue
- zero :: Num criterionValue => CriterionValue criterionValue
- calculateWeightedMean :: (Fractional weightedMean, Real criterionValue, Real criterionWeight) => [(CriterionValue criterionValue, CriterionWeight criterionWeight)] -> WeightedMeanAndCriterionValues weightedMean criterionValue
- mkCriterionValue :: (Num criterionValue, Ord criterionValue) => criterionValue -> CriterionValue criterionValue
Types
Data-types
data CriterionValue criterionValue Source #
Quantifies some criterion; the larger the signed value, the better.
Num criterionValue => Bounded (CriterionValue criterionValue) Source # | |
Eq criterionValue => Eq (CriterionValue criterionValue) Source # | |
Show criterionValue => Show (CriterionValue criterionValue) Source # | |
Constants
zero :: Num criterionValue => CriterionValue criterionValue Source #
Constant.
Functions
calculateWeightedMean :: (Fractional weightedMean, Real criterionValue, Real criterionWeight) => [(CriterionValue criterionValue, CriterionWeight criterionWeight)] -> WeightedMeanAndCriterionValues weightedMean criterionValue Source #
- Calculates the weighted mean of the specified
CriterionValue
s using the corresponding criterion-weights. - Also writes individual unweighted
CriterionValue
s, to facilitate post-analysis; if the corresponding weight is0
, evaluation of the criterion is, for efficiency, avoided. - CAVEAT: if all weights are
0
, then the result is indeterminate.
Constructor
mkCriterionValue :: (Num criterionValue, Ord criterionValue) => criterionValue -> CriterionValue criterionValue Source #
Smart constructor.