diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bundles.adb | 8 | ||||
-rw-r--r-- | src/bundles.ads | 53 |
2 files changed, 61 insertions, 0 deletions
diff --git a/src/bundles.adb b/src/bundles.adb new file mode 100644 index 0000000..6a2d71d --- /dev/null +++ b/src/bundles.adb @@ -0,0 +1,8 @@ + + +package body Bundles is + + +end Bundles; + + diff --git a/src/bundles.ads b/src/bundles.ads new file mode 100644 index 0000000..aa0b0d6 --- /dev/null +++ b/src/bundles.ads @@ -0,0 +1,53 @@ + + +with Candidates; +with Rationals; +private with Ada.Containers.Vectors; + + +generic + Number_Of_Candidates : Positive; +package Bundles is + + + type Bundle is private; + subtype Preference_Array is array (1 .. Number_Of_Candidates) of Candidates.CandidateID; + + + Empty_Bundle : constant Bundle; + + + procedure Add + (To : in out Bundle; + Item : in Preference_Array); + + + procedure Transfer + (From, To : in out Bundle; + Value : in Rationals.Fraction); + + + function Count + (This : in Bundle) + return Natural; + + +private + + + type Paper_Lot is record + How_Many : Positive := 1; + Prefs : Preference_Array; + end record; + + + type Bundle is record + + + + Empty_Bundle := + + +end Bundles; + + |