diff --git a/devmods/honeycomb-rule-generator.cpp b/devmods/honeycomb-rule-generator.cpp index d79f837b..b03d509b 100644 --- a/devmods/honeycomb-rule-generator.cpp +++ b/devmods/honeycomb-rule-generator.cpp @@ -272,6 +272,9 @@ int number_states = 0; /** \brief for state s, child_rules[s][i] is -1 if i-th neighbor not a child; otherwise, the state index of that neighbor */ vector > child_rules; +/** parent direction for every state */ +vector parent_list; + /** \brief if child_rules[s][i] is -1, the rules to get to that neighbor */ vector > side_rules; @@ -329,6 +332,8 @@ void test_canonical(string fname) { child_rules.resize(number_states, empty); + parent_list.resize(number_states); + println(hlog, "found ", its(number_states), " states"); /** generate child_rules */ @@ -343,6 +348,7 @@ void test_canonical(string fname) { for(int a=0; amove(a); + if(c1->FV < c->FV) parent_list[i] = a; if(c1->FV <= c->FV) continue; for(int b=0; bmove(b); @@ -372,12 +378,13 @@ void test_canonical(string fname) { int lqids = 0; for(int a=0; a<100; a++) { - set> found; - vector> v(number_states); - map, int> ids; + set> found; + vector> v(number_states); + map, int> ids; for(int i=0; i res; + array res; for(int d=0; d