Referees-0.0.0: A utility for computing distributions of material to review among reviewers.

Copyright(c) Pablo Couto 2014
LicenseGPL-3
Maintainerpablo@infty.in
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Referees.Internal

Contents

Description

This module defines the functions needed to specialize Referees.Solver to the problem of assigning proposals among referees.

Synopsis

Parsing

fromCSVtoReferees :: FilePath -> IO [Entry Referee] Source

Parses from a CSV file into Entry Referee values.

fromCSVtoProposals :: FilePath -> IO [Entry Proposal] Source

Parses from a CSV file into Entry Proposal values.

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 CSVentrys, 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

distributeWith Source

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.

profitRefProp :: ProfitFunction (Entry Proposal) (Entry Referee) Language Source

Computes the profit for an assignment between the given Entry Proposal and Entry Referee. The scale is continuous in [0,2]. Takes understood languages into account.

logBias :: [Double] Source

This list is used to bias the profit associated with Areas and Subareas matches according to their order in the corresponding Entrys.

toCap :: [Entry Referee] -> Capacity -> [Capacity] Source

toCap rs def builds a list of capacities matching the Referees in rs, while assigning default capacity def to those Referees that don’t have one defined.

Querying

whichRefereesForProposal Source

Arguments

:: Entry Proposal 
-> [Entry Referee] 
-> Maybe Language

Optional shared language between the proposal and referees

-> [Entry Referee] 

Provides a list of all Referees suited for a Proposal, regardless of any distribution.

whichProposalsForReferee Source

Arguments

:: Entry Referee 
-> [Entry Proposal] 
-> Maybe Language

Optional shared language between the referee and proposals

-> [Entry Proposal] 

Provides a list of all Proposals suited for a Referee, regardless of any distribution.

Pretty printing

ppDistribution :: Maybe [Match] -> String Source

Concise printing of assignments. Ignores Entry Referees for which there are no assigned Entry Proposals.

ppMatrix :: Matrix Double -> String Source

Pretty prints the given matrix, converting its values to 2-digit precision. This is currently used only in debug.

mkBounds Source

Arguments

:: (Num a, Ord a) 
=> a

Lower bound

-> a

Upper bound

-> Maybe (Bounds a) 

This function creates a (Maybe) Bounds value, holding both lower and upper bounds for an interval, after verifying that they are consistent.