with Preferences, Candidates.Containers, Rationals; private with Ada.Containers.Vectors; generic with package Given_Prefs is new Preferences (<>); package Bundles is type Bundle is private; Empty_Bundle : constant Bundle; procedure Transfer (This : in out Bundle; From, To : in Candidates.CandidateID; Excluded : in Candidates.Containers.CandidateID_Set; Value : in Rationals.Fraction; Result : out Bundle); function Count_Votes (This : in Bundle) return Natural; function Count_Papers (This : in Bundle) return Natural; procedure Count_Both (This : in Bundle; Votes : out Natural; Papers : out Natural); function "<" (Left, Right : in Bundle) return Boolean; private use type Rationals.Fraction; use type Given_Prefs.Preference_Array; package Paper_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Given_Prefs.Preference_Array); use type Paper_Vectors.Vector; type Bundle is record Papers : Paper_Vectors.Vector := Paper_Vectors.Empty_Vector; Worth : Rationals.Fraction := 1 / 1; end record; Empty_Bundle : constant Bundle := (Papers => Paper_Vectors.Empty_Vector, Worth => 1 / 1); end Bundles;