Generated by Cython 0.29.13
Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.
Raw output: CACompute.cpp
+001: # distutils: language=c++
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
002:
+003: import re
__pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
004: from libcpp.vector cimport vector
005: from libcpp.pair cimport pair
006: from libcpp.map cimport map
007: from libcpp cimport bool
008: from libcpp.string cimport string
009: from libcpp.unordered_map cimport unordered_map
010: from libcpp.unordered_set cimport unordered_set
011:
012: cdef vector[vector[int]] colour_palette
013: cdef string rule_name
014: cdef string rule_space, bsconditions
015: cdef int n_states
016: cdef vector[unordered_map[pair[int, int], int]] index_map
017: cdef vector[vector[int]] state_weights
018: cdef vector[vector[pair[int, int]]] neighbourhood, original_neighbourhood
019: cdef vector[vector[int]] neighbourhood_weights
020: cdef int alternating_period, birth_state
021: cdef vector[unordered_set[int]] birth, survival, forcing, killing, living, \
022: regen_birth, regen_survival, activity_list, other_birth, other_survival
023:
024: cdef extern from "compute.cpp":
025: pass
026:
+027: cpdef load(filename):
static PyObject *__pyx_pw_9CACompute_1load(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
static PyObject *__pyx_f_9CACompute_load(PyObject *__pyx_v_filename, CYTHON_UNUSED int __pyx_skip_dispatch) {
std::string __pyx_v_rule;
int __pyx_v_neighbourhood_count;
std::vector<std::vector<int> > __pyx_v_current_neighbourhood_weights;
std::vector<std::vector<std::vector<int> > > __pyx_v_unflattened_neighbourhood_weights;
std::unordered_set<std::pair<int,int> > __pyx_v_set_neighbourhood;
std::pair<int,int> __pyx_v_neighbour;
std::pair<int,int> __pyx_v_neighbour2;
bool __pyx_v_parsing_neighbourhood;
int __pyx_v_colour_palette_count;
std::vector<int> __pyx_v_temp;
bool __pyx_v_parsing_colour_palette;
std::string __pyx_v_section;
std::vector<std::string> __pyx_v_rule_string;
int __pyx_v_neighbourhood_range;
int __pyx_v_i;
int __pyx_v_j;
std::vector<std::vector<int> > __pyx_v_weights;
std::vector<std::pair<int,int> > __pyx_v_pair_temp;
std::unordered_map<std::pair<int,int> ,int> __pyx_v_map_temp;
std::vector<int> __pyx_v_k;
int __pyx_v_num;
int __pyx_v_alt;
std::unordered_set<int> __pyx_v_set_temp;
std::vector<int> __pyx_v_extended;
PyObject *__pyx_v_file = NULL;
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_v_y = NULL;
std::string __pyx_v_individual_rule_string;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("load", 0);
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_36);
__Pyx_XDECREF(__pyx_t_37);
__Pyx_AddTraceback("CACompute.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_file);
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XDECREF(__pyx_v_y);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_1load(PyObject *__pyx_self, PyObject *__pyx_v_filename); /*proto*/
static PyObject *__pyx_pw_9CACompute_1load(PyObject *__pyx_self, PyObject *__pyx_v_filename) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("load (wrapper)", 0);
__pyx_r = __pyx_pf_9CACompute_load(__pyx_self, ((PyObject *)__pyx_v_filename));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_load(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("load", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_9CACompute_load(__pyx_v_filename, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
028: global colour_palette, rule_name, rule_space, n_states, state_weights, neighbourhood, neighbourhood_weights,\
029: alternating_period, birth, survival, forcing, killing, living, \
030: regen_birth, regen_survival, activity_list, birth_state, other_birth, other_survival, bsconditions, \
031: original_neighbourhood, index_map
032:
+033: colour_palette.clear()
__pyx_v_9CACompute_colour_palette.clear();
+034: rule_name = b""
__pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_v_9CACompute_rule_name = __pyx_t_1;
+035: rule_space = b""
__pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 35, __pyx_L1_error) __pyx_v_9CACompute_rule_space = __pyx_t_1;
+036: bsconditions = b""
__pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_kp_b_); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L1_error) __pyx_v_9CACompute_bsconditions = __pyx_t_1;
+037: n_states = 0
__pyx_v_9CACompute_n_states = 0;
+038: state_weights.clear()
__pyx_v_9CACompute_state_weights.clear();
+039: neighbourhood.clear()
__pyx_v_9CACompute_neighbourhood.clear();
+040: neighbourhood_weights.clear()
__pyx_v_9CACompute_neighbourhood_weights.clear();
+041: original_neighbourhood.clear()
__pyx_v_9CACompute_original_neighbourhood.clear();
+042: alternating_period = 0
__pyx_v_9CACompute_alternating_period = 0;
+043: birth_state = 0
__pyx_v_9CACompute_birth_state = 0;
+044: birth.clear()
__pyx_v_9CACompute_birth.clear();
+045: survival.clear()
__pyx_v_9CACompute_survival.clear();
+046: forcing.clear()
__pyx_v_9CACompute_forcing.clear();
+047: killing.clear()
__pyx_v_9CACompute_killing.clear();
+048: living.clear()
__pyx_v_9CACompute_living.clear();
+049: index_map.clear()
__pyx_v_9CACompute_index_map.clear();
+050: activity_list.clear()
__pyx_v_9CACompute_activity_list.clear();
+051: regen_birth.clear()
__pyx_v_9CACompute_regen_birth.clear();
+052: regen_survival.clear()
__pyx_v_9CACompute_regen_survival.clear();
+053: other_birth.clear()
__pyx_v_9CACompute_other_birth.clear();
+054: other_survival.clear()
__pyx_v_9CACompute_other_survival.clear();
055:
056: cdef string rule
057:
+058: cdef int neighbourhood_count = 0
__pyx_v_neighbourhood_count = 0;
059: cdef vector[vector[int]] current_neighbourhood_weights
060: cdef vector[vector[vector[int]]] unflattened_neighbourhood_weights
061: cdef unordered_set[pair[int, int]] set_neighbourhood
062: cdef pair[int, int] neighbour, neighbour2
+063: cdef bool parsing_neighbourhood = False
__pyx_v_parsing_neighbourhood = 0;
064:
+065: cdef int colour_palette_count = 0
__pyx_v_colour_palette_count = 0;
066: cdef vector[int] temp
+067: cdef bool parsing_colour_palette = False
__pyx_v_parsing_colour_palette = 0;
068:
069: cdef string section
070: cdef vector[string] rule_string
071:
+072: cdef int neighbourhood_range = 0
__pyx_v_neighbourhood_range = 0;
073:
074: cdef int i, j
075: cdef vector[vector[int]] weights
076: cdef vector[pair[int, int]] pair_temp
077: cdef unordered_map[pair[int, int], int] map_temp
078:
079: cdef vector[int] k
080:
081: cdef int num, alt
082: cdef unordered_set[int] set_temp
083: cdef vector[int] extended
084:
+085: file = open(filename, "r")
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename); __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_r); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_file = __pyx_t_3; __pyx_t_3 = 0;
+086: rule = file.read().encode("utf-8")
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u_utf_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_rule = __pyx_t_1;
087:
+088: for section in rule.split(b"\n"):
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_rule); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_b__2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_b__2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 88, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 88, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 88, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_section = __pyx_t_1; /* … */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+089: if section.find(b"Neighbourhood:") != -1 or section.find(b"#") != -1:
__pyx_t_9 = ((__pyx_v_section.find(__pyx_k_Neighbourhood) != -1L) != 0);
if (!__pyx_t_9) {
} else {
__pyx_t_8 = __pyx_t_9;
goto __pyx_L6_bool_binop_done;
}
__pyx_t_9 = ((__pyx_v_section.find(__pyx_k__3) != -1L) != 0);
__pyx_t_8 = __pyx_t_9;
__pyx_L6_bool_binop_done:;
if (__pyx_t_8) {
/* … */
}
+090: neighbourhood_count = 0
__pyx_v_neighbourhood_count = 0;
+091: parsing_neighbourhood = True
__pyx_v_parsing_neighbourhood = 1;
+092: current_neighbourhood_weights.clear()
__pyx_v_current_neighbourhood_weights.clear();
+093: continue
goto __pyx_L3_continue;
+094: elif parsing_neighbourhood:
__pyx_t_8 = (__pyx_v_parsing_neighbourhood != 0);
if (__pyx_t_8) {
/* … */
}
+095: temp.clear()
__pyx_v_temp.clear();
+096: for x in section.split(b","):
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 96, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 96, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 96, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+097: temp.push_back(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; try { __pyx_v_temp.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 97, __pyx_L1_error) }
+098: current_neighbourhood_weights.push_back(temp)
try {
__pyx_v_current_neighbourhood_weights.push_back(__pyx_v_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 98, __pyx_L1_error)
}
+099: neighbourhood_count += 1
__pyx_v_neighbourhood_count = (__pyx_v_neighbourhood_count + 1);
+100: if neighbourhood_count == neighbourhood_range * 2 + 1:
__pyx_t_8 = ((__pyx_v_neighbourhood_count == ((__pyx_v_neighbourhood_range * 2) + 1)) != 0);
if (__pyx_t_8) {
/* … */
}
+101: parsing_neighbourhood = False
__pyx_v_parsing_neighbourhood = 0;
+102: unflattened_neighbourhood_weights.push_back(current_neighbourhood_weights)
try {
__pyx_v_unflattened_neighbourhood_weights.push_back(__pyx_v_current_neighbourhood_weights);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 102, __pyx_L1_error)
}
+103: continue
goto __pyx_L3_continue;
104:
+105: if section.find(b"Colour Palette:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_Colour_Palette) != -1L) != 0);
if (__pyx_t_8) {
/* … */
}
+106: parsing_colour_palette = True
__pyx_v_parsing_colour_palette = 1;
+107: continue
goto __pyx_L3_continue;
+108: elif parsing_colour_palette:
__pyx_t_8 = (__pyx_v_parsing_colour_palette != 0);
if (__pyx_t_8) {
/* … */
}
+109: if section.find(b"None") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_None) != -1L) != 0);
if (__pyx_t_8) {
/* … */
}
+110: colour_palette.clear()
__pyx_v_9CACompute_colour_palette.clear();
+111: parsing_colour_palette = False
__pyx_v_parsing_colour_palette = 0;
+112: continue
goto __pyx_L3_continue;
113:
+114: temp.clear()
__pyx_v_temp.clear();
+115: for x in section.split(b","):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 115, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 115, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+116: temp.push_back(int(re.sub(b"[() ]", b"", x)))
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sub); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_b__5, __pyx_kp_b_, __pyx_v_x}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_b__5, __pyx_kp_b_, __pyx_v_x}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_14 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_b__5); __Pyx_GIVEREF(__pyx_kp_b__5); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_kp_b__5); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_12, __pyx_v_x); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; try { __pyx_v_temp.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 116, __pyx_L1_error) }
+117: colour_palette.push_back(temp)
try {
__pyx_v_9CACompute_colour_palette.push_back(__pyx_v_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 117, __pyx_L1_error)
}
+118: colour_palette_count += 1
__pyx_v_colour_palette_count = (__pyx_v_colour_palette_count + 1);
+119: if colour_palette_count == n_states:
__pyx_t_8 = ((__pyx_v_colour_palette_count == __pyx_v_9CACompute_n_states) != 0);
if (__pyx_t_8) {
/* … */
}
+120: parsing_colour_palette = False
__pyx_v_parsing_colour_palette = 0;
+121: continue
goto __pyx_L3_continue;
122:
+123: if section.find(b"Name:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_Name) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L16;
}
+124: rule_name = section.replace(b"Name: ", b"")
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_9CACompute_rule_name = __pyx_t_1; /* … */ __pyx_tuple__6 = PyTuple_Pack(2, __pyx_kp_b_Name_2, __pyx_kp_b_); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6);
+125: elif section.find(b"Neighbourhood Range:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_Neighbourhood_Range) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L16;
}
+126: neighbourhood_range = int(section.replace(b"Neighbourhood Range: ", b""))
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_neighbourhood_range = __pyx_t_12; /* … */ __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_b_Neighbourhood_Range_2, __pyx_kp_b_); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7);
+127: elif section.find(b"State Weights:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_State_Weights) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L16;
}
+128: for x in section.replace(b"State Weights: ", b"").split(b"|"):
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_13 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_5 = __pyx_t_13; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 128, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_13); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_13); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_11(__pyx_t_5); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 128, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13); __pyx_t_13 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* … */ __pyx_tuple__8 = PyTuple_Pack(2, __pyx_kp_b_State_Weights_2, __pyx_kp_b_); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8);
+129: temp.clear()
__pyx_v_temp.clear();
+130: for y in x.split(b","):
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_14, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_4 = __pyx_t_13; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 130, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_13); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 130, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_13); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 130, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_16(__pyx_t_4); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 130, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_13); __pyx_t_13 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+131: temp.push_back(int(y))
__pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_y); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; try { __pyx_v_temp.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 131, __pyx_L1_error) }
+132: state_weights.push_back(temp)
try {
__pyx_v_9CACompute_state_weights.push_back(__pyx_v_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 132, __pyx_L1_error)
}
+133: n_states = state_weights[0].size()
__pyx_v_9CACompute_n_states = (__pyx_v_9CACompute_state_weights[0]).size();
+134: elif section.find(b"Rulespace:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_Rulespace) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L16;
}
+135: rule_space = section.replace(b"Rulespace: ", b"")
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_9CACompute_rule_space = __pyx_t_1; /* … */ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_b_Rulespace_2, __pyx_kp_b_); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10);
+136: elif section.find(b"B/S Conditions:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_B_S_Conditions) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L16;
}
+137: bsconditions = section.replace(b"B/S Conditions: ", b"")
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_9CACompute_bsconditions = __pyx_t_1; /* … */ __pyx_tuple__11 = PyTuple_Pack(2, __pyx_kp_b_B_S_Conditions_2, __pyx_kp_b_); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11);
+138: elif section.find(b"Rulestring:") != -1:
__pyx_t_8 = ((__pyx_v_section.find(__pyx_k_Rulestring) != -1L) != 0);
if (__pyx_t_8) {
/* … */
}
__pyx_L16:;
+139: rule_string = section.replace(b"Rulestring: ", b"").split(b"|")
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_section); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_replace); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_4, __pyx_kp_b__9) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_17 = __pyx_convert_vector_from_py_std_3a__3a_string(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_rule_string = __pyx_t_17;
140:
+141: alternating_period = state_weights.size()
__pyx_v_9CACompute_alternating_period = __pyx_v_9CACompute_state_weights.size();
142:
+143: for weights in unflattened_neighbourhood_weights:
__pyx_t_18 = __pyx_v_unflattened_neighbourhood_weights.begin();
for (;;) {
if (!(__pyx_t_18 != __pyx_v_unflattened_neighbourhood_weights.end())) break;
__pyx_t_19 = *__pyx_t_18;
++__pyx_t_18;
__pyx_v_weights = __pyx_t_19;
/* … */
}
+144: pair_temp.clear()
__pyx_v_pair_temp.clear();
+145: for i in range(-neighbourhood_range, neighbourhood_range + 1):
__pyx_t_20 = (__pyx_v_neighbourhood_range + 1);
__pyx_t_21 = __pyx_t_20;
for (__pyx_t_12 = (-__pyx_v_neighbourhood_range); __pyx_t_12 < __pyx_t_21; __pyx_t_12+=1) {
__pyx_v_i = __pyx_t_12;
+146: for j in range(-neighbourhood_range, neighbourhood_range + 1):
__pyx_t_22 = (__pyx_v_neighbourhood_range + 1);
__pyx_t_23 = __pyx_t_22;
for (__pyx_t_24 = (-__pyx_v_neighbourhood_range); __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
__pyx_v_j = __pyx_t_24;
+147: if weights[i + neighbourhood_range][j + neighbourhood_range] != 0:
__pyx_t_8 = ((((__pyx_v_weights[(__pyx_v_i + __pyx_v_neighbourhood_range)])[(__pyx_v_j + __pyx_v_neighbourhood_range)]) != 0) != 0);
if (__pyx_t_8) {
/* … */
}
}
}
+148: pair_temp.push_back(pair[int, int] (i, j))
try {
__pyx_t_25 = std::pair<int,int> (__pyx_v_i, __pyx_v_j);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 148, __pyx_L1_error)
}
try {
__pyx_v_pair_temp.push_back(__pyx_t_25);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 148, __pyx_L1_error)
}
149:
+150: neighbourhood.push_back(pair_temp)
try {
__pyx_v_9CACompute_neighbourhood.push_back(__pyx_v_pair_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 150, __pyx_L1_error)
}
151:
+152: if bsconditions == b"BokaBB":
__pyx_t_8 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"BokaBB")) != 0);
if (__pyx_t_8) {
/* … */
}
+153: original_neighbourhood = neighbourhood
__pyx_v_9CACompute_original_neighbourhood = __pyx_v_9CACompute_neighbourhood;
+154: neighbourhood.clear()
__pyx_v_9CACompute_neighbourhood.clear();
+155: for i in range(alternating_period):
__pyx_t_12 = __pyx_v_9CACompute_alternating_period;
__pyx_t_24 = __pyx_t_12;
for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_24; __pyx_t_26+=1) {
__pyx_v_i = __pyx_t_26;
+156: set_neighbourhood.clear()
__pyx_v_set_neighbourhood.clear();
+157: for neighbour in original_neighbourhood[i]:
__pyx_t_28 = &(__pyx_v_9CACompute_original_neighbourhood[__pyx_v_i]);
__pyx_t_27 = __pyx_t_28->begin();
for (;;) {
if (!(__pyx_t_27 != __pyx_t_28->end())) break;
__pyx_t_25 = *__pyx_t_27;
++__pyx_t_27;
__pyx_v_neighbour = __pyx_t_25;
/* … */
}
+158: for neighbour2 in original_neighbourhood[i]:
__pyx_t_30 = &(__pyx_v_9CACompute_original_neighbourhood[__pyx_v_i]);
__pyx_t_29 = __pyx_t_30->begin();
for (;;) {
if (!(__pyx_t_29 != __pyx_t_30->end())) break;
__pyx_t_25 = *__pyx_t_29;
++__pyx_t_29;
__pyx_v_neighbour2 = __pyx_t_25;
/* … */
}
+159: set_neighbourhood.insert(pair[int, int] (neighbour.first + neighbour2.first,
try {
__pyx_t_25 = std::pair<int,int> ((__pyx_v_neighbour.first + __pyx_v_neighbour2.first), (__pyx_v_neighbour.second + __pyx_v_neighbour2.second));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 159, __pyx_L1_error)
}
(void)(__pyx_v_set_neighbourhood.insert(__pyx_t_25));
160: neighbour.second + neighbour2.second))
+161: set_neighbourhood.insert(neighbour)
(void)(__pyx_v_set_neighbourhood.insert(__pyx_v_neighbour));
162:
+163: pair_temp.clear()
__pyx_v_pair_temp.clear();
+164: pair_temp.insert(pair_temp.end(), set_neighbourhood.begin(), set_neighbourhood.end())
try {
__pyx_v_pair_temp.insert(__pyx_v_pair_temp.end(), __pyx_v_set_neighbourhood.begin(), __pyx_v_set_neighbourhood.end());
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 164, __pyx_L1_error)
}
+165: neighbourhood.push_back(pair_temp)
try {
__pyx_v_9CACompute_neighbourhood.push_back(__pyx_v_pair_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 165, __pyx_L1_error)
}
166:
+167: map_temp.clear()
__pyx_v_map_temp.clear();
+168: for j in range(len(neighbourhood[i])):
__pyx_t_2 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___((__pyx_v_9CACompute_neighbourhood[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_t_6; for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_10; __pyx_t_31+=1) { __pyx_v_j = __pyx_t_31;
+169: map_temp[neighbourhood[i][j]] = j
(__pyx_v_map_temp[((__pyx_v_9CACompute_neighbourhood[__pyx_v_i])[__pyx_v_j])]) = __pyx_v_j;
}
+170: index_map.push_back(map_temp)
try {
__pyx_v_9CACompute_index_map.push_back(__pyx_v_map_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 170, __pyx_L1_error)
}
}
171:
+172: for weights in unflattened_neighbourhood_weights:
__pyx_t_18 = __pyx_v_unflattened_neighbourhood_weights.begin();
for (;;) {
if (!(__pyx_t_18 != __pyx_v_unflattened_neighbourhood_weights.end())) break;
__pyx_t_19 = *__pyx_t_18;
++__pyx_t_18;
__pyx_v_weights = __pyx_t_19;
/* … */
}
+173: temp.clear()
__pyx_v_temp.clear();
+174: for k in weights:
__pyx_t_32 = __pyx_v_weights.begin();
for (;;) {
if (!(__pyx_t_32 != __pyx_v_weights.end())) break;
__pyx_t_33 = *__pyx_t_32;
++__pyx_t_32;
__pyx_v_k = __pyx_t_33;
/* … */
}
+175: for j in k:
__pyx_t_34 = __pyx_v_k.begin();
for (;;) {
if (!(__pyx_t_34 != __pyx_v_k.end())) break;
__pyx_t_12 = *__pyx_t_34;
++__pyx_t_34;
__pyx_v_j = __pyx_t_12;
/* … */
}
+176: if j != 0:
__pyx_t_8 = ((__pyx_v_j != 0) != 0);
if (__pyx_t_8) {
/* … */
}
+177: temp.push_back(j)
try {
__pyx_v_temp.push_back(__pyx_v_j);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 177, __pyx_L1_error)
}
178:
+179: neighbourhood_weights.push_back(temp)
try {
__pyx_v_9CACompute_neighbourhood_weights.push_back(__pyx_v_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 179, __pyx_L1_error)
}
180:
+181: if rule_space == b"Single State":
__pyx_t_8 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Single State")) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L44;
}
+182: if bsconditions == b"Outer Totalistic":
__pyx_t_8 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"Outer Totalistic")) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L45;
}
+183: for individual_rule_string in rule_string:
__pyx_t_35 = __pyx_v_rule_string.begin();
for (;;) {
if (!(__pyx_t_35 != __pyx_v_rule_string.end())) break;
__pyx_t_1 = *__pyx_t_35;
++__pyx_t_35;
__pyx_v_individual_rule_string = __pyx_t_1;
/* … */
}
+184: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L48;
}
+185: set_temp.clear()
__pyx_v_set_temp.clear();
+186: for x in individual_rule_string.split(b"/")[1].split(b","):
__pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 186, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+187: set_temp.insert(int(x))
__pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+188: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 188, __pyx_L1_error)
}
189:
+190: set_temp.clear()
__pyx_v_set_temp.clear();
+191: for x in individual_rule_string.split(b"/")[0].split(b","):
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_4, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_13, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 191, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 191, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 191, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 191, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+192: set_temp.insert(int(x))
__pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+193: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 193, __pyx_L1_error)
}
194: else:
+195: set_temp.clear()
/*else*/ {
__pyx_v_set_temp.clear();
+196: for x in re.split(b"[bs]", individual_rule_string)[1].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b_bs, __pyx_t_13}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b_bs, __pyx_t_13}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 196, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+197: set_temp.insert(int(x))
__pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+198: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 198, __pyx_L1_error)
}
199:
+200: set_temp.clear()
__pyx_v_set_temp.clear();
+201: for x in re.split(b"[bs]", individual_rule_string)[2].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bs, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bs, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_14 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 201, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 201, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 201, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+202: set_temp.insert(int(x))
__pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+203: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 203, __pyx_L1_error)
}
}
__pyx_L48:;
+204: elif bsconditions == b"BokaBB":
__pyx_t_8 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"BokaBB")) != 0);
if (__pyx_t_8) {
/* … */
}
__pyx_L45:;
+205: for individual_rule_string in rule_string:
__pyx_t_35 = __pyx_v_rule_string.begin();
for (;;) {
if (!(__pyx_t_35 != __pyx_v_rule_string.end())) break;
__pyx_t_1 = *__pyx_t_35;
++__pyx_t_35;
__pyx_v_individual_rule_string = __pyx_t_1;
/* … */
}
+206: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L59;
}
+207: set_temp.clear()
__pyx_v_set_temp.clear();
+208: for x in re.findall(b"\((.*?)\)", individual_rule_string.split(b"/")[1])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_findall); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_4, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__14, __pyx_t_13}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b__14, __pyx_t_13}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_14, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 208, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 208, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+209: set_temp.insert(int(x))
__pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+210: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 210, __pyx_L1_error)
}
211:
+212: set_temp.clear()
__pyx_v_set_temp.clear();
+213: for x in re.findall(b"\((.*?)\)", individual_rule_string.split(b"/")[0])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_re); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_14 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_14, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b__14, __pyx_t_3}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b__14, __pyx_t_3}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 213, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+214: set_temp.insert(int(x))
__pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+215: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 215, __pyx_L1_error)
}
216:
+217: set_temp.clear()
__pyx_v_set_temp.clear();
+218: for x in re.sub(b"\(.*?\)", b"", individual_rule_string.split(b"/")[1]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_14}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_14}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_3 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_13 = __pyx_t_2; __Pyx_INCREF(__pyx_t_13); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 218, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) #else __pyx_t_2 = PySequence_ITEM(__pyx_t_13, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_7(__pyx_t_13); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 218, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2); __pyx_t_2 = 0; /* … */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+219: set_temp.insert(int(x))
__pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+220: other_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_other_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 220, __pyx_L1_error)
}
221:
+222: set_temp.clear()
__pyx_v_set_temp.clear();
+223: for x in re.sub(b"\(.*?\)", b"", individual_rule_string.split(b"/")[0]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_14, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_14 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_12, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_13 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_3 = __pyx_t_13; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_13); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_13); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 223, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13); __pyx_t_13 = 0; /* … */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+224: set_temp.insert(int(x))
__pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+225: other_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_other_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 225, __pyx_L1_error)
}
226: else:
+227: set_temp.clear()
/*else*/ {
__pyx_v_set_temp.clear();
+228: for x in re.findall(b"\((.*?)\)", re.split(b"[bs]", individual_rule_string)[1])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_findall); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_36 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_bs, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_bs, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_36) { __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_36); __pyx_t_36 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b__14, __pyx_t_5}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b__14, __pyx_t_5}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_37, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_3 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_14, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_13 = __pyx_t_3; __Pyx_INCREF(__pyx_t_13); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 228, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 228, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_13, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_13); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 228, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+229: set_temp.insert(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+230: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 230, __pyx_L1_error)
}
231:
+232: set_temp.clear()
__pyx_v_set_temp.clear();
+233: for x in re.findall(b"\((.*?)\)", re.split(b"[bs]", individual_rule_string)[2])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_re); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_findall); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_b_bs, __pyx_t_5}; __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_b_bs, __pyx_t_5}; __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_36 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_36, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_36, 1+__pyx_t_12, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_36, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_14, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b__14, __pyx_t_2}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b__14, __pyx_t_2}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_36 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_36, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_36, 1+__pyx_t_12, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_13 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_13)) || PyTuple_CheckExact(__pyx_t_13)) { __pyx_t_3 = __pyx_t_13; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_13); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_13); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) #else __pyx_t_13 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #endif } } else { __pyx_t_13 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_13)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 233, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_13); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13); __pyx_t_13 = 0; /* … */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+234: set_temp.insert(int(x))
__pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+235: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 235, __pyx_L1_error)
}
236:
+237: set_temp.clear()
__pyx_v_set_temp.clear();
+238: for x in re.sub(b"\(.*?\)", b"", re.split(b"[bs]", individual_rule_string)[1]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_re); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_sub); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bs, __pyx_t_2}; __pyx_t_37 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bs, __pyx_t_2}; __pyx_t_37 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_4 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_37 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_4, NULL); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_37, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_36))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[4] = {__pyx_t_37, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_14}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[4] = {__pyx_t_37, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_14}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_12, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_36, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_13, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_36 = __pyx_t_3; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 238, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+239: set_temp.insert(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+240: other_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_other_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 240, __pyx_L1_error)
}
241:
+242: set_temp.clear()
__pyx_v_set_temp.clear();
+243: for x in re.sub(b"\(.*?\)", b"", re.split(b"[bs]", individual_rule_string)[2]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_sub); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_re); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_2 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_bs, __pyx_t_14}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_bs, __pyx_t_14}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_kp_b_bs); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b_bs); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_14); __pyx_t_14 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_5, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_13, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_37}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_13, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_37}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_12, __pyx_t_37); __pyx_t_37 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 243, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+244: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+245: other_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_other_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 245, __pyx_L1_error)
}
}
__pyx_L59:;
+246: elif rule_space == b"BSFKL":
__pyx_t_8 = ((__pyx_v_9CACompute_rule_space == ((char const *)"BSFKL")) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L44;
}
+247: for individual_rule_string in rule_string:
__pyx_t_35 = __pyx_v_rule_string.begin();
for (;;) {
if (!(__pyx_t_35 != __pyx_v_rule_string.end())) break;
__pyx_t_1 = *__pyx_t_35;
++__pyx_t_35;
__pyx_v_individual_rule_string = __pyx_t_1;
/* … */
}
+248: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L78;
}
+249: set_temp.clear()
__pyx_v_set_temp.clear();
+250: for x in individual_rule_string.split(b"/")[0].split(b","):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 250, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+251: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+252: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 252, __pyx_L1_error)
}
253:
+254: set_temp.clear()
__pyx_v_set_temp.clear();
+255: for x in individual_rule_string.split(b"/")[1].split(b","):
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 255, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+256: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+257: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 257, __pyx_L1_error)
}
258:
+259: set_temp.clear()
__pyx_v_set_temp.clear();
+260: for x in individual_rule_string.split(b"/")[2].split(b","):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 260, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+261: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+262: forcing.push_back(set_temp)
try {
__pyx_v_9CACompute_forcing.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 262, __pyx_L1_error)
}
263:
+264: set_temp.clear()
__pyx_v_set_temp.clear();
+265: for x in individual_rule_string.split(b"/")[3].split(b","):
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 265, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+266: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+267: killing.push_back(set_temp)
try {
__pyx_v_9CACompute_killing.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 267, __pyx_L1_error)
}
268:
+269: set_temp.clear()
__pyx_v_set_temp.clear();
+270: for x in individual_rule_string.split(b"/")[4].split(b","):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 270, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 270, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 270, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 270, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+271: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+272: living.push_back(set_temp)
try {
__pyx_v_9CACompute_living.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 272, __pyx_L1_error)
}
273: else:
+274: set_temp.clear()
/*else*/ {
__pyx_v_set_temp.clear();
+275: for x in re.split(b"[bsfkl]", individual_rule_string)[1].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsfkl, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsfkl, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_kp_b_bsfkl); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 275, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 275, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 275, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+276: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+277: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 277, __pyx_L1_error)
}
278:
+279: set_temp.clear()
__pyx_v_set_temp.clear();
+280: for x in re.split(b"[bsfkl]", individual_rule_string)[2].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bsfkl, __pyx_t_3}; __pyx_t_36 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bsfkl, __pyx_t_3}; __pyx_t_36 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_kp_b_bsfkl); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_36 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_37, NULL); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_36, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_13, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 280, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 280, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 280, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+281: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+282: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 282, __pyx_L1_error)
}
283:
+284: set_temp.clear()
__pyx_v_set_temp.clear();
+285: for x in re.split(b"[bsfkl]", individual_rule_string)[3].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_bsfkl, __pyx_t_13}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_bsfkl, __pyx_t_13}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_kp_b_bsfkl); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 285, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 285, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 285, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+286: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+287: forcing.push_back(set_temp)
try {
__pyx_v_9CACompute_forcing.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 287, __pyx_L1_error)
}
288:
+289: set_temp.clear()
__pyx_v_set_temp.clear();
+290: for x in re.split(b"[bsfkl]", individual_rule_string)[4].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_re); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsfkl, __pyx_t_37}; __pyx_t_36 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsfkl, __pyx_t_37}; __pyx_t_36 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_kp_b_bsfkl); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_t_37); __pyx_t_37 = 0; __pyx_t_36 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 290, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+291: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+292: killing.push_back(set_temp)
try {
__pyx_v_9CACompute_killing.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 292, __pyx_L1_error)
}
293:
+294: set_temp.clear()
__pyx_v_set_temp.clear();
+295: for x in re.split(b"[bsfkl]", individual_rule_string)[5].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsfkl, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsfkl, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_kp_b_bsfkl); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_kp_b_bsfkl); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 295, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 295, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+296: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+297: living.push_back(set_temp)
try {
__pyx_v_9CACompute_living.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 297, __pyx_L1_error)
}
}
__pyx_L78:;
+298: elif rule_space == b"Extended Generations":
__pyx_t_8 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Extended Generations")) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L44;
}
+299: for individual_rule_string in rule_string:
__pyx_t_35 = __pyx_v_rule_string.begin();
for (;;) {
if (!(__pyx_t_35 != __pyx_v_rule_string.end())) break;
__pyx_t_1 = *__pyx_t_35;
++__pyx_t_35;
__pyx_v_individual_rule_string = __pyx_t_1;
/* … */
}
+300: if bsconditions == b"Outer Totalistic":
__pyx_t_8 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"Outer Totalistic")) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L101;
}
+301: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L102;
}
+302: set_temp.clear()
__pyx_v_set_temp.clear();
+303: for x in individual_rule_string.split(b"/")[1].split(b","):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_36, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_13, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 303, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 303, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 303, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 303, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+304: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+305: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 305, __pyx_L1_error)
}
306:
+307: set_temp.clear()
__pyx_v_set_temp.clear();
+308: for x in individual_rule_string.split(b"/")[0].split(b","):
__pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 308, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 308, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+309: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+310: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 310, __pyx_L1_error)
}
311:
+312: extended.clear()
__pyx_v_extended.clear();
+313: for x in individual_rule_string.split(b"/")[2].split(b"-"):
__pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_36, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_13, __pyx_kp_b__16) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__16); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 313, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 313, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 313, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+314: extended.push_back(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; try { __pyx_v_extended.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 314, __pyx_L1_error) }
315: else:
+316: set_temp.clear()
/*else*/ {
__pyx_v_set_temp.clear();
+317: for x in re.split(b"[bsd]", individual_rule_string)[1].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bsd, __pyx_t_13}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_bsd, __pyx_t_13}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_37, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 317, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 317, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 317, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 317, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+318: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+319: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 319, __pyx_L1_error)
}
320:
+321: set_temp.clear()
__pyx_v_set_temp.clear();
+322: for x in re.split(b"[bsd]", individual_rule_string)[2].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsd, __pyx_t_3}; __pyx_t_36 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsd, __pyx_t_3}; __pyx_t_36 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_36 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_5, NULL); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_36, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 322, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 322, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+323: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+324: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 324, __pyx_L1_error)
}
325:
+326: extended.clear()
__pyx_v_extended.clear();
+327: for x in re.split(b"[bsd]", individual_rule_string)[3].split(b"-"):
__Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_re); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_3 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_bsd, __pyx_t_37}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_bsd, __pyx_t_37}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_37); __pyx_t_37 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_kp_b__16) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__16); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 327, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 327, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 327, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L102:;
+328: extended.push_back(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; try { __pyx_v_extended.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 328, __pyx_L1_error) }
+329: elif bsconditions == b"BokaBB":
__pyx_t_8 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"BokaBB")) != 0);
if (__pyx_t_8) {
/* … */
}
__pyx_L101:;
+330: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L115;
}
+331: set_temp.clear()
__pyx_v_set_temp.clear();
+332: for x in re.findall(b"\((.*?)\)", individual_rule_string.split(b"/")[1])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_findall); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_5 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_37, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b__14, __pyx_t_3}; __pyx_t_36 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b__14, __pyx_t_3}; __pyx_t_36 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_36 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_37, NULL); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_36, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_4 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_13, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_36 = __pyx_t_4; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 332, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 332, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 332, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+333: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+334: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 334, __pyx_L1_error)
}
335:
+336: set_temp.clear()
__pyx_v_set_temp.clear();
+337: for x in re.findall(b"\((.*?)\)", individual_rule_string.split(b"/")[0])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_findall); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_13 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b__14, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b__14, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_4 = __pyx_t_36; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 337, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 337, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 337, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+338: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+339: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 339, __pyx_L1_error)
}
340:
+341: set_temp.clear()
__pyx_v_set_temp.clear();
+342: for x in re.sub(b"\(.*?\)", b"", individual_rule_string.split(b"/")[1]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_re); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_sub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_37 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_5, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_37, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_37, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_13}; __pyx_t_36 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_37, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_13}; __pyx_t_36 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_36 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_4 = (__pyx_t_36) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_36, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 342, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 342, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 342, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 342, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; /* … */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+343: set_temp.insert(int(x))
__pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+344: other_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_other_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 344, __pyx_L1_error)
}
345:
+346: set_temp.clear()
__pyx_v_set_temp.clear();
+347: for x in re.sub(b"\(.*?\)", b"", individual_rule_string.split(b"/")[0]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_36, __pyx_n_s_re); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_36 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_13, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_36, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_36, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_37}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_36, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_37}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif { __pyx_t_13 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_36) { __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_36); __pyx_t_36 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_12, __pyx_t_37); __pyx_t_37 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 347, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 347, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 347, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+348: set_temp.insert(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+349: other_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_other_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 349, __pyx_L1_error)
}
350:
+351: extended.clear()
__pyx_v_extended.clear();
+352: for x in individual_rule_string.split(b"/")[2].split(b"-"):
__pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_4, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_5 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_13, __pyx_kp_b__16) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__16); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 352, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 352, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 352, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 352, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+353: extended.push_back(int(x))
__pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; try { __pyx_v_extended.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 353, __pyx_L1_error) }
354: else:
+355: set_temp.clear()
/*else*/ {
__pyx_v_set_temp.clear();
+356: for x in re.findall(b"\((.*?)\)", re.split(b"[bsd]", individual_rule_string)[1])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GetModuleGlobalName(__pyx_t_37, __pyx_n_s_re); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_14 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_36))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b_bsd, __pyx_t_37}; __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_kp_b_bsd, __pyx_t_37}; __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_t_37); __pyx_t_37 = 0; __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_36, __pyx_t_2, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_GetItemInt(__pyx_t_13, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b__14, __pyx_t_36}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b__14, __pyx_t_36}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_t_36); __pyx_t_36 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 356, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 356, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 356, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 356, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+357: set_temp.insert(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+358: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 358, __pyx_L1_error)
}
359:
+360: set_temp.clear()
__pyx_v_set_temp.clear();
+361: for x in re.findall(b"\((.*?)\)", re.split(b"[bsd]", individual_rule_string)[2])[0].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_findall); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_36, __pyx_n_s_re); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_37 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsd, __pyx_t_36}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_37, __pyx_kp_b_bsd, __pyx_t_36}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif { __pyx_t_14 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_37) { __Pyx_GIVEREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_37); __pyx_t_37 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_t_36); __pyx_t_36 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_b__14, __pyx_t_13}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_b__14, __pyx_t_13}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_14 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_kp_b__14); __Pyx_GIVEREF(__pyx_kp_b__14); PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_12, __pyx_kp_b__14); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 361, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 361, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+362: set_temp.insert(int(x))
__pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+363: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 363, __pyx_L1_error)
}
364:
+365: set_temp.clear()
__pyx_v_set_temp.clear();
+366: for x in re.sub(b"\(.*?\)", b"", re.split(b"[bsd]", individual_rule_string)[1]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sub); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_re); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_36 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_bsd, __pyx_t_13}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_bsd, __pyx_t_13}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_37 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_36) { __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_36); __pyx_t_36 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_37, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_4}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) { PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_4}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_37 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_37, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_37, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_37, 2+__pyx_t_12, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_14 = __pyx_t_3; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 366, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 366, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 366, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 366, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+367: set_temp.insert(int(x))
__pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+368: other_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_other_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 368, __pyx_L1_error)
}
369:
+370: set_temp.clear()
__pyx_v_set_temp.clear();
+371: for x in re.sub(b"\(.*?\)", b"", re.split(b"[bsd]", individual_rule_string)[2]).split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sub); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_13)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsd, __pyx_t_4}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_13, __pyx_kp_b_bsd, __pyx_t_4}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_36 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); if (__pyx_t_13) { __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_13); __pyx_t_13 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_36, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_36, 1+__pyx_t_12, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_36, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_2}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_b__15, __pyx_kp_b_, __pyx_t_2}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_36 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b__15); __Pyx_GIVEREF(__pyx_kp_b__15); PyTuple_SET_ITEM(__pyx_t_36, 0+__pyx_t_12, __pyx_kp_b__15); __Pyx_INCREF(__pyx_kp_b_); __Pyx_GIVEREF(__pyx_kp_b_); PyTuple_SET_ITEM(__pyx_t_36, 1+__pyx_t_12, __pyx_kp_b_); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_36, 2+__pyx_t_12, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_14 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_37 = __pyx_t_14; __Pyx_INCREF(__pyx_t_37); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_37 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_7 = Py_TYPE(__pyx_t_37)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_37))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyList_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } } else { __pyx_t_14 = __pyx_t_7(__pyx_t_37); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 371, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_14); __pyx_t_14 = 0; /* … */ } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
+372: set_temp.insert(int(x))
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_12));
+373: other_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_other_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 373, __pyx_L1_error)
}
374:
+375: extended.clear()
__pyx_v_extended.clear();
+376: for x in re.split(b"[bsd]", individual_rule_string)[3].split(b"-"):
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; __pyx_t_12 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_36))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); __pyx_t_12 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_bsd, __pyx_t_3}; __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_bsd, __pyx_t_3}; __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_kp_b_bsd); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_12, __pyx_kp_b_bsd); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_36, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_GetItemInt(__pyx_t_14, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_37 = (__pyx_t_36) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_36, __pyx_kp_b__16) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__16); __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_37)) || PyTuple_CheckExact(__pyx_t_37)) { __pyx_t_14 = __pyx_t_37; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_37); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 376, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } } else { __pyx_t_37 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_37)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 376, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_37); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_37); __pyx_t_37 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __pyx_L115:;
+377: extended.push_back(int(x))
__pyx_t_37 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_37); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; try { __pyx_v_extended.push_back(__pyx_t_12); } catch(...) { __Pyx_CppExn2PyErr(); __PYX_ERR(0, 377, __pyx_L1_error) }
378:
+379: num, alt = 1, 1
__pyx_t_12 = 1;
__pyx_t_24 = 1;
__pyx_v_num = __pyx_t_12;
__pyx_v_alt = __pyx_t_24;
+380: set_temp.clear()
__pyx_v_set_temp.clear();
+381: for i in extended:
__pyx_t_34 = __pyx_v_extended.begin();
for (;;) {
if (!(__pyx_t_34 != __pyx_v_extended.end())) break;
__pyx_t_24 = *__pyx_t_34;
++__pyx_t_34;
__pyx_v_i = __pyx_t_24;
/* … */
}
+382: for j in range(num, i + num):
__pyx_t_24 = (__pyx_v_i + __pyx_v_num);
__pyx_t_12 = __pyx_t_24;
for (__pyx_t_26 = __pyx_v_num; __pyx_t_26 < __pyx_t_12; __pyx_t_26+=1) {
__pyx_v_j = __pyx_t_26;
+383: if alt > 0:
__pyx_t_8 = ((__pyx_v_alt > 0) != 0);
if (__pyx_t_8) {
/* … */
}
+384: set_temp.insert(j)
(void)(__pyx_v_set_temp.insert(__pyx_v_j));
+385: num += 1
__pyx_v_num = (__pyx_v_num + 1);
}
+386: alt *= -1
__pyx_v_alt = (__pyx_v_alt * -1L);
387:
+388: activity_list.push_back(set_temp)
try {
__pyx_v_9CACompute_activity_list.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 388, __pyx_L1_error)
}
+389: elif rule_space == b"Regenerating Generations":
__pyx_t_8 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Regenerating Generations")) != 0);
if (__pyx_t_8) {
/* … */
}
__pyx_L44:;
+390: for individual_rule_string in rule_string:
__pyx_t_35 = __pyx_v_rule_string.begin();
for (;;) {
if (!(__pyx_t_35 != __pyx_v_rule_string.end())) break;
__pyx_t_1 = *__pyx_t_35;
++__pyx_t_35;
__pyx_v_individual_rule_string = __pyx_t_1;
/* … */
}
+391: if individual_rule_string.find(b"/") != -1:
__pyx_t_8 = ((__pyx_v_individual_rule_string.find(__pyx_k__13) != -1L) != 0);
if (__pyx_t_8) {
/* … */
goto __pyx_L143;
}
+392: birth_state = int(individual_rule_string.split(b"/")[1])
__pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_14 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_37, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_GetItemInt(__pyx_t_14, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyNumber_Int(__pyx_t_36); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_9CACompute_birth_state = __pyx_t_24;
393:
+394: set_temp.clear()
__pyx_v_set_temp.clear();
+395: for x in individual_rule_string.split(b"/")[2].split(b","):
__pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_37, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_36 = __pyx_t_14; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 395, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 395, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } } else { __pyx_t_14 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 395, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_14); __pyx_t_14 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+396: set_temp.insert(int(x))
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+397: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 397, __pyx_L1_error)
}
398:
+399: set_temp.clear()
__pyx_v_set_temp.clear();
+400: for x in individual_rule_string.split(b"/")[3].split(b","):
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_5, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_14, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_14 = __pyx_t_36; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 400, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 400, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 400, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+401: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+402: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 402, __pyx_L1_error)
}
403:
+404: set_temp.clear()
__pyx_v_set_temp.clear();
+405: for x in individual_rule_string.split(b"/")[4].split(b","):
__pyx_t_37 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_37, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_36, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); } } __pyx_t_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_36, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_36, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_36 = __pyx_t_14; __Pyx_INCREF(__pyx_t_36); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_36 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_7 = Py_TYPE(__pyx_t_36)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 405, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_36))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyList_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_36)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_36, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 405, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_36, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } } else { __pyx_t_14 = __pyx_t_7(__pyx_t_36); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 405, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_14); __pyx_t_14 = 0; /* … */ } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
+406: set_temp.insert(int(x))
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+407: regen_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_regen_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 407, __pyx_L1_error)
}
408:
+409: set_temp.clear()
__pyx_v_set_temp.clear();
+410: for x in individual_rule_string.split(b"/")[5].split(b","):
__pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_5, __pyx_kp_b__13) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__13); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_GetItemInt(__pyx_t_14, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_37, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_37 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_37)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_37); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_36 = (__pyx_t_37) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_37, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_37); __pyx_t_37 = 0; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_36)) || PyTuple_CheckExact(__pyx_t_36)) { __pyx_t_14 = __pyx_t_36; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_36); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 410, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 410, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_36 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_36); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 410, __pyx_L1_error) #else __pyx_t_36 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); #endif } } else { __pyx_t_36 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_36)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 410, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_36); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_36); __pyx_t_36 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+411: set_temp.insert(int(x))
__pyx_t_36 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_36); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+412: regen_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_regen_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 412, __pyx_L1_error)
}
413: else:
+414: birth_state = int(re.split(b"rg|l|b|s|rb|rs", individual_rule_string)[2])
/*else*/ {
__Pyx_GetModuleGlobalName(__pyx_t_36, __pyx_n_s_re); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_36);
__pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_37);
__Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
__pyx_t_36 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_36);
__pyx_t_5 = NULL;
__pyx_t_24 = 0;
if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_37))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_37);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_37, function);
__pyx_t_24 = 1;
}
}
#if CYTHON_FAST_PYCALL
if (PyFunction_Check(__pyx_t_37)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_36};
__pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
} else
#endif
#if CYTHON_FAST_PYCCALL
if (__Pyx_PyFastCFunction_Check(__pyx_t_37)) {
PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_36};
__pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_37, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0;
} else
#endif
{
__pyx_t_3 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
if (__pyx_t_5) {
__Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
}
__Pyx_INCREF(__pyx_kp_b_rg_l_b_s_rb_rs);
__Pyx_GIVEREF(__pyx_kp_b_rg_l_b_s_rb_rs);
PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_24, __pyx_kp_b_rg_l_b_s_rb_rs);
__Pyx_GIVEREF(__pyx_t_36);
PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_24, __pyx_t_36);
__pyx_t_36 = 0;
__pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_37, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
__pyx_t_37 = __Pyx_GetItemInt(__pyx_t_14, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_37);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_t_37); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
__pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_v_9CACompute_birth_state = __pyx_t_24;
415:
+416: set_temp.clear()
__pyx_v_set_temp.clear();
+417: for x in re.split(b"rg|l|b|s|rb|rs", individual_rule_string)[3].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_24 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_36))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_36); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_36); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_36, function); __pyx_t_24 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_3}; __pyx_t_37 = __Pyx_PyFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_36)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_3}; __pyx_t_37 = __Pyx_PyCFunction_FastCall(__pyx_t_36, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { __pyx_t_2 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_kp_b_rg_l_b_s_rb_rs); PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_24, __pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_24, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_37 = __Pyx_PyObject_Call(__pyx_t_36, __pyx_t_2, NULL); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __Pyx_GetItemInt(__pyx_t_37, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_14 = (__pyx_t_36) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_36, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_37 = __pyx_t_14; __Pyx_INCREF(__pyx_t_37); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_37 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_7 = Py_TYPE(__pyx_t_37)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_37))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyList_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 417, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } } else { __pyx_t_14 = __pyx_t_7(__pyx_t_37); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 417, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_14); __pyx_t_14 = 0; /* … */ } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
+418: set_temp.insert(int(x))
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+419: birth.push_back(set_temp)
try {
__pyx_v_9CACompute_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 419, __pyx_L1_error)
}
420:
+421: set_temp.clear()
__pyx_v_set_temp.clear();
+422: for x in re.split(b"rg|l|b|s|rb|rs", individual_rule_string)[4].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_36, __pyx_n_s_re); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_36, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; __pyx_t_36 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); __pyx_t_3 = NULL; __pyx_t_24 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_24 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_36}; __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_36}; __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_kp_b_rg_l_b_s_rb_rs); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_24, __pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_24, __pyx_t_36); __pyx_t_36 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_14, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_37 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_2, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_37)) || PyTuple_CheckExact(__pyx_t_37)) { __pyx_t_14 = __pyx_t_37; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_37); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 422, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } } else { __pyx_t_37 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_37)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 422, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_37); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_37); __pyx_t_37 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+423: set_temp.insert(int(x))
__pyx_t_37 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_37); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+424: survival.push_back(set_temp)
try {
__pyx_v_9CACompute_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 424, __pyx_L1_error)
}
425:
+426: set_temp.clear()
__pyx_v_set_temp.clear();
+427: for x in re.split(b"rg|l|b|s|rb|rs", individual_rule_string)[5].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_36 = NULL; __pyx_t_24 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_36 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_36)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_36); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_24 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_2}; __pyx_t_37 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_36, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_2}; __pyx_t_37 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_36); __pyx_t_36 = 0; __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_36) { __Pyx_GIVEREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_36); __pyx_t_36 = NULL; } __Pyx_INCREF(__pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_kp_b_rg_l_b_s_rb_rs); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_24, __pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_24, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_37 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_37, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_37))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_37); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_37); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_37, function); } } __pyx_t_14 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_37, __pyx_t_5, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_37, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; if (likely(PyList_CheckExact(__pyx_t_14)) || PyTuple_CheckExact(__pyx_t_14)) { __pyx_t_37 = __pyx_t_14; __Pyx_INCREF(__pyx_t_37); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_37 = PyObject_GetIter(__pyx_t_14); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_7 = Py_TYPE(__pyx_t_37)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_37))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyList_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 427, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_37)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_14 = PyTuple_GET_ITEM(__pyx_t_37, __pyx_t_6); __Pyx_INCREF(__pyx_t_14); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 427, __pyx_L1_error) #else __pyx_t_14 = PySequence_ITEM(__pyx_t_37, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif } } else { __pyx_t_14 = __pyx_t_7(__pyx_t_37); if (unlikely(!__pyx_t_14)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 427, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_14); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_14); __pyx_t_14 = 0; /* … */ } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0;
+428: set_temp.insert(int(x))
__pyx_t_14 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+429: regen_birth.push_back(set_temp)
try {
__pyx_v_9CACompute_regen_birth.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 429, __pyx_L1_error)
}
430:
+431: set_temp.clear()
__pyx_v_set_temp.clear();
+432: for x in re.split(b"rg|l|b|s|rb|rs", individual_rule_string)[6].split(b","):
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_individual_rule_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; __pyx_t_24 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_24 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_5}; __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_kp_b_rg_l_b_s_rb_rs, __pyx_t_5}; __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_24, 2+__pyx_t_24); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_36 = PyTuple_New(2+__pyx_t_24); if (unlikely(!__pyx_t_36)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_36); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_kp_b_rg_l_b_s_rb_rs); PyTuple_SET_ITEM(__pyx_t_36, 0+__pyx_t_24, __pyx_kp_b_rg_l_b_s_rb_rs); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_36, 1+__pyx_t_24, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_36, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_36); __pyx_t_36 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_14, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_14, function); } } __pyx_t_37 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_3, __pyx_kp_b__4) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_b__4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (likely(PyList_CheckExact(__pyx_t_37)) || PyTuple_CheckExact(__pyx_t_37)) { __pyx_t_14 = __pyx_t_37; __Pyx_INCREF(__pyx_t_14); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_37); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_7 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_14))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 432, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_37 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_6); __Pyx_INCREF(__pyx_t_37); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 432, __pyx_L1_error) #else __pyx_t_37 = PySequence_ITEM(__pyx_t_14, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); #endif } } else { __pyx_t_37 = __pyx_t_7(__pyx_t_14); if (unlikely(!__pyx_t_37)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 432, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_37); } __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_37); __pyx_t_37 = 0; /* … */ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+433: set_temp.insert(int(x))
__pyx_t_37 = __Pyx_PyNumber_Int(__pyx_v_x); if (unlikely(!__pyx_t_37)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_37); __pyx_t_24 = __Pyx_PyInt_As_int(__pyx_t_37); if (unlikely((__pyx_t_24 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_37); __pyx_t_37 = 0; (void)(__pyx_v_set_temp.insert(__pyx_t_24));
+434: regen_survival.push_back(set_temp)
try {
__pyx_v_9CACompute_regen_survival.push_back(__pyx_v_set_temp);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 434, __pyx_L1_error)
}
}
__pyx_L143:;
435:
+436: cpdef vector[pair[int, int]] get_neighbourhood(int generations):
static PyObject *__pyx_pw_9CACompute_3get_neighbourhood(PyObject *__pyx_self, PyObject *__pyx_arg_generations); /*proto*/
static std::vector<std::pair<int,int> > __pyx_f_9CACompute_get_neighbourhood(int __pyx_v_generations, CYTHON_UNUSED int __pyx_skip_dispatch) {
std::vector<std::pair<int,int> > __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_neighbourhood", 0);
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_3get_neighbourhood(PyObject *__pyx_self, PyObject *__pyx_arg_generations); /*proto*/
static PyObject *__pyx_pw_9CACompute_3get_neighbourhood(PyObject *__pyx_self, PyObject *__pyx_arg_generations) {
int __pyx_v_generations;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_neighbourhood (wrapper)", 0);
assert(__pyx_arg_generations); {
__pyx_v_generations = __Pyx_PyInt_As_int(__pyx_arg_generations); if (unlikely((__pyx_v_generations == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_AddTraceback("CACompute.get_neighbourhood", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9CACompute_2get_neighbourhood(__pyx_self, ((int)__pyx_v_generations));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_2get_neighbourhood(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_generations) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_neighbourhood", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(__pyx_f_9CACompute_get_neighbourhood(__pyx_v_generations, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.get_neighbourhood", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+437: return neighbourhood[generations % alternating_period]
__pyx_r = (__pyx_v_9CACompute_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]); goto __pyx_L0;
438:
+439: cpdef int get_n_states():
static PyObject *__pyx_pw_9CACompute_5get_n_states(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_9CACompute_get_n_states(CYTHON_UNUSED int __pyx_skip_dispatch) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_n_states", 0);
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_5get_n_states(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9CACompute_5get_n_states(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_n_states (wrapper)", 0);
__pyx_r = __pyx_pf_9CACompute_4get_n_states(__pyx_self);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_4get_n_states(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_n_states", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_9CACompute_get_n_states(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.get_n_states", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+440: return n_states
__pyx_r = __pyx_v_9CACompute_n_states; goto __pyx_L0;
441:
+442: cpdef vector[vector[int]] get_colour_palette():
static PyObject *__pyx_pw_9CACompute_7get_colour_palette(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static std::vector<std::vector<int> > __pyx_f_9CACompute_get_colour_palette(CYTHON_UNUSED int __pyx_skip_dispatch) {
std::vector<std::vector<int> > __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_colour_palette", 0);
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_7get_colour_palette(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9CACompute_7get_colour_palette(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_colour_palette (wrapper)", 0);
__pyx_r = __pyx_pf_9CACompute_6get_colour_palette(__pyx_self);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_6get_colour_palette(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_colour_palette", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_convert_vector_to_py_std_3a__3a_vector_3c_int_3e___(__pyx_f_9CACompute_get_colour_palette(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.get_colour_palette", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+443: return colour_palette
__pyx_r = __pyx_v_9CACompute_colour_palette; goto __pyx_L0;
444:
+445: cpdef string get_rule_name():
static PyObject *__pyx_pw_9CACompute_9get_rule_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static std::string __pyx_f_9CACompute_get_rule_name(CYTHON_UNUSED int __pyx_skip_dispatch) {
std::string __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_rule_name", 0);
/* … */
/* function exit code */
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_9get_rule_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_9CACompute_9get_rule_name(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_rule_name (wrapper)", 0);
__pyx_r = __pyx_pf_9CACompute_8get_rule_name(__pyx_self);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_8get_rule_name(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("get_rule_name", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_f_9CACompute_get_rule_name(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.get_rule_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+446: return rule_name
__pyx_r = __pyx_v_9CACompute_rule_name; goto __pyx_L0;
447:
+448: cdef int transition_func(vector[int] neighbours, int generations):
static int __pyx_f_9CACompute_transition_func(std::vector<int> __pyx_v_neighbours, int __pyx_v_generations) {
int __pyx_v_n_living;
int __pyx_v_n_destructive;
int __pyx_v_n;
int __pyx_v_n_birth;
int __pyx_v_n_survival;
int __pyx_v_idx;
std::pair<int,int> __pyx_v_neighbour;
std::pair<int,int> __pyx_v_neighbour2;
std::vector<int> ::size_type __pyx_v_i;
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("transition_func", 0);
/* … */
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_WriteUnraisable("CACompute.transition_func", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+449: cdef int n_living = 0, n_destructive = 0, n = 0, n_birth = 0, n_survival = 0, index, found_index, idx
__pyx_v_n_living = 0; __pyx_v_n_destructive = 0; __pyx_v_n = 0; __pyx_v_n_birth = 0; __pyx_v_n_survival = 0;
450: cdef pair[int, int] neighbour, neighbour2
+451: if rule_space == b"BSFKL":
__pyx_t_1 = ((__pyx_v_9CACompute_rule_space == ((char const *)"BSFKL")) != 0);
if (__pyx_t_1) {
/* … */
}
+452: for i in range(neighbours.size() - 1):
__pyx_t_2 = (__pyx_v_neighbours.size() - 1);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
+453: if neighbours[i] == 1:
__pyx_t_1 = (((__pyx_v_neighbours[__pyx_v_i]) == 1) != 0);
if (__pyx_t_1) {
/* … */
goto __pyx_L6;
}
+454: n_living += neighbourhood_weights[generations % alternating_period][i]
__pyx_v_n_living = (__pyx_v_n_living + ((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_i]));
+455: elif neighbours[i] == 2:
__pyx_t_1 = (((__pyx_v_neighbours[__pyx_v_i]) == 2) != 0);
if (__pyx_t_1) {
/* … */
}
__pyx_L6:;
}
+456: n_destructive += neighbourhood_weights[generations % alternating_period][i]
__pyx_v_n_destructive = (__pyx_v_n_destructive + ((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_i]));
457:
+458: if neighbours[neighbours.size() - 1] == 1:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 1) != 0);
if (__pyx_t_1) {
/* … */
}
+459: if killing[generations % alternating_period].find(n_destructive) != \
__pyx_t_1 = (((__pyx_v_9CACompute_killing[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_destructive) != (__pyx_v_9CACompute_killing[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
460: killing[generations % alternating_period].end():
+461: return 0
__pyx_r = 0;
goto __pyx_L0;
+462: elif survival[generations % alternating_period].find(n_living) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_living) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
463: survival[generations % alternating_period].end():
+464: return 1
__pyx_r = 1;
goto __pyx_L0;
+465: return 2
__pyx_r = 2;
goto __pyx_L0;
466:
+467: elif neighbours[neighbours.size() - 1] == 2:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 2) != 0);
if (__pyx_t_1) {
/* … */
}
+468: if living[generations % alternating_period].find(n_living) != \
__pyx_t_1 = (((__pyx_v_9CACompute_living[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_living) != (__pyx_v_9CACompute_living[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
469: living[generations % alternating_period].end():
+470: return 0
__pyx_r = 0;
goto __pyx_L0;
+471: return 2
__pyx_r = 2;
goto __pyx_L0;
472:
473: else:
+474: if forcing[generations % alternating_period].find(n_destructive) != \
/*else*/ {
/* … */
__pyx_t_5 = (((__pyx_v_9CACompute_forcing[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_destructive) != (__pyx_v_9CACompute_forcing[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_5) {
} else {
__pyx_t_1 = __pyx_t_5;
goto __pyx_L11_bool_binop_done;
}
/* … */
if (__pyx_t_1) {
/* … */
}
475: forcing[generations % alternating_period].end() and \
+476: birth[generations % alternating_period].find(n_living) != \
__pyx_t_5 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_living) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
__pyx_t_1 = __pyx_t_5;
__pyx_L11_bool_binop_done:;
477: birth[generations % alternating_period].end():
+478: return 1
__pyx_r = 1;
goto __pyx_L0;
+479: return 0
__pyx_r = 0;
goto __pyx_L0;
}
+480: elif rule_space == b"Extended Generations":
__pyx_t_1 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Extended Generations")) != 0);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+481: if bsconditions == b"Outer Totalistic":
__pyx_t_1 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"Outer Totalistic")) != 0);
if (__pyx_t_1) {
/* … */
goto __pyx_L13;
}
+482: for i in range(neighbours.size() - 1):
__pyx_t_2 = (__pyx_v_neighbours.size() - 1);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
+483: n += neighbourhood_weights[generations % alternating_period][i] * \
__pyx_v_n = (__pyx_v_n + (((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_i]) * ((__pyx_v_9CACompute_state_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[(__pyx_v_neighbours[__pyx_v_i])])));
}
484: state_weights[generations % alternating_period][neighbours[i]]
485:
+486: if activity_list[generations % alternating_period].find(neighbours[neighbours.size() - 1]) != \
__pyx_t_1 = (((__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)])) != (__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
487: activity_list[generations % alternating_period].end():
+488: if survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
489: survival[generations % alternating_period].end():
+490: return neighbours[neighbours.size() - 1]
__pyx_r = (__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]);
goto __pyx_L0;
+491: return (neighbours[neighbours.size() - 1] + 1) % n_states
__pyx_r = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) + 1) % __pyx_v_9CACompute_n_states);
goto __pyx_L0;
492:
+493: elif neighbours[neighbours.size() - 1] == 0:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 0) != 0);
if (__pyx_t_1) {
/* … */
}
+494: if birth[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
495: birth[generations % alternating_period].end():
+496: return 1
__pyx_r = 1;
goto __pyx_L0;
+497: return 0
__pyx_r = 0;
goto __pyx_L0;
+498: elif bsconditions == b"BokaBB":
__pyx_t_1 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"BokaBB")) != 0);
if (__pyx_t_1) {
/* … */
}
__pyx_L13:;
+499: n_birth = 0
__pyx_v_n_birth = 0;
+500: n_survival = 0
__pyx_v_n_survival = 0;
+501: for neighbour in original_neighbourhood[generations % alternating_period]:
__pyx_t_7 = &(__pyx_v_9CACompute_original_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_6 = __pyx_t_7->begin();
for (;;) {
if (!(__pyx_t_6 != __pyx_t_7->end())) break;
__pyx_t_8 = *__pyx_t_6;
++__pyx_t_6;
__pyx_v_neighbour = __pyx_t_8;
/* … */
}
+502: n = 0
__pyx_v_n = 0;
+503: idx = 0
__pyx_v_idx = 0;
+504: for neighbour2 in original_neighbourhood[generations % alternating_period]:
__pyx_t_10 = &(__pyx_v_9CACompute_original_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_9 = __pyx_t_10->begin();
for (;;) {
if (!(__pyx_t_9 != __pyx_t_10->end())) break;
__pyx_t_8 = *__pyx_t_9;
++__pyx_t_9;
__pyx_v_neighbour2 = __pyx_t_8;
/* … */
}
+505: n += neighbourhood_weights[generations % alternating_period][idx] * \
__pyx_v_n = (__pyx_v_n + (((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_idx]) * ((__pyx_v_9CACompute_state_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[(__pyx_v_neighbours[((__pyx_v_9CACompute_index_map[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_t_8])])])));
506: state_weights[generations % alternating_period][neighbours[index_map[
507: generations % alternating_period][pair[int, int]
+508: (neighbour.first + neighbour2.first, neighbour.second + neighbour2.second)]]]
try {
__pyx_t_8 = std::pair<int,int> ((__pyx_v_neighbour.first + __pyx_v_neighbour2.first), (__pyx_v_neighbour.second + __pyx_v_neighbour2.second));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 508, __pyx_L1_error)
}
+509: idx += 1
__pyx_v_idx = (__pyx_v_idx + 1);
510:
+511: if other_birth[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_other_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_other_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
512: other_birth[generations % alternating_period].end():
+513: n_birth += 1
__pyx_v_n_birth = (__pyx_v_n_birth + 1);
+514: if other_survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_other_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_other_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
515: other_survival[generations % alternating_period].end():
+516: n_survival += 1
__pyx_v_n_survival = (__pyx_v_n_survival + 1);
517:
+518: if activity_list[generations % alternating_period].find(neighbours[neighbours.size() - 1]) != \
__pyx_t_1 = (((__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)])) != (__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
519: activity_list[generations % alternating_period].end():
+520: if survival[generations % alternating_period].find(n_survival) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_survival) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
521: survival[generations % alternating_period].end():
+522: return 1
__pyx_r = 1;
goto __pyx_L0;
+523: return 2
__pyx_r = 2;
goto __pyx_L0;
524:
+525: elif neighbours[neighbours.size() - 1] == 0:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 0) != 0);
if (__pyx_t_1) {
/* … */
}
+526: if birth[generations % alternating_period].find(n_birth) != \
__pyx_t_1 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_birth) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
527: birth[generations % alternating_period].end():
+528: return 1
__pyx_r = 1;
goto __pyx_L0;
+529: return 0
__pyx_r = 0;
goto __pyx_L0;
+530: elif rule_space == b"Single State":
__pyx_t_1 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Single State")) != 0);
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
+531: if bsconditions == b"Outer Totalistic":
__pyx_t_1 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"Outer Totalistic")) != 0);
if (__pyx_t_1) {
/* … */
}
+532: for i in range(neighbours.size() - 1):
__pyx_t_2 = (__pyx_v_neighbours.size() - 1);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
+533: n += neighbourhood_weights[generations % alternating_period][i] * \
__pyx_v_n = (__pyx_v_n + (((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_i]) * ((__pyx_v_9CACompute_state_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[(__pyx_v_neighbours[__pyx_v_i])])));
}
534: state_weights[generations % alternating_period][neighbours[i]]
535:
+536: if neighbours[neighbours.size() - 1] == 1:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 1) != 0);
if (__pyx_t_1) {
/* … */
}
+537: if survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
538: survival[generations % alternating_period].end():
+539: return 1
__pyx_r = 1;
goto __pyx_L0;
+540: return 0
__pyx_r = 0;
goto __pyx_L0;
541: else:
+542: if birth[generations % alternating_period].find(n) != \
/*else*/ {
/* … */
__pyx_t_1 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
/* … */
if (__pyx_t_1) {
/* … */
}
543: birth[generations % alternating_period].end():
+544: return 1
__pyx_r = 1;
goto __pyx_L0;
+545: return 0
__pyx_r = 0;
goto __pyx_L0;
}
+546: elif bsconditions == b"BokaBB":
__pyx_t_1 = ((__pyx_v_9CACompute_bsconditions == ((char const *)"BokaBB")) != 0);
if (__pyx_t_1) {
/* … */
}
+547: n_birth = 0
__pyx_v_n_birth = 0;
+548: n_survival = 0
__pyx_v_n_survival = 0;
+549: for neighbour in original_neighbourhood[generations % alternating_period]:
__pyx_t_7 = &(__pyx_v_9CACompute_original_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_6 = __pyx_t_7->begin();
for (;;) {
if (!(__pyx_t_6 != __pyx_t_7->end())) break;
__pyx_t_8 = *__pyx_t_6;
++__pyx_t_6;
__pyx_v_neighbour = __pyx_t_8;
/* … */
}
+550: n = 0
__pyx_v_n = 0;
+551: idx = 0
__pyx_v_idx = 0;
+552: for neighbour2 in original_neighbourhood[generations % alternating_period]:
__pyx_t_10 = &(__pyx_v_9CACompute_original_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_9 = __pyx_t_10->begin();
for (;;) {
if (!(__pyx_t_9 != __pyx_t_10->end())) break;
__pyx_t_8 = *__pyx_t_9;
++__pyx_t_9;
__pyx_v_neighbour2 = __pyx_t_8;
/* … */
}
+553: n += neighbourhood_weights[generations % alternating_period][idx] * \
__pyx_v_n = (__pyx_v_n + (((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_idx]) * ((__pyx_v_9CACompute_state_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[(__pyx_v_neighbours[((__pyx_v_9CACompute_index_map[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_t_8])])])));
554: state_weights[generations % alternating_period][neighbours[index_map[
555: generations % alternating_period][pair[int, int]
+556: (neighbour.first + neighbour2.first, neighbour.second + neighbour2.second)]]]
try {
__pyx_t_8 = std::pair<int,int> ((__pyx_v_neighbour.first + __pyx_v_neighbour2.first), (__pyx_v_neighbour.second + __pyx_v_neighbour2.second));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 556, __pyx_L1_error)
}
+557: idx += 1
__pyx_v_idx = (__pyx_v_idx + 1);
558:
+559: if other_birth[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_other_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_other_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
560: other_birth[generations % alternating_period].end():
+561: n_birth += 1
__pyx_v_n_birth = (__pyx_v_n_birth + 1);
+562: if other_survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_other_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_other_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
563: other_survival[generations % alternating_period].end():
+564: n_survival += 1
__pyx_v_n_survival = (__pyx_v_n_survival + 1);
565:
+566: if neighbours[neighbours.size() - 1] == 1:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 1) != 0);
if (__pyx_t_1) {
/* … */
}
+567: if survival[generations % alternating_period].find(n_survival) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_survival) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
568: survival[generations % alternating_period].end():
+569: return 1
__pyx_r = 1;
goto __pyx_L0;
+570: return 0
__pyx_r = 0;
goto __pyx_L0;
571:
+572: elif neighbours[neighbours.size() - 1] == 0:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 0) != 0);
if (__pyx_t_1) {
/* … */
}
+573: if birth[generations % alternating_period].find(n_birth) != \
__pyx_t_1 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n_birth) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
574: birth[generations % alternating_period].end():
+575: return 1
__pyx_r = 1;
goto __pyx_L0;
+576: return 0
__pyx_r = 0;
goto __pyx_L0;
+577: elif rule_space == b"Regenerating Generations":
__pyx_t_1 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Regenerating Generations")) != 0);
if (__pyx_t_1) {
/* … */
}
__pyx_L3:;
+578: for i in range(neighbours.size() - 1):
__pyx_t_2 = (__pyx_v_neighbours.size() - 1);
__pyx_t_3 = __pyx_t_2;
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
+579: n += neighbourhood_weights[generations % alternating_period][i] * \
__pyx_v_n = (__pyx_v_n + (((__pyx_v_9CACompute_neighbourhood_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[__pyx_v_i]) * ((__pyx_v_9CACompute_state_weights[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)])[(__pyx_v_neighbours[__pyx_v_i])])));
}
580: state_weights[generations % alternating_period][neighbours[i]]
581:
+582: if neighbours[neighbours.size() - 1] == 0:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 0) != 0);
if (__pyx_t_1) {
/* … */
}
+583: if birth[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
584: birth[generations % alternating_period].end():
+585: return birth_state
__pyx_r = __pyx_v_9CACompute_birth_state;
goto __pyx_L0;
+586: return 0
__pyx_r = 0;
goto __pyx_L0;
+587: elif neighbours[neighbours.size() - 1] == 1:
__pyx_t_1 = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) == 1) != 0);
if (__pyx_t_1) {
/* … */
}
+588: if survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
589: survival[generations % alternating_period].end():
+590: return 1
__pyx_r = 1;
goto __pyx_L0;
+591: return 2
__pyx_r = 2;
goto __pyx_L0;
592: else:
+593: if regen_birth[generations % alternating_period].find(n) != \
/*else*/ {
/* … */
__pyx_t_1 = (((__pyx_v_9CACompute_regen_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_regen_birth[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
/* … */
if (__pyx_t_1) {
/* … */
}
594: regen_birth[generations % alternating_period].end():
+595: return neighbours[neighbours.size() - 1] - 1
__pyx_r = ((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) - 1);
goto __pyx_L0;
+596: elif regen_survival[generations % alternating_period].find(n) != \
__pyx_t_1 = (((__pyx_v_9CACompute_regen_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_n) != (__pyx_v_9CACompute_regen_survival[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (__pyx_t_1) {
/* … */
}
597: regen_survival[generations % alternating_period].end():
+598: return neighbours[neighbours.size() - 1]
__pyx_r = (__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]);
goto __pyx_L0;
+599: return (neighbours[neighbours.size() - 1] + 1) % n_states
__pyx_r = (((__pyx_v_neighbours[(__pyx_v_neighbours.size() - 1)]) + 1) % __pyx_v_9CACompute_n_states);
goto __pyx_L0;
}
600:
+601: cdef int depend_on_neighbours(int state, int generations):
static int __pyx_f_9CACompute_depend_on_neighbours(int __pyx_v_state, int __pyx_v_generations) {
int __pyx_r;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("depend_on_neighbours", 0);
/* … */
/* function exit code */
__pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
+602: if rule_space == b"BSFKL" or rule_space == b"Single State" or rule_space == b"Regenerating Generations":
__pyx_t_2 = ((__pyx_v_9CACompute_rule_space == ((char const *)"BSFKL")) != 0);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Single State")) != 0);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L4_bool_binop_done;
}
__pyx_t_2 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Regenerating Generations")) != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
if (__pyx_t_1) {
/* … */
}
+603: return -1
__pyx_r = -1;
goto __pyx_L0;
+604: elif rule_space == b"Extended Generations":
__pyx_t_1 = ((__pyx_v_9CACompute_rule_space == ((char const *)"Extended Generations")) != 0);
if (__pyx_t_1) {
/* … */
}
+605: if activity_list[generations % alternating_period].find(state) != \
__pyx_t_2 = (((__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).find(__pyx_v_state) != (__pyx_v_9CACompute_activity_list[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).end()) != 0);
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L8_bool_binop_done;
}
/* … */
if (__pyx_t_1) {
/* … */
}
+606: activity_list[generations % alternating_period].end() or state == 0:
__pyx_t_2 = ((__pyx_v_state == 0) != 0);
__pyx_t_1 = __pyx_t_2;
__pyx_L8_bool_binop_done:;
+607: return -1
__pyx_r = -1;
goto __pyx_L0;
608: else:
+609: return (state + 1) % n_states
/*else*/ {
__pyx_r = ((__pyx_v_state + 1) % __pyx_v_9CACompute_n_states);
goto __pyx_L0;
}
610:
611: cdef unordered_map[pair[int, int], int] depends_cache
612: cdef map[pair[vector[int], int], int] transition_func_cache
+613: cpdef compute(unordered_set[pair[int, int]] cells_changed,
static PyObject *__pyx_pw_9CACompute_11compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9CACompute_compute(std::unordered_set<std::pair<int,int> > __pyx_v_cells_changed, std::unordered_map<std::pair<int,int> ,int> __pyx_v_copy_grid, std::unordered_map<std::pair<int,int> ,int> __pyx_v_dict_grid, int __pyx_v_generations, CYTHON_UNUSED int __pyx_skip_dispatch) {
std::vector<int> __pyx_v_neighbours;
std::unordered_set<std::pair<int,int> > __pyx_v_cells_to_check;
int __pyx_v_ans;
std::pair<int,int> __pyx_v_coordinates;
std::pair<int,int> __pyx_v_coordinates2;
std::pair<int,int> __pyx_v_neighbour;
std::pair<int,int> __pyx_v_coor;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("compute", 0);
/* … */
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_AddTraceback("CACompute.compute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_9CACompute_11compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_9CACompute_11compute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
std::unordered_set<std::pair<int,int> > __pyx_v_cells_changed;
std::unordered_map<std::pair<int,int> ,int> __pyx_v_copy_grid;
std::unordered_map<std::pair<int,int> ,int> __pyx_v_dict_grid;
int __pyx_v_generations;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("compute (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cells_changed,&__pyx_n_s_copy_grid,&__pyx_n_s_dict_grid,&__pyx_n_s_generations,0};
PyObject* values[4] = {0,0,0,0};
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
CYTHON_FALLTHROUGH;
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
CYTHON_FALLTHROUGH;
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
CYTHON_FALLTHROUGH;
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cells_changed)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy_grid)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("compute", 1, 4, 4, 1); __PYX_ERR(0, 613, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 2:
if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dict_grid)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("compute", 1, 4, 4, 2); __PYX_ERR(0, 613, __pyx_L3_error)
}
CYTHON_FALLTHROUGH;
case 3:
if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_generations)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("compute", 1, 4, 4, 3); __PYX_ERR(0, 613, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute") < 0)) __PYX_ERR(0, 613, __pyx_L3_error)
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
}
__pyx_v_cells_changed = __pyx_convert_unordered_set_from_py_std_3a__3a_pair_3c_int_2c_int_3e___(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L3_error)
__pyx_v_copy_grid = __pyx_convert_unordered_map_from_py_std_3a__3a_pair_3c_int_2c_int_3e_____and_int(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
__pyx_v_dict_grid = __pyx_convert_unordered_map_from_py_std_3a__3a_pair_3c_int_2c_int_3e_____and_int(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L3_error)
__pyx_v_generations = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_generations == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 615, __pyx_L3_error)
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("compute", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 613, __pyx_L3_error)
__pyx_L3_error:;
__Pyx_AddTraceback("CACompute.compute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_9CACompute_10compute(__pyx_self, __pyx_v_cells_changed, __pyx_v_copy_grid, __pyx_v_dict_grid, __pyx_v_generations);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_9CACompute_10compute(CYTHON_UNUSED PyObject *__pyx_self, std::unordered_set<std::pair<int,int> > __pyx_v_cells_changed, std::unordered_map<std::pair<int,int> ,int> __pyx_v_copy_grid, std::unordered_map<std::pair<int,int> ,int> __pyx_v_dict_grid, int __pyx_v_generations) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("compute", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __pyx_f_9CACompute_compute(__pyx_v_cells_changed, __pyx_v_copy_grid, __pyx_v_dict_grid, __pyx_v_generations, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("CACompute.compute", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
614: unordered_map[pair[int, int], int] copy_grid, unordered_map[pair[int, int], int] dict_grid,
615: int generations):
616:
617: cdef vector[int] neighbours
+618: neighbours.reserve(neighbourhood[generations % alternating_period].size() + 1)
__pyx_v_neighbours.reserve(((__pyx_v_9CACompute_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]).size() + 1));
619:
620: cdef unordered_set[pair[int, int]] cells_to_check
621:
622: cdef int i, j
623: cdef int ans
624: cdef pair[int, int] coordinates, coordinates2
625: cdef pair[int, int] neighbour
626:
+627: for coor in cells_changed:
__pyx_t_1 = __pyx_v_cells_changed.begin();
for (;;) {
if (!(__pyx_t_1 != __pyx_v_cells_changed.end())) break;
__pyx_t_2 = *__pyx_t_1;
++__pyx_t_1;
__pyx_v_coor = __pyx_t_2;
/* … */
}
+628: for neighbour in neighbourhood[generations % alternating_period]:
__pyx_t_4 = &(__pyx_v_9CACompute_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_3 = __pyx_t_4->begin();
for (;;) {
if (!(__pyx_t_3 != __pyx_t_4->end())) break;
__pyx_t_2 = *__pyx_t_3;
++__pyx_t_3;
__pyx_v_neighbour = __pyx_t_2;
/* … */
}
+629: coordinates.first = coor.first + neighbour.first
__pyx_v_coordinates.first = (__pyx_v_coor.first + __pyx_v_neighbour.first);
+630: coordinates.second = coor.second + neighbour.second
__pyx_v_coordinates.second = (__pyx_v_coor.second + __pyx_v_neighbour.second);
+631: cells_to_check.insert(coordinates)
(void)(__pyx_v_cells_to_check.insert(__pyx_v_coordinates));
632:
+633: cells_to_check.insert(coor)
(void)(__pyx_v_cells_to_check.insert(__pyx_v_coor));
634:
+635: if alternating_period > 1:
__pyx_t_5 = ((__pyx_v_9CACompute_alternating_period > 1) != 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L7;
}
+636: if generations % (alternating_period - 1) == 0:
__pyx_t_5 = (((__pyx_v_generations % (__pyx_v_9CACompute_alternating_period - 1)) == 0) != 0);
if (__pyx_t_5) {
/* … */
}
+637: cells_changed.clear()
__pyx_v_cells_changed.clear();
638: else:
+639: cells_changed.clear()
/*else*/ {
__pyx_v_cells_changed.clear();
}
__pyx_L7:;
640:
+641: for coordinates in cells_to_check:
__pyx_t_1 = __pyx_v_cells_to_check.begin();
for (;;) {
if (!(__pyx_t_1 != __pyx_v_cells_to_check.end())) break;
__pyx_t_2 = *__pyx_t_1;
++__pyx_t_1;
__pyx_v_coordinates = __pyx_t_2;
/* … */
}
+642: neighbours.clear()
__pyx_v_neighbours.clear();
+643: ans = -1
__pyx_v_ans = -1;
644:
+645: if copy_grid.find(coordinates) == copy_grid.end():
__pyx_t_5 = ((__pyx_v_copy_grid.find(__pyx_v_coordinates) == __pyx_v_copy_grid.end()) != 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L11;
}
+646: if depends_cache.find(pair[int, int] (0, generations % alternating_period)) == \
try {
__pyx_t_2 = std::pair<int,int> (0, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 646, __pyx_L1_error)
}
/* … */
__pyx_t_5 = ((__pyx_v_9CACompute_depends_cache.find(__pyx_t_2) == __pyx_v_9CACompute_depends_cache.end()) != 0);
/* … */
if (__pyx_t_5) {
/* … */
goto __pyx_L12;
}
647: depends_cache.end():
+648: ans = depend_on_neighbours(0, generations % alternating_period)
__pyx_v_ans = __pyx_f_9CACompute_depend_on_neighbours(0, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
+649: depends_cache[pair[int, int] (0, generations % alternating_period)] = ans
try {
__pyx_t_2 = std::pair<int,int> (0, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 649, __pyx_L1_error)
}
(__pyx_v_9CACompute_depends_cache[__pyx_t_2]) = __pyx_v_ans;
650: else:
+651: ans = depends_cache[pair[int, int] (0, generations % alternating_period)]
/*else*/ {
try {
__pyx_t_2 = std::pair<int,int> (0, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 651, __pyx_L1_error)
}
__pyx_v_ans = (__pyx_v_9CACompute_depends_cache[__pyx_t_2]);
}
__pyx_L12:;
652: else:
+653: if depends_cache.find(pair[int, int] (copy_grid[coordinates],
/*else*/ {
/* … */
try {
__pyx_t_2 = std::pair<int,int> ((__pyx_v_copy_grid[__pyx_v_coordinates]), (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 653, __pyx_L1_error)
}
/* … */
if (__pyx_t_5) {
/* … */
goto __pyx_L13;
}
+654: generations % alternating_period)) == \
__pyx_t_5 = ((__pyx_v_9CACompute_depends_cache.find(__pyx_t_2) == __pyx_v_9CACompute_depends_cache.end()) != 0);
655: depends_cache.end():
+656: ans = depend_on_neighbours(copy_grid[coordinates], generations % alternating_period)
__pyx_v_ans = __pyx_f_9CACompute_depend_on_neighbours((__pyx_v_copy_grid[__pyx_v_coordinates]), (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
+657: depends_cache[pair[int, int] (copy_grid[coordinates], generations % alternating_period)] = ans
try {
__pyx_t_2 = std::pair<int,int> ((__pyx_v_copy_grid[__pyx_v_coordinates]), (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 657, __pyx_L1_error)
}
(__pyx_v_9CACompute_depends_cache[__pyx_t_2]) = __pyx_v_ans;
658: else:
+659: ans = depends_cache[pair[int, int] (copy_grid[coordinates], generations % alternating_period)]
/*else*/ {
try {
__pyx_t_2 = std::pair<int,int> ((__pyx_v_copy_grid[__pyx_v_coordinates]), (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 659, __pyx_L1_error)
}
__pyx_v_ans = (__pyx_v_9CACompute_depends_cache[__pyx_t_2]);
}
__pyx_L13:;
}
__pyx_L11:;
660:
+661: if ans == -1:
__pyx_t_5 = ((__pyx_v_ans == -1L) != 0);
if (__pyx_t_5) {
/* … */
}
+662: for neighbour in neighbourhood[generations % alternating_period]:
__pyx_t_4 = &(__pyx_v_9CACompute_neighbourhood[(__pyx_v_generations % __pyx_v_9CACompute_alternating_period)]);
__pyx_t_3 = __pyx_t_4->begin();
for (;;) {
if (!(__pyx_t_3 != __pyx_t_4->end())) break;
__pyx_t_2 = *__pyx_t_3;
++__pyx_t_3;
__pyx_v_neighbour = __pyx_t_2;
/* … */
}
+663: coordinates2 = pair[int, int] (coordinates.first + neighbour.first,
try {
__pyx_t_2 = std::pair<int,int> ((__pyx_v_coordinates.first + __pyx_v_neighbour.first), (__pyx_v_coordinates.second + __pyx_v_neighbour.second));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 663, __pyx_L1_error)
}
__pyx_v_coordinates2 = __pyx_t_2;
664: coordinates.second + neighbour.second)
+665: if copy_grid.find(coordinates2) != copy_grid.end():
__pyx_t_5 = ((__pyx_v_copy_grid.find(__pyx_v_coordinates2) != __pyx_v_copy_grid.end()) != 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L17;
}
+666: neighbours.push_back(copy_grid[coordinates2])
try {
__pyx_v_neighbours.push_back((__pyx_v_copy_grid[__pyx_v_coordinates2]));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 666, __pyx_L1_error)
}
667: else:
+668: neighbours.push_back(0)
/*else*/ {
try {
__pyx_v_neighbours.push_back(0);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 668, __pyx_L1_error)
}
}
__pyx_L17:;
669:
+670: if copy_grid.find(coordinates) != copy_grid.end():
__pyx_t_5 = ((__pyx_v_copy_grid.find(__pyx_v_coordinates) != __pyx_v_copy_grid.end()) != 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L18;
}
+671: neighbours.push_back(copy_grid[coordinates])
try {
__pyx_v_neighbours.push_back((__pyx_v_copy_grid[__pyx_v_coordinates]));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 671, __pyx_L1_error)
}
+672: if transition_func_cache.find(
if (__pyx_t_5) {
/* … */
goto __pyx_L19;
}
+673: pair[vector[int], int] (neighbours, generations % alternating_period)) == \
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 673, __pyx_L1_error)
}
/* … */
__pyx_t_5 = ((__pyx_v_9CACompute_transition_func_cache.find(__pyx_t_6) == __pyx_v_9CACompute_transition_func_cache.end()) != 0);
674: transition_func_cache.end():
+675: if ans == -1:
__pyx_t_5 = ((__pyx_v_ans == -1L) != 0);
if (__pyx_t_5) {
/* … */
}
+676: ans = transition_func(neighbours, generations % alternating_period)
__pyx_v_ans = __pyx_f_9CACompute_transition_func(__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
677: transition_func_cache[
+678: pair[vector[int], int] (neighbours, generations % alternating_period)] = ans
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 678, __pyx_L1_error)
}
(__pyx_v_9CACompute_transition_func_cache[__pyx_t_6]) = __pyx_v_ans;
679: else:
+680: if ans == -1: ans = transition_func_cache[
/*else*/ {
__pyx_t_5 = ((__pyx_v_ans == -1L) != 0);
if (__pyx_t_5) {
/* … */
__pyx_v_ans = (__pyx_v_9CACompute_transition_func_cache[__pyx_t_6]);
}
}
__pyx_L19:;
+681: pair[vector[int], int] (neighbours, generations % alternating_period)]
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 681, __pyx_L1_error)
}
682:
+683: if ans == 0:
__pyx_t_5 = ((__pyx_v_ans == 0) != 0);
if (__pyx_t_5) {
/* … */
goto __pyx_L22;
}
+684: dict_grid.erase(coordinates)
(void)(__pyx_v_dict_grid.erase(__pyx_v_coordinates));
+685: cells_changed.insert(coordinates)
(void)(__pyx_v_cells_changed.insert(__pyx_v_coordinates));
+686: elif ans != copy_grid[coordinates]:
__pyx_t_5 = ((__pyx_v_ans != (__pyx_v_copy_grid[__pyx_v_coordinates])) != 0);
if (__pyx_t_5) {
/* … */
}
__pyx_L22:;
+687: dict_grid[coordinates] = ans
(__pyx_v_dict_grid[__pyx_v_coordinates]) = __pyx_v_ans;
+688: cells_changed.insert(coordinates)
(void)(__pyx_v_cells_changed.insert(__pyx_v_coordinates));
689: else:
+690: neighbours.push_back(0)
/*else*/ {
try {
__pyx_v_neighbours.push_back(0);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 690, __pyx_L1_error)
}
+691: if transition_func_cache.find(
if (__pyx_t_5) {
/* … */
goto __pyx_L23;
}
+692: pair[vector[int], int] (neighbours, generations % alternating_period)) == \
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 692, __pyx_L1_error)
}
/* … */
__pyx_t_5 = ((__pyx_v_9CACompute_transition_func_cache.find(__pyx_t_6) == __pyx_v_9CACompute_transition_func_cache.end()) != 0);
693: transition_func_cache.end():
+694: if ans == -1:
__pyx_t_5 = ((__pyx_v_ans == -1L) != 0);
if (__pyx_t_5) {
/* … */
}
+695: ans = transition_func(neighbours, generations % alternating_period)
__pyx_v_ans = __pyx_f_9CACompute_transition_func(__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
696: transition_func_cache[
+697: pair[vector[int], int] (neighbours, generations % alternating_period)] = ans
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 697, __pyx_L1_error)
}
(__pyx_v_9CACompute_transition_func_cache[__pyx_t_6]) = __pyx_v_ans;
698: else:
+699: if ans == -1: ans = transition_func_cache[
/*else*/ {
__pyx_t_5 = ((__pyx_v_ans == -1L) != 0);
if (__pyx_t_5) {
/* … */
__pyx_v_ans = (__pyx_v_9CACompute_transition_func_cache[__pyx_t_6]);
}
}
__pyx_L23:;
+700: pair[vector[int], int] (neighbours, generations % alternating_period)]
try {
__pyx_t_6 = std::pair<std::vector<int> ,int> (__pyx_v_neighbours, (__pyx_v_generations % __pyx_v_9CACompute_alternating_period));
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 700, __pyx_L1_error)
}
701:
+702: if ans != 0:
__pyx_t_5 = ((__pyx_v_ans != 0) != 0);
if (__pyx_t_5) {
/* … */
}
}
__pyx_L18:;
+703: dict_grid.insert(pair[pair[int, int], int] (coordinates, ans))
try {
__pyx_t_7 = std::pair<std::pair<int,int> ,int> (__pyx_v_coordinates, __pyx_v_ans);
} catch(...) {
__Pyx_CppExn2PyErr();
__PYX_ERR(0, 703, __pyx_L1_error)
}
(void)(__pyx_v_dict_grid.insert(__pyx_t_7));
+704: cells_changed.insert(coordinates)
(void)(__pyx_v_cells_changed.insert(__pyx_v_coordinates));
705:
+706: return cells_changed, dict_grid
__Pyx_XDECREF(__pyx_r); __pyx_t_8 = __pyx_convert_unordered_set_to_py_std_3a__3a_pair_3c_int_2c_int_3e___(__pyx_v_cells_changed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __pyx_convert_unordered_map_to_py_std_3a__3a_pair_3c_int_2c_int_3e_______int(__pyx_v_dict_grid); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0;