Skip to content

Commit dd33815

Browse files
committed
Add example ballot file with 10k ballots.
1 parent 4965b92 commit dd33815

File tree

10 files changed

+41511
-0
lines changed

10 files changed

+41511
-0
lines changed

.github/workflows/integration.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ jobs:
9898
- random/rand_2x10
9999
- random/rand_5x4
100100
- random/rand_hypergeometric
101+
- random/rand_hypergeometric_10k
101102
- recursive_descent/transfer
102103
- recursive_descent/transfer_is_blocked
103104
- ties/tie_break_explicit
@@ -144,6 +145,7 @@ jobs:
144145
- random/rand_2x10
145146
- random/rand_5x4
146147
- random/rand_hypergeometric
148+
- random/rand_hypergeometric_10k
147149
- vegetables
148150
fail-fast: false
149151
runs-on: ubuntu-latest
@@ -169,6 +171,7 @@ jobs:
169171
- random/rand_2x10
170172
- random/rand_5x4
171173
- random/rand_hypergeometric
174+
- random/rand_hypergeometric_10k
172175
- vegetables
173176
fail-fast: false
174177
runs-on: ubuntu-latest
@@ -262,6 +265,9 @@ jobs:
262265
- rand_sorted_by_product
263266
- rand_sorted_lexicographically
264267
- rand_sorted_by_lexico_product
268+
- rand_10k_sorted_by_product
269+
- rand_10k_sorted_lexicographically
270+
- rand_10k_sorted_by_lexico_product
265271
include:
266272
- file: rand_sorted_by_product
267273
src: random/rand_hypergeometric
@@ -272,6 +278,15 @@ jobs:
272278
- file: rand_sorted_by_lexico_product
273279
src: random/rand_hypergeometric
274280
strategy: "lexico-product"
281+
- file: rand_10k_sorted_by_product
282+
src: random/rand_hypergeometric_10k
283+
strategy: "product"
284+
- file: rand_10k_sorted_lexicographically
285+
src: random/rand_hypergeometric_10k
286+
strategy: "lexicographic"
287+
- file: rand_10k_sorted_by_lexico_product
288+
src: random/rand_hypergeometric_10k
289+
strategy: "lexico-product"
275290
fail-fast: false
276291
runs-on: ubuntu-latest
277292
steps:

examples/random_ballots.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ fn main() -> Result<()> {
4545
let file = File::create("rand_hypergeometric.blt")?;
4646
write_blt_hypergeometric(&mut thread_rng(), &mut BufWriter::new(file), 1000)?;
4747

48+
let file = File::create("rand_hypergeometric_10k.blt")?;
49+
write_blt_hypergeometric(&mut thread_rng(), &mut BufWriter::new(file), 10000)?;
50+
4851
Ok(())
4952
}
5053

testdata/ballots/random/rand_hypergeometric_10k.blt

