blob: aa0b0d6d7f15e9c76a84794a50906b85f4a817b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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;
|