tiny changes plus csv and related script

This commit is contained in:
William Ball 2022-06-19 19:54:34 -07:00
parent 7359f166d4
commit 558bedf9b1
4 changed files with 48 additions and 2 deletions

View file

@ -0,0 +1,32 @@
import glob
import re
import sys
precs = glob.glob('output*')
types = list(map(lambda x: x.replace('data/', ''), glob.glob('data/**/*.txt', recursive=True)))
dims = {}
for prec in precs:
dims[prec] = {}
for type in types:
try:
with open('{}/{}'.format(prec, type)) as f:
lines = f.readlines()
dimension = [line[19:-1] for line in lines if line[0:19] == "Fractal dimension: "]
dims[prec][type] = dimension[0]
except:
pass
with open('dimension.csv', 'w') as f:
for type in types:
f.write(',{}'.format(re.sub(r'^.*/', '', type).replace('.txt', '').replace('_', ' ')))
f.write('\n')
for prec in precs:
f.write('{}'.format(prec.replace('output', '')))
for type in types:
try:
f.write(',{}'.format(dims[prec][type]))
except:
f.write(',MISSING')
f.write('\n')

View file

@ -0,0 +1,12 @@
,heptagonal prism,nonagonal prism,triangular prism,decagonal prism,pentagonal prism,hexagonal prism,octagonal prism,icosahedron,octahedron,tetrahedron,dodecahedron,cube,6v7f1,6v7f2,cuboctohedron,truncated icosahedron,nonagonal antiprism,square antiprism,decagonal antiprism,heptagonal antiprism,pentagonal antiprism,octagonal antiprism,hexagonal antiprism,decagonal pyramid,pentagonal pyramid,hexagonal pyramid,heptagonal pyramid,nonagonal pyramid,square pyramid,octagonal pyramid,rhombic dodecahedron,rhombic triacontahedron
3e8,1.5431117664603877,1.5566772796188262,1.4066313793978622,1.560949779197067,1.5132404210529178,1.5315683164741583,1.550989353715095,1.3729772958011588,1.3353281387462352,MISSING,1.596242363635575,1.4802519239370366,1.3242354210219975,1.3382091338817814,1.4535742537908198,1.6568123896810754,1.4317228215863411,1.378333729285644,1.4353973351004388,1.4212091278292471,1.3998062454957,1.4272910790608093,1.4126510265196899,1.3274955042092016,1.339656539517361,1.3382108784841351,1.3354232703484121,1.3298476055286683,1.3353281193939301,1.332515772628906,1.4894740984690233,1.5000294512617012
5e6,1.5430433498849396,1.556661709691871,1.4066520667559925,1.5609902215830394,1.5130969001675096,1.5316045193585355,1.5508604342170393,1.3725356174024972,1.3352181431530956,MISSING,1.5962336117834885,1.4802852687982206,1.3240996138103203,1.3382812247452276,1.453469278662681,1.6567858782696363,1.4335399260390551,1.3783795076765932,1.4355096933688505,1.4211839159078241,1.3997442943953209,1.4272389270276586,1.4126702715887578,1.3275494451026275,1.3396872642963957,1.3381609177726845,1.3354817119076765,1.3299659812531195,1.3352184396919573,1.3324626833476887,1.4894351636159058,1.4998326976811691
4e8,1.5431097480766467,1.5566758630957582,1.4066365714949982,1.560957143386703,1.5132301394388208,1.5315708653032365,1.5509810018277892,1.3729565158086572,1.3353181196497264,MISSING,1.596242568458158,1.4802506100223891,1.3242443684636434,1.3382121342288391,1.4535794478758508,1.6568069934615224,1.431671404485539,1.378325683803753,1.4354079542372604,1.4212041539937372,1.399821480264362,1.4272720582595357,1.4126590436591084,1.3274930895614196,1.339654224344592,1.3382138683414655,1.335421879001465,1.3298498679086022,1.335318097681861,1.3325099342975393,1.489471085955889,1.4999791169336874
5e7,1.5431236763745952,1.5566654983616355,1.4066608138366978,1.5609652398738287,1.5132182760637072,1.5315715238864445,1.5510097812940418,1.37284722531795,1.3353318978310815,MISSING,1.5962388952632787,1.480245458431498,1.3242604276465189,1.3382102859249845,1.4535976839982392,1.6568336188115225,1.431627682547377,1.3782998445055625,1.4354005649485597,1.4211586698663696,1.3998161826590638,1.4273190909974456,1.4126955114572546,1.3275151865583248,1.3396446028063274,1.3382225330126407,1.3353939062135725,1.3298447999614191,1.3353318966035501,1.3325255853998408,1.489464977294569,1.4999718514284974
1e8,1.5431020757008507,1.5566756784674693,1.4066478732545797,1.5609649635057734,1.5132427373402981,1.5315686203712573,1.5509861502454962,1.3728914526804765,1.3353239791599663,MISSING,1.596244887722567,1.480248628028886,1.3242350081784096,1.3382110621381005,1.4535878302150287,1.6568040850024586,1.4317142943968555,1.3782987622869496,1.4353943913988583,1.4212136926407724,1.3998060769250533,1.4272748174765624,1.412636512563388,1.3275061548030873,1.339656404847211,1.3382178434739516,1.3354264765044448,1.3298690074645068,1.335323975419279,1.3324966899964696,1.489474826286628,1.500059265948014
1e6,1.542991254200265,1.556815713691277,1.406664690865384,1.5613888471962742,1.5130204399195448,1.531379367948449,1.550786946936712,1.3735060097388425,1.3354128221469261,MISSING,1.5963637160162403,1.4801061783525686,1.324821631572518,1.338185383960637,1.4533641114322406,1.656757456704511,1.431164228676963,1.3784925455620327,1.4358267165010965,1.420780597243824,1.399652710272311,1.4275560884625609,1.4129434012712605,1.3275815916452245,1.3397789158879816,1.3380091884020555,1.3356416131011466,1.330172669138874,1.3354146639650715,1.3321426719317444,1.4894426948921908,1.5001373553753052
1e7,1.5431693285810848,1.556663393386475,1.4065769306208142,1.5609070281254505,1.513248485647511,1.5315700991479402,1.5510101718975449,1.3728957205054073,1.3352287795995696,MISSING,1.5962518843635647,1.4802761539075804,1.3241782720617725,1.3382443253139122,1.453633058999394,1.6568625501592362,1.4314099284870745,1.3784122971151345,1.435339516395261,1.4211902385712332,1.3997986357907661,1.4273431381761477,1.412656216642195,1.3275381236464552,1.339627872900268,1.3382274863975396,1.335371726957949,1.329829877914715,1.3352287714114646,1.3325817683113517,1.4894906447120204,1.5000827607722431
6e8,1.543110190216444,1.556673590432065,1.4066342967716463,1.560952557066393,1.5132316890470596,1.531569651006187,1.5509840099351888,1.372992836283798,1.3353282911029116,MISSING,1.5962400971652784,1.48025222690353,MISSING,1.3382125100083746,MISSING,MISSING,1.4317200456789512,1.378331544899613,1.4354021654111535,1.4211940628368767,1.3998132969928283,1.4272936849219047,1.4126699173717023,1.3274932165894984,1.3396570048871794,1.3382110668524845,1.3354147362724165,1.3298544579683,1.335328264503229,1.3325090058406053,1.4894698142207021,1.4999914869371653
1e3,1.4595189162350715,1.548184577576514,1.3890881876913497,1.566702859169144,1.4936894441042006,1.4244274366080378,1.5222884222850448,1.40476889472137,1.3365090074245987,MISSING,1.425255998684727,1.4940321330565125,1.3478255818626024,1.400899927782822,1.515036808841364,1.7980639024941685,1.262786109439771,1.421583471132899,1.4099943488953748,1.4268047052242334,1.408978366696069,1.403871984129419,1.3724457273578357,1.2475810337647877,1.29637896536962,1.3988725605928642,1.3894991310187024,1.2742409743230465,1.3367540534444284,1.3318738611100582,1.3778335922856897,1.7120352969361596
5e8,1.5431079985224438,1.5566777666288636,1.4066462371097597,1.5609539758560698,1.513231822455525,1.5315716259372687,1.5509840417590643,1.3729435268593073,1.335321519346331,MISSING,1.5962417471271855,1.4802540165320217,MISSING,1.3382152524081246,MISSING,MISSING,1.4316887193576442,1.3783473933850796,1.435404587282053,1.4211991218891724,1.3998153748689177,1.4272858202905598,1.412669726659721,1.3274876928622594,1.3396579500243813,1.338211438380835,1.3354204415913127,1.3298557302315317,1.3353214942384743,1.33251544237211,1.4894701481251202,1.4999721855110735
2e8,1.5431071944964327,1.5566691567046091,1.4066442521888336,1.5609631207207801,1.5132293845346172,1.531567958633147,1.550987905712697,1.3729881903819372,1.3353201069773506,MISSING,1.596239407142062,1.4802520560666377,1.3242402249737837,1.3382104117913456,1.4535853797283425,1.6568214589659378,1.4317494353336662,1.378321090406904,1.435410636126871,1.4211861593858608,1.3998275441096575,1.427276339103884,1.412667738751613,1.3275007876289726,1.3396606873051315,1.338211328260098,1.335409372527209,1.32985346035568,1.3353200948052961,1.3325296814480614,1.4894699061375234,1.5000142229928692
1 heptagonal prism nonagonal prism triangular prism decagonal prism pentagonal prism hexagonal prism octagonal prism icosahedron octahedron tetrahedron dodecahedron cube 6v7f1 6v7f2 cuboctohedron truncated icosahedron nonagonal antiprism square antiprism decagonal antiprism heptagonal antiprism pentagonal antiprism octagonal antiprism hexagonal antiprism decagonal pyramid pentagonal pyramid hexagonal pyramid heptagonal pyramid nonagonal pyramid square pyramid octagonal pyramid rhombic dodecahedron rhombic triacontahedron
2 3e8 1.5431117664603877 1.5566772796188262 1.4066313793978622 1.560949779197067 1.5132404210529178 1.5315683164741583 1.550989353715095 1.3729772958011588 1.3353281387462352 MISSING 1.596242363635575 1.4802519239370366 1.3242354210219975 1.3382091338817814 1.4535742537908198 1.6568123896810754 1.4317228215863411 1.378333729285644 1.4353973351004388 1.4212091278292471 1.3998062454957 1.4272910790608093 1.4126510265196899 1.3274955042092016 1.339656539517361 1.3382108784841351 1.3354232703484121 1.3298476055286683 1.3353281193939301 1.332515772628906 1.4894740984690233 1.5000294512617012
3 5e6 1.5430433498849396 1.556661709691871 1.4066520667559925 1.5609902215830394 1.5130969001675096 1.5316045193585355 1.5508604342170393 1.3725356174024972 1.3352181431530956 MISSING 1.5962336117834885 1.4802852687982206 1.3240996138103203 1.3382812247452276 1.453469278662681 1.6567858782696363 1.4335399260390551 1.3783795076765932 1.4355096933688505 1.4211839159078241 1.3997442943953209 1.4272389270276586 1.4126702715887578 1.3275494451026275 1.3396872642963957 1.3381609177726845 1.3354817119076765 1.3299659812531195 1.3352184396919573 1.3324626833476887 1.4894351636159058 1.4998326976811691
4 4e8 1.5431097480766467 1.5566758630957582 1.4066365714949982 1.560957143386703 1.5132301394388208 1.5315708653032365 1.5509810018277892 1.3729565158086572 1.3353181196497264 MISSING 1.596242568458158 1.4802506100223891 1.3242443684636434 1.3382121342288391 1.4535794478758508 1.6568069934615224 1.431671404485539 1.378325683803753 1.4354079542372604 1.4212041539937372 1.399821480264362 1.4272720582595357 1.4126590436591084 1.3274930895614196 1.339654224344592 1.3382138683414655 1.335421879001465 1.3298498679086022 1.335318097681861 1.3325099342975393 1.489471085955889 1.4999791169336874
5 5e7 1.5431236763745952 1.5566654983616355 1.4066608138366978 1.5609652398738287 1.5132182760637072 1.5315715238864445 1.5510097812940418 1.37284722531795 1.3353318978310815 MISSING 1.5962388952632787 1.480245458431498 1.3242604276465189 1.3382102859249845 1.4535976839982392 1.6568336188115225 1.431627682547377 1.3782998445055625 1.4354005649485597 1.4211586698663696 1.3998161826590638 1.4273190909974456 1.4126955114572546 1.3275151865583248 1.3396446028063274 1.3382225330126407 1.3353939062135725 1.3298447999614191 1.3353318966035501 1.3325255853998408 1.489464977294569 1.4999718514284974
6 1e8 1.5431020757008507 1.5566756784674693 1.4066478732545797 1.5609649635057734 1.5132427373402981 1.5315686203712573 1.5509861502454962 1.3728914526804765 1.3353239791599663 MISSING 1.596244887722567 1.480248628028886 1.3242350081784096 1.3382110621381005 1.4535878302150287 1.6568040850024586 1.4317142943968555 1.3782987622869496 1.4353943913988583 1.4212136926407724 1.3998060769250533 1.4272748174765624 1.412636512563388 1.3275061548030873 1.339656404847211 1.3382178434739516 1.3354264765044448 1.3298690074645068 1.335323975419279 1.3324966899964696 1.489474826286628 1.500059265948014
7 1e6 1.542991254200265 1.556815713691277 1.406664690865384 1.5613888471962742 1.5130204399195448 1.531379367948449 1.550786946936712 1.3735060097388425 1.3354128221469261 MISSING 1.5963637160162403 1.4801061783525686 1.324821631572518 1.338185383960637 1.4533641114322406 1.656757456704511 1.431164228676963 1.3784925455620327 1.4358267165010965 1.420780597243824 1.399652710272311 1.4275560884625609 1.4129434012712605 1.3275815916452245 1.3397789158879816 1.3380091884020555 1.3356416131011466 1.330172669138874 1.3354146639650715 1.3321426719317444 1.4894426948921908 1.5001373553753052
8 1e7 1.5431693285810848 1.556663393386475 1.4065769306208142 1.5609070281254505 1.513248485647511 1.5315700991479402 1.5510101718975449 1.3728957205054073 1.3352287795995696 MISSING 1.5962518843635647 1.4802761539075804 1.3241782720617725 1.3382443253139122 1.453633058999394 1.6568625501592362 1.4314099284870745 1.3784122971151345 1.435339516395261 1.4211902385712332 1.3997986357907661 1.4273431381761477 1.412656216642195 1.3275381236464552 1.339627872900268 1.3382274863975396 1.335371726957949 1.329829877914715 1.3352287714114646 1.3325817683113517 1.4894906447120204 1.5000827607722431
9 6e8 1.543110190216444 1.556673590432065 1.4066342967716463 1.560952557066393 1.5132316890470596 1.531569651006187 1.5509840099351888 1.372992836283798 1.3353282911029116 MISSING 1.5962400971652784 1.48025222690353 MISSING 1.3382125100083746 MISSING MISSING 1.4317200456789512 1.378331544899613 1.4354021654111535 1.4211940628368767 1.3998132969928283 1.4272936849219047 1.4126699173717023 1.3274932165894984 1.3396570048871794 1.3382110668524845 1.3354147362724165 1.3298544579683 1.335328264503229 1.3325090058406053 1.4894698142207021 1.4999914869371653
10 1e3 1.4595189162350715 1.548184577576514 1.3890881876913497 1.566702859169144 1.4936894441042006 1.4244274366080378 1.5222884222850448 1.40476889472137 1.3365090074245987 MISSING 1.425255998684727 1.4940321330565125 1.3478255818626024 1.400899927782822 1.515036808841364 1.7980639024941685 1.262786109439771 1.421583471132899 1.4099943488953748 1.4268047052242334 1.408978366696069 1.403871984129419 1.3724457273578357 1.2475810337647877 1.29637896536962 1.3988725605928642 1.3894991310187024 1.2742409743230465 1.3367540534444284 1.3318738611100582 1.3778335922856897 1.7120352969361596
11 5e8 1.5431079985224438 1.5566777666288636 1.4066462371097597 1.5609539758560698 1.513231822455525 1.5315716259372687 1.5509840417590643 1.3729435268593073 1.335321519346331 MISSING 1.5962417471271855 1.4802540165320217 MISSING 1.3382152524081246 MISSING MISSING 1.4316887193576442 1.3783473933850796 1.435404587282053 1.4211991218891724 1.3998153748689177 1.4272858202905598 1.412669726659721 1.3274876928622594 1.3396579500243813 1.338211438380835 1.3354204415913127 1.3298557302315317 1.3353214942384743 1.33251544237211 1.4894701481251202 1.4999721855110735
12 2e8 1.5431071944964327 1.5566691567046091 1.4066442521888336 1.5609631207207801 1.5132293845346172 1.531567958633147 1.550987905712697 1.3729881903819372 1.3353201069773506 MISSING 1.596239407142062 1.4802520560666377 1.3242402249737837 1.3382104117913456 1.4535853797283425 1.6568214589659378 1.4317494353336662 1.378321090406904 1.435410636126871 1.4211861593858608 1.3998275441096575 1.427276339103884 1.412667738751613 1.3275007876289726 1.3396606873051315 1.338211328260098 1.335409372527209 1.32985346035568 1.3353200948052961 1.3325296814480614 1.4894699061375234 1.5000142229928692