Lines changed: 10024 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
rank,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
2+
Apple,147578.56666666668,96953.86904761905,70426.95238095238,54430.10952380952,40094.84761904762,30476.764285714286,21895.54761904762,15171.714285714286,9247.295238095237,5501.478571428572,3250.304761904762,1908.85,1381.0166666666667,635.0166666666667,263.8333333333333,117.58333333333333,19.25,0,0,0
3+
Banana,108195.98333333334,93419.8619047619,74606.11309523809,57719.35119047619,46358.3380952381,36560.07380952381,26201.009523809524,18464.39285714286,13303.980952380953,9417.154761904761,5983.375,4393.679761904762,2502.0690476190475,1135.1,595.2666666666667,330.0833333333333,134.58333333333334,32.583333333333336,0,0
4+
Cherry,79066.7,77682.52619047619,70509.07738095238,61244.66547619048,52011.09285714286,41226.17380952381,33640.73095238095,26990.64761904762,18850.238095238095,13142.695238095239,9904.215476190477,6239.596428571429,4382.307142857143,2463.116666666667,1325,540.6333333333333,109.33333333333333,24.25,0,0
5+
Date,57302.083333333336,63006.43571428571,64689.38690476191,58956.929761904765,54897.9376984127,46961.82103174603,39262.809126984124,31136.525793650795,25213.518650793652,18438.675793650793,13873.307936507936,10079.522222222222,7093.455555555555,3881.1619047619047,2145.611904761905,1442.2333333333333,705.5,220.58333333333334,45.5,0
6+
Eggplant,36757.1,50023.54285714286,54561.30952380953,54940.5,54446.554761904765,49124.735714285714,45375.48333333333,38925.56428571429,31798.295238095237,26070.123809523808,19901.65,13680.445238095239,9765.514285714286,6463.516666666666,3805.252380952381,1952.695238095238,1065.9833333333333,633.2333333333333,59.833333333333336,1.6666666666666667
7+
Fig,23278,37207.933333333334,46050.775,50926.98690476191,49596.732936507935,50239.34722222222,45644.30079365079,43591.73174603174,37901.86984126984,32490.16031746032,26421.47341269841,19220.41626984127,13131.301984126983,9558.217857142858,6443.5952380952385,3770.2571428571428,2065.016666666667,1191.8166666666666,509.31666666666666,113.75
8+
Grape,17920.211904761905,25755.814285714285,34418.115476190476,40361.77023809524,43911.36031746032,47194.46984126984,47966.48531746032,47237.39246031746,42472.49246031746,37405.11507936508,30811.76150793651,24995.925793650793,19745.474603174604,14340.445238095239,9897.334523809524,6344.515476190476,4957.191666666667,2294.7738095238096,933.35,389
9+
Hazelnut,9607.2,19569.745238095238,25931.613095238095,33799.83452380952,40991.62341269841,42683.830555555556,43921.74246031746,42889.13055555556,42748.73531746032,41580.83174603175,39616.21031746032,32506.06746031746,25831.510317460317,19595.82619047619,14371.188095238096,10293.688095238096,7172.957142857143,4043.032142857143,1676.8166666666666,521.4166666666666
10+
Jalapeno,8347.988095238095,13799.247619047619,20317.480952380953,25522.988095238095,31230.534523809525,36100.348809523806,40631.541666666664,42226.98690476191,46622.775,43979.22261904762,40265.25714285715,36786.72857142857,31279.996428571427,26212.436904761904,20823.486904761903,14265.039285714285,9901.508333333333,5927.675,3546.040476190476,1565.7166666666667
11+
Kiwi,4516.383333333333,7936.719047619048,12123.895238095238,19849.928571428572,25018.867857142857,32283.972619047618,37916.877380952385,42789.2130952381,42682.336904761905,43349.80952380953,41997.06785714286,40314.11309523809,36812.583333333336,33104.27857142857,24468.39285714286,19269.366666666665,16601.009523809524,10391.30119047619,6150.966666666666,1775.9166666666667
12+
Litchi,3114.883333333333,5291.8452380952385,9297.136904761905,14036.789285714285,18150.268650793652,23871.949603174602,30776.629365079367,35441.13412698413,39598.66507936508,42083.61031746032,44856.40912698413,42740.19484126984,40961.104365079365,37976.877380952385,33265.68095238095,29226.004761904762,20450.059523809523,15375.466666666667,8854.240476190476,3984.05
13+
Mushroom,1313.75,3052.292857142857,5584.6261904761905,9627.34761904762,14168.067460317461,19233.503174603175,26219.782936507938,30561.7876984127,36579.49722222222,39644.531746031746,42450.91984126984,43847.67222222222,43404.293650793654,41466.05,38738.75357142857,32438.251190476192,28371.741666666665,21132.240476190476,13955.307142857142,7562.583333333333
14+
Nut,1235.5833333333333,2324.0666666666666,3868.5416666666665,6110.591666666666,9910.607936507937,14077.172222222222,18070.631746031748,24423.184126984128,29389.91507936508,36444.51388888889,38991.34007936508,41084.8876984127,44736.33888888889,45829.340476190475,43632.25476190476,41666.57380952381,35936.416666666664,29662.09880952381,20987.790476190476,10971.15
15+
Orange,533.9666666666667,1123.5523809523809,2462.711904761905,4388.9857142857145,6523.010317460317,10465.155555555555,13748.278174603174,19610.44484126984,24157.228174603173,30955.804365079366,35076.26507936508,40892.6126984127,43831.80079365079,44444.44761904762,47669.755952380954,46320.72023809524,42014.80119047619,36341.691666666666,30226.95,18564.816666666666
16+
Pear,361.93333333333334,1076.5833333333333,2084.0666666666666,3007.266666666667,4810.382142857143,6728.625,8873.94642857143,12650.360714285714,18862.094047619048,23423.428571428572,29752.836904761905,36538.44642857143,40308.45238095238,45203.66428571429,48522.2,50758.2,50015.607142857145,47342.88214285715,40389.79047619048,28642.233333333334
17+
Quinoa,114.66666666666667,417.68095238095236,905.2476190476191,2230.6714285714284,2974.5261904761905,5012.292857142857,7336.277380952381,10058.02738095238,13996.286904761904,19019.234523809522,24849.260714285716,30844.59642857143,36662.80357142857,42703.79404761905,46917.85238095238,53738.9119047619,53761.71428571428,53521.54761904762,52039.04047619048,42248.566666666666
18+
Radish,23,415.93333333333334,745.0833333333334,934.95,1836.5416666666667,2891.7083333333335,4804.475,6703.460714285714,9764.020238095238,13970.969047619048,18729.10357142857,25862.553571428572,32810.80238095238,39274.33571428571,45892.48333333333,50780.973809523806,57768.55,63542.74880952381,63048.473809523806,59552.833333333336
19+
Soy,0,188.35,365.01666666666665,597.25,1263.9055555555556,2024.7055555555555,3151.7210317460317,4780.587698412698,7120.835317460317,9686.355555555556,13815.805555555555,20857.28888888889,27173.338888888888,35105.37619047619,43934.50119047619,51247.50357142857,59752.708333333336,66824.08333333333,72837.28333333334,78626.38333333333
20+
Tomato,85,62,319.93333333333334,482.46666666666664,519.3666666666667,1130.7666666666667,2346.3845238095237,3396.1178571428572,5164.1654761904765,6912.4154761904765,10803.783333333333,14859.95,20309.266666666666,27213.040476190476,35098.215476190475,43741.534523809525,56452.60119047619,71445.89166666666,91428.48333333334,107581.61666666667
21+
Vanilla,0,45,85.91666666666667,183.61666666666667,638.4333333333333,1065.5833333333333,1568.345238095238,2304.595238095238,3878.754761904762,5836.869047619048,8002.652380952381,11699.452380952382,17229.569047619047,22746.957142857143,31542.340476190475,41108.23095238095,52096.46666666667,69405.1,92663.81666666667,137251.3

0 commit comments

Comments
 (0)