The Copeland() function executes the Copeland Winners method. The score of an element \(r_i\) is determined by the number of its "victories" against all the other involved elements. A victory for \(r_i\) is achieved if the majority of the voters rank \(r_i\) higher than another element \(r_j\).
In contrast to the Condorcet method, Copeland Winners assign "half" a victory (i.e. a score of 0.5) to each element of a pair \((r_i,r_j)\) in the case of tie. A tie happens when exactly half of the voters rank \(r_i\) higher than \(r_j\) and the other half voters rank \(r_j\) higher than \(r_i\).

Function Definitions

void Copeland(const char inf[], const char relf[], const int evpts,
     const char ranstr[], const char out[])

and

__declspec(dllexport) void __cdecl Copeland(const char inf[], const char relf[], const int evpts,
     const char ranstr[], const char out[])

Implementation Files

Input arguments

  • const char inf[]: The path of the input file that stores the preference lists to be aggregated.
  • const char relf[]: The path of the input file that stores the element relevance judgments.
  • const int evpts: the elements in the aggregate list on which the evaluation measures (i.e. Precision, and nDCG) will be computed.
  • const char ranstr[]: A string that is embedded in the names of the output files. Used when FLAGR is compiled as a shared library.
  • const char out[]: The file system location where the output file with the aggregate list will be stored.

Description
The input parameters are parsed and stored in a special C structure called UserParams that is defined in src/InputParams.h. Then, UserParams is passed to the execution driver and the rank aggregation process starts.