View file

@ -78,7 +78,9 @@ fn invert_matrix(bt: f64, b: f64, h1: f64, h2: f64) -> DMatrix<f64> {
} }
/// Given a gram matrix and face scheme, finds a bounded root tuple using `root_tuple`. Makes sure /// Given a gram matrix and face scheme, finds a bounded root tuple using `root_tuple`. Makes sure
/// to avoid extra symmetry in the packing, as that can confuse it later on. /// to avoid extra symmetry in the packing, as that can confuse it later on. I don't actually think
/// that is a problem any more, but I'm too scared to delete it. Picking nice tuples has other
/// benefits too anyway.
pub fn bounded_root_tuple(gram_matrix: &DMatrix<f64>, faces: &[Vec<usize>]) -> DMatrix<f64> { pub fn bounded_root_tuple(gram_matrix: &DMatrix<f64>, faces: &[Vec<usize>]) -> DMatrix<f64> {
let mut root = None; let mut root = None;
for face in faces.iter().skip(1) { for face in faces.iter().skip(1) {

View file

@ -59,7 +59,7 @@ impl<'a, T: Task> Searcher<'a, T> {
println!(); println!();
timer.time_stamp("Took ", " to count circles\n"); timer.time_stamp("Took ", " to count circles\n");
} else { } else {
timer.time_stamp("",""); timer.time_stamp("", "");
} }
} }