This is a simple class that stores the ranking information of a MergedItem in a particular input preference list. An array of Ranking objects is maintained inside each MergedItem.

Implementation files
The Ranking class is defined in the src/Ranking.h header file; its member functions are implemented in src/Ranking.cpp.

Technical Details
A Ranking class comprises three members:

  • A pointer to the corresponding preference InputList,
  • The (integer) ranking in the preference InputList, and
  • The score value that is assigned by the voter to this element. The score data type can be either float, or double; this is determined by the score_t data type definition in flagr.cpp.

The following interactive block diagram depicts the functionality of the Ranking class inside the entire architecture of FLAGR.

FLAGR architecture