Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type JS = Integer
- type GS = Integer
- type G = Integer
- rankOfMajorityValue :: GS -> MajorityValue (Ranked grade) -> Integer
- positionOfMajorityValue :: GS -> MajorityValue (Ranked grade) -> Rational
- countMiddleFrom :: JS -> GS -> (G, G) -> (G, G) -> Integer
- countMiddle :: JS -> GS -> (G, G) -> Integer
- probaMajorityGrades :: JS -> GS -> [Rational]
- countMerits :: JS -> GS -> Integer
- lastRank :: JS -> GS -> Integer
- nCk :: Integral i => i -> i -> i
Documentation
rankOfMajorityValue :: GS -> MajorityValue (Ranked grade) -> Integer Source #
'rankOfMajorityValue gs mv' returns
the number of MajorityValue
lower than given mv
.
positionOfMajorityValue :: GS -> MajorityValue (Ranked grade) -> Rational Source #
countMiddle :: JS -> GS -> (G, G) -> Integer Source #
'countMiddle js gs (l,h)'
returns the number of MajorityValue
s of length js
and using grades gs
,
which have '(l,h)' as lower and upper majority grade.
This is done by multiplying together
the countMerits
to the left of l
and the countMerits
to the right of h
probaMajorityGrades :: JS -> GS -> [Rational] Source #
(probaMajorityGrades js gs' compute the probability
of each grade to be a MajorityGrade
given js
judges and gs
grades.