You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dribble/cpp/a_star/expansion_groups.h

7 lines
187 KiB
C

7 months ago
const int expansion_positions_no = 7845;
const float expansion_pos_dist[7845] = {0.0,0.1,0.1,0.1,0.1,0.14142135623730953,0.14142135623730953,0.14142135623730953,0.14142135623730953,0.2,0.2,0.2,0.2,0.223606797749979,0.223606797749979,0.223606797749979,0.223606797749979,0.223606797749979,0.223606797749979,0.223606797749979,0.223606797749979,0.28284271247461906,0.28284271247461906,0.28284271247461906,0.28284271247461906,0.30000000000000004,0.30000000000000004,0.30000000000000004,0.30000000000000004,0.316227766016838,0.316227766016838,0.316227766016838,0.316227766016838,0.316227766016838,0.316227766016838,0.316227766016838,0.316227766016838,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.36055512754639896,0.4,0.4,0.4,0.4,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.41231056256176607,0.4242640687119285,0.4242640687119285,0.4242640687119285,0.4242640687119285,0.447213595499958,0.447213595499958,0.447213595499958,0.447213595499958,0.447213595499958,0.447213595499958,0.447213595499958,0.447213595499958,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5099019513592785,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5385164807134504,0.5656854249492381,0.5656854249492381,0.5656854249492381,0.5656854249492381,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.5830951894845301,0.6000000000000001,0.6000000000000001,0.6000000000000001,0.6000000000000001,0.608276253029822,0.608276253029822,0.608276253029822,0.608276253029822,0.608276253029822,0.608276253029822,0.608276253029822,0.608276253029822,0.632455532033676,0.632455532033676,0.632455532033676,0.632455532033676,0.632455532033676,0.632455532033676,0.632455532033676,0.632455532033676,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.6403124237432849,0.670820393249937,0.670820393249937,0.670820393249937,0.670820393249937,0.670820393249937,0.670820393249937,0.670820393249937,0.670820393249937,0.7000000000000001,0.7000000000000001,0.7000000000000001,0.7000000000000001,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7071067811865476,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7211102550927979,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7280109889280518,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7615773105863909,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.7810249675906654,0.8,0.8,0.8,0.8,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8062257748298549,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.8246211251235321,0.848528137423857,0.848528137423857,0.848528137423857,0.848528137423857,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8544003745317531,0.8602325267042628,0.8602325267042628,0.8602325267042628,0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,-8,-8,3,3,-3,-3,7,7,-7,-7,9,9,-9,-9,11,11,-11,-11,6,6,-6,-6,10,10,-10,-10,4,4,-4,-4,11,11,-11,-11,0,0,12,-12,1,1,-1,-1,8,8,-8,-8,9,9,-9,-9,12,12,-12,-12,5,5,-5,-5,11,11,-11,-11,2,2,-2,-2,12,12,-12,-12,7,7,-7,-7,10,10,-10,-10,3,3,-3,-3,12,12,-12,-12,6,6,-6,-6,11,11,-11,-11,4,4,-4,-4,12,12,-12,-12,9,9,-9,-9,8,8,-8,-8,10,10,-10,-10,0,0,5,5,-5,-5,12,12,-12,-12,13,-13,1,1,-1,-1,7,7,-7,-7,11,11,-11,-11,13,13,-13,-13,2,2,-2,-2,13,13,-13,-13,3,3,-3,-3,13,13,-13,-13,6,6,-6,-6,12,12,-12,-12,9,9,-9,-9,10,10,-10,-10,4,4,-4,-4,8,8,-8,-8,11,11,-11,-11,13,13,-13,-13,7,7,-7,-7,12,12,-12,-12,5,5,-5,-5,13,13,-13,-13,0,0,14,-14,1,1,-1,-1,14,14,-14,-14,2,2,-2,-2,10,10,-10,-10,14,14,-14,-14,9,9,-9,-9,11,11,-11,-11,3,3,-3,-3,6,6,-6,-6,13,13,-13,-13,14,14,-14,-14,8,8,-8,-8,12,12,-12,-12,4,4,-4,-4,14,14,-14,-14,7,7,-7,-7,13,13,-13,-13,5,5,-5,-5,10,10,-10,-10,11,11,-11,-11,14,14,-14,-14,0,0,9,9,-9,-9,12,12,-12,-12,15,-15,1,1,-1,-1,15,15,-15,-15,2,2,-2,-2,15,15,-15,-15,6,6,-6,-6,14,14,-14,-14,8,8,-8,-8,13,13,-13,-13,3,3,-3,-3,15,15,-15,-15,4,4,-4,-4,15,15,-15,-15,11,11,-11,-11,10,10,-10,-10,12,12,-12,-12,7,7,-7,-7,14,14,-14,-14,5,5,-5,-5,9,9,-9,-9,13,13,-13,-13,15,15,-15,-15,0,0,16,-16,1,1,-1,-1,16,16,-16,-16,2,2,-2,-2,8,8,-8,-8,14,14,-14,-14,16,16,-16,-16,6,6,-6,-6,15,15,-15,-15,3,3,-3,-3,11,11,-11,-11,12,12,-12,-12,16,16,-16,-16,10,10,-10,-10,13,13,-13,-13,4,4,-4,-4,16,16,-16,-16,7,7,-7,-7,15,15,-15,-15,9,9,-9,-9,14,14,-14,-14,5,5,-5,-5,16,16,-16,-16,12,12,-12,-12,0,0,8,8,-8,-8,15,15,-15,-15,17,-17,1,1,-1,-1,11,11,-11,-11,13,13,-13,-13,17,17,-17,-17,6,6,-6,-6,16,16,-16,-16,2,2,-2,-2,17,17,-17,-17,10,10,-10,-10,14,14,-14,-14,3,3,-3,-3,17,17,-17,-17,4,4,-4,-4,7,7,-7,-7,16,16,-16,-16,17,17,-17,-17,9,9,-9,-9,15,15,-15,-15,12,12,-12,-12,13,13,-13,-13,5,5,-5,-5,17,17,-17,-17,11,11,-11,-11,14,14,-14,-14,8,8,-8,-8,16,16,-16,-16,0,0,18,-18,1,1,-1,-1,6,6,-6,-6,10,10,-10,-10,15,15,-15,-15,17,17,-17,-17,18,18,-18,-18,2,2,-2,-2,18,18,-18,-18,3,3,-3,-3,18,18,-18,-18,9,9,-9,-9,16,16,-16,-16,7,7,-7,-7,13,13,-13,-13,17,17,-17,-17,4,4,-4,-4,12,12,-12,-12,14,14,-14,-14,18,18,-18,-18,11,11,-11,-11,15,15,-15,-15,5,5,-5,-5,18,18,-18,-18,8,8,-8,-8,17,17,-17,-17,10,10,-10,-10,16,16,-16,-16,6,6,-6,-6,18,18,-18,-18,0,0,19,-19,1,1,-1,-1,19,19,-19,-19,2,2,-2,-2,13,13,-13,-13,14,14,-14,-14,19,19,-19,-19,12,12,-12,-12,15,15,-15,-15,3,3,-3,-3,9,9,-9,-9,17,17,-17,-17,19,19,-19,-19,7,7,-7,-7,18,18,-18,-18,4,4,-4,-4,11,11,-11,-11,16,16,-16,-16,19,19,-19,-19,5,5,-5,-5,19,19,-19,-19,8,8,-8,-8,18,18,-18,-18,10,10,-10,-10,17,17,-17,-17,14,14,-14,-14,13,13,-13,-13,15,15,-15,-15,6,6,-6,-6,19,19,-19,-19,0,0,12,12,-12,-12,16,16,-16,-16,20,-20,1,1,-1,-1,20,20,-20,-20,2,2,-2,-2,20,20,-20,-20,9,9,-9,-9,18,18,-18,-18,3,3,-3,-3,20,20,-20,-20,7,7,-7,-7,11,11,-11,-11,17,17,-17,-17,19,19,-19,-19,4,4,-4,-4,20,20,-20,-20,14,14,-14,-14,15,15,-15,-15,10,10,-10,-10,18,18,-18,-18,5,5,-5,-5,8,8,-8,-8,13,13,-13,-13,16,16,-16,-16,19,19,-19,-19,20,20,-20,-20,12,12,-12,-12,17,17,-17,-17,6,6,-6,-6,20,20,-20,-20,0,0,21,-21,1,1,-1,-1,9,9,-9,-9,19,19,-19,-19,21,21,-
const int expansion_pos_c[7845] = {0,1,-1,0,0,1,-1,1,-1,2,-2,0,0,2,-2,2,-2,1,-1,1,-1,2,-2,2,-2,3,-3,0,0,3,-3,3,-3,1,-1,1,-1,3,-3,3,-3,2,-2,2,-2,4,-4,0,0,4,-4,4,-4,1,-1,1,-1,3,-3,3,-3,4,-4,4,-4,2,-2,2,-2,5,-5,4,-4,4,-4,3,-3,3,-3,0,0,5,-5,5,-5,1,-1,1,-1,5,-5,5,-5,2,-2,2,-2,4,-4,4,-4,5,-5,5,-5,3,-3,3,-3,6,-6,0,0,6,-6,6,-6,1,-1,1,-1,6,-6,6,-6,2,-2,2,-2,5,-5,5,-5,4,-4,4,-4,6,-6,6,-6,3,-3,3,-3,7,-7,0,0,7,-7,7,-7,5,-5,5,-5,1,-1,1,-1,6,-6,6,-6,4,-4,4,-4,7,-7,7,-7,2,-2,2,-2,7,-7,7,-7,3,-3,3,-3,6,-6,6,-6,5,-5,5,-5,8,-8,0,0,8,-8,8,-8,7,-7,7,-7,4,-4,4,-4,1,-1,1,-1,8,-8,8,-8,2,-2,2,-2,6,-6,6,-6,8,-8,8,-8,3,-3,3,-3,7,-7,7,-7,5,-5,5,-5,8,-8,8,-8,4,-4,4,-4,9,-9,0,0,9,-9,9,-9,1,-1,1,-1,9,-9,9,-9,7,-7,7,-7,6,-6,6,-6,2,-2,2,-2,8,-8,8,-8,5,-5,5,-5,9,-9,9,-9,3,-3,3,-3,9,-9,9,-9,4,-4,4,-4,7,-7,7,-7,10,-10,8,-8,8,-8,6,-6,6,-6,0,0,10,-10,10,-10,1,-1,1,-1,10,-10,10,-10,2,-2,2,-2,9,-9,9,-9,5,-5,5,-5,10,-10,10,-10,3,-3,3,-3,8,-8,8,-8,7,-7,7,-7,10,-10,10,-10,4,-4,4,-4,9,-9,9,-9,6,-6,6,-6,11,-11,0,0,11,-11,11,-11,1,-1,1,-1,11,-11,11,-11,10,-10,10,-10,5,-5,5,-5,2,-2,2,-2,8,-8,8,-8,11,-11,11,-11,9,-9,9,-9,7,-7,7,-7,3,-3,3,-3,10,-10,10,-10,6,-6,6,-6,11,-11,11,-11,4,-4,4,-4,12,-12,0,0,12,-12,12,-12,9,-9,9,-9,8,-8,8,-8,1,-1,1,-1,11,-11,11,-11,5,-5,5,-5,12,-12,12,-12,2,-2,2,-2,10,-10,10,-10,7,-7,7,-7,12,-12,12,-12,3,-3,3,-3,11,-11,11,-11,6,-6,6,-6,12,-12,12,-12,4,-4,4,-4,9,-9,9,-9,10,-10,10,-10,8,-8,8,-8,13,-13,12,-12,12,-12,5,-5,5,-5,0,0,13,-13,13,-13,11,-11,11,-11,7,-7,7,-7,1,-1,1,-1,13,-13,13,-13,2,-2,2,-2,13,-13,13,-13,3,-3,3,-3,12,-12,12,-12,6,-6,6,-6,10,-10,10,-10,9,-9,9,-9,13,-13,13,-13,11,-11,11,-11,8,-8,8,-8,4,-4,4,-4,12,-12,12,-12,7,-7,7,-7,13,-13,13,-13,5,-5,5,-5,14,-14,0,0,14,-14,14,-14,1,-1,1,-1,14,-14,14,-14,10,-10,10,-10,2,-2,2,-2,11,-11,11,-11,9,-9,9,-9,14,-14,14,-14,13,-13,13,-13,6,-6,6,-6,3,-3,3,-3,12,-12,12,-12,8,-8,8,-8,14,-14,14,-14,4,-4,4,-4,13,-13,13,-13,7,-7,7,-7,14,-14,14,-14,11,-11,11,-11,10,-10,10,-10,5,-5,5,-5,15,-15,12,-12,12,-12,9,-9,9,-9,0,0,15,-15,15,-15,1,-1,1,-1,15,-15,15,-15,2,-2,2,-2,14,-14,14,-14,6,-6,6,-6,13,-13,13,-13,8,-8,8,-8,15,-15,15,-15,3,-3,3,-3,15,-15,15,-15,4,-4,4,-4,11,-11,11,-11,12,-12,12,-12,10,-10,10,-10,14,-14,14,-14,7,-7,7,-7,15,-15,15,-15,13,-13,13,-13,9,-9,9,-9,5,-5,5,-5,16,-16,0,0,16,-16,16,-16,1,-1,1,-1,16,-16,16,-16,14,-14,14,-14,8,-8,8,-8,2,-2,2,-2,15,-15,15,-15,6,-6,6,-6,16,-16,16,-16,12,-12,12,-12,11,-11,11,-11,3,-3,3,-3,13,-13,13,-13,10,-10,10,-10,16,-16,16,-16,4,-4,4,-4,15,-15,15,-15,7,-7,7,-7,14,-14,14,-14,9,-9,9,-9,16,-16,16,-16,5,-5,5,-5,12,-12,12,-12,17,-17,15,-15,15,-15,8,-8,8,-8,0,0,17,-17,17,-17,13,-13,13,-13,11,-11,11,-11,1,-1,1,-1,16,-16,16,-16,6,-6,6,-6,17,-17,17,-17,2,-2,2,-2,14,-14,14,-14,10,-10,10,-10,17,-17,17,-17,3,-3,3,-3,17,-17,17,-17,16,-16,16,-16,7,-7,7,-7,4,-4,4,-4,15,-15,15,-15,9,-9,9,-9,13,-13,13,-13,12,-12,12,-12,17,-17,17,-17,5,-5,5,-5,14,-14,14,-14,11,-11,11,-11,16,-16,16,-16,8,-8,8,-8,18,-18,0,0,18,-18,18,-18,17,-17,17,-17,15,-15,15,-15,10,-10,10,-10,6,-6,6,-6,1,-1,1,-1,18,-18,18,-18,2,-2,2,-2,18,-18,18,-18,3,-3,3,-3,16,-16,16,-16,9,-9,9,-9,17,-17,17,-17,13,-13,13,-13,7,-7,7,-7,18,-18,18,-18,14,-14,14,-14,12,-12,12,-12,4,-4,4,-4,15,-15,15,-15,11,-11,11,-11,18,-18,18,-18,5,-5,5,-5,17,-17,17,-17,8,-8,8,-8,16,-16,16,-16,10,-10,10,-10,18,-18,18,-18,6,-6,6,-6,19,-19,0,0,19,-19,19,-19,1,-1,1,-1,19,-19,19,-19,14,-14,14,-14,13,-13,13,-13,2,-2,2,-2,15,-15,15,-15,12,-12,12,-12,19,-19,19,-19,17,-17,17,-17,9,-9,9,-9,3,-3,3,-3,18,-18,18,-18,7,-7,7,-7,19,-19,19,-19,16,-16,16,-16,11,-11,11,-11,4,-4,4,-4,19,-19,19,-19,5,-5,5,-5,18,-18,18,-18,8,-8,8,-8,17,-17,17,-17,10,-10,10,-10,14,-14,14,-14,15,-15,15,-15,13,-13,13,-13,19,-19,19,-19,6,-6,6,-6,20,-20,16,-16,16,-16,12,-12,12,-12,0,0,20,-20,20,-20,1,-1,1,-1,20,-20,20,-20,2,-2,2,-2,18,-18,18,-18,9,-9,9,-9,20,-20,20,-20,3,-3,3,-3,19,-19,19,-19,17,-17,17,-17,11,-11,11,-11,7,-7,7,-7,20,-20,20,-20,4,-4,4,-4,15,-15,15,-15,14,-14,14,-14,18,-18,18,-18,10,-10,10,-10,20,-20,20,-20,19,-19,19,-19,16,-16,16,-16,13,-13,13,-13,8,-8,8,-8,5,-5,5,-5,17,-17,17,-17,12,-12,12,-12,20,-20,20,-20,6,-6,6,-6,21,-21,0,0,21,-21,21,-21,19,-19,19,-19,9,-9,9,-9,1,-