Copyright | (c) Pablo Couto 2014 |
---|---|
License | GPL-3 |
Maintainer | pablo@infty.in |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Referees.Internal
Description
This module defines the functions needed to specialize Referees.Solver to the problem of assigning proposals among referees.
- fromCSVtoReferees :: FilePath -> IO [Entry Referee]
- fromCSVtoProposals :: FilePath -> IO [Entry Proposal]
- fromCSVtoEntry :: FilePath -> IO [Entry a]
- readCSVentries :: FilePath -> IO [CSVentry]
- distributeWith :: ProfitFunction (Entry Proposal) (Entry Referee) Language -> [Entry Referee] -> Capacity -> Bounds Copies -> Maybe Language -> [Entry Proposal] -> IO (Maybe [Match])
- profitRefProp :: ProfitFunction (Entry Proposal) (Entry Referee) Language
- logBias :: [Double]
- toCap :: [Entry Referee] -> Capacity -> [Capacity]
- whichRefereesForProposal :: Entry Proposal -> [Entry Referee] -> Maybe Language -> [Entry Referee]
- whichProposalsForReferee :: Entry Referee -> [Entry Proposal] -> Maybe Language -> [Entry Proposal]
- ppDistribution :: Maybe [Match] -> String
- ppReferee :: Entry Referee -> String
- ppProposal :: Entry Proposal -> String
- ppEntry :: Entry a -> String
- ppMatrix :: Matrix Double -> String
- ppCSV_Warning :: CSV_Warning -> String
- ppNames :: [Name] -> String
- mkBounds :: (Num a, Ord a) => a -> a -> Maybe (Bounds a)
Parsing
fromCSVtoEntry :: FilePath -> IO [Entry a] Source
Taking the path to some CSV file in the appropriate format, parses it into
values of type Entry
a
. This function is intended to be used with
wrappers that specialize a
to some concrete type.
readCSVentries :: FilePath -> IO [CSVentry] Source
Parses CSV files into CSVentry
s, according to the format described in
Referees.
The parser is defined at the FromField
instance declarations in
Referees.Types.Internal.
Assignment of proposals to referees
Arguments
:: ProfitFunction (Entry Proposal) (Entry Referee) Language | |
-> [Entry Referee] | Referees among which to distribute |
-> Capacity | Default capacity for referees, if none declared |
-> Bounds Copies | Min and max number of copies to distribute |
-> Maybe Language | Optional shared language between referees and proposals |
-> [Entry Proposal] | Proposals to distribute |
-> IO (Maybe [Match]) |
distributeWith
computes a distribution of proposals among referees,
according to the given parameters.
This list is used to bias the profit associated with Area
s and Subarea
s
matches according to their order in the corresponding Entry
s.
Querying
Pretty printing
ppDistribution :: Maybe [Match] -> String Source
ppProposal :: Entry Proposal -> String Source
ppMatrix :: Matrix Double -> String Source
Pretty prints the given matrix, converting its values to 2-digit precision. This is currently used only in debug.
ppCSV_Warning :: CSV_Warning -> String Source