diff --git a/constraint/constraints.c b/constraint/constraints.c index b48b741..b06da78 100644 --- a/constraint/constraints.c +++ b/constraint/constraints.c @@ -1517,15 +1517,17 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_8_genexpr; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_9_preProcess; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr; -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__; -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr; -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__; -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr; -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr; /* "constraint/constraints.py":64 * vconstraints[variable].remove((self, variables)) @@ -1710,7 +1712,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr { }; -/* "constraint/constraints.py":780 +/* "constraint/constraints.py":781 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -1724,30 +1726,44 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr { }; -/* "constraint/constraints.py":890 +/* "constraint/constraints.py":810 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_value; +}; + + +/* "constraint/constraints.py":895 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ { PyObject_HEAD PyObject *__pyx_v_assigned_product; PyObject *__pyx_v_target_value; }; -/* "constraint/constraints.py":913 +/* "constraint/constraints.py":918 * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< * possible_max = max(assigned_product * c for c in candidates) * */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr { PyObject_HEAD - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *__pyx_outer_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_c; PyObject *__pyx_t_0; @@ -1755,16 +1771,16 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr { }; -/* "constraint/constraints.py":914 +/* "constraint/constraints.py":919 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) * possible_max = max(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< * * if target_value < possible_min or target_value > possible_max: */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr { PyObject_HEAD - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *__pyx_outer_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_c; PyObject *__pyx_t_0; @@ -1772,86 +1788,100 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr { }; -/* "constraint/constraints.py":928 +/* "constraint/constraints.py":933 * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr { PyObject_HEAD - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *__pyx_outer_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_c; }; -/* "constraint/constraints.py":1034 +/* "constraint/constraints.py":1039 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True # Can't evaluate yet */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ { PyObject_HEAD PyObject *__pyx_v_target_value; }; -/* "constraint/constraints.py":1070 +/* "constraint/constraints.py":1075 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< * domain.hideValue(val) * if not domain: */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr { PyObject_HEAD - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *__pyx_outer_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_p; }; -/* "constraint/constraints.py":1104 +/* "constraint/constraints.py":1110 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_value; }; -/* "constraint/constraints.py":1205 +/* "constraint/constraints.py":1139 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr { + PyObject_HEAD + PyObject *__pyx_genexpr_arg_0; + PyObject *__pyx_v_value; +}; + + +/* "constraint/constraints.py":1215 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True # Can't evaluate yet */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ { PyObject_HEAD PyObject *__pyx_v_target_value; }; -/* "constraint/constraints.py":1241 +/* "constraint/constraints.py":1251 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< * domain.hideValue(val) * if not domain: */ -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr { +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr { PyObject_HEAD - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *__pyx_outer_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_p; }; @@ -2960,7 +2990,6 @@ static PyObject *__pyx_builtin_RuntimeError; static const char __pyx_k_[] = "."; static const char __pyx_k_A[] = "\240A"; static const char __pyx_k_L[] = "\320\004 \240\001\360\014\000\t\r\210L\230\001"; -static const char __pyx_k_N[] = "\320\004\"\240!\360\014\000\t\r\210N\230!"; static const char __pyx_k_Q[] = "\240Q"; static const char __pyx_k_b[] = "b"; static const char __pyx_k_c[] = "c"; @@ -2977,7 +3006,8 @@ static const char __pyx_k_gc[] = "gc"; static const char __pyx_k_hi[] = "hi"; static const char __pyx_k_lo[] = "lo"; static const char __pyx_k_A_2[] = "\250A"; -static const char __pyx_k_Q_2[] = "\230Q"; +static const char __pyx_k_Q_2[] = "\270Q"; +static const char __pyx_k_Q_3[] = "\230Q"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_dom[] = "dom"; static const char __pyx_k_get[] = "get"; @@ -2992,6 +3022,8 @@ static const char __pyx_k_val[] = "val"; static const char __pyx_k_var[] = "var"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_A_HA[] = "\200A\360\014\000\t\r\210H\220A"; +static const char __pyx_k_L_6a[] = "\320\004 \240\001\360\014\000\t\r\210L\230\001\330\010\014\320\0146\260a"; +static const char __pyx_k_N_6a[] = "\320\004\"\240!\360\014\000\t\r\210N\230!\330\010\014\320\0146\260a"; static const char __pyx_k_bool[] = "bool"; static const char __pyx_k_call[] = "__call__"; static const char __pyx_k_dict[] = "dict"; @@ -3205,10 +3237,10 @@ static const char __pyx_k_NotInSetConstraint_preProcess[] = "NotInSetConstraint. static const char __pyx_k_SomeNotInSetConstraint___call[] = "SomeNotInSetConstraint.__call__"; static const char __pyx_k_SomeNotInSetConstraint___init[] = "SomeNotInSetConstraint.__init__"; static const char __pyx_k_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\013\2104\210|\2307\240!\330\014\023\2201\340\010\027\220{\240!\2404\240q\330\010\030\230\001\330\010\025\220Q\340\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020!\240\033\250A\250Q\340\020\032\230'\240\021\240!\340\010\013\2104\210q\330\014\023\220>\240\023\240A\360\006\000\t\031\230\002\230#\230Q\230g\240Q\240e\2503\250a\250w\260a\260u\270D\300\005\300Q\330\010\025\220Q\220d\230.\250\001\250\023\250D\260\005\260W\270B\270b\300\004\300D\310\004\310D\320PV\320VW\330\010\031\230\021\230.\250\002\250\"\250D\260\005\260Q\330\010\013\2103\210a\320\017\037\230r\240\021\330\014\023\2201\340\010\013\2101\330\014\020\220\007\220q\330\020#\2401\240B\240d\250%\250{\270#\270R\270s\300!\330\020\023\2201\330\024\035\230R\230s\240!\2407\250!\2505\260\003\2601\260G\2701\270E\300\024\300U\310!\330\024%\240Q\240d\250.\270\001\270\023\270D\300\005\300W\310B\310b\320PT\320TX\320X\\\320\\`\320`f\320fg\340\024%\240Q\240a\340\020\031\230\027\240\001\240\021\330\020\024\220G\2306\240\021\330\024\034\230A\230^\2502\250T\260\022\2602\260T\270\025\270a\330\024\035\230Q\330\030\036\230j\250\001\250\021\330\020\023\2204\220q\330\024\033\2301\340\010\017\210q"; -static const char __pyx_k_55H_a_D_q_a_J_c_T_y_1_1A_1_waq[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\024\220D\230\001\330\010\017\210q\330\010\022\220!\330\010\026\220a\330\010\014\210J\320\026&\240c\250\021\250+\260T\270\021\330\014\017\210y\230\003\2301\330\020\030\230\013\2401\240A\340\020\032\230!\330\020\023\2201\330\024\037\230w\240a\240q\330\010\013\210:\220Q\220f\230A\330\014\023\2205\230\001\230\026\230q\330\010\014\210D\220\010\230\004\230E\240\023\240K\250t\2603\260a\260}\300C\300r\310\024\310U\320RT\320TU\330\014\023\2201\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\240<\250u\260I\270W\300L\320PS\320SV\320VW\320Wd\320dg\320gh\330\024\035\230W\240A\240Q\330\024\030\230\t\240\026\240q\330\030\033\2305\240\002\240&\250\002\250!\330\034\"\240*\250A\250Q\330\024\027\220t\2301\330\030\037\230q\330\010\017\210q"; +static const char __pyx_k_55H_a_D_q_a_3at_Cs_1_A_7_Q_J_c[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\024\220D\230\001\330\010\017\210q\330\010\022\220!\330\010\026\220a\340\010\013\2103\210a\210t\320\023,\250C\250s\260!\2601\330\014\020\220\014\230A\330\020\024\320\024+\2507\260+\270Q\330\010\014\210J\320\026&\240c\250\021\250+\260T\270\021\330\014\017\210y\230\003\2301\330\020\030\230\013\2401\240A\340\020\032\230!\330\020\023\2201\330\024\037\230w\240a\240q\330\010\013\210:\220Q\220f\230A\330\014\023\2205\230\001\230\026\230q\330\010\014\210D\220\010\230\004\230E\240\023\240K\250t\2603\260a\260}\300C\300r\310\024\310U\320RT\320TU\330\014\023\2201\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\240<\250u\260I\270W\300L\320PS\320SV\320VW\320Wd\320dg\320gh\330\024\035\230W\240A\240Q\330\024\030\230\t\240\026\240q\330\030\033\2305\240\002\240&\250\002\250!\330\034\"\240*\250A\250Q\330\024\027\220t\2301\330\030\037\230q\330\010\017\210q"; static const char __pyx_k_55H_a_L_y_q_q_a_q_L_Kq_QfA_5_q[] = "\320\004\"\320\"5\3205H\310\006\310a\340\010\014\210L\230\001\330\014\017\210y\230\007\230q\330\020\027\220q\360\006\000\t\023\220$\220a\330\010\017\210q\330\010\014\210L\230\001\330\014\024\220K\230q\240\001\330\010\013\210:\220Q\220f\230A\330\014\023\2205\230\001\230\026\230q\330\010\017\210u\220C\220q"; static const char __pyx_k_55H_a_L_y_q_q_d_Q_a_1_1Kq_Rq_A[] = "\320\004\"\320\"5\3205H\310\006\310a\340\010\014\210L\230\001\330\014\017\210y\230\007\230q\330\020\027\220q\360\006\000\t\027\220d\230!\330\010\021\220\024\220Q\330\010\016\210a\330\010\013\2101\330\014\020\220\n\230.\250\003\2501\250K\260q\330\020\027\220{\240!\240:\250R\250q\340\014\020\220\014\230A\330\020\027\220{\240!\2401\330\010\013\210:\220Q\220e\2301\330\014\022\220%\220q\230\005\230Q\330\010\017\210t\2203\220a"; -static const char __pyx_k_55H_a_a_q_a_J_c_T_y_1_1A_1_waq[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\022\220$\220a\330\010\017\210q\330\010\022\220!\330\010\026\220a\330\010\014\210J\320\026&\240c\250\021\250+\260T\270\021\330\014\017\210y\230\003\2301\330\020\030\230\013\2401\240A\340\020\032\230!\330\020\023\2201\330\024\037\230w\240a\240q\330\010\013\210:\220Q\220f\230A\330\014\023\2205\230\001\230\026\230q\330\010\014\210D\220\010\230\003\2303\230a\230}\250C\250s\260$\260e\2702\270Q\330\014\023\2201\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\240<\250u\260I\270W\300L\320PS\320SV\320VW\320Wd\320dg\320gh\330\024\035\230W\240A\240Q\330\024\030\230\t\240\026\240q\330\030\033\2305\240\002\240&\250\002\250!\330\034\"\240*\250A\250Q\330\024\027\220t\2301\330\030\037\230q\330\010\017\210q"; +static const char __pyx_k_55H_a_a_q_a_3at_Cs_1_A_7_Q_J_c[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\022\220$\220a\330\010\017\210q\330\010\022\220!\330\010\026\220a\340\010\013\2103\210a\210t\320\023,\250C\250s\260!\2601\330\014\020\220\014\230A\330\020\024\320\024+\2507\260+\270Q\330\010\014\210J\320\026&\240c\250\021\250+\260T\270\021\330\014\017\210y\230\003\2301\330\020\030\230\013\2401\240A\340\020\032\230!\330\020\023\2201\330\024\037\230w\240a\240q\330\010\013\210:\220Q\220f\230A\330\014\023\2205\230\001\230\026\230q\330\010\014\210D\220\010\230\003\2303\230a\230}\250C\250s\260$\260e\2702\270Q\330\014\023\2201\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\240<\250u\260I\270W\300L\320PS\320SV\320VW\320Wd\320dg\320gh\330\024\035\230W\240A\240Q\330\024\030\230\t\240\026\240q\330\030\033\2305\240\002\240&\250\002\250!\330\034\"\240*\250A\250Q\330\024\027\220t\2301\330\030\037\230q\330\010\017\210q"; static const char __pyx_k_55H_a_d_Q_a_1_1Kq_9Cq_az_1_z_q[] = "\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\330\010\021\220\024\220Q\330\010\016\210a\330\010\013\2101\330\014\020\220\n\230.\250\003\2501\250K\260q\330\020\023\2209\230C\230q\330\024\033\230;\240a\240z\260\022\2601\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\220Q\330\020\027\220q\330\014\017\210q\330\020\024\220J\230n\250C\250q\260\013\2701\330\024\027\220y\240\007\240q\330\030!\240\027\250\001\250\021\330\030\034\230I\240V\2501\330\034\037\230t\2402\240V\2502\250[\270\002\270!\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\340\014\020\220\014\230A\330\020\023\2209\230C\230q\330\024\033\230;\240a\240q\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\220Q\330\020\027\220q\330\014\017\210q\330\020\024\220L\240\001\330\024\027\220y\240\007\240q\330\030!\240\027\250\001\250\021\330\030\034\230I\240V\2501\330\034\037\230t\2402\240V\2502\250Q\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\330\010\017\210q"; static const char __pyx_k_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J[] = "\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\360\006\000\t\r\320\0146\260a\330\010\034\230A\330\010\014\210L\230\001\330\014\036\230g\240Q\330\014\020\320\020'\240w\250a\250q\330\010\014\210J\320\026&\240c\250\021\250+\260T\270\021\330\014\017\210}\230C\230q\330\020\023\320\023%\240W\250A\340\024\025\330\020$\240A\360\006\000\t\025\220D\230\001\330\010\014\210L\230\001\330\014\017\320\017!\240\027\250\005\250T\3201C\3003\300a\330\020\021\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\2301\330\024\032\230'\240\021\240!\330\025\033\2303\230b\240\004\240J\250c\260\021\330\024\032\230'\240\021\240!"; static const char __pyx_k_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi[] = "\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\025\220W\230A\230T\240\021\330\010\020\220\003\2201\220A\340\010\014\210G\2204\220q\330\014\030\230\r\240T\320)=\270Q\270i\300|\320ST\330\014\022\220'\230\021\230!\330\014\020\220\007\220s\230!\330\020!\240\021\240$\240b\250\014\260D\270\002\270!\330\020\023\2203\220a\320\027'\240r\250\021\330\024\027\220w\230a\230q"; @@ -3248,7 +3280,9 @@ static const char __pyx_k_Constraint_enforcing_that_the_pr[] = "Constraint enfor static const char __pyx_k_Constraint_enforcing_that_the_su[] = "Constraint enforcing that the sum of variables equals the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 2, 3])\n >>> problem.addConstraint(VariableExactSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 2)], [('a', 1), ('b', 2), ('c', 3)], [('a', 2), ('b', 1), ('c', 3)]]\n "; static const char __pyx_k_Constraint_enforcing_that_values[] = "Constraint enforcing that values of all given variables are different.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(AllDifferentConstraint())\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n "; static const char __pyx_k_Constraint_which_wraps_a_functio[] = "Constraint which wraps a function defining the constraint logic.\n\n Examples:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> def func(a, b):\n ... return b > a\n >>> problem.addConstraint(func, [\"a\", \"b\"])\n >>> problem.getSolution()\n {'a': 1, 'b': 2}\n\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> def func(a, b):\n ... return b > a\n >>> problem.addConstraint(FunctionConstraint(func), [\"a\", \"b\"])\n >>> problem.getSolution()\n {'a': 1, 'b': 2}\n "; +static const char __pyx_k_ExactProdConstraint___call___loc[] = "ExactProdConstraint.__call__..genexpr"; static const char __pyx_k_ExactProdConstraint_preProcess_l[] = "ExactProdConstraint.preProcess..genexpr"; +static const char __pyx_k_MaxProdConstraint___call___local[] = "MaxProdConstraint.__call__..genexpr"; static const char __pyx_k_MaxProdConstraint_preProcess_loc[] = "MaxProdConstraint.preProcess..genexpr"; static const char __pyx_k_MaxSumConstraint_preProcess_loca[] = "MaxSumConstraint.preProcess..genexpr"; static const char __pyx_k_Module_containing_the_code_for_c[] = "Module containing the code for constraint definitions."; @@ -3340,6 +3374,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exactprod); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_10preProcess_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preProcess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_constraints, PyObject *__pyx_v_vconstraints); /* proto */ +static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__call___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target_var, PyObject *__pyx_v_product_vars); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_2_get_product_bounds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_domain_dict, PyObject *__pyx_v_exclude_var); /* proto */ @@ -3361,6 +3396,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_maxprod); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_10preProcess_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2preProcess(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_constraints, PyObject *__pyx_v_vconstraints); /* proto */ +static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_target_var, PyObject *__pyx_v_product_vars); /* proto */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_2_get_product_bounds(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_domain_dict, PyObject *__pyx_v_exclude_var); /* proto */ @@ -3391,15 +3427,17 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_8_ge static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_9_preProcess(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_21___call__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_22_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ /* SmallCodeConfig */ @@ -3451,15 +3489,17 @@ typedef struct { PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_9_preProcess; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr; - PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call__; - PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call__; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr; - PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call__; - PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call__; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr; - PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call__; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr; PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call__; + PyObject *__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_defaults; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess; @@ -3473,22 +3513,24 @@ typedef struct { PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_preProcess; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr; - PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__; - PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr; - PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__; - PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr; - PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr; PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__; + PyTypeObject *__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; __Pyx_CachedCFunction __pyx_umethod_PyList_Type__remove; PyObject *__pyx_slice[1]; PyObject *__pyx_tuple[5]; - PyObject *__pyx_codeobj_tab[75]; - PyObject *__pyx_string_tab[288]; + PyObject *__pyx_codeobj_tab[77]; + PyObject *__pyx_string_tab[290]; PyObject *__pyx_int_0; PyObject *__pyx_int_1; PyObject *__pyx_int_10; @@ -3555,13 +3597,13 @@ int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr; #endif #if CYTHON_USE_FREELISTS -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12___call__[8]; -int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_12___call__; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12_genexpr[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_12_genexpr; #endif #if CYTHON_USE_FREELISTS -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13_genexpr[8]; -int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_13_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13___call__[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_13___call__; #endif #if CYTHON_USE_FREELISTS @@ -3575,13 +3617,13 @@ int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr; #endif #if CYTHON_USE_FREELISTS -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16___call__[8]; -int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_16___call__; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16_genexpr[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_16_genexpr; #endif #if CYTHON_USE_FREELISTS -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17_genexpr[8]; -int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_17_genexpr; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17___call__[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_17___call__; #endif #if CYTHON_USE_FREELISTS @@ -3590,14 +3632,24 @@ int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr; #endif #if CYTHON_USE_FREELISTS -struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19___call__[8]; -int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_19___call__; +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19_genexpr[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_19_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_20_genexpr[8]; int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr; #endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_21___call__[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_21___call__; +#endif + +#if CYTHON_USE_FREELISTS +struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *__pyx_freelist_10constraint_11constraints___pyx_scope_struct_22_genexpr[8]; +int __pyx_freecount_10constraint_11constraints___pyx_scope_struct_22_genexpr; +#endif /* CommonTypesMetaclass.module_state_decls */ PyTypeObject *__pyx_CommonTypesMetaclassType; @@ -3677,256 +3729,258 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_u_Constraint_which_wraps_a_functio __pyx_string_tab[35] #define __pyx_n_u_ExactProdConstraint __pyx_string_tab[36] #define __pyx_n_u_ExactProdConstraint___call __pyx_string_tab[37] -#define __pyx_n_u_ExactProdConstraint___init __pyx_string_tab[38] -#define __pyx_n_u_ExactProdConstraint_preProcess __pyx_string_tab[39] -#define __pyx_n_u_ExactProdConstraint_preProcess_l __pyx_string_tab[40] -#define __pyx_n_u_ExactSumConstraint __pyx_string_tab[41] -#define __pyx_n_u_ExactSumConstraint___call __pyx_string_tab[42] -#define __pyx_n_u_ExactSumConstraint___init __pyx_string_tab[43] -#define __pyx_n_u_ExactSumConstraint_preProcess __pyx_string_tab[44] -#define __pyx_n_u_FunctionConstraint __pyx_string_tab[45] -#define __pyx_n_u_FunctionConstraint___call __pyx_string_tab[46] -#define __pyx_n_u_FunctionConstraint___init __pyx_string_tab[47] -#define __pyx_n_u_InSetConstraint __pyx_string_tab[48] -#define __pyx_n_u_InSetConstraint___call __pyx_string_tab[49] -#define __pyx_n_u_InSetConstraint___init __pyx_string_tab[50] -#define __pyx_n_u_InSetConstraint_preProcess __pyx_string_tab[51] -#define __pyx_kp_u_Last_multiplier_must_be_1_as_it __pyx_string_tab[52] -#define __pyx_n_u_MaxProdConstraint __pyx_string_tab[53] -#define __pyx_n_u_MaxProdConstraint___call __pyx_string_tab[54] -#define __pyx_n_u_MaxProdConstraint___init __pyx_string_tab[55] -#define __pyx_n_u_MaxProdConstraint_preProcess __pyx_string_tab[56] -#define __pyx_n_u_MaxProdConstraint_preProcess_loc __pyx_string_tab[57] -#define __pyx_n_u_MaxSumConstraint __pyx_string_tab[58] -#define __pyx_n_u_MaxSumConstraint___call __pyx_string_tab[59] -#define __pyx_n_u_MaxSumConstraint___init __pyx_string_tab[60] -#define __pyx_n_u_MaxSumConstraint_preProcess __pyx_string_tab[61] -#define __pyx_n_u_MaxSumConstraint_preProcess_loca __pyx_string_tab[62] -#define __pyx_n_u_MinProdConstraint __pyx_string_tab[63] -#define __pyx_n_u_MinProdConstraint___call __pyx_string_tab[64] -#define __pyx_n_u_MinProdConstraint___init __pyx_string_tab[65] -#define __pyx_n_u_MinProdConstraint_preProcess __pyx_string_tab[66] -#define __pyx_n_u_MinSumConstraint __pyx_string_tab[67] -#define __pyx_n_u_MinSumConstraint___call __pyx_string_tab[68] -#define __pyx_n_u_MinSumConstraint___init __pyx_string_tab[69] -#define __pyx_kp_u_Multipliers_must_be_numbers __pyx_string_tab[70] -#define __pyx_kp_u_Multipliers_must_match_sum_varia __pyx_string_tab[71] -#define __pyx_n_u_NotImplementedError __pyx_string_tab[72] -#define __pyx_n_u_NotInSetConstraint __pyx_string_tab[73] -#define __pyx_n_u_NotInSetConstraint___call __pyx_string_tab[74] -#define __pyx_n_u_NotInSetConstraint___init __pyx_string_tab[75] -#define __pyx_n_u_NotInSetConstraint_preProcess __pyx_string_tab[76] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[77] -#define __pyx_n_u_Optional __pyx_string_tab[78] -#define __pyx_kp_u_Optional_Sequence __pyx_string_tab[79] -#define __pyx_n_u_RuntimeError __pyx_string_tab[80] -#define __pyx_n_u_Sequence __pyx_string_tab[81] -#define __pyx_kp_u_Sequence_str __pyx_string_tab[82] -#define __pyx_n_u_SomeInSetConstraint __pyx_string_tab[83] -#define __pyx_n_u_SomeInSetConstraint___call __pyx_string_tab[84] -#define __pyx_n_u_SomeInSetConstraint___init __pyx_string_tab[85] -#define __pyx_n_u_SomeNotInSetConstraint __pyx_string_tab[86] -#define __pyx_n_u_SomeNotInSetConstraint___call __pyx_string_tab[87] -#define __pyx_n_u_SomeNotInSetConstraint___init __pyx_string_tab[88] -#define __pyx_n_u_Unassigned __pyx_string_tab[89] -#define __pyx_n_u_Union __pyx_string_tab[90] -#define __pyx_kp_u_Union_int_float __pyx_string_tab[91] -#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[92] -#define __pyx_n_u_VariableExactProdConstraint___ca __pyx_string_tab[93] -#define __pyx_n_u_VariableExactProdConstraint___ca_2 __pyx_string_tab[94] -#define __pyx_n_u_VariableExactProdConstraint___in __pyx_string_tab[95] -#define __pyx_n_u_VariableExactProdConstraint__get __pyx_string_tab[96] -#define __pyx_n_u_VariableExactProdConstraint__saf __pyx_string_tab[97] -#define __pyx_n_u_VariableExactProdConstraint_preP __pyx_string_tab[98] -#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[99] -#define __pyx_n_u_VariableExactSumConstraint___cal __pyx_string_tab[100] -#define __pyx_n_u_VariableExactSumConstraint___ini __pyx_string_tab[101] -#define __pyx_n_u_VariableExactSumConstraint___ini_2 __pyx_string_tab[102] -#define __pyx_n_u_VariableExactSumConstraint_prePr __pyx_string_tab[103] -#define __pyx_n_u_VariableExactSumConstraint_prePr_2 __pyx_string_tab[104] -#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[105] -#define __pyx_n_u_VariableMaxProdConstraint___call __pyx_string_tab[106] -#define __pyx_n_u_VariableMaxProdConstraint___call_2 __pyx_string_tab[107] -#define __pyx_n_u_VariableMaxProdConstraint___init __pyx_string_tab[108] -#define __pyx_n_u_VariableMaxProdConstraint__get_p __pyx_string_tab[109] -#define __pyx_n_u_VariableMaxProdConstraint__safe __pyx_string_tab[110] -#define __pyx_n_u_VariableMaxProdConstraint_prePro __pyx_string_tab[111] -#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[112] -#define __pyx_n_u_VariableMaxSumConstraint___call __pyx_string_tab[113] -#define __pyx_n_u_VariableMaxSumConstraint___init __pyx_string_tab[114] -#define __pyx_n_u_VariableMaxSumConstraint___init_2 __pyx_string_tab[115] -#define __pyx_n_u_VariableMaxSumConstraint_preProc __pyx_string_tab[116] -#define __pyx_n_u_VariableMaxSumConstraint_preProc_2 __pyx_string_tab[117] -#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[118] -#define __pyx_n_u_VariableMinProdConstraint___call __pyx_string_tab[119] -#define __pyx_n_u_VariableMinProdConstraint___call_2 __pyx_string_tab[120] -#define __pyx_n_u_VariableMinProdConstraint___init __pyx_string_tab[121] -#define __pyx_n_u_VariableMinProdConstraint__get_p __pyx_string_tab[122] -#define __pyx_n_u_VariableMinProdConstraint__safe __pyx_string_tab[123] -#define __pyx_n_u_VariableMinProdConstraint_prePro __pyx_string_tab[124] -#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[125] -#define __pyx_n_u_VariableMinSumConstraint___call __pyx_string_tab[126] -#define __pyx_n_u_VariableMinSumConstraint___init __pyx_string_tab[127] -#define __pyx_n_u_VariableMinSumConstraint___init_2 __pyx_string_tab[128] -#define __pyx_n_u_VariableMinSumConstraint_preProc __pyx_string_tab[129] -#define __pyx_n_u_VariableMinSumConstraint_preProc_2 __pyx_string_tab[130] -#define __pyx_kp_u_Wrapper_function_for_picklable_s __pyx_string_tab[131] -#define __pyx_kp_u__2 __pyx_string_tab[132] -#define __pyx_kp_u_add_note __pyx_string_tab[133] -#define __pyx_n_u_all_bounds __pyx_string_tab[134] -#define __pyx_n_u_append __pyx_string_tab[135] -#define __pyx_n_u_assigned __pyx_string_tab[136] -#define __pyx_n_u_assigned_2 __pyx_string_tab[137] -#define __pyx_n_u_assigned_prod __pyx_string_tab[138] -#define __pyx_n_u_assigned_product __pyx_string_tab[139] -#define __pyx_n_u_assignments __pyx_string_tab[140] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[141] -#define __pyx_n_u_b __pyx_string_tab[142] -#define __pyx_n_u_bool __pyx_string_tab[143] -#define __pyx_n_u_bounds __pyx_string_tab[144] -#define __pyx_n_u_c __pyx_string_tab[145] -#define __pyx_n_u_call __pyx_string_tab[146] -#define __pyx_n_u_candidates __pyx_string_tab[147] -#define __pyx_n_u_class_getitem __pyx_string_tab[148] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[149] -#define __pyx_n_u_close __pyx_string_tab[150] -#define __pyx_n_u_collections_abc __pyx_string_tab[151] -#define __pyx_n_u_constraint_constraints __pyx_string_tab[152] -#define __pyx_kp_u_constraint_constraints_py __pyx_string_tab[153] -#define __pyx_n_u_constraint_domain __pyx_string_tab[154] -#define __pyx_n_u_constraints __pyx_string_tab[155] -#define __pyx_n_u_contains_lt1 __pyx_string_tab[156] -#define __pyx_n_u_contains_negative __pyx_string_tab[157] -#define __pyx_n_u_dict __pyx_string_tab[158] -#define __pyx_kp_u_disable __pyx_string_tab[159] -#define __pyx_n_u_doc __pyx_string_tab[160] -#define __pyx_n_u_dom __pyx_string_tab[161] -#define __pyx_n_u_domain __pyx_string_tab[162] -#define __pyx_n_u_domain_bounds __pyx_string_tab[163] -#define __pyx_n_u_domain_dict __pyx_string_tab[164] -#define __pyx_n_u_domains __pyx_string_tab[165] -#define __pyx_kp_u_enable __pyx_string_tab[166] -#define __pyx_n_u_exact __pyx_string_tab[167] -#define __pyx_n_u_exact_2 __pyx_string_tab[168] -#define __pyx_n_u_exactprod __pyx_string_tab[169] -#define __pyx_n_u_exactprod_2 __pyx_string_tab[170] -#define __pyx_n_u_exactsum __pyx_string_tab[171] -#define __pyx_n_u_exactsum_2 __pyx_string_tab[172] -#define __pyx_n_u_exclude_var __pyx_string_tab[173] -#define __pyx_n_u_forwardCheck __pyx_string_tab[174] -#define __pyx_n_u_forwardcheck __pyx_string_tab[175] -#define __pyx_n_u_found __pyx_string_tab[176] -#define __pyx_n_u_func __pyx_string_tab[177] -#define __pyx_n_u_func_2 __pyx_string_tab[178] -#define __pyx_n_u_func_3 __pyx_string_tab[179] -#define __pyx_kp_u_gc __pyx_string_tab[180] -#define __pyx_n_u_genexpr __pyx_string_tab[181] -#define __pyx_n_u_get __pyx_string_tab[182] -#define __pyx_n_u_get_product_bounds __pyx_string_tab[183] -#define __pyx_n_u_hi __pyx_string_tab[184] -#define __pyx_n_u_hideValue __pyx_string_tab[185] -#define __pyx_n_u_index __pyx_string_tab[186] -#define __pyx_n_u_init __pyx_string_tab[187] -#define __pyx_n_u_is_coroutine __pyx_string_tab[188] -#define __pyx_kp_u_isenabled __pyx_string_tab[189] -#define __pyx_n_u_itertools __pyx_string_tab[190] -#define __pyx_kp_u_list_tuple __pyx_string_tab[191] -#define __pyx_n_u_lo __pyx_string_tab[192] -#define __pyx_n_u_m __pyx_string_tab[193] -#define __pyx_n_u_main __pyx_string_tab[194] -#define __pyx_n_u_max __pyx_string_tab[195] -#define __pyx_n_u_max_others __pyx_string_tab[196] -#define __pyx_n_u_maxprod __pyx_string_tab[197] -#define __pyx_n_u_maxprod_2 __pyx_string_tab[198] -#define __pyx_n_u_maxsum __pyx_string_tab[199] -#define __pyx_n_u_maxsum_2 __pyx_string_tab[200] -#define __pyx_n_u_maxval __pyx_string_tab[201] -#define __pyx_n_u_metaclass __pyx_string_tab[202] -#define __pyx_n_u_min __pyx_string_tab[203] -#define __pyx_n_u_min_others __pyx_string_tab[204] -#define __pyx_n_u_minprod __pyx_string_tab[205] -#define __pyx_n_u_minprod_2 __pyx_string_tab[206] -#define __pyx_n_u_minsum __pyx_string_tab[207] -#define __pyx_n_u_minsum_2 __pyx_string_tab[208] -#define __pyx_n_u_minval __pyx_string_tab[209] -#define __pyx_n_u_missing __pyx_string_tab[210] -#define __pyx_n_u_missing_lt1 __pyx_string_tab[211] -#define __pyx_n_u_module __pyx_string_tab[212] -#define __pyx_n_u_mro_entries __pyx_string_tab[213] -#define __pyx_n_u_multiplier __pyx_string_tab[214] -#define __pyx_n_u_multipliers __pyx_string_tab[215] -#define __pyx_n_u_multipliers_2 __pyx_string_tab[216] -#define __pyx_n_u_n __pyx_string_tab[217] -#define __pyx_n_u_n_2 __pyx_string_tab[218] -#define __pyx_n_u_name __pyx_string_tab[219] -#define __pyx_n_u_next __pyx_string_tab[220] -#define __pyx_n_u_o __pyx_string_tab[221] -#define __pyx_n_u_other_max __pyx_string_tab[222] -#define __pyx_n_u_other_min __pyx_string_tab[223] -#define __pyx_n_u_other_products __pyx_string_tab[224] -#define __pyx_n_u_other_unassigned __pyx_string_tab[225] -#define __pyx_n_u_others __pyx_string_tab[226] -#define __pyx_n_u_others_bounds __pyx_string_tab[227] -#define __pyx_n_u_others_max __pyx_string_tab[228] -#define __pyx_n_u_others_min __pyx_string_tab[229] -#define __pyx_n_u_p __pyx_string_tab[230] -#define __pyx_n_u_parms __pyx_string_tab[231] -#define __pyx_n_u_pop __pyx_string_tab[232] -#define __pyx_n_u_possible_max __pyx_string_tab[233] -#define __pyx_n_u_possible_min __pyx_string_tab[234] -#define __pyx_n_u_possible_prods __pyx_string_tab[235] -#define __pyx_n_u_preProcess __pyx_string_tab[236] -#define __pyx_n_u_prepare __pyx_string_tab[237] -#define __pyx_n_u_prod __pyx_string_tab[238] -#define __pyx_n_u_prods __pyx_string_tab[239] -#define __pyx_n_u_product __pyx_string_tab[240] -#define __pyx_n_u_product_vars __pyx_string_tab[241] -#define __pyx_n_u_products __pyx_string_tab[242] -#define __pyx_n_u_qualname __pyx_string_tab[243] -#define __pyx_n_u_remove __pyx_string_tab[244] -#define __pyx_n_u_round __pyx_string_tab[245] -#define __pyx_n_u_safe_product __pyx_string_tab[246] -#define __pyx_n_u_seen __pyx_string_tab[247] -#define __pyx_n_u_self __pyx_string_tab[248] -#define __pyx_n_u_send __pyx_string_tab[249] -#define __pyx_n_u_set __pyx_string_tab[250] -#define __pyx_n_u_set_2 __pyx_string_tab[251] -#define __pyx_n_u_set_name __pyx_string_tab[252] -#define __pyx_n_u_singlevalue __pyx_string_tab[253] -#define __pyx_n_u_str __pyx_string_tab[254] -#define __pyx_n_u_sum __pyx_string_tab[255] -#define __pyx_n_u_sum_value __pyx_string_tab[256] -#define __pyx_n_u_sum_vars __pyx_string_tab[257] -#define __pyx_n_u_t_max __pyx_string_tab[258] -#define __pyx_n_u_t_min __pyx_string_tab[259] -#define __pyx_n_u_target_dom __pyx_string_tab[260] -#define __pyx_n_u_target_domain __pyx_string_tab[261] -#define __pyx_n_u_target_max __pyx_string_tab[262] -#define __pyx_n_u_target_min __pyx_string_tab[263] -#define __pyx_n_u_target_value __pyx_string_tab[264] -#define __pyx_n_u_target_var __pyx_string_tab[265] -#define __pyx_n_u_temp_sum __pyx_string_tab[266] -#define __pyx_n_u_test __pyx_string_tab[267] -#define __pyx_n_u_throw __pyx_string_tab[268] -#define __pyx_n_u_typing __pyx_string_tab[269] -#define __pyx_n_u_unassigned __pyx_string_tab[270] -#define __pyx_n_u_unassigned_2 __pyx_string_tab[271] -#define __pyx_n_u_unassigned_vars __pyx_string_tab[272] -#define __pyx_n_u_unassignedvariable __pyx_string_tab[273] -#define __pyx_n_u_v __pyx_string_tab[274] -#define __pyx_n_u_val __pyx_string_tab[275] -#define __pyx_n_u_value __pyx_string_tab[276] -#define __pyx_n_u_values __pyx_string_tab[277] -#define __pyx_n_u_var __pyx_string_tab[278] -#define __pyx_n_u_variable __pyx_string_tab[279] -#define __pyx_n_u_variable_contains_lt1 __pyx_string_tab[280] -#define __pyx_n_u_variable_contains_negative __pyx_string_tab[281] -#define __pyx_n_u_variable_with_lt1 __pyx_string_tab[282] -#define __pyx_n_u_variable_with_negative __pyx_string_tab[283] -#define __pyx_n_u_variables __pyx_string_tab[284] -#define __pyx_n_u_vconstraints __pyx_string_tab[285] -#define __pyx_n_u_x __pyx_string_tab[286] -#define __pyx_n_u_zip __pyx_string_tab[287] +#define __pyx_n_u_ExactProdConstraint___call___loc __pyx_string_tab[38] +#define __pyx_n_u_ExactProdConstraint___init __pyx_string_tab[39] +#define __pyx_n_u_ExactProdConstraint_preProcess __pyx_string_tab[40] +#define __pyx_n_u_ExactProdConstraint_preProcess_l __pyx_string_tab[41] +#define __pyx_n_u_ExactSumConstraint __pyx_string_tab[42] +#define __pyx_n_u_ExactSumConstraint___call __pyx_string_tab[43] +#define __pyx_n_u_ExactSumConstraint___init __pyx_string_tab[44] +#define __pyx_n_u_ExactSumConstraint_preProcess __pyx_string_tab[45] +#define __pyx_n_u_FunctionConstraint __pyx_string_tab[46] +#define __pyx_n_u_FunctionConstraint___call __pyx_string_tab[47] +#define __pyx_n_u_FunctionConstraint___init __pyx_string_tab[48] +#define __pyx_n_u_InSetConstraint __pyx_string_tab[49] +#define __pyx_n_u_InSetConstraint___call __pyx_string_tab[50] +#define __pyx_n_u_InSetConstraint___init __pyx_string_tab[51] +#define __pyx_n_u_InSetConstraint_preProcess __pyx_string_tab[52] +#define __pyx_kp_u_Last_multiplier_must_be_1_as_it __pyx_string_tab[53] +#define __pyx_n_u_MaxProdConstraint __pyx_string_tab[54] +#define __pyx_n_u_MaxProdConstraint___call __pyx_string_tab[55] +#define __pyx_n_u_MaxProdConstraint___call___local __pyx_string_tab[56] +#define __pyx_n_u_MaxProdConstraint___init __pyx_string_tab[57] +#define __pyx_n_u_MaxProdConstraint_preProcess __pyx_string_tab[58] +#define __pyx_n_u_MaxProdConstraint_preProcess_loc __pyx_string_tab[59] +#define __pyx_n_u_MaxSumConstraint __pyx_string_tab[60] +#define __pyx_n_u_MaxSumConstraint___call __pyx_string_tab[61] +#define __pyx_n_u_MaxSumConstraint___init __pyx_string_tab[62] +#define __pyx_n_u_MaxSumConstraint_preProcess __pyx_string_tab[63] +#define __pyx_n_u_MaxSumConstraint_preProcess_loca __pyx_string_tab[64] +#define __pyx_n_u_MinProdConstraint __pyx_string_tab[65] +#define __pyx_n_u_MinProdConstraint___call __pyx_string_tab[66] +#define __pyx_n_u_MinProdConstraint___init __pyx_string_tab[67] +#define __pyx_n_u_MinProdConstraint_preProcess __pyx_string_tab[68] +#define __pyx_n_u_MinSumConstraint __pyx_string_tab[69] +#define __pyx_n_u_MinSumConstraint___call __pyx_string_tab[70] +#define __pyx_n_u_MinSumConstraint___init __pyx_string_tab[71] +#define __pyx_kp_u_Multipliers_must_be_numbers __pyx_string_tab[72] +#define __pyx_kp_u_Multipliers_must_match_sum_varia __pyx_string_tab[73] +#define __pyx_n_u_NotImplementedError __pyx_string_tab[74] +#define __pyx_n_u_NotInSetConstraint __pyx_string_tab[75] +#define __pyx_n_u_NotInSetConstraint___call __pyx_string_tab[76] +#define __pyx_n_u_NotInSetConstraint___init __pyx_string_tab[77] +#define __pyx_n_u_NotInSetConstraint_preProcess __pyx_string_tab[78] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[79] +#define __pyx_n_u_Optional __pyx_string_tab[80] +#define __pyx_kp_u_Optional_Sequence __pyx_string_tab[81] +#define __pyx_n_u_RuntimeError __pyx_string_tab[82] +#define __pyx_n_u_Sequence __pyx_string_tab[83] +#define __pyx_kp_u_Sequence_str __pyx_string_tab[84] +#define __pyx_n_u_SomeInSetConstraint __pyx_string_tab[85] +#define __pyx_n_u_SomeInSetConstraint___call __pyx_string_tab[86] +#define __pyx_n_u_SomeInSetConstraint___init __pyx_string_tab[87] +#define __pyx_n_u_SomeNotInSetConstraint __pyx_string_tab[88] +#define __pyx_n_u_SomeNotInSetConstraint___call __pyx_string_tab[89] +#define __pyx_n_u_SomeNotInSetConstraint___init __pyx_string_tab[90] +#define __pyx_n_u_Unassigned __pyx_string_tab[91] +#define __pyx_n_u_Union __pyx_string_tab[92] +#define __pyx_kp_u_Union_int_float __pyx_string_tab[93] +#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[94] +#define __pyx_n_u_VariableExactProdConstraint___ca __pyx_string_tab[95] +#define __pyx_n_u_VariableExactProdConstraint___ca_2 __pyx_string_tab[96] +#define __pyx_n_u_VariableExactProdConstraint___in __pyx_string_tab[97] +#define __pyx_n_u_VariableExactProdConstraint__get __pyx_string_tab[98] +#define __pyx_n_u_VariableExactProdConstraint__saf __pyx_string_tab[99] +#define __pyx_n_u_VariableExactProdConstraint_preP __pyx_string_tab[100] +#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[101] +#define __pyx_n_u_VariableExactSumConstraint___cal __pyx_string_tab[102] +#define __pyx_n_u_VariableExactSumConstraint___ini __pyx_string_tab[103] +#define __pyx_n_u_VariableExactSumConstraint___ini_2 __pyx_string_tab[104] +#define __pyx_n_u_VariableExactSumConstraint_prePr __pyx_string_tab[105] +#define __pyx_n_u_VariableExactSumConstraint_prePr_2 __pyx_string_tab[106] +#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[107] +#define __pyx_n_u_VariableMaxProdConstraint___call __pyx_string_tab[108] +#define __pyx_n_u_VariableMaxProdConstraint___call_2 __pyx_string_tab[109] +#define __pyx_n_u_VariableMaxProdConstraint___init __pyx_string_tab[110] +#define __pyx_n_u_VariableMaxProdConstraint__get_p __pyx_string_tab[111] +#define __pyx_n_u_VariableMaxProdConstraint__safe __pyx_string_tab[112] +#define __pyx_n_u_VariableMaxProdConstraint_prePro __pyx_string_tab[113] +#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[114] +#define __pyx_n_u_VariableMaxSumConstraint___call __pyx_string_tab[115] +#define __pyx_n_u_VariableMaxSumConstraint___init __pyx_string_tab[116] +#define __pyx_n_u_VariableMaxSumConstraint___init_2 __pyx_string_tab[117] +#define __pyx_n_u_VariableMaxSumConstraint_preProc __pyx_string_tab[118] +#define __pyx_n_u_VariableMaxSumConstraint_preProc_2 __pyx_string_tab[119] +#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[120] +#define __pyx_n_u_VariableMinProdConstraint___call __pyx_string_tab[121] +#define __pyx_n_u_VariableMinProdConstraint___call_2 __pyx_string_tab[122] +#define __pyx_n_u_VariableMinProdConstraint___init __pyx_string_tab[123] +#define __pyx_n_u_VariableMinProdConstraint__get_p __pyx_string_tab[124] +#define __pyx_n_u_VariableMinProdConstraint__safe __pyx_string_tab[125] +#define __pyx_n_u_VariableMinProdConstraint_prePro __pyx_string_tab[126] +#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[127] +#define __pyx_n_u_VariableMinSumConstraint___call __pyx_string_tab[128] +#define __pyx_n_u_VariableMinSumConstraint___init __pyx_string_tab[129] +#define __pyx_n_u_VariableMinSumConstraint___init_2 __pyx_string_tab[130] +#define __pyx_n_u_VariableMinSumConstraint_preProc __pyx_string_tab[131] +#define __pyx_n_u_VariableMinSumConstraint_preProc_2 __pyx_string_tab[132] +#define __pyx_kp_u_Wrapper_function_for_picklable_s __pyx_string_tab[133] +#define __pyx_kp_u__2 __pyx_string_tab[134] +#define __pyx_kp_u_add_note __pyx_string_tab[135] +#define __pyx_n_u_all_bounds __pyx_string_tab[136] +#define __pyx_n_u_append __pyx_string_tab[137] +#define __pyx_n_u_assigned __pyx_string_tab[138] +#define __pyx_n_u_assigned_2 __pyx_string_tab[139] +#define __pyx_n_u_assigned_prod __pyx_string_tab[140] +#define __pyx_n_u_assigned_product __pyx_string_tab[141] +#define __pyx_n_u_assignments __pyx_string_tab[142] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[143] +#define __pyx_n_u_b __pyx_string_tab[144] +#define __pyx_n_u_bool __pyx_string_tab[145] +#define __pyx_n_u_bounds __pyx_string_tab[146] +#define __pyx_n_u_c __pyx_string_tab[147] +#define __pyx_n_u_call __pyx_string_tab[148] +#define __pyx_n_u_candidates __pyx_string_tab[149] +#define __pyx_n_u_class_getitem __pyx_string_tab[150] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[151] +#define __pyx_n_u_close __pyx_string_tab[152] +#define __pyx_n_u_collections_abc __pyx_string_tab[153] +#define __pyx_n_u_constraint_constraints __pyx_string_tab[154] +#define __pyx_kp_u_constraint_constraints_py __pyx_string_tab[155] +#define __pyx_n_u_constraint_domain __pyx_string_tab[156] +#define __pyx_n_u_constraints __pyx_string_tab[157] +#define __pyx_n_u_contains_lt1 __pyx_string_tab[158] +#define __pyx_n_u_contains_negative __pyx_string_tab[159] +#define __pyx_n_u_dict __pyx_string_tab[160] +#define __pyx_kp_u_disable __pyx_string_tab[161] +#define __pyx_n_u_doc __pyx_string_tab[162] +#define __pyx_n_u_dom __pyx_string_tab[163] +#define __pyx_n_u_domain __pyx_string_tab[164] +#define __pyx_n_u_domain_bounds __pyx_string_tab[165] +#define __pyx_n_u_domain_dict __pyx_string_tab[166] +#define __pyx_n_u_domains __pyx_string_tab[167] +#define __pyx_kp_u_enable __pyx_string_tab[168] +#define __pyx_n_u_exact __pyx_string_tab[169] +#define __pyx_n_u_exact_2 __pyx_string_tab[170] +#define __pyx_n_u_exactprod __pyx_string_tab[171] +#define __pyx_n_u_exactprod_2 __pyx_string_tab[172] +#define __pyx_n_u_exactsum __pyx_string_tab[173] +#define __pyx_n_u_exactsum_2 __pyx_string_tab[174] +#define __pyx_n_u_exclude_var __pyx_string_tab[175] +#define __pyx_n_u_forwardCheck __pyx_string_tab[176] +#define __pyx_n_u_forwardcheck __pyx_string_tab[177] +#define __pyx_n_u_found __pyx_string_tab[178] +#define __pyx_n_u_func __pyx_string_tab[179] +#define __pyx_n_u_func_2 __pyx_string_tab[180] +#define __pyx_n_u_func_3 __pyx_string_tab[181] +#define __pyx_kp_u_gc __pyx_string_tab[182] +#define __pyx_n_u_genexpr __pyx_string_tab[183] +#define __pyx_n_u_get __pyx_string_tab[184] +#define __pyx_n_u_get_product_bounds __pyx_string_tab[185] +#define __pyx_n_u_hi __pyx_string_tab[186] +#define __pyx_n_u_hideValue __pyx_string_tab[187] +#define __pyx_n_u_index __pyx_string_tab[188] +#define __pyx_n_u_init __pyx_string_tab[189] +#define __pyx_n_u_is_coroutine __pyx_string_tab[190] +#define __pyx_kp_u_isenabled __pyx_string_tab[191] +#define __pyx_n_u_itertools __pyx_string_tab[192] +#define __pyx_kp_u_list_tuple __pyx_string_tab[193] +#define __pyx_n_u_lo __pyx_string_tab[194] +#define __pyx_n_u_m __pyx_string_tab[195] +#define __pyx_n_u_main __pyx_string_tab[196] +#define __pyx_n_u_max __pyx_string_tab[197] +#define __pyx_n_u_max_others __pyx_string_tab[198] +#define __pyx_n_u_maxprod __pyx_string_tab[199] +#define __pyx_n_u_maxprod_2 __pyx_string_tab[200] +#define __pyx_n_u_maxsum __pyx_string_tab[201] +#define __pyx_n_u_maxsum_2 __pyx_string_tab[202] +#define __pyx_n_u_maxval __pyx_string_tab[203] +#define __pyx_n_u_metaclass __pyx_string_tab[204] +#define __pyx_n_u_min __pyx_string_tab[205] +#define __pyx_n_u_min_others __pyx_string_tab[206] +#define __pyx_n_u_minprod __pyx_string_tab[207] +#define __pyx_n_u_minprod_2 __pyx_string_tab[208] +#define __pyx_n_u_minsum __pyx_string_tab[209] +#define __pyx_n_u_minsum_2 __pyx_string_tab[210] +#define __pyx_n_u_minval __pyx_string_tab[211] +#define __pyx_n_u_missing __pyx_string_tab[212] +#define __pyx_n_u_missing_lt1 __pyx_string_tab[213] +#define __pyx_n_u_module __pyx_string_tab[214] +#define __pyx_n_u_mro_entries __pyx_string_tab[215] +#define __pyx_n_u_multiplier __pyx_string_tab[216] +#define __pyx_n_u_multipliers __pyx_string_tab[217] +#define __pyx_n_u_multipliers_2 __pyx_string_tab[218] +#define __pyx_n_u_n __pyx_string_tab[219] +#define __pyx_n_u_n_2 __pyx_string_tab[220] +#define __pyx_n_u_name __pyx_string_tab[221] +#define __pyx_n_u_next __pyx_string_tab[222] +#define __pyx_n_u_o __pyx_string_tab[223] +#define __pyx_n_u_other_max __pyx_string_tab[224] +#define __pyx_n_u_other_min __pyx_string_tab[225] +#define __pyx_n_u_other_products __pyx_string_tab[226] +#define __pyx_n_u_other_unassigned __pyx_string_tab[227] +#define __pyx_n_u_others __pyx_string_tab[228] +#define __pyx_n_u_others_bounds __pyx_string_tab[229] +#define __pyx_n_u_others_max __pyx_string_tab[230] +#define __pyx_n_u_others_min __pyx_string_tab[231] +#define __pyx_n_u_p __pyx_string_tab[232] +#define __pyx_n_u_parms __pyx_string_tab[233] +#define __pyx_n_u_pop __pyx_string_tab[234] +#define __pyx_n_u_possible_max __pyx_string_tab[235] +#define __pyx_n_u_possible_min __pyx_string_tab[236] +#define __pyx_n_u_possible_prods __pyx_string_tab[237] +#define __pyx_n_u_preProcess __pyx_string_tab[238] +#define __pyx_n_u_prepare __pyx_string_tab[239] +#define __pyx_n_u_prod __pyx_string_tab[240] +#define __pyx_n_u_prods __pyx_string_tab[241] +#define __pyx_n_u_product __pyx_string_tab[242] +#define __pyx_n_u_product_vars __pyx_string_tab[243] +#define __pyx_n_u_products __pyx_string_tab[244] +#define __pyx_n_u_qualname __pyx_string_tab[245] +#define __pyx_n_u_remove __pyx_string_tab[246] +#define __pyx_n_u_round __pyx_string_tab[247] +#define __pyx_n_u_safe_product __pyx_string_tab[248] +#define __pyx_n_u_seen __pyx_string_tab[249] +#define __pyx_n_u_self __pyx_string_tab[250] +#define __pyx_n_u_send __pyx_string_tab[251] +#define __pyx_n_u_set __pyx_string_tab[252] +#define __pyx_n_u_set_2 __pyx_string_tab[253] +#define __pyx_n_u_set_name __pyx_string_tab[254] +#define __pyx_n_u_singlevalue __pyx_string_tab[255] +#define __pyx_n_u_str __pyx_string_tab[256] +#define __pyx_n_u_sum __pyx_string_tab[257] +#define __pyx_n_u_sum_value __pyx_string_tab[258] +#define __pyx_n_u_sum_vars __pyx_string_tab[259] +#define __pyx_n_u_t_max __pyx_string_tab[260] +#define __pyx_n_u_t_min __pyx_string_tab[261] +#define __pyx_n_u_target_dom __pyx_string_tab[262] +#define __pyx_n_u_target_domain __pyx_string_tab[263] +#define __pyx_n_u_target_max __pyx_string_tab[264] +#define __pyx_n_u_target_min __pyx_string_tab[265] +#define __pyx_n_u_target_value __pyx_string_tab[266] +#define __pyx_n_u_target_var __pyx_string_tab[267] +#define __pyx_n_u_temp_sum __pyx_string_tab[268] +#define __pyx_n_u_test __pyx_string_tab[269] +#define __pyx_n_u_throw __pyx_string_tab[270] +#define __pyx_n_u_typing __pyx_string_tab[271] +#define __pyx_n_u_unassigned __pyx_string_tab[272] +#define __pyx_n_u_unassigned_2 __pyx_string_tab[273] +#define __pyx_n_u_unassigned_vars __pyx_string_tab[274] +#define __pyx_n_u_unassignedvariable __pyx_string_tab[275] +#define __pyx_n_u_v __pyx_string_tab[276] +#define __pyx_n_u_val __pyx_string_tab[277] +#define __pyx_n_u_value __pyx_string_tab[278] +#define __pyx_n_u_values __pyx_string_tab[279] +#define __pyx_n_u_var __pyx_string_tab[280] +#define __pyx_n_u_variable __pyx_string_tab[281] +#define __pyx_n_u_variable_contains_lt1 __pyx_string_tab[282] +#define __pyx_n_u_variable_contains_negative __pyx_string_tab[283] +#define __pyx_n_u_variable_with_lt1 __pyx_string_tab[284] +#define __pyx_n_u_variable_with_negative __pyx_string_tab[285] +#define __pyx_n_u_variables __pyx_string_tab[286] +#define __pyx_n_u_vconstraints __pyx_string_tab[287] +#define __pyx_n_u_x __pyx_string_tab[288] +#define __pyx_n_u_zip __pyx_string_tab[289] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -3973,28 +4027,32 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr); - Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__); - Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call__); - Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr); - Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call__); Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr); - Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__); - Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call__); - Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr); - Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call__); Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr); - Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__); - Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call__); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call__); + Py_CLEAR(clear_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr); + Py_CLEAR(clear_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr); for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } - for (int i=0; i<75; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<288; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<77; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<290; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); Py_CLEAR(clear_module_state->__pyx_int_10); @@ -4044,28 +4102,32 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr); - Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__); - Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call__); - Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr); - Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call__); Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr); - Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__); - Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call__); - Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr); - Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call__); Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr); - Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__); - Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call__); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call__); + Py_VISIT(traverse_module_state->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr); + Py_VISIT(traverse_module_state->__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr); for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } - for (int i=0; i<75; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<288; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<77; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<290; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_10); @@ -20343,6 +20405,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exactprod) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -20352,11 +20415,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___ini * exactprod: Value to be considered as the product * """ * self._exactprod = exactprod # <<<<<<<<<<<<<< + * self._variable_contains_lt1: list[bool] = list() * - * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2, __pyx_v_exactprod) < 0) __PYX_ERR(0, 771, __pyx_L1_error) + /* "constraint/constraints.py":772 + * """ + * self._exactprod = exactprod + * self._variable_contains_lt1: list[bool] = list() # <<<<<<<<<<<<<< + * + * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 +*/ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 772, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "constraint/constraints.py":765 * """ * @@ -20369,6 +20444,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___ini __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("constraint.constraints.ExactProdConstraint.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -20377,8 +20453,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___ini return __pyx_r; } -/* "constraint/constraints.py":773 - * self._exactprod = exactprod +/* "constraint/constraints.py":774 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -20428,50 +20504,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 773, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 774, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 773, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 774, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 773, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 774, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 774, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 774, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 774, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 774, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 773, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 774, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -20481,7 +20557,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 773, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 774, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20492,9 +20568,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 773, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 773, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 773, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 774, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 774, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 774, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -20515,7 +20591,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10preProcess_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":780 +/* "constraint/constraints.py":781 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -20535,7 +20611,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_10pre if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 780, __pyx_L1_error) + __PYX_ERR(0, 781, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20543,7 +20619,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_10pre __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_19ExactProdConstraint_10preProcess_2generator8, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint_preProcess_l, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_19ExactProdConstraint_10preProcess_2generator8, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint_preProcess_l, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -20580,16 +20656,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 780, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 780, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 781, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 781, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -20597,7 +20673,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 781, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20607,7 +20683,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 781, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20618,13 +20694,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 780, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 781, __pyx_L1_error) PyErr_Clear(); } break; @@ -20635,8 +20711,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -20675,8 +20751,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre return __pyx_r; } -/* "constraint/constraints.py":773 - * self._exactprod = exactprod +/* "constraint/constraints.py":774 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -20712,7 +20788,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":774 + /* "constraint/constraints.py":775 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -20720,9 +20796,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP * # check if there are any values less than 1 in the associated variables */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -20742,24 +20818,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":777 + /* "constraint/constraints.py":778 * * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() # <<<<<<<<<<<<<< * variable_with_lt1 = None * for variable in variables: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 777, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":778 + /* "constraint/constraints.py":779 * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None # <<<<<<<<<<<<<< @@ -20769,7 +20845,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_INCREF(Py_None); __pyx_v_variable_with_lt1 = Py_None; - /* "constraint/constraints.py":779 + /* "constraint/constraints.py":780 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -20781,9 +20857,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -20791,7 +20867,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 779, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -20801,7 +20877,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 779, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -20812,13 +20888,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 779, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 779, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 780, __pyx_L1_error) PyErr_Clear(); } break; @@ -20828,37 +20904,37 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":780 + /* "constraint/constraints.py":781 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_10preProcess_genexpr(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_10preProcess_genexpr(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":781 + /* "constraint/constraints.py":782 * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) # <<<<<<<<<<<<<< * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_contains_lt1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_contains_lt1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":779 + /* "constraint/constraints.py":780 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -20868,7 +20944,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":782 + /* "constraint/constraints.py":783 * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< @@ -20878,7 +20954,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_builtin_zip); __pyx_t_2 = __pyx_builtin_zip; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; { @@ -20887,7 +20963,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -20895,9 +20971,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20906,7 +20982,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 783, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -20916,7 +20992,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 783, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -20927,13 +21003,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 783, __pyx_L1_error) PyErr_Clear(); } break; @@ -20946,7 +21022,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 782, __pyx_L1_error) + __PYX_ERR(0, 783, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20956,22 +21032,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 782, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -20979,7 +21055,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 782, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 783, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -20987,7 +21063,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 782, __pyx_L1_error) + __PYX_ERR(0, 783, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_3); @@ -20995,7 +21071,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":783 + /* "constraint/constraints.py":784 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -21005,7 +21081,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_11 = (__pyx_v_contains_lt1 == Py_True); if (__pyx_t_11) { - /* "constraint/constraints.py":784 + /* "constraint/constraints.py":785 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -21015,7 +21091,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_11 = (__pyx_v_variable_with_lt1 != Py_None); if (__pyx_t_11) { - /* "constraint/constraints.py":786 + /* "constraint/constraints.py":787 * if variable_with_lt1 is not None: * # if more than one associated variables contain less than 1, we can't prune * return # <<<<<<<<<<<<<< @@ -21027,7 +21103,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/constraints.py":784 + /* "constraint/constraints.py":785 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -21036,7 +21112,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":787 + /* "constraint/constraints.py":788 * # if more than one associated variables contain less than 1, we can't prune * return * variable_with_lt1 = variable # <<<<<<<<<<<<<< @@ -21046,7 +21122,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_INCREF(__pyx_v_variable); __Pyx_DECREF_SET(__pyx_v_variable_with_lt1, __pyx_v_variable); - /* "constraint/constraints.py":783 + /* "constraint/constraints.py":784 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -21055,7 +21131,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":782 + /* "constraint/constraints.py":783 * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< @@ -21065,19 +21141,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":790 + /* "constraint/constraints.py":791 * * # prune the associated variables of values > exactprod * exactprod = self._exactprod # <<<<<<<<<<<<<< * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exactprod = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/constraints.py":791 + /* "constraint/constraints.py":792 * # prune the associated variables of values > exactprod * exactprod = self._exactprod * for variable in variables: # <<<<<<<<<<<<<< @@ -21089,9 +21165,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 792, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -21099,7 +21175,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 791, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21109,7 +21185,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 791, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 792, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21120,13 +21196,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 791, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 792, __pyx_L1_error) PyErr_Clear(); } break; @@ -21136,7 +21212,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":792 + /* "constraint/constraints.py":793 * exactprod = self._exactprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -21149,14 +21225,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_11 = __pyx_t_12; goto __pyx_L16_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable_with_lt1, __pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable_with_lt1, __pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_12; __pyx_L16_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":793 + /* "constraint/constraints.py":794 * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue # <<<<<<<<<<<<<< @@ -21165,7 +21241,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ goto __pyx_L13_continue; - /* "constraint/constraints.py":792 + /* "constraint/constraints.py":793 * exactprod = self._exactprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -21174,35 +21250,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":794 + /* "constraint/constraints.py":795 * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value > exactprod: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":795 + /* "constraint/constraints.py":796 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value > exactprod: * domain.remove(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 796, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21211,7 +21287,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -21221,7 +21297,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 796, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -21232,13 +21308,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_13; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 796, __pyx_L1_error) PyErr_Clear(); } break; @@ -21248,19 +21324,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":796 + /* "constraint/constraints.py":797 * domain = domains[variable] * for value in domain[:]: * if value > exactprod: # <<<<<<<<<<<<<< * domain.remove(value) * elif value == 0 and exactprod != 0: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 796, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":797 + /* "constraint/constraints.py":798 * for value in domain[:]: * if value > exactprod: * domain.remove(value) # <<<<<<<<<<<<<< @@ -21274,12 +21350,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":796 + /* "constraint/constraints.py":797 * domain = domains[variable] * for value in domain[:]: * if value > exactprod: # <<<<<<<<<<<<<< @@ -21289,25 +21365,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP goto __pyx_L20; } - /* "constraint/constraints.py":798 + /* "constraint/constraints.py":799 * if value > exactprod: * domain.remove(value) * elif value == 0 and exactprod != 0: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_12 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 799, __pyx_L1_error) if (__pyx_t_12) { } else { __pyx_t_11 = __pyx_t_12; goto __pyx_L21_bool_binop_done; } - __pyx_t_12 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_exactprod, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyLong_BoolNeObjC(__pyx_v_exactprod, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 799, __pyx_L1_error) __pyx_t_11 = __pyx_t_12; __pyx_L21_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":799 + /* "constraint/constraints.py":800 * domain.remove(value) * elif value == 0 and exactprod != 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -21321,12 +21397,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":798 + /* "constraint/constraints.py":799 * if value > exactprod: * domain.remove(value) * elif value == 0 and exactprod != 0: # <<<<<<<<<<<<<< @@ -21336,7 +21412,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __pyx_L20:; - /* "constraint/constraints.py":795 + /* "constraint/constraints.py":796 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -21346,7 +21422,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":791 + /* "constraint/constraints.py":792 * # prune the associated variables of values > exactprod * exactprod = self._exactprod * for variable in variables: # <<<<<<<<<<<<<< @@ -21357,8 +21433,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":773 - * self._exactprod = exactprod + /* "constraint/constraints.py":774 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -21389,7 +21465,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP return __pyx_r; } -/* "constraint/constraints.py":801 +/* "constraint/constraints.py":802 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -21440,53 +21516,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 801, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 802, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 801, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 802, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 801, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 802, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 802, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 802, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 802, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 801, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 802, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -21500,7 +21576,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 801, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 802, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21511,8 +21587,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 801, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 802, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 802, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -21531,6 +21607,175 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } +static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "constraint/constraints.py":810 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ + +static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__call___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 810, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator9, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint___call___loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("constraint.constraints.ExactProdConstraint.__call__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 810, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 810, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 810, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 810, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 810, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_5) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "constraint/constraints.py":802 + * domain.remove(value) + * + * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< + * exactprod = self._exactprod + * prod = 1 +*/ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck) { PyObject *__pyx_v_exactprod = NULL; @@ -21541,40 +21786,41 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca PyObject *__pyx_v_contains_lt1 = NULL; PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_value = NULL; + PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator9 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - size_t __pyx_t_5; - Py_ssize_t __pyx_t_6; - PyObject *(*__pyx_t_7)(PyObject *); + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *(*__pyx_t_9)(PyObject *); - int __pyx_t_10; - int __pyx_t_11; - int __pyx_t_12; - Py_ssize_t __pyx_t_13; + int __pyx_t_9; + size_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":802 + /* "constraint/constraints.py":803 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * exactprod = self._exactprod # <<<<<<<<<<<<<< * prod = 1 * missing = False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exactprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":803 + /* "constraint/constraints.py":804 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * exactprod = self._exactprod * prod = 1 # <<<<<<<<<<<<<< @@ -21584,93 +21830,207 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":804 + /* "constraint/constraints.py":805 * exactprod = self._exactprod * prod = 1 * missing = False # <<<<<<<<<<<<<< * missing_lt1 = [] - * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * # find out which variables contain values less than 1 if not preprocessed */ __pyx_v_missing = 0; - /* "constraint/constraints.py":805 + /* "constraint/constraints.py":806 * prod = 1 * missing = False * missing_lt1 = [] # <<<<<<<<<<<<<< - * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): - * if variable in assignments: + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_missing_lt1 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":806 - * missing = False + /* "constraint/constraints.py":808 * missing_lt1 = [] + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 808, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_2 != __pyx_t_3); + if (__pyx_t_4) { + + /* "constraint/constraints.py":809 + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: # <<<<<<<<<<<<<< + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): +*/ + if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { + __pyx_t_1 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 809, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 809, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 809, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 809, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 809, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_6); + __pyx_t_6 = 0; + + /* "constraint/constraints.py":810 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__call___genexpr(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 810, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "constraint/constraints.py":809 + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: # <<<<<<<<<<<<<< + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "constraint/constraints.py":808 + * missing_lt1 = [] + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) +*/ + } + + /* "constraint/constraints.py":811 + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< * if variable in assignments: * prod *= assignments[variable] */ - __pyx_t_2 = NULL; + __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_builtin_zip); - __pyx_t_3 = __pyx_builtin_zip; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = 1; + __pyx_t_6 = __pyx_builtin_zip; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_variables, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = 0; - __pyx_t_7 = NULL; + __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 811, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 806, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 811, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_6); - ++__pyx_t_6; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_3); + ++__pyx_t_3; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 806, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 811, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3); #endif - ++__pyx_t_6; + ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_3); + __pyx_t_1 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 806, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 811, __pyx_L1_error) PyErr_Clear(); } break; @@ -21683,91 +22043,91 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 806, __pyx_L1_error) + __PYX_ERR(0, 811, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __Pyx_INCREF(__pyx_t_4); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_7); } else { - __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 0); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyList_GetItemRef(sequence, 1); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 806, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 811, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); - index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 806, __pyx_L1_error) - __pyx_t_9 = NULL; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L6_unpacking_done; - __pyx_L5_unpacking_failed:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L10_unpacking_done; + __pyx_L9_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 806, __pyx_L1_error) - __pyx_L6_unpacking_done:; + __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_L10_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_8); + __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_7); + __pyx_t_7 = 0; - /* "constraint/constraints.py":807 - * missing_lt1 = [] + /* "constraint/constraints.py":812 + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: # <<<<<<<<<<<<<< * prod *= assignments[variable] * else: */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 807, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 812, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":808 + /* "constraint/constraints.py":813 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: * prod *= assignments[variable] # <<<<<<<<<<<<<< * else: * missing = True */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 813, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_7); + __pyx_t_7 = 0; - /* "constraint/constraints.py":807 - * missing_lt1 = [] + /* "constraint/constraints.py":812 + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: # <<<<<<<<<<<<<< * prod *= assignments[variable] * else: */ - goto __pyx_L7; + goto __pyx_L11; } - /* "constraint/constraints.py":810 + /* "constraint/constraints.py":815 * prod *= assignments[variable] * else: * missing = True # <<<<<<<<<<<<<< @@ -21777,26 +22137,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca /*else*/ { __pyx_v_missing = 1; - /* "constraint/constraints.py":811 + /* "constraint/constraints.py":816 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< * missing_lt1.append(variable) * if isinstance(prod, float): */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 811, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 816, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":812 + /* "constraint/constraints.py":817 * missing = True * if contains_lt1: * missing_lt1.append(variable) # <<<<<<<<<<<<<< * if isinstance(prod, float): * prod = round(prod, 10) */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 817, __pyx_L1_error) - /* "constraint/constraints.py":811 + /* "constraint/constraints.py":816 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< @@ -21805,51 +22165,51 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } } - __pyx_L7:; + __pyx_L11:; - /* "constraint/constraints.py":806 - * missing = False - * missing_lt1 = [] + /* "constraint/constraints.py":811 + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< * if variable in assignments: * prod *= assignments[variable] */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":813 + /* "constraint/constraints.py":818 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): */ - __pyx_t_10 = PyFloat_Check(__pyx_v_prod); - if (__pyx_t_10) { + __pyx_t_4 = PyFloat_Check(__pyx_v_prod); + if (__pyx_t_4) { - /* "constraint/constraints.py":814 + /* "constraint/constraints.py":819 * missing_lt1.append(variable) * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False */ - __pyx_t_2 = NULL; + __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_builtin_round); __pyx_t_1 = __pyx_builtin_round; - __pyx_t_5 = 1; + __pyx_t_10 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); } - __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_6); + __pyx_t_6 = 0; - /* "constraint/constraints.py":813 + /* "constraint/constraints.py":818 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -21858,42 +22218,42 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":815 + /* "constraint/constraints.py":820 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): # <<<<<<<<<<<<<< * return False * if forwardcheck: */ - __pyx_t_12 = (!__pyx_v_missing); - if (!__pyx_t_12) { - goto __pyx_L13_next_or; + __pyx_t_13 = (!__pyx_v_missing); + if (!__pyx_t_13) { + goto __pyx_L17_next_or; } else { } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_exactprod, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 815, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!__pyx_t_12) { + __pyx_t_6 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_exactprod, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L12_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L16_bool_binop_done; } - __pyx_L13_next_or:; - __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 815, __pyx_L1_error) - __pyx_t_12 = (__pyx_t_6 == 0); - if (__pyx_t_12) { + __pyx_L17_next_or:; + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_3 == 0); + if (__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L12_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 815, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __pyx_t_12; - __pyx_L12_bool_binop_done:; - if (__pyx_t_10) { + __pyx_t_6 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 820, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __pyx_t_13; + __pyx_L16_bool_binop_done:; + if (__pyx_t_4) { - /* "constraint/constraints.py":816 + /* "constraint/constraints.py":821 * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False # <<<<<<<<<<<<<< @@ -21905,7 +22265,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":815 + /* "constraint/constraints.py":820 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): # <<<<<<<<<<<<<< @@ -21914,17 +22274,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":817 + /* "constraint/constraints.py":822 * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False * if forwardcheck: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 817, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":818 + /* "constraint/constraints.py":823 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -21932,48 +22292,48 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca * domain = domains[variable] */ if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { - __pyx_t_3 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = 0; - __pyx_t_7 = NULL; + __pyx_t_6 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error) } for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 818, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 823, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_6); - ++__pyx_t_6; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_3); + ++__pyx_t_3; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 818, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 823, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3); #endif - ++__pyx_t_6; + ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_3); + __pyx_t_1 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 818, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 823, __pyx_L1_error) PyErr_Clear(); } break; @@ -21983,96 +22343,96 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":819 + /* "constraint/constraints.py":824 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 819, __pyx_L1_error) - if (__pyx_t_12) { + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + if (__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L20_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L24_bool_binop_done; } - __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 819, __pyx_L1_error) - if (!__pyx_t_12) { + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) + if (!__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L20_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L24_bool_binop_done; } - __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 819, __pyx_L1_error) - __pyx_t_12 = (__pyx_t_13 == 1); - __pyx_t_10 = __pyx_t_12; - __pyx_L20_bool_binop_done:; - if (__pyx_t_10) { + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_2 == 1); + __pyx_t_4 = __pyx_t_13; + __pyx_L24_bool_binop_done:; + if (__pyx_t_4) { - /* "constraint/constraints.py":820 + /* "constraint/constraints.py":825 * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if prod * value > exactprod: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":821 + /* "constraint/constraints.py":826 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if prod * value > exactprod: * domain.hideValue(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); - __pyx_t_13 = 0; + __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); + __pyx_t_2 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 826, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_7))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 821, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 826, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_13); - ++__pyx_t_13; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_2); + ++__pyx_t_2; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 821, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 826, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_2)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_13); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_2); #endif - ++__pyx_t_13; + ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_14(__pyx_t_2); + __pyx_t_1 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 821, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 826, __pyx_L1_error) PyErr_Clear(); } break; @@ -22082,22 +22442,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":822 + /* "constraint/constraints.py":827 * domain = domains[variable] * for value in domain[:]: * if prod * value > exactprod: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 822, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_4) { - /* "constraint/constraints.py":823 + /* "constraint/constraints.py":828 * for value in domain[:]: * if prod * value > exactprod: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -22106,17 +22466,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ __pyx_t_1 = __pyx_v_domain; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = 0; + __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":822 + /* "constraint/constraints.py":827 * domain = domains[variable] * for value in domain[:]: * if prod * value > exactprod: # <<<<<<<<<<<<<< @@ -22125,7 +22485,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":821 + /* "constraint/constraints.py":826 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -22133,20 +22493,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca * domain.hideValue(value) */ } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":824 + /* "constraint/constraints.py":829 * if prod * value > exactprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 824, __pyx_L1_error) - __pyx_t_12 = (!__pyx_t_10); - if (__pyx_t_12) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_13 = (!__pyx_t_4); + if (__pyx_t_13) { - /* "constraint/constraints.py":825 + /* "constraint/constraints.py":830 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -22156,10 +22516,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/constraints.py":824 + /* "constraint/constraints.py":829 * if prod * value > exactprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -22168,7 +22528,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":819 + /* "constraint/constraints.py":824 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< @@ -22177,7 +22537,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":818 + /* "constraint/constraints.py":823 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -22185,9 +22545,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca * domain = domains[variable] */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":817 + /* "constraint/constraints.py":822 * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False * if forwardcheck: # <<<<<<<<<<<<<< @@ -22196,7 +22556,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":826 + /* "constraint/constraints.py":831 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -22208,7 +22568,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":801 + /* "constraint/constraints.py":802 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -22219,10 +22579,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("constraint.constraints.ExactProdConstraint.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -22233,12 +22593,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF(__pyx_v_contains_lt1); __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator9); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":839 +/* "constraint/constraints.py":844 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< @@ -22288,38 +22649,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_target_var,&__pyx_mstate_global->__pyx_n_u_product_vars,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 839, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 844, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 844, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 844, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 839, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 844, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 839, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 844, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 844, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 839, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 844, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -22327,7 +22688,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 839, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 844, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22338,7 +22699,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 839, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 844, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_product_vars); /* function exit code */ @@ -22366,25 +22727,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":846 + /* "constraint/constraints.py":851 * product_vars (sequence of Variables): The variables to calculate the product of. * """ * self.target_var = target_var # <<<<<<<<<<<<<< * self.product_vars = product_vars * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 846, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 851, __pyx_L1_error) - /* "constraint/constraints.py":847 + /* "constraint/constraints.py":852 * """ * self.target_var = target_var * self.product_vars = product_vars # <<<<<<<<<<<<<< * * def _get_product_bounds(self, domain_dict, exclude_var=None): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 847, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 852, __pyx_L1_error) - /* "constraint/constraints.py":839 + /* "constraint/constraints.py":844 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< @@ -22404,7 +22765,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":849 +/* "constraint/constraints.py":854 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -22454,41 +22815,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domain_dict,&__pyx_mstate_global->__pyx_n_u_exclude_var,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 849, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 854, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 854, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 854, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 854, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 849, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 854, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 849, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 854, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 854, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 854, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 849, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 854, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -22500,7 +22861,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 849, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 854, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22528,11 +22889,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_v_all_bounds = NULL; PyObject *__pyx_v_candidates = NULL; PyObject *__pyx_v_products = NULL; - PyObject *__pyx_8genexpr9__pyx_v_b = NULL; PyObject *__pyx_9genexpr10__pyx_v_b = NULL; - PyObject *__pyx_9genexpr11__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr11__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr12__pyx_v_p = NULL; + PyObject *__pyx_9genexpr11__pyx_v_b = NULL; + PyObject *__pyx_9genexpr12__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr12__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr13__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -22555,35 +22916,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":851 + /* "constraint/constraints.py":856 * def _get_product_bounds(self, domain_dict, exclude_var=None): * """Return min and max product of domains of product_vars (excluding `exclude_var` if given).""" * bounds = [] # <<<<<<<<<<<<<< * for var in self.product_vars: * if var == exclude_var: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":852 + /* "constraint/constraints.py":857 * """Return min and max product of domains of product_vars (excluding `exclude_var` if given).""" * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< * if var == exclude_var: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -22592,7 +22953,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 857, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -22602,7 +22963,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 857, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -22613,13 +22974,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 857, __pyx_L1_error) PyErr_Clear(); } break; @@ -22629,19 +22990,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":853 + /* "constraint/constraints.py":858 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< * continue * dom = domain_dict[var] */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":854 + /* "constraint/constraints.py":859 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -22650,7 +23011,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ goto __pyx_L3_continue; - /* "constraint/constraints.py":853 + /* "constraint/constraints.py":858 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -22659,30 +23020,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":855 + /* "constraint/constraints.py":860 * if var == exclude_var: * continue * dom = domain_dict[var] # <<<<<<<<<<<<<< * if not dom: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":856 + /* "constraint/constraints.py":861 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< * continue * bounds.append((min(dom), max(dom))) */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 861, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":857 + /* "constraint/constraints.py":862 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -22691,7 +23052,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ goto __pyx_L3_continue; - /* "constraint/constraints.py":856 + /* "constraint/constraints.py":861 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -22700,7 +23061,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":858 + /* "constraint/constraints.py":863 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -22716,7 +23077,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 858, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_7 = NULL; @@ -22728,21 +23089,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 863, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 863, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":852 + /* "constraint/constraints.py":857 * """Return min and max product of domains of product_vars (excluding `exclude_var` if given).""" * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -22753,7 +23114,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":860 + /* "constraint/constraints.py":865 * bounds.append((min(dom), max(dom))) * * all_bounds = [b for b in bounds] # <<<<<<<<<<<<<< @@ -22761,7 +23122,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * return 1, 1 */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L10_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_10); __pyx_t_3 = 0; @@ -22769,30 +23130,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 860, __pyx_L10_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 865, __pyx_L10_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 860, __pyx_L10_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_b, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_b, __pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr9__pyx_v_b))) __PYX_ERR(0, 860, __pyx_L10_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr10__pyx_v_b))) __PYX_ERR(0, 865, __pyx_L10_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_b); __pyx_8genexpr9__pyx_v_b = 0; + __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_b); __pyx_9genexpr10__pyx_v_b = 0; goto __pyx_L14_exit_scope; __pyx_L10_error:; - __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_b); __pyx_8genexpr9__pyx_v_b = 0; + __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_b); __pyx_9genexpr10__pyx_v_b = 0; goto __pyx_L1_error; __pyx_L14_exit_scope:; } /* exit inner scope */ __pyx_v_all_bounds = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":861 + /* "constraint/constraints.py":866 * * all_bounds = [b for b in bounds] * if not all_bounds: # <<<<<<<<<<<<<< @@ -22800,11 +23161,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * */ __pyx_t_6 = (__Pyx_PyList_GET_SIZE(__pyx_v_all_bounds) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 861, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 866, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":862 + /* "constraint/constraints.py":867 * all_bounds = [b for b in bounds] * if not all_bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -22816,7 +23177,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":861 + /* "constraint/constraints.py":866 * * all_bounds = [b for b in bounds] * if not all_bounds: # <<<<<<<<<<<<<< @@ -22825,7 +23186,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":865 + /* "constraint/constraints.py":870 * * # Get all combinations of min/max to find global min/max product * candidates = [b for b in product(*[(lo, hi) for lo, hi in all_bounds])] # <<<<<<<<<<<<<< @@ -22833,12 +23194,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * return min(products), max(products) */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L18_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 865, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 870, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); { /* enter inner scope */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L23_error) + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __pyx_v_all_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -22846,13 +23207,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 865, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L23_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L23_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { PyObject* sequence = __pyx_t_7; @@ -22860,7 +23221,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 865, __pyx_L23_error) + __PYX_ERR(0, 870, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22870,22 +23231,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 865, __pyx_L23_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 865, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 865, __pyx_L23_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 865, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 865, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -22893,7 +23254,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 865, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 870, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -22901,38 +23262,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 865, __pyx_L23_error) + __PYX_ERR(0, 870, __pyx_L23_error) __pyx_L27_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_lo, __pyx_t_12); + __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_hi, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 865, __pyx_L23_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_9genexpr11__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr11__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr11__pyx_v_lo) != (0)) __PYX_ERR(0, 865, __pyx_L23_error); - __Pyx_INCREF(__pyx_9genexpr11__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr11__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr11__pyx_v_hi) != (0)) __PYX_ERR(0, 865, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 865, __pyx_L23_error) + __Pyx_INCREF(__pyx_9genexpr12__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr12__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr12__pyx_v_lo) != (0)) __PYX_ERR(0, 870, __pyx_L23_error); + __Pyx_INCREF(__pyx_9genexpr12__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr12__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr12__pyx_v_hi) != (0)) __PYX_ERR(0, 870, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 870, __pyx_L23_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_hi); __pyx_9genexpr11__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_lo); __pyx_9genexpr11__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_hi); __pyx_9genexpr12__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_lo); __pyx_9genexpr12__pyx_v_lo = 0; goto __pyx_L29_exit_scope; __pyx_L23_error:; - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_hi); __pyx_9genexpr11__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_lo); __pyx_9genexpr11__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_hi); __pyx_9genexpr12__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_lo); __pyx_9genexpr12__pyx_v_lo = 0; goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L18_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L18_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -22941,9 +23302,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L18_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L18_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -22952,7 +23313,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 865, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L18_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -22962,7 +23323,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 865, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L18_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -22973,35 +23334,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 865, __pyx_L18_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L18_error) } else { __pyx_t_8 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 865, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 870, __pyx_L18_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_b, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_b, __pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr10__pyx_v_b))) __PYX_ERR(0, 865, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr11__pyx_v_b))) __PYX_ERR(0, 870, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_b); __pyx_9genexpr10__pyx_v_b = 0; + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_b); __pyx_9genexpr11__pyx_v_b = 0; goto __pyx_L31_exit_scope; __pyx_L18_error:; - __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_b); __pyx_9genexpr10__pyx_v_b = 0; + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_b); __pyx_9genexpr11__pyx_v_b = 0; goto __pyx_L1_error; __pyx_L31_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":866 + /* "constraint/constraints.py":871 * # Get all combinations of min/max to find global min/max product * candidates = [b for b in product(*[(lo, hi) for lo, hi in all_bounds])] * products = [self._safe_product(p) for p in candidates] # <<<<<<<<<<<<<< @@ -23009,7 +23370,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L34_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -23017,41 +23378,41 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 866, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 871, __pyx_L34_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L34_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_p, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_9 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr12__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr13__pyx_v_p}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L34_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 871, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_8); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 866, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 871, __pyx_L34_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_p); __pyx_9genexpr12__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_p); __pyx_9genexpr13__pyx_v_p = 0; goto __pyx_L38_exit_scope; __pyx_L34_error:; - __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_p); __pyx_9genexpr12__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_p); __pyx_9genexpr13__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L38_exit_scope:; } /* exit inner scope */ __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":867 + /* "constraint/constraints.py":872 * candidates = [b for b in product(*[(lo, hi) for lo, hi in all_bounds])] * products = [self._safe_product(p) for p in candidates] * return min(products), max(products) # <<<<<<<<<<<<<< @@ -23068,7 +23429,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_1 = NULL; @@ -23080,22 +23441,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 867, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 867, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 872, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 867, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 872, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "constraint/constraints.py":849 + /* "constraint/constraints.py":854 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -23122,17 +23483,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_v_all_bounds); __Pyx_XDECREF(__pyx_v_candidates); __Pyx_XDECREF(__pyx_v_products); - __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_b); __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_b); - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_b); + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":869 +/* "constraint/constraints.py":874 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -23180,39 +23541,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_values,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 869, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 874, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 869, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 874, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 869, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 874, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 869, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 874, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 869, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 874, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 869, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 874, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 869, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 874, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_values = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 869, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 874, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23247,7 +23608,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":870 + /* "constraint/constraints.py":875 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -23257,7 +23618,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":871 + /* "constraint/constraints.py":876 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -23269,9 +23630,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -23279,7 +23640,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 876, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -23289,7 +23650,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 876, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -23300,13 +23661,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 876, __pyx_L1_error) PyErr_Clear(); } break; @@ -23316,19 +23677,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":872 + /* "constraint/constraints.py":877 * prod = 1 * for v in values: * prod *= v # <<<<<<<<<<<<<< * return prod * */ - __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":871 + /* "constraint/constraints.py":876 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -23338,7 +23699,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":873 + /* "constraint/constraints.py":878 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -23350,7 +23711,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":869 + /* "constraint/constraints.py":874 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -23372,7 +23733,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":875 +/* "constraint/constraints.py":880 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -23423,50 +23784,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 875, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 880, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 880, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 880, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 880, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 880, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 880, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 875, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 880, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 875, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 880, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 880, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 880, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 880, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 880, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 875, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 880, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -23476,7 +23837,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 875, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 880, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23487,9 +23848,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 875, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 875, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 875, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 880, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 880, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 880, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_6preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -23542,7 +23903,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":876 + /* "constraint/constraints.py":881 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -23550,9 +23911,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * target_domain = domains[self.target_var] */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -23572,27 +23933,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":878 + /* "constraint/constraints.py":883 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * * target_domain = domains[self.target_var] # <<<<<<<<<<<<<< * target_min = min(target_domain) * target_max = max(target_domain) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_domain = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":879 + /* "constraint/constraints.py":884 * * target_domain = domains[self.target_var] * target_min = min(target_domain) # <<<<<<<<<<<<<< @@ -23608,13 +23969,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_target_min = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":880 + /* "constraint/constraints.py":885 * target_domain = domains[self.target_var] * target_min = min(target_domain) * target_max = max(target_domain) # <<<<<<<<<<<<<< @@ -23630,29 +23991,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_target_max = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":881 + /* "constraint/constraints.py":886 * target_min = min(target_domain) * target_max = max(target_domain) * for var in self.product_vars: # <<<<<<<<<<<<<< * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) * domain = domains[var] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 886, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -23661,7 +24022,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 881, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 886, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -23671,7 +24032,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 881, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 886, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -23682,13 +24043,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 881, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 881, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 886, __pyx_L1_error) PyErr_Clear(); } break; @@ -23698,7 +24059,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":882 + /* "constraint/constraints.py":887 * target_max = max(target_domain) * for var in self.product_vars: * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -23710,13 +24071,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_domains}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 882, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 887, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -23725,7 +24086,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 882, __pyx_L1_error) + __PYX_ERR(0, 887, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -23735,22 +24096,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -23758,7 +24119,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 882, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 887, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -23766,7 +24127,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 882, __pyx_L1_error) + __PYX_ERR(0, 887, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_other_min, __pyx_t_3); @@ -23774,35 +24135,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_other_max, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":883 + /* "constraint/constraints.py":888 * for var in self.product_vars: * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) * domain = domains[var] # <<<<<<<<<<<<<< * for value in domain[:]: * candidates = [value * other_min, value * other_max] */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":884 + /* "constraint/constraints.py":889 * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 889, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -23811,7 +24172,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 889, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -23821,7 +24182,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 889, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -23832,13 +24193,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 889, __pyx_L1_error) PyErr_Clear(); } break; @@ -23848,29 +24209,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":885 + /* "constraint/constraints.py":890 * domain = domains[var] * for value in domain[:]: * candidates = [value * other_min, value * other_max] # <<<<<<<<<<<<<< * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 885, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 885, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 890, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 885, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 890, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_candidates, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "constraint/constraints.py":886 + /* "constraint/constraints.py":891 * for value in domain[:]: * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) # <<<<<<<<<<<<<< @@ -23886,7 +24247,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_3 = NULL; @@ -23898,7 +24259,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_minval, __pyx_t_8); @@ -23906,29 +24267,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_maxval, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":887 + /* "constraint/constraints.py":892 * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_maxval, __pyx_v_target_min, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_maxval, __pyx_v_target_min, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_minval, __pyx_v_target_max, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_minval, __pyx_v_target_max, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = __pyx_t_14; __pyx_L10_bool_binop_done:; if (__pyx_t_13) { - /* "constraint/constraints.py":888 + /* "constraint/constraints.py":893 * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: * domain.remove(value) # <<<<<<<<<<<<<< @@ -23942,12 +24303,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":887 + /* "constraint/constraints.py":892 * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: # <<<<<<<<<<<<<< @@ -23956,7 +24317,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":884 + /* "constraint/constraints.py":889 * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -23966,7 +24327,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":881 + /* "constraint/constraints.py":886 * target_min = min(target_domain) * target_max = max(target_domain) * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -23976,7 +24337,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":875 + /* "constraint/constraints.py":880 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -24013,7 +24374,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":890 +/* "constraint/constraints.py":895 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -24064,53 +24425,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 890, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 895, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 890, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 895, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 890, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 895, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 895, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 895, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 895, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 895, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 890, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 895, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -24124,7 +24485,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 890, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 895, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24135,8 +24496,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 890, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 890, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 895, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -24155,9 +24516,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":913 +/* "constraint/constraints.py":918 * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< @@ -24166,29 +24527,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 913, __pyx_L1_error) + __PYX_ERR(0, 918, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator10, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -24204,9 +24565,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -24226,29 +24587,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); - __PYX_ERR(0, 913, __pyx_L1_error) + __PYX_ERR(0, 918, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 913, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 918, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 918, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 913, __pyx_L1_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 918, __pyx_L1_error) } + __pyx_t_3 = PyNumber_Multiply(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -24266,7 +24627,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 918, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -24291,9 +24652,9 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":914 +/* "constraint/constraints.py":919 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) * possible_max = max(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< @@ -24302,29 +24663,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___3genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 914, __pyx_L1_error) + __PYX_ERR(0, 919, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator11, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -24340,9 +24701,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -24362,29 +24723,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); - __PYX_ERR(0, 914, __pyx_L1_error) + __PYX_ERR(0, 919, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 914, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 919, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 919, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 914, __pyx_L1_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 919, __pyx_L1_error) } + __pyx_t_3 = PyNumber_Multiply(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -24402,7 +24763,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 919, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -24427,9 +24788,9 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":928 +/* "constraint/constraints.py":933 * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): # <<<<<<<<<<<<<< @@ -24438,29 +24799,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___6genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 928, __pyx_L1_error) + __PYX_ERR(0, 933, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator11, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator12, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -24476,9 +24837,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -24497,29 +24858,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 928, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 928, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 933, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 933, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 928, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 933, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 928, __pyx_L1_error) } - __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_c, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 928, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 933, __pyx_L1_error) } + __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_c, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { @@ -24559,7 +24920,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":890 +/* "constraint/constraints.py":895 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -24568,7 +24929,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai */ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *__pyx_cur_scope; PyObject *__pyx_v_unassigned_vars = NULL; PyObject *__pyx_v_var = NULL; PyObject *__pyx_v_domain_bounds = NULL; @@ -24580,19 +24941,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_v_other_products = NULL; PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_value = NULL; - PyObject *__pyx_9genexpr13__pyx_v_v = NULL; - PyObject *__pyx_9genexpr14__pyx_v_p = NULL; - PyObject *__pyx_9genexpr15__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr15__pyx_v_hi = NULL; - PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9 = 0; - PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10 = 0; - PyObject *__pyx_9genexpr18__pyx_v_v = NULL; + PyObject *__pyx_9genexpr14__pyx_v_v = NULL; + PyObject *__pyx_9genexpr15__pyx_v_p = NULL; + PyObject *__pyx_9genexpr16__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr16__pyx_v_hi = NULL; + PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator10 = 0; + PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator11 = 0; PyObject *__pyx_9genexpr19__pyx_v_v = NULL; - PyObject *__pyx_9genexpr20__pyx_v_p = NULL; - PyObject *__pyx_9genexpr21__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr21__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr22__pyx_v_p = NULL; - PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator11 = 0; + PyObject *__pyx_9genexpr20__pyx_v_v = NULL; + PyObject *__pyx_9genexpr21__pyx_v_p = NULL; + PyObject *__pyx_9genexpr22__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr22__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr23__pyx_v_p = NULL; + PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator12 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -24617,29 +24978,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 890, __pyx_L1_error) + __PYX_ERR(0, 895, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":891 + /* "constraint/constraints.py":896 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":892 + /* "constraint/constraints.py":897 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: * return True # <<<<<<<<<<<<<< @@ -24651,7 +25012,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":891 + /* "constraint/constraints.py":896 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -24660,23 +25021,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":894 + /* "constraint/constraints.py":899 * return True * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * assigned_product = 1 * unassigned_vars = [] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":895 + /* "constraint/constraints.py":900 * * target_value = assignments[self.target_var] * assigned_product = 1 # <<<<<<<<<<<<<< @@ -24687,35 +25048,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); __pyx_cur_scope->__pyx_v_assigned_product = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":896 + /* "constraint/constraints.py":901 * target_value = assignments[self.target_var] * assigned_product = 1 * unassigned_vars = [] # <<<<<<<<<<<<<< * * for var in self.product_vars: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned_vars = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":898 + /* "constraint/constraints.py":903 * unassigned_vars = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< * if var in assignments: * assigned_product *= assignments[var] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 903, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -24724,7 +25085,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 903, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -24734,7 +25095,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 903, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -24745,13 +25106,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 903, __pyx_L1_error) PyErr_Clear(); } break; @@ -24761,26 +25122,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":899 + /* "constraint/constraints.py":904 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< * assigned_product *= assignments[var] * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 904, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":900 + /* "constraint/constraints.py":905 * for var in self.product_vars: * if var in assignments: * assigned_product *= assignments[var] # <<<<<<<<<<<<<< * else: * unassigned_vars.append(var) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_assigned_product); @@ -24788,7 +25149,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":899 + /* "constraint/constraints.py":904 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -24798,7 +25159,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai goto __pyx_L6; } - /* "constraint/constraints.py":902 + /* "constraint/constraints.py":907 * assigned_product *= assignments[var] * else: * unassigned_vars.append(var) # <<<<<<<<<<<<<< @@ -24806,11 +25167,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * if isinstance(assigned_product, float): */ /*else*/ { - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned_vars, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned_vars, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 907, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":898 + /* "constraint/constraints.py":903 * unassigned_vars = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -24820,7 +25181,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":904 + /* "constraint/constraints.py":909 * unassigned_vars.append(var) * * if isinstance(assigned_product, float): # <<<<<<<<<<<<<< @@ -24833,7 +25194,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":905 + /* "constraint/constraints.py":910 * * if isinstance(assigned_product, float): * assigned_product = round(assigned_product, 10) # <<<<<<<<<<<<<< @@ -24849,7 +25210,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_assigned_product); @@ -24857,7 +25218,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":904 + /* "constraint/constraints.py":909 * unassigned_vars.append(var) * * if isinstance(assigned_product, float): # <<<<<<<<<<<<<< @@ -24866,7 +25227,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":907 + /* "constraint/constraints.py":912 * assigned_product = round(assigned_product, 10) * * if not unassigned_vars: # <<<<<<<<<<<<<< @@ -24874,11 +25235,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * */ __pyx_t_2 = (__Pyx_PyList_GET_SIZE(__pyx_v_unassigned_vars) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 907, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 912, __pyx_L1_error) __pyx_t_9 = (!__pyx_t_2); if (__pyx_t_9) { - /* "constraint/constraints.py":908 + /* "constraint/constraints.py":913 * * if not unassigned_vars: * return assigned_product == target_value # <<<<<<<<<<<<<< @@ -24886,12 +25247,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * # Partial assignment check feasibility */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_cur_scope->__pyx_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":907 + /* "constraint/constraints.py":912 * assigned_product = round(assigned_product, 10) * * if not unassigned_vars: # <<<<<<<<<<<<<< @@ -24900,7 +25261,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":911 + /* "constraint/constraints.py":916 * * # Partial assignment check feasibility * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] # <<<<<<<<<<<<<< @@ -24908,7 +25269,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * possible_min = min(assigned_product * c for c in candidates) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L12_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_unassigned_vars; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; @@ -24916,20 +25277,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 911, __pyx_L12_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 916, __pyx_L12_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 911, __pyx_L12_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_11 = __pyx_builtin_min; - __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 911, __pyx_L12_error) + __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr14__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = 1; { @@ -24938,13 +25299,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 911, __pyx_L12_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_10 = __pyx_builtin_max; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 911, __pyx_L12_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr14__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = 1; { @@ -24953,32 +25314,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 911, __pyx_L12_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 911, __pyx_L12_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 911, __pyx_L12_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 916, __pyx_L12_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 911, __pyx_L12_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 916, __pyx_L12_error); __pyx_t_6 = 0; __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 911, __pyx_L12_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 916, __pyx_L12_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_v); __pyx_9genexpr13__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_v); __pyx_9genexpr14__pyx_v_v = 0; goto __pyx_L16_exit_scope; __pyx_L12_error:; - __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_v); __pyx_9genexpr13__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_v); __pyx_9genexpr14__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L16_exit_scope:; } /* exit inner scope */ __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":912 + /* "constraint/constraints.py":917 * # Partial assignment check feasibility * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] # <<<<<<<<<<<<<< @@ -24986,12 +25347,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * possible_max = max(assigned_product * c for c in candidates) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L19_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L19_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); { /* enter inner scope */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L24_error) + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0; @@ -24999,13 +25360,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 912, __pyx_L24_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L24_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_11, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L24_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; @@ -25013,7 +25374,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 912, __pyx_L24_error) + __PYX_ERR(0, 917, __pyx_L24_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25023,22 +25384,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_12); } else { __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 912, __pyx_L24_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_XGOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 912, __pyx_L24_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_XGOTREF(__pyx_t_12); } #else - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 912, __pyx_L24_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 912, __pyx_L24_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 912, __pyx_L24_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -25046,7 +25407,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_13); index = 1; __pyx_t_12 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_12)) goto __pyx_L27_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 912, __pyx_L24_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 917, __pyx_L24_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L28_unpacking_done; @@ -25054,38 +25415,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 912, __pyx_L24_error) + __PYX_ERR(0, 917, __pyx_L24_error) __pyx_L28_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_lo, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_lo, __pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_hi, __pyx_t_12); + __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_hi, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __pyx_L24_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_9genexpr15__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr15__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr15__pyx_v_lo) != (0)) __PYX_ERR(0, 912, __pyx_L24_error); - __Pyx_INCREF(__pyx_9genexpr15__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr15__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr15__pyx_v_hi) != (0)) __PYX_ERR(0, 912, __pyx_L24_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 912, __pyx_L24_error) + __Pyx_INCREF(__pyx_9genexpr16__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr16__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr16__pyx_v_lo) != (0)) __PYX_ERR(0, 917, __pyx_L24_error); + __Pyx_INCREF(__pyx_9genexpr16__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr16__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr16__pyx_v_hi) != (0)) __PYX_ERR(0, 917, __pyx_L24_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 917, __pyx_L24_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_hi); __pyx_9genexpr15__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_lo); __pyx_9genexpr15__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_hi); __pyx_9genexpr16__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_lo); __pyx_9genexpr16__pyx_v_lo = 0; goto __pyx_L30_exit_scope; __pyx_L24_error:; - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_hi); __pyx_9genexpr15__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_lo); __pyx_9genexpr15__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_hi); __pyx_9genexpr16__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_lo); __pyx_9genexpr16__pyx_v_lo = 0; goto __pyx_L19_error; __pyx_L30_exit_scope:; } /* exit inner scope */ - __pyx_t_11 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 912, __pyx_L19_error) + __pyx_t_11 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L19_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -25094,9 +25455,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 912, __pyx_L19_error) + __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L19_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L19_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -25105,7 +25466,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L19_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -25115,7 +25476,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 917, __pyx_L19_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -25126,46 +25487,46 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 917, __pyx_L19_error) } else { __pyx_t_10 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_10)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 917, __pyx_L19_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_p, __pyx_t_10); + __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_p, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_9genexpr14__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_9genexpr15__pyx_v_p}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 912, __pyx_L19_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 917, __pyx_L19_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_p); __pyx_9genexpr14__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_p); __pyx_9genexpr15__pyx_v_p = 0; goto __pyx_L32_exit_scope; __pyx_L19_error:; - __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_p); __pyx_9genexpr14__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_p); __pyx_9genexpr15__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L32_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":913 + /* "constraint/constraints.py":918 * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< @@ -25175,7 +25536,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_10 = __pyx_builtin_min; - __pyx_t_3 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_t_3 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = 1; { @@ -25184,13 +25545,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_possible_min = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":914 + /* "constraint/constraints.py":919 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_min = min(assigned_product * c for c in candidates) * possible_max = max(assigned_product * c for c in candidates) # <<<<<<<<<<<<<< @@ -25200,7 +25561,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_3 = __pyx_builtin_max; - __pyx_t_11 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_11 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = 1; { @@ -25209,35 +25570,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_possible_max = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":916 + /* "constraint/constraints.py":921 * possible_max = max(assigned_product * c for c in candidates) * * if target_value < possible_min or target_value > possible_max: # <<<<<<<<<<<<<< * return False * */ - __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_target_value, __pyx_v_possible_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 916, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_target_value, __pyx_v_possible_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 921, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) { } else { __pyx_t_9 = __pyx_t_2; goto __pyx_L34_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_target_value, __pyx_v_possible_max, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 916, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_target_value, __pyx_v_possible_max, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 921, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_t_2; __pyx_L34_bool_binop_done:; if (__pyx_t_9) { - /* "constraint/constraints.py":917 + /* "constraint/constraints.py":922 * * if target_value < possible_min or target_value > possible_max: * return False # <<<<<<<<<<<<<< @@ -25249,7 +25610,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":916 + /* "constraint/constraints.py":921 * possible_max = max(assigned_product * c for c in candidates) * * if target_value < possible_min or target_value > possible_max: # <<<<<<<<<<<<<< @@ -25258,17 +25619,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":919 + /* "constraint/constraints.py":924 * return False * * if forwardcheck: # <<<<<<<<<<<<<< * for var in unassigned_vars: * others = [v for v in unassigned_vars if v != var] */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 919, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 924, __pyx_L1_error) if (__pyx_t_9) { - /* "constraint/constraints.py":920 + /* "constraint/constraints.py":925 * * if forwardcheck: * for var in unassigned_vars: # <<<<<<<<<<<<<< @@ -25281,18 +25642,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 920, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 925, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":921 + /* "constraint/constraints.py":926 * if forwardcheck: * for var in unassigned_vars: * others = [v for v in unassigned_vars if v != var] # <<<<<<<<<<<<<< @@ -25300,7 +25661,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in others_bounds])] */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 921, __pyx_L41_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_v_unassigned_vars; __Pyx_INCREF(__pyx_t_11); __pyx_t_16 = 0; @@ -25308,35 +25669,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 921, __pyx_L41_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 926, __pyx_L41_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_10 = __Pyx_PyList_GetItemRef(__pyx_t_11, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 921, __pyx_L41_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 926, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_v, __pyx_t_10); + __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_v, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyObject_RichCompare(__pyx_9genexpr18__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 921, __pyx_L41_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 921, __pyx_L41_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_9genexpr19__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 926, __pyx_L41_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 926, __pyx_L41_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_9) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr18__pyx_v_v))) __PYX_ERR(0, 921, __pyx_L41_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr19__pyx_v_v))) __PYX_ERR(0, 926, __pyx_L41_error) } } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_v); __pyx_9genexpr18__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_v); __pyx_9genexpr19__pyx_v_v = 0; goto __pyx_L46_exit_scope; __pyx_L41_error:; - __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_v); __pyx_9genexpr18__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_v); __pyx_9genexpr19__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L46_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_others, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "constraint/constraints.py":922 + /* "constraint/constraints.py":927 * for var in unassigned_vars: * others = [v for v in unassigned_vars if v != var] * others_bounds = [(min(domains[v]), max(domains[v])) for v in others] or [(1, 1)] # <<<<<<<<<<<<<< @@ -25344,7 +25705,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * */ { /* enter inner scope */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 922, __pyx_L51_error) + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __pyx_v_others; __Pyx_INCREF(__pyx_t_10); __pyx_t_16 = 0; @@ -25352,20 +25713,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 922, __pyx_L51_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 927, __pyx_L51_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L51_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_13 = __pyx_builtin_min; - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr19__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 922, __pyx_L51_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr20__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_8 = 1; { @@ -25374,13 +25735,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L51_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_14 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_12 = __pyx_builtin_max; - __pyx_t_17 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr19__pyx_v_v); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 922, __pyx_L51_error) + __pyx_t_17 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr20__pyx_v_v); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_8 = 1; { @@ -25389,29 +25750,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 922, __pyx_L51_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_13); } - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 922, __pyx_L51_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 922, __pyx_L51_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 927, __pyx_L51_error); __Pyx_GIVEREF(__pyx_t_13); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 922, __pyx_L51_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 927, __pyx_L51_error); __pyx_t_6 = 0; __pyx_t_13 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 922, __pyx_L51_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 927, __pyx_L51_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_v); __pyx_9genexpr19__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_v); __pyx_9genexpr20__pyx_v_v = 0; goto __pyx_L55_exit_scope; __pyx_L51_error:; - __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_v); __pyx_9genexpr19__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_v); __pyx_9genexpr20__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L55_exit_scope:; } /* exit inner scope */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 922, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 927, __pyx_L1_error) if (!__pyx_t_9) { __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { @@ -25420,11 +25781,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L47_bool_binop_done; } - __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 922, __pyx_L1_error) + __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_mstate_global->__pyx_tuple[0]) != (0)) __PYX_ERR(0, 922, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_mstate_global->__pyx_tuple[0]) != (0)) __PYX_ERR(0, 927, __pyx_L1_error); __Pyx_INCREF(__pyx_t_11); __pyx_t_3 = __pyx_t_11; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -25432,7 +25793,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_others_bounds, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "constraint/constraints.py":923 + /* "constraint/constraints.py":928 * others = [v for v in unassigned_vars if v != var] * others_bounds = [(min(domains[v]), max(domains[v])) for v in others] or [(1, 1)] * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in others_bounds])] # <<<<<<<<<<<<<< @@ -25440,16 +25801,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * domain = domains[var] */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 923, __pyx_L58_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 923, __pyx_L58_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_11); { /* enter inner scope */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 923, __pyx_L63_error) + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_10); if (unlikely(__pyx_v_others_bounds == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 923, __pyx_L63_error) + __PYX_ERR(0, 928, __pyx_L63_error) } __pyx_t_12 = __pyx_v_others_bounds; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; @@ -25457,13 +25818,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 923, __pyx_L63_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 928, __pyx_L63_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_13 = __Pyx_PyList_GetItemRef(__pyx_t_12, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 923, __pyx_L63_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_13); if ((likely(PyTuple_CheckExact(__pyx_t_13))) || (PyList_CheckExact(__pyx_t_13))) { PyObject* sequence = __pyx_t_13; @@ -25471,7 +25832,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 923, __pyx_L63_error) + __PYX_ERR(0, 928, __pyx_L63_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25481,22 +25842,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_17); } else { __pyx_t_6 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L63_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_XGOTREF(__pyx_t_6); __pyx_t_17 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 923, __pyx_L63_error) + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_XGOTREF(__pyx_t_17); } #else - __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 923, __pyx_L63_error) + __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_17 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 923, __pyx_L63_error) + __pyx_t_17 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 923, __pyx_L63_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -25504,7 +25865,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_17 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_17)) goto __pyx_L66_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 923, __pyx_L63_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 928, __pyx_L63_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L67_unpacking_done; @@ -25512,38 +25873,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 923, __pyx_L63_error) + __PYX_ERR(0, 928, __pyx_L63_error) __pyx_L67_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_lo, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_lo, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_hi, __pyx_t_17); + __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_hi, __pyx_t_17); __pyx_t_17 = 0; - __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 923, __pyx_L63_error) + __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_13); - __Pyx_INCREF(__pyx_9genexpr21__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr21__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_9genexpr21__pyx_v_lo) != (0)) __PYX_ERR(0, 923, __pyx_L63_error); - __Pyx_INCREF(__pyx_9genexpr21__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr21__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_9genexpr21__pyx_v_hi) != (0)) __PYX_ERR(0, 923, __pyx_L63_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 923, __pyx_L63_error) + __Pyx_INCREF(__pyx_9genexpr22__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr22__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_9genexpr22__pyx_v_lo) != (0)) __PYX_ERR(0, 928, __pyx_L63_error); + __Pyx_INCREF(__pyx_9genexpr22__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr22__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_9genexpr22__pyx_v_hi) != (0)) __PYX_ERR(0, 928, __pyx_L63_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 928, __pyx_L63_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_hi); __pyx_9genexpr21__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_lo); __pyx_9genexpr21__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_hi); __pyx_9genexpr22__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_lo); __pyx_9genexpr22__pyx_v_lo = 0; goto __pyx_L69_exit_scope; __pyx_L63_error:; - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_hi); __pyx_9genexpr21__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_lo); __pyx_9genexpr21__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_hi); __pyx_9genexpr22__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_lo); __pyx_9genexpr22__pyx_v_lo = 0; goto __pyx_L58_error; __pyx_L69_exit_scope:; } /* exit inner scope */ - __pyx_t_12 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 923, __pyx_L58_error) + __pyx_t_12 = PySequence_Tuple(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 923, __pyx_L58_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -25552,9 +25913,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 923, __pyx_L58_error) + __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L58_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L58_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -25563,7 +25924,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 928, __pyx_L58_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -25573,7 +25934,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 928, __pyx_L58_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -25584,74 +25945,74 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 928, __pyx_L58_error) } else { __pyx_t_10 = __pyx_t_5(__pyx_t_12); if (unlikely(!__pyx_t_10)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 928, __pyx_L58_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_p, __pyx_t_10); + __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_p, __pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_8 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr20__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr21__pyx_v_p}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_GOTREF(__pyx_t_10); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 923, __pyx_L58_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 928, __pyx_L58_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_p); __pyx_9genexpr20__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_p); __pyx_9genexpr21__pyx_v_p = 0; goto __pyx_L71_exit_scope; __pyx_L58_error:; - __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_p); __pyx_9genexpr20__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_p); __pyx_9genexpr21__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L71_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "constraint/constraints.py":925 + /* "constraint/constraints.py":930 * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in others_bounds])] * * domain = domains[var] # <<<<<<<<<<<<<< * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":926 + /* "constraint/constraints.py":931 * * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_12 = __pyx_t_3; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -25660,7 +26021,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 926, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -25670,7 +26031,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 926, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 931, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -25681,13 +26042,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_12); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 926, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 931, __pyx_L1_error) PyErr_Clear(); } break; @@ -25697,7 +26058,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":927 + /* "constraint/constraints.py":932 * domain = domains[var] * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] # <<<<<<<<<<<<<< @@ -25705,7 +26066,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * domain.hideValue(value) */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L76_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L76_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __pyx_v_other_products; __Pyx_INCREF(__pyx_t_10); __pyx_t_18 = 0; @@ -25713,52 +26074,52 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 927, __pyx_L76_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 932, __pyx_L76_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_18); ++__pyx_t_18; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 927, __pyx_L76_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 932, __pyx_L76_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_p, __pyx_t_11); + __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_p, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 927, __pyx_L76_error) + __pyx_t_11 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 932, __pyx_L76_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_13 = PyNumber_Multiply(__pyx_t_11, __pyx_9genexpr22__pyx_v_p); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 927, __pyx_L76_error) + __pyx_t_13 = PyNumber_Multiply(__pyx_t_11, __pyx_9genexpr23__pyx_v_p); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 932, __pyx_L76_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 927, __pyx_L76_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 932, __pyx_L76_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_p); __pyx_9genexpr22__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_p); __pyx_9genexpr23__pyx_v_p = 0; goto __pyx_L80_exit_scope; __pyx_L76_error:; - __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_p); __pyx_9genexpr22__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_p); __pyx_9genexpr23__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L80_exit_scope:; } /* exit inner scope */ __Pyx_DECREF_SET(__pyx_v_candidates, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "constraint/constraints.py":928 + /* "constraint/constraints.py":933 * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_3 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___6genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_3 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___6genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_10 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 933, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_9) { - /* "constraint/constraints.py":929 + /* "constraint/constraints.py":934 * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -25772,12 +26133,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 929, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":928 + /* "constraint/constraints.py":933 * for value in domain[:]: * candidates = [assigned_product * value * p for p in other_products] * if all(c != target_value for c in candidates): # <<<<<<<<<<<<<< @@ -25786,7 +26147,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":926 + /* "constraint/constraints.py":931 * * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -25796,18 +26157,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "constraint/constraints.py":930 + /* "constraint/constraints.py":935 * if all(c != target_value for c in candidates): * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 930, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 935, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_9); if (__pyx_t_2) { - /* "constraint/constraints.py":931 + /* "constraint/constraints.py":936 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -25820,7 +26181,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":930 + /* "constraint/constraints.py":935 * if all(c != target_value for c in candidates): * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -25829,7 +26190,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":920 + /* "constraint/constraints.py":925 * * if forwardcheck: * for var in unassigned_vars: # <<<<<<<<<<<<<< @@ -25839,7 +26200,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":919 + /* "constraint/constraints.py":924 * return False * * if forwardcheck: # <<<<<<<<<<<<<< @@ -25848,7 +26209,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":933 + /* "constraint/constraints.py":938 * return False * * return True # <<<<<<<<<<<<<< @@ -25860,7 +26221,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":890 + /* "constraint/constraints.py":895 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -25893,26 +26254,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF(__pyx_v_other_products); __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_9genexpr13__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_hi); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10); - __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr15__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr16__pyx_v_hi); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator10); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator11); __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_p); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator11); + __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_p); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___8generator12); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":947 +/* "constraint/constraints.py":952 * """ * * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< @@ -25961,39 +26322,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_minprod,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 947, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 952, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 947, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 952, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 947, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 952, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 947, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 952, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 947, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 952, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_minprod = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 947, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 952, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26022,16 +26383,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":953 + /* "constraint/constraints.py":958 * minprod: Value to be considered as the maximum product * """ * self._minprod = minprod # <<<<<<<<<<<<<< * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2, __pyx_v_minprod) < 0) __PYX_ERR(0, 953, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2, __pyx_v_minprod) < 0) __PYX_ERR(0, 958, __pyx_L1_error) - /* "constraint/constraints.py":947 + /* "constraint/constraints.py":952 * """ * * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< @@ -26051,7 +26412,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint___init_ return __pyx_r; } -/* "constraint/constraints.py":955 +/* "constraint/constraints.py":960 * self._minprod = minprod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -26102,50 +26463,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 955, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 960, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 955, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 960, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 955, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 960, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 960, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 960, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 960, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 960, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 955, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 960, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -26155,7 +26516,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 955, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 960, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26166,9 +26527,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 955, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 955, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 955, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 960, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_17MinProdConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -26211,7 +26572,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":956 + /* "constraint/constraints.py":961 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -26219,9 +26580,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro * # prune the associated variables of values > minprod */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 956, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -26241,24 +26602,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":959 + /* "constraint/constraints.py":964 * * # prune the associated variables of values > minprod * minprod = self._minprod # <<<<<<<<<<<<<< * for variable in variables: * domain = domains[variable] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_minprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":960 + /* "constraint/constraints.py":965 * # prune the associated variables of values > minprod * minprod = self._minprod * for variable in variables: # <<<<<<<<<<<<<< @@ -26270,9 +26631,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -26280,7 +26641,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 965, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -26290,7 +26651,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 965, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -26301,13 +26662,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 965, __pyx_L1_error) PyErr_Clear(); } break; @@ -26317,35 +26678,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":961 + /* "constraint/constraints.py":966 * minprod = self._minprod * for variable in variables: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value == 0 and minprod > 0: */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":962 + /* "constraint/constraints.py":967 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value == 0 and minprod > 0: * domain.remove(value) */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 967, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -26354,7 +26715,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 962, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 967, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -26364,7 +26725,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 962, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 967, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -26375,13 +26736,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 962, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 967, __pyx_L1_error) PyErr_Clear(); } break; @@ -26391,27 +26752,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":963 + /* "constraint/constraints.py":968 * domain = domains[variable] * for value in domain[:]: * if value == 0 and minprod > 0: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_11 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 963, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 968, __pyx_L1_error) if (__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_minprod, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 963, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_minprod, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_11; __pyx_L8_bool_binop_done:; if (__pyx_t_10) { - /* "constraint/constraints.py":964 + /* "constraint/constraints.py":969 * for value in domain[:]: * if value == 0 and minprod > 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -26425,12 +26786,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":963 + /* "constraint/constraints.py":968 * domain = domains[variable] * for value in domain[:]: * if value == 0 and minprod > 0: # <<<<<<<<<<<<<< @@ -26439,7 +26800,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro */ } - /* "constraint/constraints.py":962 + /* "constraint/constraints.py":967 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -26449,7 +26810,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":960 + /* "constraint/constraints.py":965 * # prune the associated variables of values > minprod * minprod = self._minprod * for variable in variables: # <<<<<<<<<<<<<< @@ -26459,7 +26820,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":955 + /* "constraint/constraints.py":960 * self._minprod = minprod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -26487,7 +26848,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro return __pyx_r; } -/* "constraint/constraints.py":966 +/* "constraint/constraints.py":971 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -26538,53 +26899,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 966, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 971, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 966, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 971, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 966, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 971, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 971, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 971, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 971, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 971, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 966, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 971, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -26598,7 +26959,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 966, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 971, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26609,8 +26970,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 966, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 966, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 971, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 971, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -26648,7 +27009,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":968 + /* "constraint/constraints.py":973 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * # check if each variable is in the assignments * for variable in variables: # <<<<<<<<<<<<<< @@ -26660,9 +27021,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -26670,7 +27031,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 968, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 973, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -26680,7 +27041,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 968, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 973, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -26691,13 +27052,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 973, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 968, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 973, __pyx_L1_error) PyErr_Clear(); } break; @@ -26707,17 +27068,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":969 + /* "constraint/constraints.py":974 * # check if each variable is in the assignments * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * return True * */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 974, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":970 + /* "constraint/constraints.py":975 * for variable in variables: * if variable not in assignments: * return True # <<<<<<<<<<<<<< @@ -26730,7 +27091,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":969 + /* "constraint/constraints.py":974 * # check if each variable is in the assignments * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -26739,7 +27100,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call */ } - /* "constraint/constraints.py":968 + /* "constraint/constraints.py":973 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * # check if each variable is in the assignments * for variable in variables: # <<<<<<<<<<<<<< @@ -26749,19 +27110,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":973 + /* "constraint/constraints.py":978 * * # with each variable assigned, sum the values * minprod = self._minprod # <<<<<<<<<<<<<< * prod = 1 * for variable in variables: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_minprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":974 + /* "constraint/constraints.py":979 * # with each variable assigned, sum the values * minprod = self._minprod * prod = 1 # <<<<<<<<<<<<<< @@ -26771,7 +27132,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":975 + /* "constraint/constraints.py":980 * minprod = self._minprod * prod = 1 * for variable in variables: # <<<<<<<<<<<<<< @@ -26783,9 +27144,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 975, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -26793,7 +27154,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 980, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -26803,7 +27164,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 980, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -26814,13 +27175,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 980, __pyx_L1_error) PyErr_Clear(); } break; @@ -26830,22 +27191,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":976 + /* "constraint/constraints.py":981 * prod = 1 * for variable in variables: * prod *= assignments[variable] # <<<<<<<<<<<<<< * if isinstance(prod, float): * prod = round(prod, 10) */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":975 + /* "constraint/constraints.py":980 * minprod = self._minprod * prod = 1 * for variable in variables: # <<<<<<<<<<<<<< @@ -26855,7 +27216,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":977 + /* "constraint/constraints.py":982 * for variable in variables: * prod *= assignments[variable] * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -26865,7 +27226,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __pyx_t_5 = PyFloat_Check(__pyx_v_prod); if (__pyx_t_5) { - /* "constraint/constraints.py":978 + /* "constraint/constraints.py":983 * prod *= assignments[variable] * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< @@ -26881,13 +27242,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":977 + /* "constraint/constraints.py":982 * for variable in variables: * prod *= assignments[variable] * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -26896,7 +27257,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call */ } - /* "constraint/constraints.py":979 + /* "constraint/constraints.py":984 * if isinstance(prod, float): * prod = round(prod, 10) * return prod >= minprod # <<<<<<<<<<<<<< @@ -26904,12 +27265,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_minprod, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_minprod, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":966 + /* "constraint/constraints.py":971 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -26933,7 +27294,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call return __pyx_r; } -/* "constraint/constraints.py":993 +/* "constraint/constraints.py":998 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -26982,38 +27343,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_target_var,&__pyx_mstate_global->__pyx_n_u_product_vars,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 993, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 998, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 998, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 998, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 998, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 993, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 998, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 993, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 998, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 998, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 998, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 993, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 998, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -27021,7 +27382,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 993, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 998, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27032,7 +27393,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 993, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 998, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMinProdConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_product_vars); /* function exit code */ @@ -27060,25 +27421,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":994 + /* "constraint/constraints.py":999 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 * self.target_var = target_var # <<<<<<<<<<<<<< * self.product_vars = product_vars * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 994, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 999, __pyx_L1_error) - /* "constraint/constraints.py":995 + /* "constraint/constraints.py":1000 * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 * self.target_var = target_var * self.product_vars = product_vars # <<<<<<<<<<<<<< * * def _get_product_bounds(self, domain_dict, exclude_var=None): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 995, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 1000, __pyx_L1_error) - /* "constraint/constraints.py":993 + /* "constraint/constraints.py":998 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -27098,7 +27459,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":997 +/* "constraint/constraints.py":1002 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -27147,41 +27508,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domain_dict,&__pyx_mstate_global->__pyx_n_u_exclude_var,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 997, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1002, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 997, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 1002, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 997, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 1002, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1002, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 997, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1002, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -27193,7 +27554,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 997, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1002, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27220,10 +27581,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_v_dom = NULL; PyObject *__pyx_v_candidates = NULL; PyObject *__pyx_v_products = NULL; - PyObject *__pyx_9genexpr24__pyx_v_p = NULL; - PyObject *__pyx_9genexpr25__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr25__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr26__pyx_v_p = NULL; + PyObject *__pyx_9genexpr25__pyx_v_p = NULL; + PyObject *__pyx_9genexpr26__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr26__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr27__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -27246,35 +27607,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":998 + /* "constraint/constraints.py":1003 * * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] # <<<<<<<<<<<<<< * for var in self.product_vars: * if var == exclude_var: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":999 + /* "constraint/constraints.py":1004 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< * if var == exclude_var: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1004, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -27283,7 +27644,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1004, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -27293,7 +27654,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1004, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -27304,13 +27665,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1004, __pyx_L1_error) PyErr_Clear(); } break; @@ -27320,19 +27681,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1000 + /* "constraint/constraints.py":1005 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< * continue * dom = domain_dict[var] */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1000, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1001 + /* "constraint/constraints.py":1006 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -27341,7 +27702,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1000 + /* "constraint/constraints.py":1005 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -27350,30 +27711,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1002 + /* "constraint/constraints.py":1007 * if var == exclude_var: * continue * dom = domain_dict[var] # <<<<<<<<<<<<<< * if not dom: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1003 + /* "constraint/constraints.py":1008 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< * continue * bounds.append((min(dom), max(dom))) */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1003, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1008, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":1004 + /* "constraint/constraints.py":1009 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -27382,7 +27743,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1003 + /* "constraint/constraints.py":1008 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -27391,7 +27752,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1005 + /* "constraint/constraints.py":1010 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -27407,7 +27768,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_7 = NULL; @@ -27419,21 +27780,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1005, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1005, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1010, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1005, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1010, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":999 + /* "constraint/constraints.py":1004 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -27444,7 +27805,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1007 + /* "constraint/constraints.py":1012 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -27452,11 +27813,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * */ __pyx_t_6 = (__Pyx_PyList_GET_SIZE(__pyx_v_bounds) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 1007, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 1012, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":1008 + /* "constraint/constraints.py":1013 * * if not bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -27468,7 +27829,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":1007 + /* "constraint/constraints.py":1012 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -27477,7 +27838,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1011 + /* "constraint/constraints.py":1016 * * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -27485,12 +27846,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * return min(products), max(products) */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L11_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1011, __pyx_L11_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); { /* enter inner scope */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1011, __pyx_L16_error) + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -27498,13 +27859,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1011, __pyx_L16_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1016, __pyx_L16_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L16_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { PyObject* sequence = __pyx_t_7; @@ -27512,7 +27873,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1011, __pyx_L16_error) + __PYX_ERR(0, 1016, __pyx_L16_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -27522,22 +27883,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L16_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1011, __pyx_L16_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L16_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1011, __pyx_L16_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1011, __pyx_L16_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -27545,7 +27906,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1011, __pyx_L16_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1016, __pyx_L16_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L20_unpacking_done; @@ -27553,38 +27914,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1011, __pyx_L16_error) + __PYX_ERR(0, 1016, __pyx_L16_error) __pyx_L20_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_lo, __pyx_t_12); + __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_hi, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1011, __pyx_L16_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_9genexpr25__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr25__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr25__pyx_v_lo) != (0)) __PYX_ERR(0, 1011, __pyx_L16_error); - __Pyx_INCREF(__pyx_9genexpr25__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr25__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr25__pyx_v_hi) != (0)) __PYX_ERR(0, 1011, __pyx_L16_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1011, __pyx_L16_error) + __Pyx_INCREF(__pyx_9genexpr26__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr26__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr26__pyx_v_lo) != (0)) __PYX_ERR(0, 1016, __pyx_L16_error); + __Pyx_INCREF(__pyx_9genexpr26__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr26__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr26__pyx_v_hi) != (0)) __PYX_ERR(0, 1016, __pyx_L16_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1016, __pyx_L16_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_hi); __pyx_9genexpr25__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_lo); __pyx_9genexpr25__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_hi); __pyx_9genexpr26__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_lo); __pyx_9genexpr26__pyx_v_lo = 0; goto __pyx_L22_exit_scope; __pyx_L16_error:; - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_hi); __pyx_9genexpr25__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_lo); __pyx_9genexpr25__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_hi); __pyx_9genexpr26__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_lo); __pyx_9genexpr26__pyx_v_lo = 0; goto __pyx_L11_error; __pyx_L22_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L11_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1011, __pyx_L11_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -27593,9 +27954,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L11_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L11_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -27604,7 +27965,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1011, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1016, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -27614,7 +27975,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1011, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1016, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -27625,35 +27986,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1011, __pyx_L11_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L11_error) } else { __pyx_t_8 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1011, __pyx_L11_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1016, __pyx_L11_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_p, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr24__pyx_v_p))) __PYX_ERR(0, 1011, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr25__pyx_v_p))) __PYX_ERR(0, 1016, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_p); __pyx_9genexpr24__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_p); __pyx_9genexpr25__pyx_v_p = 0; goto __pyx_L24_exit_scope; __pyx_L11_error:; - __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_p); __pyx_9genexpr24__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_p); __pyx_9genexpr25__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L24_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1012 + /* "constraint/constraints.py":1017 * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] * products = [self._safe_product(p) for p in candidates] # <<<<<<<<<<<<<< @@ -27661,7 +28022,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L27_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -27669,41 +28030,41 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1012, __pyx_L27_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L27_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1012, __pyx_L27_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1017, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_p, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_9 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr26__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr27__pyx_v_p}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1012, __pyx_L27_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1017, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1012, __pyx_L27_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1017, __pyx_L27_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_p); __pyx_9genexpr26__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_p); __pyx_9genexpr27__pyx_v_p = 0; goto __pyx_L31_exit_scope; __pyx_L27_error:; - __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_p); __pyx_9genexpr26__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_p); __pyx_9genexpr27__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L31_exit_scope:; } /* exit inner scope */ __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1013 + /* "constraint/constraints.py":1018 * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] * products = [self._safe_product(p) for p in candidates] * return min(products), max(products) # <<<<<<<<<<<<<< @@ -27720,7 +28081,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_1 = NULL; @@ -27732,22 +28093,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1013, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1013, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1018, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1013, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1018, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "constraint/constraints.py":997 + /* "constraint/constraints.py":1002 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -27773,16 +28134,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_v_dom); __Pyx_XDECREF(__pyx_v_candidates); __Pyx_XDECREF(__pyx_v_products); - __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr25__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1015 +/* "constraint/constraints.py":1020 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -27830,39 +28191,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_values,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1015, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1020, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1015, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1020, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1015, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1020, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 1015, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 1020, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1015, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1020, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1015, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1020, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1015, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1020, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_values = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1015, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1020, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27897,7 +28258,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":1016 + /* "constraint/constraints.py":1021 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -27907,7 +28268,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":1017 + /* "constraint/constraints.py":1022 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -27919,9 +28280,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -27929,7 +28290,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1022, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -27939,7 +28300,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1017, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1022, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -27950,13 +28311,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1017, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1017, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1022, __pyx_L1_error) PyErr_Clear(); } break; @@ -27966,19 +28327,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1018 + /* "constraint/constraints.py":1023 * prod = 1 * for v in values: * prod *= v # <<<<<<<<<<<<<< * return prod * */ - __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1017 + /* "constraint/constraints.py":1022 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -27988,7 +28349,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1019 + /* "constraint/constraints.py":1024 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -28000,7 +28361,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":1015 + /* "constraint/constraints.py":1020 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -28022,7 +28383,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1021 +/* "constraint/constraints.py":1026 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -28073,50 +28434,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1021, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1026, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1026, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1026, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1026, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1026, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1026, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1021, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1026, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1021, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1026, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1026, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1026, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1026, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1026, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1021, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1026, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -28126,7 +28487,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1021, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1026, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28137,9 +28498,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1021, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1021, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1021, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1026, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_6preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -28187,7 +28548,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1022 + /* "constraint/constraints.py":1027 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -28195,9 +28556,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * t_min = min(target_dom) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -28217,27 +28578,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1023 + /* "constraint/constraints.py":1028 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] # <<<<<<<<<<<<<< * t_min = min(target_dom) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_dom = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1024 + /* "constraint/constraints.py":1029 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] * t_min = min(target_dom) # <<<<<<<<<<<<<< @@ -28253,29 +28614,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_t_min = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1026 + /* "constraint/constraints.py":1031 * t_min = min(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1031, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -28284,7 +28645,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1031, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -28294,7 +28655,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1031, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -28305,13 +28666,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1031, __pyx_L1_error) PyErr_Clear(); } break; @@ -28321,7 +28682,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1027 + /* "constraint/constraints.py":1032 * * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -28333,13 +28694,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_domains}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1027, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -28348,7 +28709,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1027, __pyx_L1_error) + __PYX_ERR(0, 1032, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -28358,22 +28719,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -28381,7 +28742,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1027, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -28389,7 +28750,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1027, __pyx_L1_error) + __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_min_others, __pyx_t_3); @@ -28397,35 +28758,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_max_others, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1028 + /* "constraint/constraints.py":1033 * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] # <<<<<<<<<<<<<< * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1029 + /* "constraint/constraints.py":1034 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_dom, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_dom, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1034, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -28434,7 +28795,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1029, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1034, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -28444,7 +28805,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1029, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1034, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -28455,13 +28816,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1034, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1029, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1034, __pyx_L1_error) PyErr_Clear(); } break; @@ -28471,29 +28832,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1030 + /* "constraint/constraints.py":1035 * dom = domains[var] * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] # <<<<<<<<<<<<<< * if max(possible_prods) < t_min: * dom.remove(val) */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1030, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1035, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1030, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1035, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_possible_prods, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "constraint/constraints.py":1031 + /* "constraint/constraints.py":1036 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: # <<<<<<<<<<<<<< @@ -28509,16 +28870,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_min, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_min, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { - /* "constraint/constraints.py":1032 + /* "constraint/constraints.py":1037 * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: * dom.remove(val) # <<<<<<<<<<<<<< @@ -28532,12 +28893,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_val}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1032, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1031 + /* "constraint/constraints.py":1036 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: # <<<<<<<<<<<<<< @@ -28546,7 +28907,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1029 + /* "constraint/constraints.py":1034 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< @@ -28556,7 +28917,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1026 + /* "constraint/constraints.py":1031 * t_min = min(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -28566,7 +28927,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1021 + /* "constraint/constraints.py":1026 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -28599,7 +28960,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1034 +/* "constraint/constraints.py":1039 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -28650,53 +29011,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1034, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1039, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1034, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1039, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1034, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1039, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1039, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1039, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1039, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1039, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1034, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1039, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -28710,7 +29071,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1034, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1039, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28721,8 +29082,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1034, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1034, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1039, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1039, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_8__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -28741,9 +29102,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1070 +/* "constraint/constraints.py":1075 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< @@ -28752,29 +29113,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_8__call___genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1070, __pyx_L1_error) + __PYX_ERR(0, 1075, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator12, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator13, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -28790,9 +29151,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -28811,29 +29172,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1070, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1070, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1075, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1075, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1070, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1075, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1070, __pyx_L1_error) } - __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_p, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1070, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1075, __pyx_L1_error) } + __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_p, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { @@ -28873,7 +29234,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1034 +/* "constraint/constraints.py":1039 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -28882,7 +29243,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_8__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *__pyx_cur_scope; PyObject *__pyx_v_assigned_prod = NULL; PyObject *__pyx_v_unassigned = NULL; PyObject *__pyx_v_var = NULL; @@ -28895,18 +29256,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_val = NULL; PyObject *__pyx_v_prods = NULL; - PyObject *__pyx_9genexpr27__pyx_v_v = NULL; - PyObject *__pyx_9genexpr28__pyx_v_p = NULL; - PyObject *__pyx_9genexpr29__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr29__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr30__pyx_v_c = NULL; - PyObject *__pyx_9genexpr31__pyx_v_v = NULL; + PyObject *__pyx_9genexpr28__pyx_v_v = NULL; + PyObject *__pyx_9genexpr29__pyx_v_p = NULL; + PyObject *__pyx_9genexpr30__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr30__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr31__pyx_v_c = NULL; PyObject *__pyx_9genexpr32__pyx_v_v = NULL; - PyObject *__pyx_9genexpr33__pyx_v_p = NULL; - PyObject *__pyx_9genexpr34__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr34__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr35__pyx_v_o = NULL; - PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator12 = 0; + PyObject *__pyx_9genexpr33__pyx_v_v = NULL; + PyObject *__pyx_9genexpr34__pyx_v_p = NULL; + PyObject *__pyx_9genexpr35__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr35__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr36__pyx_v_o = NULL; + PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator13 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -28931,29 +29292,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1034, __pyx_L1_error) + __PYX_ERR(0, 1039, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":1035 + /* "constraint/constraints.py":1040 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True # Can't evaluate yet * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":1036 + /* "constraint/constraints.py":1041 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: * return True # Can't evaluate yet # <<<<<<<<<<<<<< @@ -28965,7 +29326,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1035 + /* "constraint/constraints.py":1040 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -28974,23 +29335,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1038 + /* "constraint/constraints.py":1043 * return True # Can't evaluate yet * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * assigned_prod = 1 * unassigned = [] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":1039 + /* "constraint/constraints.py":1044 * * target_value = assignments[self.target_var] * assigned_prod = 1 # <<<<<<<<<<<<<< @@ -29000,35 +29361,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_assigned_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":1040 + /* "constraint/constraints.py":1045 * target_value = assignments[self.target_var] * assigned_prod = 1 * unassigned = [] # <<<<<<<<<<<<<< * * for var in self.product_vars: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1042 + /* "constraint/constraints.py":1047 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< * if var in assignments: * assigned_prod *= assignments[var] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1047, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -29037,7 +29398,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1042, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1047, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -29047,7 +29408,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1042, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1047, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -29058,13 +29419,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1042, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1047, __pyx_L1_error) PyErr_Clear(); } break; @@ -29074,32 +29435,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1043 + /* "constraint/constraints.py":1048 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< * assigned_prod *= assignments[var] * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1048, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":1044 + /* "constraint/constraints.py":1049 * for var in self.product_vars: * if var in assignments: * assigned_prod *= assignments[var] # <<<<<<<<<<<<<< * else: * unassigned.append(var) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_assigned_prod, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1043 + /* "constraint/constraints.py":1048 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -29109,7 +29470,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L6; } - /* "constraint/constraints.py":1046 + /* "constraint/constraints.py":1051 * assigned_prod *= assignments[var] * else: * unassigned.append(var) # <<<<<<<<<<<<<< @@ -29117,11 +29478,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * if not unassigned: */ /*else*/ { - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1051, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":1042 + /* "constraint/constraints.py":1047 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -29131,7 +29492,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1048 + /* "constraint/constraints.py":1053 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -29139,11 +29500,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * */ __pyx_t_2 = (__Pyx_PyList_GET_SIZE(__pyx_v_unassigned) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 1048, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 1053, __pyx_L1_error) __pyx_t_8 = (!__pyx_t_2); if (__pyx_t_8) { - /* "constraint/constraints.py":1049 + /* "constraint/constraints.py":1054 * * if not unassigned: * return assigned_prod >= target_value # <<<<<<<<<<<<<< @@ -29151,12 +29512,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * # Estimate min possible value of full product */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_assigned_prod, __pyx_cur_scope->__pyx_v_target_value, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_assigned_prod, __pyx_cur_scope->__pyx_v_target_value, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1048 + /* "constraint/constraints.py":1053 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -29165,7 +29526,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1052 + /* "constraint/constraints.py":1057 * * # Estimate min possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] # <<<<<<<<<<<<<< @@ -29173,7 +29534,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * possible_prods = [assigned_prod * c for c in candidates] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L11_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; @@ -29181,20 +29542,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1052, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1057, __pyx_L11_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_v, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_10 = __pyx_builtin_min; - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr27__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1052, __pyx_L11_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr28__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 1; { @@ -29203,13 +29564,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_9 = __pyx_builtin_max; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr27__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1052, __pyx_L11_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr28__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = 1; { @@ -29218,32 +29579,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1052, __pyx_L11_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1052, __pyx_L11_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1052, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1057, __pyx_L11_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1052, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1057, __pyx_L11_error); __pyx_t_3 = 0; __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1052, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1057, __pyx_L11_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_v); __pyx_9genexpr27__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_v); __pyx_9genexpr28__pyx_v_v = 0; goto __pyx_L15_exit_scope; __pyx_L11_error:; - __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_v); __pyx_9genexpr27__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_v); __pyx_9genexpr28__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L15_exit_scope:; } /* exit inner scope */ __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1053 + /* "constraint/constraints.py":1058 * # Estimate min possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] # <<<<<<<<<<<<<< @@ -29251,12 +29612,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * if max(possible_prods) < target_value: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L18_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L23_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -29264,13 +29625,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1053, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1058, __pyx_L23_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -29278,7 +29639,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1053, __pyx_L23_error) + __PYX_ERR(0, 1058, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29288,22 +29649,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_11); } else { __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1053, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_13); __pyx_t_11 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1053, __pyx_L23_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_11); } #else - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1053, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1053, __pyx_L23_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1053, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -29311,7 +29672,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_13); index = 1; __pyx_t_11 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_11)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1053, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1058, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -29319,38 +29680,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1053, __pyx_L23_error) + __PYX_ERR(0, 1058, __pyx_L23_error) __pyx_L27_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_lo, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_lo, __pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_hi, __pyx_t_11); + __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_hi, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L23_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_9genexpr29__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr29__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr29__pyx_v_lo) != (0)) __PYX_ERR(0, 1053, __pyx_L23_error); - __Pyx_INCREF(__pyx_9genexpr29__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr29__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr29__pyx_v_hi) != (0)) __PYX_ERR(0, 1053, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1053, __pyx_L23_error) + __Pyx_INCREF(__pyx_9genexpr30__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr30__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr30__pyx_v_lo) != (0)) __PYX_ERR(0, 1058, __pyx_L23_error); + __Pyx_INCREF(__pyx_9genexpr30__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr30__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr30__pyx_v_hi) != (0)) __PYX_ERR(0, 1058, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1058, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_hi); __pyx_9genexpr29__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_lo); __pyx_9genexpr29__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_hi); __pyx_9genexpr30__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_lo); __pyx_9genexpr30__pyx_v_lo = 0; goto __pyx_L29_exit_scope; __pyx_L23_error:; - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_hi); __pyx_9genexpr29__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_lo); __pyx_9genexpr29__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_hi); __pyx_9genexpr30__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_lo); __pyx_9genexpr30__pyx_v_lo = 0; goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L18_error) + __pyx_t_10 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L18_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -29359,9 +29720,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L18_error) + __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L18_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -29370,7 +29731,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1058, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -29380,7 +29741,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1058, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -29391,46 +29752,46 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1058, __pyx_L18_error) } else { __pyx_t_9 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1058, __pyx_L18_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_p, __pyx_t_9); + __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_p, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr28__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr29__pyx_v_p}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1053, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1058, __pyx_L18_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_p); __pyx_9genexpr28__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_p); __pyx_9genexpr29__pyx_v_p = 0; goto __pyx_L31_exit_scope; __pyx_L18_error:; - __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_p); __pyx_9genexpr28__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_p); __pyx_9genexpr29__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L31_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1054 + /* "constraint/constraints.py":1059 * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] # <<<<<<<<<<<<<< @@ -29438,7 +29799,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * return False */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1054, __pyx_L34_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -29446,33 +29807,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1054, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1059, __pyx_L34_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_9 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1054, __pyx_L34_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1059, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_c, __pyx_t_9); + __Pyx_XDECREF_SET(__pyx_9genexpr31__pyx_v_c, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr30__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1054, __pyx_L34_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr31__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1059, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1054, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1059, __pyx_L34_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_c); __pyx_9genexpr30__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_c); __pyx_9genexpr31__pyx_v_c = 0; goto __pyx_L38_exit_scope; __pyx_L34_error:; - __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_c); __pyx_9genexpr30__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_c); __pyx_9genexpr31__pyx_v_c = 0; goto __pyx_L1_error; __pyx_L38_exit_scope:; } /* exit inner scope */ __pyx_v_possible_prods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1055 + /* "constraint/constraints.py":1060 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] * if max(possible_prods) < target_value: # <<<<<<<<<<<<<< @@ -29488,16 +29849,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1056 + /* "constraint/constraints.py":1061 * possible_prods = [assigned_prod * c for c in candidates] * if max(possible_prods) < target_value: * return False # <<<<<<<<<<<<<< @@ -29509,7 +29870,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1055 + /* "constraint/constraints.py":1060 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] * if max(possible_prods) < target_value: # <<<<<<<<<<<<<< @@ -29518,17 +29879,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1058 + /* "constraint/constraints.py":1063 * return False * * if forwardcheck: # <<<<<<<<<<<<<< * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1063, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1059 + /* "constraint/constraints.py":1064 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -29541,18 +29902,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1059, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1064, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_9, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1059, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1060 + /* "constraint/constraints.py":1065 * if forwardcheck: * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] # <<<<<<<<<<<<<< @@ -29560,7 +29921,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L45_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_10); __pyx_t_16 = 0; @@ -29568,35 +29929,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1060, __pyx_L45_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1065, __pyx_L45_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L45_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1065, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr31__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr32__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr31__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L45_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1060, __pyx_L45_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr32__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1065, __pyx_L45_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1065, __pyx_L45_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr31__pyx_v_v))) __PYX_ERR(0, 1060, __pyx_L45_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr32__pyx_v_v))) __PYX_ERR(0, 1065, __pyx_L45_error) } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_v); __pyx_9genexpr31__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_v); __pyx_9genexpr32__pyx_v_v = 0; goto __pyx_L50_exit_scope; __pyx_L45_error:; - __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_v); __pyx_9genexpr31__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_v); __pyx_9genexpr32__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L50_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_other_unassigned, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1061 + /* "constraint/constraints.py":1066 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -29604,10 +29965,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] */ __pyx_t_8 = (__Pyx_PyList_GET_SIZE(__pyx_v_other_unassigned) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_8 < 0))) __PYX_ERR(0, 1061, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_8 < 0))) __PYX_ERR(0, 1066, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1062 + /* "constraint/constraints.py":1067 * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] # <<<<<<<<<<<<<< @@ -29615,7 +29976,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * else: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L54_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_other_unassigned; __Pyx_INCREF(__pyx_t_10); __pyx_t_16 = 0; @@ -29623,20 +29984,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1062, __pyx_L54_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1067, __pyx_L54_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr32__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_11 = __pyx_builtin_min; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr32__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1062, __pyx_L54_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr33__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = 1; { @@ -29645,13 +30006,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_3 = __pyx_builtin_max; - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr32__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1062, __pyx_L54_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr33__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = 1; { @@ -29660,32 +30021,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1062, __pyx_L54_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_11); } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L54_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1062, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1067, __pyx_L54_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1062, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1067, __pyx_L54_error); __pyx_t_6 = 0; __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1062, __pyx_L54_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1067, __pyx_L54_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_v); __pyx_9genexpr32__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_v); __pyx_9genexpr33__pyx_v_v = 0; goto __pyx_L58_exit_scope; __pyx_L54_error:; - __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_v); __pyx_9genexpr32__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_v); __pyx_9genexpr33__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L58_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_bounds, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1063 + /* "constraint/constraints.py":1068 * if other_unassigned: * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -29693,12 +30054,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * other_products = [1] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1063, __pyx_L61_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1063, __pyx_L61_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_10); { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L66_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_11); __pyx_t_16 = 0; @@ -29706,13 +30067,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1063, __pyx_L66_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L66_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_11, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L66_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; @@ -29720,7 +30081,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1063, __pyx_L66_error) + __PYX_ERR(0, 1068, __pyx_L66_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29730,22 +30091,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_14 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1063, __pyx_L66_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1063, __pyx_L66_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1063, __pyx_L66_error) + __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1063, __pyx_L66_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1063, __pyx_L66_error) + __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); @@ -29753,7 +30114,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_14); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_17); if (unlikely(!__pyx_t_13)) goto __pyx_L69_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1063, __pyx_L66_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1068, __pyx_L66_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L70_unpacking_done; @@ -29761,38 +30122,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1063, __pyx_L66_error) + __PYX_ERR(0, 1068, __pyx_L66_error) __pyx_L70_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_lo, __pyx_t_14); + __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_lo, __pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_hi, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1063, __pyx_L66_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_9genexpr34__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr34__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr34__pyx_v_lo) != (0)) __PYX_ERR(0, 1063, __pyx_L66_error); - __Pyx_INCREF(__pyx_9genexpr34__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr34__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr34__pyx_v_hi) != (0)) __PYX_ERR(0, 1063, __pyx_L66_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1063, __pyx_L66_error) + __Pyx_INCREF(__pyx_9genexpr35__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr35__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr35__pyx_v_lo) != (0)) __PYX_ERR(0, 1068, __pyx_L66_error); + __Pyx_INCREF(__pyx_9genexpr35__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr35__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr35__pyx_v_hi) != (0)) __PYX_ERR(0, 1068, __pyx_L66_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1068, __pyx_L66_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_hi); __pyx_9genexpr34__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_lo); __pyx_9genexpr34__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_hi); __pyx_9genexpr35__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_lo); __pyx_9genexpr35__pyx_v_lo = 0; goto __pyx_L72_exit_scope; __pyx_L66_error:; - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_hi); __pyx_9genexpr34__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_lo); __pyx_9genexpr34__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_hi); __pyx_9genexpr35__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_lo); __pyx_9genexpr35__pyx_v_lo = 0; goto __pyx_L61_error; __pyx_L72_exit_scope:; } /* exit inner scope */ - __pyx_t_11 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1063, __pyx_L61_error) + __pyx_t_11 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L61_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -29801,9 +30162,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1063, __pyx_L61_error) + __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L61_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L61_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -29812,7 +30173,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -29822,7 +30183,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -29833,46 +30194,46 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L61_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1068, __pyx_L61_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_p, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_p, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_12 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr33__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr34__pyx_v_p}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_3); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1063, __pyx_L61_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1068, __pyx_L61_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_p); __pyx_9genexpr33__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_p); __pyx_9genexpr34__pyx_v_p = 0; goto __pyx_L74_exit_scope; __pyx_L61_error:; - __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_p); __pyx_9genexpr33__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_p); __pyx_9genexpr34__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L74_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1061 + /* "constraint/constraints.py":1066 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -29882,7 +30243,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L51; } - /* "constraint/constraints.py":1065 + /* "constraint/constraints.py":1070 * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] * else: * other_products = [1] # <<<<<<<<<<<<<< @@ -29890,45 +30251,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * domain = domains[var] */ /*else*/ { - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1065, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1070, __pyx_L1_error); __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L51:; - /* "constraint/constraints.py":1067 + /* "constraint/constraints.py":1072 * other_products = [1] * * domain = domains[var] # <<<<<<<<<<<<<< * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1068 + /* "constraint/constraints.py":1073 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1073, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -29937,7 +30298,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1073, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -29947,7 +30308,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1073, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -29958,13 +30319,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1073, __pyx_L1_error) PyErr_Clear(); } break; @@ -29974,7 +30335,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1069 + /* "constraint/constraints.py":1074 * domain = domains[var] * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] # <<<<<<<<<<<<<< @@ -29982,7 +30343,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint * domain.hideValue(val) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L79_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_other_products; __Pyx_INCREF(__pyx_t_3); __pyx_t_18 = 0; @@ -29990,52 +30351,52 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1069, __pyx_L79_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1074, __pyx_L79_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_10 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_18); ++__pyx_t_18; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L79_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_o, __pyx_t_10); + __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_o, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1069, __pyx_L79_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1074, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_10, __pyx_9genexpr35__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1069, __pyx_L79_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_10, __pyx_9genexpr36__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1074, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1069, __pyx_L79_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1074, __pyx_L79_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_o); __pyx_9genexpr35__pyx_v_o = 0; + __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_o); __pyx_9genexpr36__pyx_v_o = 0; goto __pyx_L83_exit_scope; __pyx_L79_error:; - __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_o); __pyx_9genexpr35__pyx_v_o = 0; + __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_o); __pyx_9genexpr36__pyx_v_o = 0; goto __pyx_L1_error; __pyx_L83_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_prods, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1070 + /* "constraint/constraints.py":1075 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< * domain.hideValue(val) * if not domain: */ - __pyx_t_1 = __pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_prods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_11constraints_25VariableMinProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_prods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1071 + /* "constraint/constraints.py":1076 * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): * domain.hideValue(val) # <<<<<<<<<<<<<< @@ -30049,12 +30410,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_val}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1070 + /* "constraint/constraints.py":1075 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< @@ -30063,7 +30424,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1068 + /* "constraint/constraints.py":1073 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< @@ -30073,18 +30434,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "constraint/constraints.py":1072 + /* "constraint/constraints.py":1077 * if all(p < target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< * return False * */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1077, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_8); if (__pyx_t_2) { - /* "constraint/constraints.py":1073 + /* "constraint/constraints.py":1078 * domain.hideValue(val) * if not domain: * return False # <<<<<<<<<<<<<< @@ -30097,7 +30458,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1072 + /* "constraint/constraints.py":1077 * if all(p < target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< @@ -30106,7 +30467,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1059 + /* "constraint/constraints.py":1064 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -30116,7 +30477,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1058 + /* "constraint/constraints.py":1063 * return False * * if forwardcheck: # <<<<<<<<<<<<<< @@ -30125,7 +30486,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1075 + /* "constraint/constraints.py":1080 * return False * * return True # <<<<<<<<<<<<<< @@ -30137,7 +30498,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1034 + /* "constraint/constraints.py":1039 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -30171,25 +30532,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_prods); - __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_c); - __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr30__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr31__pyx_v_c); __Pyx_XDECREF(__pyx_9genexpr32__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_o); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator12); + __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr34__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_o); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator13); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1089 +/* "constraint/constraints.py":1094 * """ * * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< @@ -30238,39 +30599,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_maxprod,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1089, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1094, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1089, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1094, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1089, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1094, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1089, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1094, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1089, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1094, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1089, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1094, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1089, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1094, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_maxprod = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1089, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1094, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30294,21 +30655,34 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_maxprod) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1095 + /* "constraint/constraints.py":1100 * maxprod: Value to be considered as the maximum product * """ * self._maxprod = maxprod # <<<<<<<<<<<<<< + * self._variable_contains_lt1: list[bool] = list() + * +*/ + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2, __pyx_v_maxprod) < 0) __PYX_ERR(0, 1100, __pyx_L1_error) + + /* "constraint/constraints.py":1101 + * """ + * self._maxprod = maxprod + * self._variable_contains_lt1: list[bool] = list() # <<<<<<<<<<<<<< * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2, __pyx_v_maxprod) < 0) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1089 + /* "constraint/constraints.py":1094 * """ * * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< @@ -30320,6 +30694,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("constraint.constraints.MaxProdConstraint.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -30328,8 +30703,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init_ return __pyx_r; } -/* "constraint/constraints.py":1097 - * self._maxprod = maxprod +/* "constraint/constraints.py":1103 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -30379,50 +30754,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1097, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1103, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1103, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1103, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1103, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1103, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1103, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1097, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1103, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1097, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1103, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1103, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1103, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1103, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1103, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1097, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1103, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -30432,7 +30807,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1097, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1103, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30443,9 +30818,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1097, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1097, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1097, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1103, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -30464,9 +30839,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1104 +/* "constraint/constraints.py":1110 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -30475,18 +30850,18 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr */ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_10preProcess_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1104, __pyx_L1_error) + __PYX_ERR(0, 1110, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -30494,7 +30869,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_10prePr __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator13, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint_preProcess_loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator14, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint_preProcess_loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -30510,9 +30885,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_10prePr return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -30531,16 +30906,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1104, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1104, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1110, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1110, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1110, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -30548,7 +30923,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1104, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -30558,7 +30933,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1104, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -30569,13 +30944,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1104, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1110, __pyx_L1_error) PyErr_Clear(); } break; @@ -30586,8 +30961,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -30626,8 +31001,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr return __pyx_r; } -/* "constraint/constraints.py":1097 - * self._maxprod = maxprod +/* "constraint/constraints.py":1103 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -30641,7 +31016,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro PyObject *__pyx_v_maxprod = NULL; PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_value = NULL; - PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator13 = 0; + PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator14 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -30663,7 +31038,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1098 + /* "constraint/constraints.py":1104 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -30671,9 +31046,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro * # check if there are any values less than 1 in the associated variables */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -30693,24 +31068,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1101 + /* "constraint/constraints.py":1107 * * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() # <<<<<<<<<<<<<< * variable_with_lt1 = None * for variable in variables: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1, __pyx_t_1) < 0) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1102 + /* "constraint/constraints.py":1108 * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None # <<<<<<<<<<<<<< @@ -30720,7 +31095,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_INCREF(Py_None); __pyx_v_variable_with_lt1 = Py_None; - /* "constraint/constraints.py":1103 + /* "constraint/constraints.py":1109 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -30732,9 +31107,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1109, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -30742,7 +31117,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1109, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -30752,7 +31127,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1109, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -30763,13 +31138,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1109, __pyx_L1_error) PyErr_Clear(); } break; @@ -30779,37 +31154,37 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1104 + /* "constraint/constraints.py":1110 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_10preProcess_genexpr(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_10preProcess_genexpr(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1105 + /* "constraint/constraints.py":1111 * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) # <<<<<<<<<<<<<< * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_contains_lt1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1105, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_contains_lt1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1103 + /* "constraint/constraints.py":1109 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -30819,7 +31194,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1106 + /* "constraint/constraints.py":1112 * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< @@ -30829,7 +31204,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_builtin_zip); __pyx_t_2 = __pyx_builtin_zip; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; { @@ -30838,7 +31213,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -30846,9 +31221,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1112, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -30857,7 +31232,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1112, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -30867,7 +31242,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1112, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -30878,13 +31253,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1112, __pyx_L1_error) PyErr_Clear(); } break; @@ -30897,7 +31272,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1106, __pyx_L1_error) + __PYX_ERR(0, 1112, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -30907,22 +31282,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -30930,7 +31305,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1112, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -30938,7 +31313,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1106, __pyx_L1_error) + __PYX_ERR(0, 1112, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_3); @@ -30946,7 +31321,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1107 + /* "constraint/constraints.py":1113 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -30956,7 +31331,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_11 = (__pyx_v_contains_lt1 == Py_True); if (__pyx_t_11) { - /* "constraint/constraints.py":1108 + /* "constraint/constraints.py":1114 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -30966,7 +31341,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_11 = (__pyx_v_variable_with_lt1 != Py_None); if (__pyx_t_11) { - /* "constraint/constraints.py":1110 + /* "constraint/constraints.py":1116 * if variable_with_lt1 is not None: * # if more than one associated variables contain less than 1, we can't prune * return # <<<<<<<<<<<<<< @@ -30978,7 +31353,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1108 + /* "constraint/constraints.py":1114 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -30987,7 +31362,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1111 + /* "constraint/constraints.py":1117 * # if more than one associated variables contain less than 1, we can't prune * return * variable_with_lt1 = variable # <<<<<<<<<<<<<< @@ -30997,7 +31372,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_INCREF(__pyx_v_variable); __Pyx_DECREF_SET(__pyx_v_variable_with_lt1, __pyx_v_variable); - /* "constraint/constraints.py":1107 + /* "constraint/constraints.py":1113 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -31006,7 +31381,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1106 + /* "constraint/constraints.py":1112 * contains_lt1 = any(value < 1 for value in domains[variable]) * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< @@ -31016,19 +31391,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1114 + /* "constraint/constraints.py":1120 * * # prune the associated variables of values > maxprod * maxprod = self._maxprod # <<<<<<<<<<<<<< * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_maxprod = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/constraints.py":1115 + /* "constraint/constraints.py":1121 * # prune the associated variables of values > maxprod * maxprod = self._maxprod * for variable in variables: # <<<<<<<<<<<<<< @@ -31040,9 +31415,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1115, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1121, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -31050,7 +31425,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1115, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1121, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -31060,7 +31435,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1115, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1121, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -31071,13 +31446,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1115, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1121, __pyx_L1_error) PyErr_Clear(); } break; @@ -31087,7 +31462,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1116 + /* "constraint/constraints.py":1122 * maxprod = self._maxprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -31100,14 +31475,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_11 = __pyx_t_12; goto __pyx_L16_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable_with_lt1, __pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_variable_with_lt1, __pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_12; __pyx_L16_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":1117 + /* "constraint/constraints.py":1123 * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue # <<<<<<<<<<<<<< @@ -31116,7 +31491,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ goto __pyx_L13_continue; - /* "constraint/constraints.py":1116 + /* "constraint/constraints.py":1122 * maxprod = self._maxprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -31125,35 +31500,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1118 + /* "constraint/constraints.py":1124 * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value > maxprod: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1119 + /* "constraint/constraints.py":1125 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value > maxprod: * domain.remove(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1125, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -31162,7 +31537,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1119, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1125, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -31172,7 +31547,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1119, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1125, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -31183,13 +31558,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_13; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1119, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1125, __pyx_L1_error) PyErr_Clear(); } break; @@ -31199,19 +31574,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1120 + /* "constraint/constraints.py":1126 * domain = domains[variable] * for value in domain[:]: * if value > maxprod: # <<<<<<<<<<<<<< * domain.remove(value) * elif value == 0 and maxprod < 0: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1120, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":1121 + /* "constraint/constraints.py":1127 * for value in domain[:]: * if value > maxprod: * domain.remove(value) # <<<<<<<<<<<<<< @@ -31225,12 +31600,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1120 + /* "constraint/constraints.py":1126 * domain = domains[variable] * for value in domain[:]: * if value > maxprod: # <<<<<<<<<<<<<< @@ -31240,27 +31615,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro goto __pyx_L20; } - /* "constraint/constraints.py":1122 + /* "constraint/constraints.py":1128 * if value > maxprod: * domain.remove(value) * elif value == 0 and maxprod < 0: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_12 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_value, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1128, __pyx_L1_error) if (__pyx_t_12) { } else { __pyx_t_11 = __pyx_t_12; goto __pyx_L21_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_v_maxprod, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_maxprod, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_12; __pyx_L21_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":1123 + /* "constraint/constraints.py":1129 * domain.remove(value) * elif value == 0 and maxprod < 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -31274,12 +31649,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1122 + /* "constraint/constraints.py":1128 * if value > maxprod: * domain.remove(value) * elif value == 0 and maxprod < 0: # <<<<<<<<<<<<<< @@ -31289,7 +31664,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __pyx_L20:; - /* "constraint/constraints.py":1119 + /* "constraint/constraints.py":1125 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -31299,7 +31674,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1115 + /* "constraint/constraints.py":1121 * # prune the associated variables of values > maxprod * maxprod = self._maxprod * for variable in variables: # <<<<<<<<<<<<<< @@ -31310,8 +31685,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1097 - * self._maxprod = maxprod + /* "constraint/constraints.py":1103 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -31336,13 +31711,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF(__pyx_v_maxprod); __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator13); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator14); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1125 +/* "constraint/constraints.py":1131 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -31393,53 +31768,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1125, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1131, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1125, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1131, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1125, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1131, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1131, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1131, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1131, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1131, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1125, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1131, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -31453,7 +31828,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1125, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1131, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31464,8 +31839,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1125, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1125, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1131, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1131, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -31484,6 +31859,175 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } +static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "constraint/constraints.py":1139 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ + +static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 1139, __pyx_L1_error) + } else { + __Pyx_GOTREF((PyObject *)__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; + __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator15, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint___call___local, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("constraint.constraints.MaxProdConstraint.__call__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_DECREF((PyObject *)__pyx_cur_scope); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + default: /* CPython raises the right error here */ + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1139, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1139, __pyx_L1_error) } + if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { + __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_3 = NULL; + } else { + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_3)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1139, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); + ++__pyx_t_2; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1139, __pyx_L1_error) + #endif + if (__pyx_t_2 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); + #else + __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); + #endif + ++__pyx_t_2; + } + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) + } else { + __pyx_t_4 = __pyx_t_3(__pyx_t_1); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1139, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_4); + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_value, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_5) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + goto __pyx_L0; + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + if (__Pyx_PyErr_Occurred()) { + __Pyx_Generator_Replace_StopIteration(0); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "constraint/constraints.py":1131 + * domain.remove(value) + * + * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< + * maxprod = self._maxprod + * prod = 1 +*/ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck) { PyObject *__pyx_v_maxprod = NULL; @@ -31494,40 +32038,41 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call PyObject *__pyx_v_contains_lt1 = NULL; PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_value = NULL; + PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator15 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - size_t __pyx_t_5; - Py_ssize_t __pyx_t_6; - PyObject *(*__pyx_t_7)(PyObject *); + Py_ssize_t __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *(*__pyx_t_9)(PyObject *); - int __pyx_t_10; - int __pyx_t_11; - int __pyx_t_12; - Py_ssize_t __pyx_t_13; + int __pyx_t_9; + size_t __pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *(*__pyx_t_12)(PyObject *); + int __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1126 + /* "constraint/constraints.py":1132 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * maxprod = self._maxprod # <<<<<<<<<<<<<< * prod = 1 * missing = False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_maxprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1127 + /* "constraint/constraints.py":1133 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * maxprod = self._maxprod * prod = 1 # <<<<<<<<<<<<<< @@ -31537,93 +32082,207 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":1128 + /* "constraint/constraints.py":1134 * maxprod = self._maxprod * prod = 1 * missing = False # <<<<<<<<<<<<<< * missing_lt1 = [] - * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * # find out which variables contain values less than 1 if not preprocessed */ __pyx_v_missing = 0; - /* "constraint/constraints.py":1129 + /* "constraint/constraints.py":1135 * prod = 1 * missing = False * missing_lt1 = [] # <<<<<<<<<<<<<< - * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): - * if variable in assignments: + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_missing_lt1 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1130 - * missing = False + /* "constraint/constraints.py":1137 + * missing_lt1 = [] + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) +*/ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1137, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_4 = (__pyx_t_2 != __pyx_t_3); + if (__pyx_t_4) { + + /* "constraint/constraints.py":1138 + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: # <<<<<<<<<<<<<< + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): +*/ + if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { + __pyx_t_1 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; + } else { + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + { + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1138, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); + ++__pyx_t_3; + } else { + { + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); + #if !CYTHON_ASSUME_SAFE_SIZE + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1138, __pyx_L1_error) + #endif + if (__pyx_t_3 >= __pyx_temp) break; + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); + #else + __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); + #endif + ++__pyx_t_3; + } + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1138, __pyx_L1_error) + } else { + __pyx_t_6 = __pyx_t_5(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1138, __pyx_L1_error) + PyErr_Clear(); + } + break; + } + } + __Pyx_GOTREF(__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_6); + __pyx_t_6 = 0; + + /* "constraint/constraints.py":1139 + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) # <<<<<<<<<<<<<< + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): + * if variable in assignments: +*/ + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call___genexpr(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + + /* "constraint/constraints.py":1138 + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): + * for variable in variables: # <<<<<<<<<<<<<< + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) + * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): +*/ + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "constraint/constraints.py":1137 * missing_lt1 = [] + * # find out which variables contain values less than 1 if not preprocessed + * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) +*/ + } + + /* "constraint/constraints.py":1140 + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< * if variable in assignments: * prod *= assignments[variable] */ - __pyx_t_2 = NULL; + __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_builtin_zip); - __pyx_t_3 = __pyx_builtin_zip; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = 1; + __pyx_t_6 = __pyx_builtin_zip; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_variables, __pyx_t_8}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = 0; - __pyx_t_7 = NULL; + __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1140, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_6); - ++__pyx_t_6; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_3); + ++__pyx_t_3; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1140, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3); #endif - ++__pyx_t_6; + ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_3); + __pyx_t_1 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1140, __pyx_L1_error) PyErr_Clear(); } break; @@ -31636,91 +32295,91 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1130, __pyx_L1_error) + __PYX_ERR(0, 1140, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); - __Pyx_INCREF(__pyx_t_4); - __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_2); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); + __Pyx_INCREF(__pyx_t_8); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __Pyx_INCREF(__pyx_t_7); } else { - __pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_XGOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_XGOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 0); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyList_GetItemRef(sequence, 1); + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_XGOTREF(__pyx_t_7); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1130, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1140, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); - index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_4); - index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1130, __pyx_L1_error) - __pyx_t_9 = NULL; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L6_unpacking_done; - __pyx_L5_unpacking_failed:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); + index = 0; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_8); + index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_t_12 = NULL; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + goto __pyx_L10_unpacking_done; + __pyx_L9_unpacking_failed:; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1130, __pyx_L1_error) - __pyx_L6_unpacking_done:; + __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_L10_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_8); + __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_7); + __pyx_t_7 = 0; - /* "constraint/constraints.py":1131 - * missing_lt1 = [] + /* "constraint/constraints.py":1141 + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: # <<<<<<<<<<<<<< * prod *= assignments[variable] * else: */ - __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1131, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1141, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":1132 + /* "constraint/constraints.py":1142 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: * prod *= assignments[variable] # <<<<<<<<<<<<<< * else: * missing = True */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1142, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_7); + __pyx_t_7 = 0; - /* "constraint/constraints.py":1131 - * missing_lt1 = [] + /* "constraint/constraints.py":1141 + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if variable in assignments: # <<<<<<<<<<<<<< * prod *= assignments[variable] * else: */ - goto __pyx_L7; + goto __pyx_L11; } - /* "constraint/constraints.py":1134 + /* "constraint/constraints.py":1144 * prod *= assignments[variable] * else: * missing = True # <<<<<<<<<<<<<< @@ -31730,26 +32389,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call /*else*/ { __pyx_v_missing = 1; - /* "constraint/constraints.py":1135 + /* "constraint/constraints.py":1145 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< * missing_lt1.append(variable) * if isinstance(prod, float): */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1135, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1145, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":1136 + /* "constraint/constraints.py":1146 * missing = True * if contains_lt1: * missing_lt1.append(variable) # <<<<<<<<<<<<<< * if isinstance(prod, float): * prod = round(prod, 10) */ - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1146, __pyx_L1_error) - /* "constraint/constraints.py":1135 + /* "constraint/constraints.py":1145 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< @@ -31758,51 +32417,51 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } } - __pyx_L7:; + __pyx_L11:; - /* "constraint/constraints.py":1130 - * missing = False - * missing_lt1 = [] + /* "constraint/constraints.py":1140 + * for variable in variables: + * self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): # <<<<<<<<<<<<<< * if variable in assignments: * prod *= assignments[variable] */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1137 + /* "constraint/constraints.py":1147 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: */ - __pyx_t_10 = PyFloat_Check(__pyx_v_prod); - if (__pyx_t_10) { + __pyx_t_4 = PyFloat_Check(__pyx_v_prod); + if (__pyx_t_4) { - /* "constraint/constraints.py":1138 + /* "constraint/constraints.py":1148 * missing_lt1.append(variable) * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False */ - __pyx_t_2 = NULL; + __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_builtin_round); __pyx_t_1 = __pyx_builtin_round; - __pyx_t_5 = 1; + __pyx_t_10 = 1; { - PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; + __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); } - __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_3); - __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_6); + __pyx_t_6 = 0; - /* "constraint/constraints.py":1137 + /* "constraint/constraints.py":1147 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -31811,34 +32470,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1139 + /* "constraint/constraints.py":1149 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: # <<<<<<<<<<<<<< * return False * if forwardcheck: */ - __pyx_t_12 = (!__pyx_v_missing); - if (!__pyx_t_12) { + __pyx_t_13 = (!__pyx_v_missing); + if (!__pyx_t_13) { } else { - goto __pyx_L13_next_and; + goto __pyx_L17_next_and; } - __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1139, __pyx_L1_error) - __pyx_t_12 = (__pyx_t_6 == 0); - if (__pyx_t_12) { + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_3 == 0); + if (__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L12_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L16_bool_binop_done; } - __pyx_L13_next_and:; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1139, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __pyx_t_12; - __pyx_L12_bool_binop_done:; - if (__pyx_t_10) { + __pyx_L17_next_and:; + __pyx_t_6 = PyObject_RichCompare(__pyx_v_prod, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = __pyx_t_13; + __pyx_L16_bool_binop_done:; + if (__pyx_t_4) { - /* "constraint/constraints.py":1140 + /* "constraint/constraints.py":1150 * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False # <<<<<<<<<<<<<< @@ -31850,7 +32509,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1139 + /* "constraint/constraints.py":1149 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: # <<<<<<<<<<<<<< @@ -31859,17 +32518,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1141 + /* "constraint/constraints.py":1151 * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False * if forwardcheck: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1141, __pyx_L1_error) - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1151, __pyx_L1_error) + if (__pyx_t_4) { - /* "constraint/constraints.py":1142 + /* "constraint/constraints.py":1152 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -31877,48 +32536,48 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call * domain = domains[variable] */ if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { - __pyx_t_3 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = 0; - __pyx_t_7 = NULL; + __pyx_t_6 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_6); + __pyx_t_3 = 0; + __pyx_t_5 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L1_error) } for (;;) { - if (likely(!__pyx_t_7)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { + if (likely(!__pyx_t_5)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1152, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_6); - ++__pyx_t_6; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_3); + ++__pyx_t_3; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1152, __pyx_L1_error) #endif - if (__pyx_t_6 >= __pyx_temp) break; + if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_3); #endif - ++__pyx_t_6; + ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_7(__pyx_t_3); + __pyx_t_1 = __pyx_t_5(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1152, __pyx_L1_error) PyErr_Clear(); } break; @@ -31928,96 +32587,96 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1143 + /* "constraint/constraints.py":1153 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1143, __pyx_L1_error) - if (__pyx_t_12) { + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1153, __pyx_L1_error) + if (__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L19_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L23_bool_binop_done; } - __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1143, __pyx_L1_error) - if (!__pyx_t_12) { + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1153, __pyx_L1_error) + if (!__pyx_t_13) { } else { - __pyx_t_10 = __pyx_t_12; - goto __pyx_L19_bool_binop_done; + __pyx_t_4 = __pyx_t_13; + goto __pyx_L23_bool_binop_done; } - __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1143, __pyx_L1_error) - __pyx_t_12 = (__pyx_t_13 == 1); - __pyx_t_10 = __pyx_t_12; - __pyx_L19_bool_binop_done:; - if (__pyx_t_10) { + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_13 = (__pyx_t_2 == 1); + __pyx_t_4 = __pyx_t_13; + __pyx_L23_bool_binop_done:; + if (__pyx_t_4) { - /* "constraint/constraints.py":1144 + /* "constraint/constraints.py":1154 * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if prod * value > maxprod: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1145 + /* "constraint/constraints.py":1155 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if prod * value > maxprod: * domain.hideValue(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); - __pyx_t_13 = 0; + __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); + __pyx_t_2 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1155, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { + if (likely(PyList_CheckExact(__pyx_t_7))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1155, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_2 >= __pyx_temp) break; } - __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_13); - ++__pyx_t_13; + __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_2); + ++__pyx_t_2; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1155, __pyx_L1_error) #endif - if (__pyx_t_13 >= __pyx_temp) break; + if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_13)); + __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_2)); #else - __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_13); + __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_2); #endif - ++__pyx_t_13; + ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) } else { - __pyx_t_1 = __pyx_t_14(__pyx_t_2); + __pyx_t_1 = __pyx_t_14(__pyx_t_7); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1155, __pyx_L1_error) PyErr_Clear(); } break; @@ -32027,22 +32686,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1146 + /* "constraint/constraints.py":1156 * domain = domains[variable] * for value in domain[:]: * if prod * value > maxprod: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1146, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_10) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1156, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__pyx_t_4) { - /* "constraint/constraints.py":1147 + /* "constraint/constraints.py":1157 * for value in domain[:]: * if prod * value > maxprod: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -32051,17 +32710,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ __pyx_t_1 = __pyx_v_domain; __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = 0; + __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; - __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1147, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1146 + /* "constraint/constraints.py":1156 * domain = domains[variable] * for value in domain[:]: * if prod * value > maxprod: # <<<<<<<<<<<<<< @@ -32070,7 +32729,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1145 + /* "constraint/constraints.py":1155 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -32078,20 +32737,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call * domain.hideValue(value) */ } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1148 + /* "constraint/constraints.py":1158 * if prod * value > maxprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1148, __pyx_L1_error) - __pyx_t_12 = (!__pyx_t_10); - if (__pyx_t_12) { + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_13 = (!__pyx_t_4); + if (__pyx_t_13) { - /* "constraint/constraints.py":1149 + /* "constraint/constraints.py":1159 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -32101,10 +32760,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1148 + /* "constraint/constraints.py":1158 * if prod * value > maxprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -32113,7 +32772,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1143 + /* "constraint/constraints.py":1153 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< @@ -32122,7 +32781,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1142 + /* "constraint/constraints.py":1152 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -32130,9 +32789,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call * domain = domains[variable] */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1141 + /* "constraint/constraints.py":1151 * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False * if forwardcheck: # <<<<<<<<<<<<<< @@ -32141,7 +32800,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1150 + /* "constraint/constraints.py":1160 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -32153,7 +32812,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1125 + /* "constraint/constraints.py":1131 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -32164,10 +32823,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("constraint.constraints.MaxProdConstraint.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -32178,12 +32837,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF(__pyx_v_contains_lt1); __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_value); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator15); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1164 +/* "constraint/constraints.py":1174 * """ # noqa: E501 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -32232,38 +32892,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_target_var,&__pyx_mstate_global->__pyx_n_u_product_vars,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1164, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1174, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1174, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1174, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1174, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1164, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1174, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1164, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1174, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1174, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1174, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1164, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1174, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -32271,7 +32931,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1164, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1174, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32282,7 +32942,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 1164, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 1174, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_product_vars); /* function exit code */ @@ -32310,25 +32970,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1165 + /* "constraint/constraints.py":1175 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 * self.target_var = target_var # <<<<<<<<<<<<<< * self.product_vars = product_vars * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 1165, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < 0) __PYX_ERR(0, 1175, __pyx_L1_error) - /* "constraint/constraints.py":1166 + /* "constraint/constraints.py":1176 * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 * self.target_var = target_var * self.product_vars = product_vars # <<<<<<<<<<<<<< * * def _get_product_bounds(self, domain_dict, exclude_var=None): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 1166, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_v_product_vars) < 0) __PYX_ERR(0, 1176, __pyx_L1_error) - /* "constraint/constraints.py":1164 + /* "constraint/constraints.py":1174 * """ # noqa: E501 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -32348,7 +33008,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1168 +/* "constraint/constraints.py":1178 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -32397,41 +33057,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domain_dict,&__pyx_mstate_global->__pyx_n_u_exclude_var,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1168, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1178, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1178, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1178, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1178, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 1168, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_product_bounds", 0) < 0) __PYX_ERR(0, 1178, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 1168, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 1178, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1178, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1178, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1168, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1178, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -32443,7 +33103,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1168, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1178, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32470,10 +33130,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_v_dom = NULL; PyObject *__pyx_v_candidates = NULL; PyObject *__pyx_v_products = NULL; - PyObject *__pyx_9genexpr38__pyx_v_p = NULL; - PyObject *__pyx_9genexpr39__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr39__pyx_v_hi = NULL; PyObject *__pyx_9genexpr40__pyx_v_p = NULL; + PyObject *__pyx_9genexpr41__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr41__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr42__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -32496,35 +33156,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":1169 + /* "constraint/constraints.py":1179 * * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] # <<<<<<<<<<<<<< * for var in self.product_vars: * if var == exclude_var: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1170 + /* "constraint/constraints.py":1180 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< * if var == exclude_var: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -32533,7 +33193,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1180, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -32543,7 +33203,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1180, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -32554,13 +33214,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1180, __pyx_L1_error) PyErr_Clear(); } break; @@ -32570,19 +33230,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1171 + /* "constraint/constraints.py":1181 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< * continue * dom = domain_dict[var] */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1171, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_var, __pyx_v_exclude_var, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1172 + /* "constraint/constraints.py":1182 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -32591,7 +33251,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1171 + /* "constraint/constraints.py":1181 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -32600,30 +33260,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1173 + /* "constraint/constraints.py":1183 * if var == exclude_var: * continue * dom = domain_dict[var] # <<<<<<<<<<<<<< * if not dom: * continue */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1174 + /* "constraint/constraints.py":1184 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< * continue * bounds.append((min(dom), max(dom))) */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1184, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":1175 + /* "constraint/constraints.py":1185 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -32632,7 +33292,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1174 + /* "constraint/constraints.py":1184 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -32641,7 +33301,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1176 + /* "constraint/constraints.py":1186 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -32657,7 +33317,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_7 = NULL; @@ -32669,21 +33329,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1176, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1176, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1186, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1176, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1186, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":1170 + /* "constraint/constraints.py":1180 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -32694,7 +33354,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1178 + /* "constraint/constraints.py":1188 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -32702,11 +33362,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * */ __pyx_t_6 = (__Pyx_PyList_GET_SIZE(__pyx_v_bounds) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":1179 + /* "constraint/constraints.py":1189 * * if not bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -32718,7 +33378,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":1178 + /* "constraint/constraints.py":1188 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -32727,7 +33387,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1182 + /* "constraint/constraints.py":1192 * * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -32735,12 +33395,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * return min(products), max(products) */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L11_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1182, __pyx_L11_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1192, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); { /* enter inner scope */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L16_error) + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -32748,13 +33408,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1182, __pyx_L16_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1192, __pyx_L16_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1182, __pyx_L16_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { PyObject* sequence = __pyx_t_7; @@ -32762,7 +33422,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1182, __pyx_L16_error) + __PYX_ERR(0, 1192, __pyx_L16_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -32772,22 +33432,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1182, __pyx_L16_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1182, __pyx_L16_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1182, __pyx_L16_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1182, __pyx_L16_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1182, __pyx_L16_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -32795,7 +33455,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1182, __pyx_L16_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1192, __pyx_L16_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L20_unpacking_done; @@ -32803,38 +33463,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1182, __pyx_L16_error) + __PYX_ERR(0, 1192, __pyx_L16_error) __pyx_L20_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr39__pyx_v_lo, __pyx_t_12); + __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr39__pyx_v_hi, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1182, __pyx_L16_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_9genexpr39__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr39__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr39__pyx_v_lo) != (0)) __PYX_ERR(0, 1182, __pyx_L16_error); - __Pyx_INCREF(__pyx_9genexpr39__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr39__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr39__pyx_v_hi) != (0)) __PYX_ERR(0, 1182, __pyx_L16_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1182, __pyx_L16_error) + __Pyx_INCREF(__pyx_9genexpr41__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr41__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr41__pyx_v_lo) != (0)) __PYX_ERR(0, 1192, __pyx_L16_error); + __Pyx_INCREF(__pyx_9genexpr41__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr41__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_9genexpr41__pyx_v_hi) != (0)) __PYX_ERR(0, 1192, __pyx_L16_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1192, __pyx_L16_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_hi); __pyx_9genexpr39__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_lo); __pyx_9genexpr39__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_hi); __pyx_9genexpr41__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_lo); __pyx_9genexpr41__pyx_v_lo = 0; goto __pyx_L22_exit_scope; __pyx_L16_error:; - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_hi); __pyx_9genexpr39__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_lo); __pyx_9genexpr39__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_hi); __pyx_9genexpr41__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_lo); __pyx_9genexpr41__pyx_v_lo = 0; goto __pyx_L11_error; __pyx_L22_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L11_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L11_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1192, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -32843,9 +33503,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L11_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L11_error) + __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -32854,7 +33514,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1182, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1192, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -32864,7 +33524,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1182, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1192, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -32875,35 +33535,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L11_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1192, __pyx_L11_error) } else { __pyx_t_8 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1182, __pyx_L11_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1192, __pyx_L11_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr38__pyx_v_p, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr38__pyx_v_p))) __PYX_ERR(0, 1182, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr40__pyx_v_p))) __PYX_ERR(0, 1192, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_p); __pyx_9genexpr38__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_p); __pyx_9genexpr40__pyx_v_p = 0; goto __pyx_L24_exit_scope; __pyx_L11_error:; - __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_p); __pyx_9genexpr38__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_p); __pyx_9genexpr40__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L24_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1183 + /* "constraint/constraints.py":1193 * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] * products = [self._safe_product(p) for p in candidates] # <<<<<<<<<<<<<< @@ -32911,7 +33571,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L27_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1193, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -32919,41 +33579,41 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1183, __pyx_L27_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1193, __pyx_L27_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_3); ++__pyx_t_3; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L27_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1193, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_p, __pyx_t_8); + __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_p, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_9 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr40__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr42__pyx_v_p}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1183, __pyx_L27_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1193, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_8); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1183, __pyx_L27_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1193, __pyx_L27_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_p); __pyx_9genexpr40__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); __pyx_9genexpr42__pyx_v_p = 0; goto __pyx_L31_exit_scope; __pyx_L27_error:; - __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_p); __pyx_9genexpr40__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); __pyx_9genexpr42__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L31_exit_scope:; } /* exit inner scope */ __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1184 + /* "constraint/constraints.py":1194 * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] * products = [self._safe_product(p) for p in candidates] * return min(products), max(products) # <<<<<<<<<<<<<< @@ -32970,7 +33630,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_1 = NULL; @@ -32982,22 +33642,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1184, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1194, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1184, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 1194, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_8 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1168 + /* "constraint/constraints.py":1178 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -33023,16 +33683,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_v_dom); __Pyx_XDECREF(__pyx_v_candidates); __Pyx_XDECREF(__pyx_v_products); - __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_hi); __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1186 +/* "constraint/constraints.py":1196 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -33080,39 +33740,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_values,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1186, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1196, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1186, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1196, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1186, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1196, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 1186, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_safe_product", 0) < 0) __PYX_ERR(0, 1196, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1186, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1196, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1186, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1196, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1186, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1196, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_values = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1186, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1196, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33147,7 +33807,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":1187 + /* "constraint/constraints.py":1197 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -33157,7 +33817,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":1188 + /* "constraint/constraints.py":1198 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -33169,9 +33829,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -33179,7 +33839,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1198, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -33189,7 +33849,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1188, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1198, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -33200,13 +33860,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1188, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1198, __pyx_L1_error) PyErr_Clear(); } break; @@ -33216,19 +33876,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1189 + /* "constraint/constraints.py":1199 * prod = 1 * for v in values: * prod *= v # <<<<<<<<<<<<<< * return prod * */ - __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1188 + /* "constraint/constraints.py":1198 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -33238,7 +33898,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1190 + /* "constraint/constraints.py":1200 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -33250,7 +33910,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":1186 + /* "constraint/constraints.py":1196 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -33272,7 +33932,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1192 +/* "constraint/constraints.py":1202 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -33323,50 +33983,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1192, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1202, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1202, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1202, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1202, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1202, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1202, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1192, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1202, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1192, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1202, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1202, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1202, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1202, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1202, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1192, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1202, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -33376,7 +34036,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1192, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1202, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33387,9 +34047,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1192, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1192, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1192, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1202, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1202, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1202, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_6preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -33437,7 +34097,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1193 + /* "constraint/constraints.py":1203 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -33445,9 +34105,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * t_max = max(target_dom) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -33467,27 +34127,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1193, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1194 + /* "constraint/constraints.py":1204 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] # <<<<<<<<<<<<<< * t_max = max(target_dom) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_dom = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1195 + /* "constraint/constraints.py":1205 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] * t_max = max(target_dom) # <<<<<<<<<<<<<< @@ -33503,29 +34163,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_t_max = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1197 + /* "constraint/constraints.py":1207 * t_max = max(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_2 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1207, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -33534,7 +34194,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1207, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -33544,7 +34204,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1207, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -33555,13 +34215,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1207, __pyx_L1_error) PyErr_Clear(); } break; @@ -33571,7 +34231,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1198 + /* "constraint/constraints.py":1208 * * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -33583,13 +34243,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_domains}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1198, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exclude_var, __pyx_v_var, __pyx_t_3, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1208, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -33598,7 +34258,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1198, __pyx_L1_error) + __PYX_ERR(0, 1208, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33608,22 +34268,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -33631,7 +34291,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1198, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1208, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -33639,7 +34299,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1198, __pyx_L1_error) + __PYX_ERR(0, 1208, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_min_others, __pyx_t_3); @@ -33647,35 +34307,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_max_others, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1199 + /* "constraint/constraints.py":1209 * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] # <<<<<<<<<<<<<< * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1200 + /* "constraint/constraints.py":1210 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_dom, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_dom, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1210, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -33684,7 +34344,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1200, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1210, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -33694,7 +34354,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1200, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1210, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -33705,13 +34365,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1200, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1210, __pyx_L1_error) PyErr_Clear(); } break; @@ -33721,29 +34381,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1201 + /* "constraint/constraints.py":1211 * dom = domains[var] * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] # <<<<<<<<<<<<<< * if min(possible_prods) > t_max: * dom.remove(val) */ - __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1201, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1211, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1201, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1211, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_possible_prods, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "constraint/constraints.py":1202 + /* "constraint/constraints.py":1212 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: # <<<<<<<<<<<<<< @@ -33759,16 +34419,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_max, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_max, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { - /* "constraint/constraints.py":1203 + /* "constraint/constraints.py":1213 * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: * dom.remove(val) # <<<<<<<<<<<<<< @@ -33782,12 +34442,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_val}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1202 + /* "constraint/constraints.py":1212 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: # <<<<<<<<<<<<<< @@ -33796,7 +34456,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1200 + /* "constraint/constraints.py":1210 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< @@ -33806,7 +34466,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1197 + /* "constraint/constraints.py":1207 * t_max = max(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -33816,7 +34476,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1192 + /* "constraint/constraints.py":1202 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -33849,7 +34509,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1205 +/* "constraint/constraints.py":1215 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -33900,53 +34560,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1205, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1215, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1205, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1215, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1205, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1215, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1215, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1215, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1215, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1215, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -33960,7 +34620,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1205, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1215, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33971,8 +34631,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1205, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1205, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1215, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1215, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_8__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -33991,9 +34651,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1241 +/* "constraint/constraints.py":1251 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< @@ -34002,29 +34662,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_8__call___genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_22_genexpr(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1241, __pyx_L1_error) + __PYX_ERR(0, 1251, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator16, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -34040,9 +34700,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator16(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)__pyx_generator->closure); + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -34061,29 +34721,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1241, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1241, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1251, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1241, __pyx_L1_error) } - __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_p, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1251, __pyx_L1_error) } + __pyx_t_3 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_p, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { @@ -34123,7 +34783,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1205 +/* "constraint/constraints.py":1215 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -34132,7 +34792,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint */ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_8__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_variables, PyObject *__pyx_v_domains, PyObject *__pyx_v_assignments, PyObject *__pyx_v_forwardcheck) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *__pyx_cur_scope; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *__pyx_cur_scope; PyObject *__pyx_v_assigned_prod = NULL; PyObject *__pyx_v_unassigned = NULL; PyObject *__pyx_v_var = NULL; @@ -34145,18 +34805,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_v_domain = NULL; PyObject *__pyx_v_val = NULL; PyObject *__pyx_v_prods = NULL; - PyObject *__pyx_9genexpr41__pyx_v_v = NULL; - PyObject *__pyx_9genexpr42__pyx_v_p = NULL; - PyObject *__pyx_9genexpr43__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr43__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr44__pyx_v_c = NULL; - PyObject *__pyx_9genexpr45__pyx_v_v = NULL; - PyObject *__pyx_9genexpr46__pyx_v_v = NULL; - PyObject *__pyx_9genexpr47__pyx_v_p = NULL; - PyObject *__pyx_9genexpr48__pyx_v_lo = NULL; - PyObject *__pyx_9genexpr48__pyx_v_hi = NULL; - PyObject *__pyx_9genexpr49__pyx_v_o = NULL; - PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14 = 0; + PyObject *__pyx_9genexpr43__pyx_v_v = NULL; + PyObject *__pyx_9genexpr44__pyx_v_p = NULL; + PyObject *__pyx_9genexpr45__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr45__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr46__pyx_v_c = NULL; + PyObject *__pyx_9genexpr47__pyx_v_v = NULL; + PyObject *__pyx_9genexpr48__pyx_v_v = NULL; + PyObject *__pyx_9genexpr49__pyx_v_p = NULL; + PyObject *__pyx_9genexpr50__pyx_v_lo = NULL; + PyObject *__pyx_9genexpr50__pyx_v_hi = NULL; + PyObject *__pyx_9genexpr51__pyx_v_o = NULL; + PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator16 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -34181,29 +34841,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_21___call__(__pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1205, __pyx_L1_error) + __PYX_ERR(0, 1215, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":1206 + /* "constraint/constraints.py":1216 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True # Can't evaluate yet * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_t_1, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":1207 + /* "constraint/constraints.py":1217 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: * return True # Can't evaluate yet # <<<<<<<<<<<<<< @@ -34215,7 +34875,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1206 + /* "constraint/constraints.py":1216 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -34224,23 +34884,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1209 + /* "constraint/constraints.py":1219 * return True # Can't evaluate yet * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * assigned_prod = 1 * unassigned = [] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":1210 + /* "constraint/constraints.py":1220 * * target_value = assignments[self.target_var] * assigned_prod = 1 # <<<<<<<<<<<<<< @@ -34250,35 +34910,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_v_assigned_prod = __pyx_mstate_global->__pyx_int_1; - /* "constraint/constraints.py":1211 + /* "constraint/constraints.py":1221 * target_value = assignments[self.target_var] * assigned_prod = 1 * unassigned = [] # <<<<<<<<<<<<<< * * for var in self.product_vars: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1213 + /* "constraint/constraints.py":1223 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< * if var in assignments: * assigned_prod *= assignments[var] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_product_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -34287,7 +34947,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1213, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1223, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -34297,7 +34957,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1213, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1223, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -34308,13 +34968,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1213, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1223, __pyx_L1_error) PyErr_Clear(); } break; @@ -34324,32 +34984,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1214 + /* "constraint/constraints.py":1224 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< * assigned_prod *= assignments[var] * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1224, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":1215 + /* "constraint/constraints.py":1225 * for var in self.product_vars: * if var in assignments: * assigned_prod *= assignments[var] # <<<<<<<<<<<<<< * else: * unassigned.append(var) */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_assigned_prod, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1214 + /* "constraint/constraints.py":1224 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -34359,7 +35019,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L6; } - /* "constraint/constraints.py":1217 + /* "constraint/constraints.py":1227 * assigned_prod *= assignments[var] * else: * unassigned.append(var) # <<<<<<<<<<<<<< @@ -34367,11 +35027,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * if not unassigned: */ /*else*/ { - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_unassigned, __pyx_v_var); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1227, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":1213 + /* "constraint/constraints.py":1223 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -34381,7 +35041,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1219 + /* "constraint/constraints.py":1229 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -34389,11 +35049,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * */ __pyx_t_2 = (__Pyx_PyList_GET_SIZE(__pyx_v_unassigned) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 1219, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 1229, __pyx_L1_error) __pyx_t_8 = (!__pyx_t_2); if (__pyx_t_8) { - /* "constraint/constraints.py":1220 + /* "constraint/constraints.py":1230 * * if not unassigned: * return assigned_prod <= target_value # <<<<<<<<<<<<<< @@ -34401,12 +35061,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * # Estimate max possible value of full product */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_assigned_prod, __pyx_cur_scope->__pyx_v_target_value, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_assigned_prod, __pyx_cur_scope->__pyx_v_target_value, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1219 + /* "constraint/constraints.py":1229 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -34415,7 +35075,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1223 + /* "constraint/constraints.py":1233 * * # Estimate max possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] # <<<<<<<<<<<<<< @@ -34423,7 +35083,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * possible_prods = [assigned_prod * c for c in candidates] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L11_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; @@ -34431,20 +35091,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1223, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1233, __pyx_L11_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_6, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_v, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_10 = __pyx_builtin_min; - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr41__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1223, __pyx_L11_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr43__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 1; { @@ -34453,13 +35113,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_11 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_9 = __pyx_builtin_max; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr41__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1223, __pyx_L11_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr43__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = 1; { @@ -34468,32 +35128,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1223, __pyx_L11_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1223, __pyx_L11_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1223, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1233, __pyx_L11_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1223, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1233, __pyx_L11_error); __pyx_t_3 = 0; __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1223, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1233, __pyx_L11_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_v); __pyx_9genexpr41__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_v); __pyx_9genexpr43__pyx_v_v = 0; goto __pyx_L15_exit_scope; __pyx_L11_error:; - __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_v); __pyx_9genexpr41__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_v); __pyx_9genexpr43__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L15_exit_scope:; } /* exit inner scope */ __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1224 + /* "constraint/constraints.py":1234 * # Estimate max possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] # <<<<<<<<<<<<<< @@ -34501,12 +35161,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * if min(possible_prods) > target_value: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L18_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L23_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -34514,13 +35174,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L23_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -34528,7 +35188,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1224, __pyx_L23_error) + __PYX_ERR(0, 1234, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -34538,22 +35198,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_11); } else { __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1224, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_13); __pyx_t_11 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1224, __pyx_L23_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_11); } #else - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1224, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1224, __pyx_L23_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1224, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -34561,7 +35221,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_13); index = 1; __pyx_t_11 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_11)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1224, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 1234, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -34569,38 +35229,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1224, __pyx_L23_error) + __PYX_ERR(0, 1234, __pyx_L23_error) __pyx_L27_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_lo, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr45__pyx_v_lo, __pyx_t_13); __pyx_t_13 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_hi, __pyx_t_11); + __Pyx_XDECREF_SET(__pyx_9genexpr45__pyx_v_hi, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L23_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_9genexpr43__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr43__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr43__pyx_v_lo) != (0)) __PYX_ERR(0, 1224, __pyx_L23_error); - __Pyx_INCREF(__pyx_9genexpr43__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr43__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr43__pyx_v_hi) != (0)) __PYX_ERR(0, 1224, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1224, __pyx_L23_error) + __Pyx_INCREF(__pyx_9genexpr45__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr45__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr45__pyx_v_lo) != (0)) __PYX_ERR(0, 1234, __pyx_L23_error); + __Pyx_INCREF(__pyx_9genexpr45__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr45__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr45__pyx_v_hi) != (0)) __PYX_ERR(0, 1234, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1234, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_hi); __pyx_9genexpr43__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_lo); __pyx_9genexpr43__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_hi); __pyx_9genexpr45__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_lo); __pyx_9genexpr45__pyx_v_lo = 0; goto __pyx_L29_exit_scope; __pyx_L23_error:; - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_hi); __pyx_9genexpr43__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_lo); __pyx_9genexpr43__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_hi); __pyx_9genexpr45__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_lo); __pyx_9genexpr45__pyx_v_lo = 0; goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1224, __pyx_L18_error) + __pyx_t_10 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L18_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -34609,9 +35269,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1224, __pyx_L18_error) + __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L18_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -34620,7 +35280,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -34630,7 +35290,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -34641,46 +35301,46 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1234, __pyx_L18_error) } else { __pyx_t_9 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1234, __pyx_L18_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_p, __pyx_t_9); + __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_p, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr42__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr44__pyx_v_p}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1224, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1234, __pyx_L18_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); __pyx_9genexpr42__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_p); __pyx_9genexpr44__pyx_v_p = 0; goto __pyx_L31_exit_scope; __pyx_L18_error:; - __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); __pyx_9genexpr42__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_p); __pyx_9genexpr44__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L31_exit_scope:; } /* exit inner scope */ __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1225 + /* "constraint/constraints.py":1235 * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] # <<<<<<<<<<<<<< @@ -34688,7 +35348,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * return False */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L34_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -34696,33 +35356,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1225, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1235, __pyx_L34_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_9 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1225, __pyx_L34_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1235, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_c, __pyx_t_9); + __Pyx_XDECREF_SET(__pyx_9genexpr46__pyx_v_c, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr44__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1225, __pyx_L34_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr46__pyx_v_c); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1235, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_9); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1225, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1235, __pyx_L34_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_c); __pyx_9genexpr44__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_c); __pyx_9genexpr46__pyx_v_c = 0; goto __pyx_L38_exit_scope; __pyx_L34_error:; - __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_c); __pyx_9genexpr44__pyx_v_c = 0; + __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_c); __pyx_9genexpr46__pyx_v_c = 0; goto __pyx_L1_error; __pyx_L38_exit_scope:; } /* exit inner scope */ __pyx_v_possible_prods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1226 + /* "constraint/constraints.py":1236 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] * if min(possible_prods) > target_value: # <<<<<<<<<<<<<< @@ -34738,16 +35398,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1226, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1227 + /* "constraint/constraints.py":1237 * possible_prods = [assigned_prod * c for c in candidates] * if min(possible_prods) > target_value: * return False # <<<<<<<<<<<<<< @@ -34759,7 +35419,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1226 + /* "constraint/constraints.py":1236 * candidates = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in domain_bounds])] * possible_prods = [assigned_prod * c for c in candidates] * if min(possible_prods) > target_value: # <<<<<<<<<<<<<< @@ -34768,17 +35428,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1229 + /* "constraint/constraints.py":1239 * return False * * if forwardcheck: # <<<<<<<<<<<<<< * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1229, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1239, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1230 + /* "constraint/constraints.py":1240 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -34791,18 +35451,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1230, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1240, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRef(__pyx_t_9, __pyx_t_4); ++__pyx_t_4; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1230, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1231 + /* "constraint/constraints.py":1241 * if forwardcheck: * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] # <<<<<<<<<<<<<< @@ -34810,7 +35470,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1231, __pyx_L45_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_10); __pyx_t_16 = 0; @@ -34818,35 +35478,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1231, __pyx_L45_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1241, __pyx_L45_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1231, __pyx_L45_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr45__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr47__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr45__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1231, __pyx_L45_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1231, __pyx_L45_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr47__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L45_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1241, __pyx_L45_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr45__pyx_v_v))) __PYX_ERR(0, 1231, __pyx_L45_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr47__pyx_v_v))) __PYX_ERR(0, 1241, __pyx_L45_error) } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_v); __pyx_9genexpr45__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_v); __pyx_9genexpr47__pyx_v_v = 0; goto __pyx_L50_exit_scope; __pyx_L45_error:; - __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_v); __pyx_9genexpr45__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_v); __pyx_9genexpr47__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L50_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_other_unassigned, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1232 + /* "constraint/constraints.py":1242 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -34854,10 +35514,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] */ __pyx_t_8 = (__Pyx_PyList_GET_SIZE(__pyx_v_other_unassigned) != 0); - if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_8 < 0))) __PYX_ERR(0, 1232, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_8 < 0))) __PYX_ERR(0, 1242, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1233 + /* "constraint/constraints.py":1243 * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] # <<<<<<<<<<<<<< @@ -34865,7 +35525,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * else: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L54_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_other_unassigned; __Pyx_INCREF(__pyx_t_10); __pyx_t_16 = 0; @@ -34873,20 +35533,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1233, __pyx_L54_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1243, __pyx_L54_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_10, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF_SET(__pyx_9genexpr46__pyx_v_v, __pyx_t_6); + __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_builtin_min); __pyx_t_11 = __pyx_builtin_min; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1233, __pyx_L54_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr48__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = 1; { @@ -34895,13 +35555,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_builtin_max); __pyx_t_3 = __pyx_builtin_max; - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1233, __pyx_L54_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr48__pyx_v_v); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = 1; { @@ -34910,32 +35570,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1233, __pyx_L54_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_11); } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L54_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1233, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1243, __pyx_L54_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1233, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1243, __pyx_L54_error); __pyx_t_6 = 0; __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1233, __pyx_L54_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1243, __pyx_L54_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_v); __pyx_9genexpr46__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_v); __pyx_9genexpr48__pyx_v_v = 0; goto __pyx_L58_exit_scope; __pyx_L54_error:; - __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_v); __pyx_9genexpr46__pyx_v_v = 0; + __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_v); __pyx_9genexpr48__pyx_v_v = 0; goto __pyx_L1_error; __pyx_L58_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_bounds, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1234 + /* "constraint/constraints.py":1244 * if other_unassigned: * bounds = [(min(domains[v]), max(domains[v])) for v in other_unassigned] * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -34943,12 +35603,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * other_products = [1] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L61_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1234, __pyx_L61_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_10); { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L66_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_11); __pyx_t_16 = 0; @@ -34956,13 +35616,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L66_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1244, __pyx_L66_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRef(__pyx_t_11, __pyx_t_16); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __pyx_L66_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; @@ -34970,7 +35630,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1234, __pyx_L66_error) + __PYX_ERR(0, 1244, __pyx_L66_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -34980,22 +35640,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_14 = __Pyx_PyList_GetItemRef(sequence, 0); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1234, __pyx_L66_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_PyList_GetItemRef(sequence, 1); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L66_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1234, __pyx_L66_error) + __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1234, __pyx_L66_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1234, __pyx_L66_error) + __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); @@ -35003,7 +35663,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_14); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_17); if (unlikely(!__pyx_t_13)) goto __pyx_L69_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1234, __pyx_L66_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1244, __pyx_L66_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L70_unpacking_done; @@ -35011,38 +35671,38 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1234, __pyx_L66_error) + __PYX_ERR(0, 1244, __pyx_L66_error) __pyx_L70_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_lo, __pyx_t_14); + __Pyx_XDECREF_SET(__pyx_9genexpr50__pyx_v_lo, __pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_hi, __pyx_t_13); + __Pyx_XDECREF_SET(__pyx_9genexpr50__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __pyx_L66_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_9genexpr48__pyx_v_lo); - __Pyx_GIVEREF(__pyx_9genexpr48__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr48__pyx_v_lo) != (0)) __PYX_ERR(0, 1234, __pyx_L66_error); - __Pyx_INCREF(__pyx_9genexpr48__pyx_v_hi); - __Pyx_GIVEREF(__pyx_9genexpr48__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr48__pyx_v_hi) != (0)) __PYX_ERR(0, 1234, __pyx_L66_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1234, __pyx_L66_error) + __Pyx_INCREF(__pyx_9genexpr50__pyx_v_lo); + __Pyx_GIVEREF(__pyx_9genexpr50__pyx_v_lo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr50__pyx_v_lo) != (0)) __PYX_ERR(0, 1244, __pyx_L66_error); + __Pyx_INCREF(__pyx_9genexpr50__pyx_v_hi); + __Pyx_GIVEREF(__pyx_9genexpr50__pyx_v_hi); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr50__pyx_v_hi) != (0)) __PYX_ERR(0, 1244, __pyx_L66_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1244, __pyx_L66_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_hi); __pyx_9genexpr48__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_lo); __pyx_9genexpr48__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_hi); __pyx_9genexpr50__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_lo); __pyx_9genexpr50__pyx_v_lo = 0; goto __pyx_L72_exit_scope; __pyx_L66_error:; - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_hi); __pyx_9genexpr48__pyx_v_hi = 0; - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_lo); __pyx_9genexpr48__pyx_v_lo = 0; + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_hi); __pyx_9genexpr50__pyx_v_hi = 0; + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_lo); __pyx_9genexpr50__pyx_v_lo = 0; goto __pyx_L61_error; __pyx_L72_exit_scope:; } /* exit inner scope */ - __pyx_t_11 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1234, __pyx_L61_error) + __pyx_t_11 = PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L61_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -35051,9 +35711,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1234, __pyx_L61_error) + __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L61_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1244, __pyx_L61_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -35062,7 +35722,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1244, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -35072,7 +35732,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1244, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -35083,46 +35743,46 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L61_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1244, __pyx_L61_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_9genexpr47__pyx_v_p, __pyx_t_3); + __Pyx_XDECREF_SET(__pyx_9genexpr49__pyx_v_p, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_12 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr47__pyx_v_p}; + PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_9genexpr49__pyx_v_p}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_3); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1234, __pyx_L61_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1244, __pyx_L61_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_p); __pyx_9genexpr47__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_p); __pyx_9genexpr49__pyx_v_p = 0; goto __pyx_L74_exit_scope; __pyx_L61_error:; - __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_p); __pyx_9genexpr47__pyx_v_p = 0; + __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_p); __pyx_9genexpr49__pyx_v_p = 0; goto __pyx_L1_error; __pyx_L74_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1232 + /* "constraint/constraints.py":1242 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -35132,7 +35792,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L51; } - /* "constraint/constraints.py":1236 + /* "constraint/constraints.py":1246 * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] * else: * other_products = [1] # <<<<<<<<<<<<<< @@ -35140,45 +35800,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * domain = domains[var] */ /*else*/ { - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1236, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1246, __pyx_L1_error); __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L51:; - /* "constraint/constraints.py":1238 + /* "constraint/constraints.py":1248 * other_products = [1] * * domain = domains[var] # <<<<<<<<<<<<<< * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1239 + /* "constraint/constraints.py":1249 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1239, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -35187,7 +35847,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1239, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1249, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -35197,7 +35857,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1239, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1249, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -35208,13 +35868,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1239, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1249, __pyx_L1_error) PyErr_Clear(); } break; @@ -35224,7 +35884,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1240 + /* "constraint/constraints.py":1250 * domain = domains[var] * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] # <<<<<<<<<<<<<< @@ -35232,7 +35892,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint * domain.hideValue(val) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L79_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_other_products; __Pyx_INCREF(__pyx_t_3); __pyx_t_18 = 0; @@ -35240,52 +35900,52 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1240, __pyx_L79_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1250, __pyx_L79_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_10 = __Pyx_PyList_GetItemRef(__pyx_t_3, __pyx_t_18); ++__pyx_t_18; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1240, __pyx_L79_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1250, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_9genexpr49__pyx_v_o, __pyx_t_10); + __Pyx_XDECREF_SET(__pyx_9genexpr51__pyx_v_o, __pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1240, __pyx_L79_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1250, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_10, __pyx_9genexpr49__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1240, __pyx_L79_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_10, __pyx_9genexpr51__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1240, __pyx_L79_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1250, __pyx_L79_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_o); __pyx_9genexpr49__pyx_v_o = 0; + __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_o); __pyx_9genexpr51__pyx_v_o = 0; goto __pyx_L83_exit_scope; __pyx_L79_error:; - __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_o); __pyx_9genexpr49__pyx_v_o = 0; + __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_o); __pyx_9genexpr51__pyx_v_o = 0; goto __pyx_L1_error; __pyx_L83_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_prods, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1241 + /* "constraint/constraints.py":1251 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< * domain.hideValue(val) * if not domain: */ - __pyx_t_1 = __pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_prods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_prods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1242 + /* "constraint/constraints.py":1252 * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): * domain.hideValue(val) # <<<<<<<<<<<<<< @@ -35299,12 +35959,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_val}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1241 + /* "constraint/constraints.py":1251 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< @@ -35313,7 +35973,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1239 + /* "constraint/constraints.py":1249 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< @@ -35323,18 +35983,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "constraint/constraints.py":1243 + /* "constraint/constraints.py":1253 * if all(p > target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< * return False * */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1243, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1253, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_8); if (__pyx_t_2) { - /* "constraint/constraints.py":1244 + /* "constraint/constraints.py":1254 * domain.hideValue(val) * if not domain: * return False # <<<<<<<<<<<<<< @@ -35347,7 +36007,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1243 + /* "constraint/constraints.py":1253 * if all(p > target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< @@ -35356,7 +36016,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1230 + /* "constraint/constraints.py":1240 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -35366,7 +36026,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1229 + /* "constraint/constraints.py":1239 * return False * * if forwardcheck: # <<<<<<<<<<<<<< @@ -35375,7 +36035,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1246 + /* "constraint/constraints.py":1256 * return False * * return True # <<<<<<<<<<<<<< @@ -35387,7 +36047,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1205 + /* "constraint/constraints.py":1215 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -35421,25 +36081,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF(__pyx_v_domain); __Pyx_XDECREF(__pyx_v_val); __Pyx_XDECREF(__pyx_v_prods); - __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_c); - __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_v); - __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_p); - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_lo); - __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_hi); - __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_o); - __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14); + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr45__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr46__pyx_v_c); + __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_v); + __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_p); + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_lo); + __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_hi); + __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_o); + __Pyx_XDECREF(__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator16); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "constraint/constraints.py":1260 +/* "constraint/constraints.py":1270 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -35488,39 +36148,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_set,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1260, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1270, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1260, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1270, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1260, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1270, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1260, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1270, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1260, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1270, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1260, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1270, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1260, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1270, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_set = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1260, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1270, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35549,16 +36209,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint___init__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1266 + /* "constraint/constraints.py":1276 * set (set): Set of allowed values * """ * self._set = set # <<<<<<<<<<<<<< * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1266, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1276, __pyx_L1_error) - /* "constraint/constraints.py":1260 + /* "constraint/constraints.py":1270 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -35578,7 +36238,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint___init__( return __pyx_r; } -/* "constraint/constraints.py":1268 +/* "constraint/constraints.py":1278 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -35629,53 +36289,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1268, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1278, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1268, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1278, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1268, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1278, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1278, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1278, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1278, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1268, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1278, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -35689,7 +36349,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1268, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1278, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35722,7 +36382,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1270 + /* "constraint/constraints.py":1280 * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 * # preProcess() will remove it. * raise RuntimeError("Can't happen") # <<<<<<<<<<<<<< @@ -35738,14 +36398,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1270, __pyx_L1_error) + __PYX_ERR(0, 1280, __pyx_L1_error) - /* "constraint/constraints.py":1268 + /* "constraint/constraints.py":1278 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -35765,7 +36425,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ return __pyx_r; } -/* "constraint/constraints.py":1272 +/* "constraint/constraints.py":1282 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -35816,50 +36476,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1272, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1282, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1282, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1282, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1282, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1282, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1272, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1282, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1272, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1282, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1282, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1282, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1282, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1282, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1272, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1282, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -35869,7 +36529,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1272, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1282, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35880,9 +36540,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1272, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1272, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1272, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1282, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1282, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1282, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_15InSetConstraint_4preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -35925,19 +36585,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1273 + /* "constraint/constraints.py":1283 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set # <<<<<<<<<<<<<< * for variable in variables: * domain = domains[variable] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1274 + /* "constraint/constraints.py":1284 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -35949,9 +36609,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -35959,7 +36619,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1274, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1284, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -35969,7 +36629,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1274, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1284, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -35980,13 +36640,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1274, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1284, __pyx_L1_error) PyErr_Clear(); } break; @@ -35996,35 +36656,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1275 + /* "constraint/constraints.py":1285 * set = self._set * for variable in variables: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value not in set: */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1276 + /* "constraint/constraints.py":1286 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value not in set: * domain.remove(value) */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -36033,7 +36693,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -36043,7 +36703,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1286, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -36054,13 +36714,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1286, __pyx_L1_error) PyErr_Clear(); } break; @@ -36070,17 +36730,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1277 + /* "constraint/constraints.py":1287 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< * domain.remove(value) * vconstraints[variable].remove((self, variables)) */ - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1277, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1287, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1278 + /* "constraint/constraints.py":1288 * for value in domain[:]: * if value not in set: * domain.remove(value) # <<<<<<<<<<<<<< @@ -36094,12 +36754,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1278, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1277 + /* "constraint/constraints.py":1287 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< @@ -36108,7 +36768,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce */ } - /* "constraint/constraints.py":1276 + /* "constraint/constraints.py":1286 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -36118,25 +36778,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1279 + /* "constraint/constraints.py":1289 * if value not in set: * domain.remove(value) * vconstraints[variable].remove((self, variables)) # <<<<<<<<<<<<<< * constraints.remove((self, variables)) * */ - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1279, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1279, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1289, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1279, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1289, __pyx_L1_error); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; @@ -36144,12 +36804,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1279, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1274 + /* "constraint/constraints.py":1284 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -36159,27 +36819,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1280 + /* "constraint/constraints.py":1290 * domain.remove(value) * vconstraints[variable].remove((self, variables)) * constraints.remove((self, variables)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1280, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1290, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1280, __pyx_L1_error); - __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1280, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1290, __pyx_L1_error); + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1272 + /* "constraint/constraints.py":1282 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -36208,7 +36868,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce return __pyx_r; } -/* "constraint/constraints.py":1294 +/* "constraint/constraints.py":1304 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -36257,39 +36917,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_set,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1294, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1304, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1294, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1304, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1294, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1304, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1294, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1304, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1294, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1304, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1294, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1304, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1294, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1304, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_set = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1294, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1304, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36318,16 +36978,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint___init int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1300 + /* "constraint/constraints.py":1310 * set (set): Set of disallowed values * """ * self._set = set # <<<<<<<<<<<<<< * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1310, __pyx_L1_error) - /* "constraint/constraints.py":1294 + /* "constraint/constraints.py":1304 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -36347,7 +37007,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint___init return __pyx_r; } -/* "constraint/constraints.py":1302 +/* "constraint/constraints.py":1312 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -36398,53 +37058,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1302, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1312, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1302, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1312, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1302, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1312, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1312, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1312, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1312, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1312, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1302, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1312, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -36458,7 +37118,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1302, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1312, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36491,7 +37151,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1304 + /* "constraint/constraints.py":1314 * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 * # preProcess() will remove it. * raise RuntimeError("Can't happen") # <<<<<<<<<<<<<< @@ -36507,14 +37167,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1304, __pyx_L1_error) + __PYX_ERR(0, 1314, __pyx_L1_error) - /* "constraint/constraints.py":1302 + /* "constraint/constraints.py":1312 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -36534,7 +37194,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal return __pyx_r; } -/* "constraint/constraints.py":1306 +/* "constraint/constraints.py":1316 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -36585,50 +37245,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_vconstraints,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1306, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1316, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1306, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "preProcess", 0) < 0) __PYX_ERR(0, 1316, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1306, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1316, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1316, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1316, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1316, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1316, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1306, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1316, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -36638,7 +37298,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1316, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36649,9 +37309,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1306, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1306, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1306, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1316, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1316, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1316, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_18NotInSetConstraint_4preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -36694,19 +37354,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1307 + /* "constraint/constraints.py":1317 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set # <<<<<<<<<<<<<< * for variable in variables: * domain = domains[variable] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1308 + /* "constraint/constraints.py":1318 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -36718,9 +37378,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -36728,7 +37388,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1308, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1318, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -36738,7 +37398,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1308, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1318, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -36749,13 +37409,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1308, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1318, __pyx_L1_error) PyErr_Clear(); } break; @@ -36765,35 +37425,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1309 + /* "constraint/constraints.py":1319 * set = self._set * for variable in variables: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value in set: */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1310 + /* "constraint/constraints.py":1320 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value in set: * domain.remove(value) */ - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1320, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -36802,7 +37462,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1320, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -36812,7 +37472,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1320, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -36823,13 +37483,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1310, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1320, __pyx_L1_error) PyErr_Clear(); } break; @@ -36839,17 +37499,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1311 + /* "constraint/constraints.py":1321 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< * domain.remove(value) * vconstraints[variable].remove((self, variables)) */ - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1311, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1321, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1312 + /* "constraint/constraints.py":1322 * for value in domain[:]: * if value in set: * domain.remove(value) # <<<<<<<<<<<<<< @@ -36863,12 +37523,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1311 + /* "constraint/constraints.py":1321 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< @@ -36877,7 +37537,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr */ } - /* "constraint/constraints.py":1310 + /* "constraint/constraints.py":1320 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -36887,25 +37547,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1313 + /* "constraint/constraints.py":1323 * if value in set: * domain.remove(value) * vconstraints[variable].remove((self, variables)) # <<<<<<<<<<<<<< * constraints.remove((self, variables)) * */ - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1313, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1323, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1313, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1323, __pyx_L1_error); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; @@ -36913,12 +37573,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1313, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1308 + /* "constraint/constraints.py":1318 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -36928,27 +37588,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1314 + /* "constraint/constraints.py":1324 * domain.remove(value) * vconstraints[variable].remove((self, variables)) * constraints.remove((self, variables)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1314, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1314, __pyx_L1_error); - __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1324, __pyx_L1_error); + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1306 + /* "constraint/constraints.py":1316 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -36977,7 +37637,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr return __pyx_r; } -/* "constraint/constraints.py":1328 +/* "constraint/constraints.py":1338 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -37028,50 +37688,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_set,&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_exact,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1328, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1338, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1328, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1338, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_1))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1328, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1338, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1338, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1338, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1328, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1338, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -37085,7 +37745,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1328, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1338, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37114,34 +37774,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1338 + /* "constraint/constraints.py":1348 * are present in set must be exactly `n` * """ * self._set = set # <<<<<<<<<<<<<< * self._n = n * self._exact = exact */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1338, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1348, __pyx_L1_error) - /* "constraint/constraints.py":1339 + /* "constraint/constraints.py":1349 * """ * self._set = set * self._n = n # <<<<<<<<<<<<<< * self._exact = exact * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2, __pyx_v_n) < 0) __PYX_ERR(0, 1339, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2, __pyx_v_n) < 0) __PYX_ERR(0, 1349, __pyx_L1_error) - /* "constraint/constraints.py":1340 + /* "constraint/constraints.py":1350 * self._set = set * self._n = n * self._exact = exact # <<<<<<<<<<<<<< * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2, __pyx_v_exact) < 0) __PYX_ERR(0, 1340, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2, __pyx_v_exact) < 0) __PYX_ERR(0, 1350, __pyx_L1_error) - /* "constraint/constraints.py":1328 + /* "constraint/constraints.py":1338 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -37161,7 +37821,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint___ini return __pyx_r; } -/* "constraint/constraints.py":1342 +/* "constraint/constraints.py":1352 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -37212,53 +37872,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1342, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1352, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1342, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1352, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1342, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1352, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1352, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1352, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1352, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1352, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1342, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1352, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -37272,7 +37932,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1342, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1352, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37283,8 +37943,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1342, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1352, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1352, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -37329,19 +37989,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1343 + /* "constraint/constraints.py":1353 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set # <<<<<<<<<<<<<< * missing = 0 * found = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1344 + /* "constraint/constraints.py":1354 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set * missing = 0 # <<<<<<<<<<<<<< @@ -37351,7 +38011,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":1345 + /* "constraint/constraints.py":1355 * set = self._set * missing = 0 * found = 0 # <<<<<<<<<<<<<< @@ -37361,7 +38021,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_found = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":1346 + /* "constraint/constraints.py":1356 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -37373,9 +38033,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1356, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -37383,7 +38043,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1356, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37393,7 +38053,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1346, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1356, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37404,13 +38064,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1346, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1346, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1356, __pyx_L1_error) PyErr_Clear(); } break; @@ -37420,36 +38080,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1347 + /* "constraint/constraints.py":1357 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< * found += assignments[variable] in set * else: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1357, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1348 + /* "constraint/constraints.py":1358 * for variable in variables: * if variable in assignments: * found += assignments[variable] in set # <<<<<<<<<<<<<< * else: * missing += 1 */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_found, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1347 + /* "constraint/constraints.py":1357 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -37459,7 +38119,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L5; } - /* "constraint/constraints.py":1350 + /* "constraint/constraints.py":1360 * found += assignments[variable] in set * else: * missing += 1 # <<<<<<<<<<<<<< @@ -37467,14 +38127,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca * if self._exact: */ /*else*/ { - __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_missing, __pyx_t_6); __pyx_t_6 = 0; } __pyx_L5:; - /* "constraint/constraints.py":1346 + /* "constraint/constraints.py":1356 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -37484,53 +38144,53 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1351 + /* "constraint/constraints.py":1361 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< * if self._exact: * if not (found <= self._n <= missing + found): */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1361, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1352 + /* "constraint/constraints.py":1362 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< * if not (found <= self._n <= missing + found): * return False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1353 + /* "constraint/constraints.py":1363 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1363, __pyx_L1_error) if (__Pyx_PyObject_IsTrue(__pyx_t_6)) { __Pyx_DECREF(__pyx_t_6); - __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (!__pyx_t_5); if (__pyx_t_7) { - /* "constraint/constraints.py":1354 + /* "constraint/constraints.py":1364 * if self._exact: * if not (found <= self._n <= missing + found): * return False # <<<<<<<<<<<<<< @@ -37542,7 +38202,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1353 + /* "constraint/constraints.py":1363 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< @@ -37551,7 +38211,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1352 + /* "constraint/constraints.py":1362 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< @@ -37561,7 +38221,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L8; } - /* "constraint/constraints.py":1356 + /* "constraint/constraints.py":1366 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -37569,18 +38229,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca * if forwardcheck and self._n - found == missing: */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":1357 + /* "constraint/constraints.py":1367 * else: * if self._n > missing + found: * return False # <<<<<<<<<<<<<< @@ -37592,7 +38252,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1356 + /* "constraint/constraints.py":1366 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -37603,33 +38263,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __pyx_L8:; - /* "constraint/constraints.py":1358 + /* "constraint/constraints.py":1368 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< * # All unassigned variables must be assigned to * # values in the set. */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1368, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_7 = __pyx_t_5; goto __pyx_L12_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_missing, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_missing, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_5; __pyx_L12_bool_binop_done:; if (__pyx_t_7) { - /* "constraint/constraints.py":1361 + /* "constraint/constraints.py":1371 * # All unassigned variables must be assigned to * # values in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -37641,9 +38301,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1371, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -37651,7 +38311,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37661,7 +38321,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37672,13 +38332,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_3(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1361, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1371, __pyx_L1_error) PyErr_Clear(); } break; @@ -37688,45 +38348,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1362 + /* "constraint/constraints.py":1372 * # values in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1372, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1363 + /* "constraint/constraints.py":1373 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value not in set: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1364 + /* "constraint/constraints.py":1374 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value not in set: * domain.hideValue(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1374, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -37735,7 +38395,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1364, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1374, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -37745,7 +38405,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1364, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1374, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -37756,13 +38416,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1364, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1374, __pyx_L1_error) PyErr_Clear(); } break; @@ -37772,17 +38432,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1365 + /* "constraint/constraints.py":1375 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1375, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1366 + /* "constraint/constraints.py":1376 * for value in domain[:]: * if value not in set: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -37796,12 +38456,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1365 + /* "constraint/constraints.py":1375 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< @@ -37810,7 +38470,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1364 + /* "constraint/constraints.py":1374 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -37820,18 +38480,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1367 + /* "constraint/constraints.py":1377 * if value not in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1377, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_7); if (__pyx_t_5) { - /* "constraint/constraints.py":1368 + /* "constraint/constraints.py":1378 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -37844,7 +38504,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1367 + /* "constraint/constraints.py":1377 * if value not in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -37853,7 +38513,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1362 + /* "constraint/constraints.py":1372 * # values in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -37862,7 +38522,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1361 + /* "constraint/constraints.py":1371 * # All unassigned variables must be assigned to * # values in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -37872,7 +38532,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1358 + /* "constraint/constraints.py":1368 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< @@ -37881,7 +38541,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1351 + /* "constraint/constraints.py":1361 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< @@ -37891,7 +38551,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L7; } - /* "constraint/constraints.py":1370 + /* "constraint/constraints.py":1380 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -37899,28 +38559,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca * return False */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1371 + /* "constraint/constraints.py":1381 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1372 + /* "constraint/constraints.py":1382 * if self._exact: * if found != self._n: * return False # <<<<<<<<<<<<<< @@ -37932,7 +38592,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1371 + /* "constraint/constraints.py":1381 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< @@ -37941,7 +38601,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1370 + /* "constraint/constraints.py":1380 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -37951,7 +38611,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L23; } - /* "constraint/constraints.py":1374 + /* "constraint/constraints.py":1384 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -37959,15 +38619,15 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca * return True */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_found, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_found, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1375 + /* "constraint/constraints.py":1385 * else: * if found < self._n: * return False # <<<<<<<<<<<<<< @@ -37979,7 +38639,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1374 + /* "constraint/constraints.py":1384 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -37992,7 +38652,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __pyx_L7:; - /* "constraint/constraints.py":1376 + /* "constraint/constraints.py":1386 * if found < self._n: * return False * return True # <<<<<<<<<<<<<< @@ -38004,7 +38664,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1342 + /* "constraint/constraints.py":1352 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -38032,7 +38692,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca return __pyx_r; } -/* "constraint/constraints.py":1390 +/* "constraint/constraints.py":1400 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -38083,50 +38743,50 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_set,&__pyx_mstate_global->__pyx_n_u_n,&__pyx_mstate_global->__pyx_n_u_exact,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1390, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1400, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1390, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 1400, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_1))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1390, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1400, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1400, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1400, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1390, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1400, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -38140,7 +38800,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1390, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1400, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38169,34 +38829,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1400 + /* "constraint/constraints.py":1410 * are not present in set must be exactly `n` * """ * self._set = set # <<<<<<<<<<<<<< * self._n = n * self._exact = exact */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1400, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2, __pyx_v_set) < 0) __PYX_ERR(0, 1410, __pyx_L1_error) - /* "constraint/constraints.py":1401 + /* "constraint/constraints.py":1411 * """ * self._set = set * self._n = n # <<<<<<<<<<<<<< * self._exact = exact * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2, __pyx_v_n) < 0) __PYX_ERR(0, 1401, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2, __pyx_v_n) < 0) __PYX_ERR(0, 1411, __pyx_L1_error) - /* "constraint/constraints.py":1402 + /* "constraint/constraints.py":1412 * self._set = set * self._n = n * self._exact = exact # <<<<<<<<<<<<<< * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2, __pyx_v_exact) < 0) __PYX_ERR(0, 1402, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2, __pyx_v_exact) < 0) __PYX_ERR(0, 1412, __pyx_L1_error) - /* "constraint/constraints.py":1390 + /* "constraint/constraints.py":1400 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -38216,7 +38876,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint___ return __pyx_r; } -/* "constraint/constraints.py":1404 +/* "constraint/constraints.py":1414 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -38267,53 +38927,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_forwardcheck,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1404, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1414, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1404, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 1414, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1404, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1414, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1414, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1414, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1414, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1404, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -38327,7 +38987,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1404, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1414, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38338,8 +38998,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1404, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1404, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1414, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1414, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -38384,19 +39044,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1405 + /* "constraint/constraints.py":1415 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set # <<<<<<<<<<<<<< * missing = 0 * found = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1406 + /* "constraint/constraints.py":1416 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set * missing = 0 # <<<<<<<<<<<<<< @@ -38406,7 +39066,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":1407 + /* "constraint/constraints.py":1417 * set = self._set * missing = 0 * found = 0 # <<<<<<<<<<<<<< @@ -38416,7 +39076,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_found = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":1408 + /* "constraint/constraints.py":1418 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -38428,9 +39088,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -38438,7 +39098,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1408, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1418, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38448,7 +39108,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1408, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1418, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38459,13 +39119,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1408, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1418, __pyx_L1_error) PyErr_Clear(); } break; @@ -38475,36 +39135,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1409 + /* "constraint/constraints.py":1419 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< * found += assignments[variable] not in set * else: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1419, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1410 + /* "constraint/constraints.py":1420 * for variable in variables: * if variable in assignments: * found += assignments[variable] not in set # <<<<<<<<<<<<<< * else: * missing += 1 */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_v_set, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_found, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1409 + /* "constraint/constraints.py":1419 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -38514,7 +39174,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L5; } - /* "constraint/constraints.py":1412 + /* "constraint/constraints.py":1422 * found += assignments[variable] not in set * else: * missing += 1 # <<<<<<<<<<<<<< @@ -38522,14 +39182,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ * if self._exact: */ /*else*/ { - __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_missing, __pyx_t_6); __pyx_t_6 = 0; } __pyx_L5:; - /* "constraint/constraints.py":1408 + /* "constraint/constraints.py":1418 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -38539,53 +39199,53 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1413 + /* "constraint/constraints.py":1423 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< * if self._exact: * if not (found <= self._n <= missing + found): */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1423, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1414 + /* "constraint/constraints.py":1424 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< * if not (found <= self._n <= missing + found): * return False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1414, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1415 + /* "constraint/constraints.py":1425 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) if (__Pyx_PyObject_IsTrue(__pyx_t_6)) { __Pyx_DECREF(__pyx_t_6); - __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (!__pyx_t_5); if (__pyx_t_7) { - /* "constraint/constraints.py":1416 + /* "constraint/constraints.py":1426 * if self._exact: * if not (found <= self._n <= missing + found): * return False # <<<<<<<<<<<<<< @@ -38597,7 +39257,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1415 + /* "constraint/constraints.py":1425 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< @@ -38606,7 +39266,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1414 + /* "constraint/constraints.py":1424 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< @@ -38616,7 +39276,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L8; } - /* "constraint/constraints.py":1418 + /* "constraint/constraints.py":1428 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -38624,18 +39284,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ * if forwardcheck and self._n - found == missing: */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":1419 + /* "constraint/constraints.py":1429 * else: * if self._n > missing + found: * return False # <<<<<<<<<<<<<< @@ -38647,7 +39307,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1418 + /* "constraint/constraints.py":1428 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -38658,33 +39318,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __pyx_L8:; - /* "constraint/constraints.py":1420 + /* "constraint/constraints.py":1430 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< * # All unassigned variables must be assigned to * # values not in the set. */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1430, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_7 = __pyx_t_5; goto __pyx_L12_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_missing, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_missing, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_5; __pyx_L12_bool_binop_done:; if (__pyx_t_7) { - /* "constraint/constraints.py":1423 + /* "constraint/constraints.py":1433 * # All unassigned variables must be assigned to * # values not in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -38696,9 +39356,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1433, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -38706,7 +39366,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1433, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38716,7 +39376,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1433, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38727,13 +39387,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_3(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1433, __pyx_L1_error) PyErr_Clear(); } break; @@ -38743,45 +39403,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1424 + /* "constraint/constraints.py":1434 * # values not in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1434, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1425 + /* "constraint/constraints.py":1435 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if value in set: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1426 + /* "constraint/constraints.py":1436 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if value in set: * domain.hideValue(value) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1436, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -38790,7 +39450,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1436, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -38800,7 +39460,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1436, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -38811,13 +39471,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1436, __pyx_L1_error) PyErr_Clear(); } break; @@ -38827,17 +39487,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1427 + /* "constraint/constraints.py":1437 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_set, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1437, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1428 + /* "constraint/constraints.py":1438 * for value in domain[:]: * if value in set: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -38851,12 +39511,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1427 + /* "constraint/constraints.py":1437 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< @@ -38865,7 +39525,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1426 + /* "constraint/constraints.py":1436 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -38875,18 +39535,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1429 + /* "constraint/constraints.py":1439 * if value in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1439, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_7); if (__pyx_t_5) { - /* "constraint/constraints.py":1430 + /* "constraint/constraints.py":1440 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -38899,7 +39559,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1429 + /* "constraint/constraints.py":1439 * if value in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -38908,7 +39568,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1424 + /* "constraint/constraints.py":1434 * # values not in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -38917,7 +39577,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1423 + /* "constraint/constraints.py":1433 * # All unassigned variables must be assigned to * # values not in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -38927,7 +39587,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1420 + /* "constraint/constraints.py":1430 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< @@ -38936,7 +39596,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1413 + /* "constraint/constraints.py":1423 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< @@ -38946,7 +39606,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L7; } - /* "constraint/constraints.py":1432 + /* "constraint/constraints.py":1442 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -38954,28 +39614,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ * return False */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exact_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1433 + /* "constraint/constraints.py":1443 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_found, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1434 + /* "constraint/constraints.py":1444 * if self._exact: * if found != self._n: * return False # <<<<<<<<<<<<<< @@ -38987,7 +39647,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1433 + /* "constraint/constraints.py":1443 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< @@ -38996,7 +39656,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1432 + /* "constraint/constraints.py":1442 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -39006,7 +39666,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L23; } - /* "constraint/constraints.py":1436 + /* "constraint/constraints.py":1446 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -39014,15 +39674,15 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ * return True */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_n_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_found, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_found, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1436, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1437 + /* "constraint/constraints.py":1447 * else: * if found < self._n: * return False # <<<<<<<<<<<<<< @@ -39033,7 +39693,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1436 + /* "constraint/constraints.py":1446 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -39046,7 +39706,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __pyx_L7:; - /* "constraint/constraints.py":1438 + /* "constraint/constraints.py":1448 * if found < self._n: * return False * return True # <<<<<<<<<<<<<< @@ -39056,7 +39716,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1404 + /* "constraint/constraints.py":1414 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -40897,16 +41557,184 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_9_p }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_10_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_v); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_10_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_v) { + e = (*v)(p->__pyx_v_v, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr}, + {0, 0}, +}; +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_10_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_slots, +}; +#else + +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr = { + PyVarObject_HEAD_INIT(0, 0) + "constraint.constraints.""__pyx_scope_struct_10_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_10_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_11_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -40919,23 +41747,21 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); - Py_CLEAR(p->__pyx_v_v); - Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_v_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_10_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_10_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_11_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o); } else #endif { @@ -40950,49 +41776,43 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; - } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } - if (p->__pyx_v_v) { - e = (*v)(p->__pyx_v_v, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_10_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_11_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_10_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_11_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41014,7 +41834,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_10_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -41032,7 +41852,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_10_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_10_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41065,16 +41885,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_10_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_11_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41087,11 +41907,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -41100,8 +41920,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_ge Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_11_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)o); } else #endif { @@ -41116,9 +41936,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -41132,27 +41952,27 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_ge return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_11_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_12_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_11_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_12_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41174,7 +41994,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_11_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -41192,7 +42012,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_11_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_11_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41225,16 +42045,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_11_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12___call__]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13___call__]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41247,11 +42067,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12__ return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___call__(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13___call__(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___call__) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13___call__) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -41260,8 +42080,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___ Py_CLEAR(p->__pyx_v_assigned_product); Py_CLEAR(p->__pyx_v_target_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_12___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_12___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)o); } else #endif { @@ -41276,9 +42096,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___ } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12___call__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13___call__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -41292,9 +42112,9 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12___ return 0; } -static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_12___call__(PyObject *o) { +static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_13___call__(PyObject *o) { PyObject* tmp; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__ *)o; tmp = ((PyObject*)p->__pyx_v_assigned_product); p->__pyx_v_assigned_product = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -41304,28 +42124,196 @@ static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_12___cal return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_12___call___slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___call__}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12___call__}, - {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_12___call__}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12___call__}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_13___call___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13___call__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13___call__}, + {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_13___call__}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13___call__}, + {0, 0}, +}; +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_13___call___spec = { + "constraint.constraints.__pyx_scope_struct_13___call__", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__), + 0, + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, + __pyx_type_10constraint_11constraints___pyx_scope_struct_13___call___slots, +}; +#else + +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_13___call__ = { + PyVarObject_HEAD_INIT(0, 0) + "constraint.constraints.""__pyx_scope_struct_13___call__", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13___call__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13___call__, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13___call__, /*tp_traverse*/ + __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_13___call__, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + #if !CYTHON_USE_TYPE_SPECS + 0, /*tp_dictoffset*/ + #endif + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13___call__, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if CYTHON_USE_TP_FINALIZE + 0, /*tp_finalize*/ + #else + NULL, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if __PYX_NEED_TP_PRINT_SLOT == 1 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030C0000 + 0, /*tp_watched*/ + #endif + #if PY_VERSION_HEX >= 0x030d00A4 + 0, /*tp_versions_used*/ + #endif + #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 + 0, /*tp_pypy_flags*/ + #endif +}; +#endif + +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + #if CYTHON_COMPILING_IN_LIMITED_API + allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); + o = alloc_func(t, 0); + #else + #if CYTHON_USE_FREELISTS + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_14_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else + #endif + { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + #endif + return o; +} + +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o; + #if CYTHON_USE_TP_FINALIZE + if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + } + #endif + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_c); + Py_CLEAR(p->__pyx_t_0); + #if CYTHON_USE_FREELISTS + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_14_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o); + } else + #endif + { + #if CYTHON_USE_TYPE_SLOTS + (*Py_TYPE(o)->tp_free)(o); + #else + { + freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free); + if (tp_free) tp_free(o); + } + #endif + } +} + +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o; + { + e = __Pyx_call_type_traverse(o, 1, v, a); + if (e) return e; + } + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_c) { + e = (*v)(p->__pyx_v_c, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} +#if CYTHON_USE_TYPE_SPECS +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_12___call___spec = { - "constraint.constraints.__pyx_scope_struct_12___call__", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_14_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_12___call___slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_12___call__ = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_12___call__", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_14_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_12___call__, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41347,8 +42335,8 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_12_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_12___call__, /*tp_traverse*/ - __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_12___call__, /*tp_clear*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -41365,7 +42353,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_12_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_12___call__, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41398,16 +42386,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_12_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_15_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41420,11 +42408,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -41435,8 +42423,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_ge Py_CLEAR(p->__pyx_v_c); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_13_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_13_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_15_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o); } else #endif { @@ -41451,9 +42439,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -41473,27 +42461,27 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13_ge return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_13_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_15_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_13_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_15_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_13_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41515,7 +42503,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_13_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_13_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -41533,7 +42521,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_13_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_13_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41566,16 +42554,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_13_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_14_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41588,11 +42576,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -41601,10 +42589,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_ge Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_c); - Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_14_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)o); } else #endif { @@ -41619,9 +42606,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -41635,33 +42622,30 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_ge if (p->__pyx_v_c) { e = (*v)(p->__pyx_v_c, a); if (e) return e; } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; - } return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_14_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_16_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_14_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_16_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41683,7 +42667,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_14_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -41701,7 +42685,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_14_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_14_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41734,16 +42718,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_14_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_15_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17___call__]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41756,22 +42740,20 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17___call__(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17___call__) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_genexpr_arg_0); - Py_CLEAR(p->__pyx_v_c); + Py_CLEAR(p->__pyx_v_target_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_15_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)o); } else #endif { @@ -41786,46 +42768,50 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17___call__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_genexpr_arg_0) { - e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; - } - if (p->__pyx_v_c) { - e = (*v)(p->__pyx_v_c, a); if (e) return e; + if (p->__pyx_v_target_value) { + e = (*v)(p->__pyx_v_target_value, a); if (e) return e; } return 0; } + +static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_17___call__(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__ *)o; + tmp = ((PyObject*)p->__pyx_v_target_value); + p->__pyx_v_target_value = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_17___call___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17___call__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17___call__}, + {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_17___call__}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17___call__}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_15_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_17___call___spec = { + "constraint.constraints.__pyx_scope_struct_17___call__", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_17___call___slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_17___call__ = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_15_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_17___call__", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17___call__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17___call__, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -41847,8 +42833,8 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_15_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17___call__, /*tp_traverse*/ + __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_17___call__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -41865,7 +42851,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_15_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_15_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17___call__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -41898,16 +42884,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_15_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16___call__]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_18_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -41920,20 +42906,22 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16__ return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16___call__(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16___call__) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_target_value); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_genexpr_arg_0); + Py_CLEAR(p->__pyx_v_p); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_16___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_16___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_18_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o); } else #endif { @@ -41948,50 +42936,46 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16___ } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16___call__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } - if (p->__pyx_v_target_value) { - e = (*v)(p->__pyx_v_target_value, a); if (e) return e; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_genexpr_arg_0) { + e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; + } + if (p->__pyx_v_p) { + e = (*v)(p->__pyx_v_p, a); if (e) return e; } - return 0; -} - -static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_16___call__(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__ *)o; - tmp = ((PyObject*)p->__pyx_v_target_value); - p->__pyx_v_target_value = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_16___call___slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16___call__}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16___call__}, - {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_16___call__}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16___call__}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_16___call___spec = { - "constraint.constraints.__pyx_scope_struct_16___call__", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_18_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_16___call___slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_16___call__ = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_16___call__", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16___call__), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_18_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_16___call__, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -42013,8 +42997,8 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_16_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_16___call__, /*tp_traverse*/ - __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_16___call__, /*tp_clear*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -42031,7 +43015,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_16_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_16___call__, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -42064,16 +43048,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_16_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -42086,22 +43070,21 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); - Py_CLEAR(p->__pyx_v_p); + Py_CLEAR(p->__pyx_v_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_17_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)o); } else #endif { @@ -42116,46 +43099,43 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; - } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } - if (p->__pyx_v_p) { - e = (*v)(p->__pyx_v_p, a); if (e) return e; + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_17_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_19_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_17_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_19_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_17_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -42177,7 +43157,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_17_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_17_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -42195,7 +43175,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_17_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_17_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -42228,16 +43208,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_17_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_18_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_20_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -42250,11 +43230,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -42263,8 +43243,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_ge Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_18_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_18_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_20_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o); } else #endif { @@ -42279,9 +43259,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -42295,27 +43275,27 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_ge return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_18_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_20_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_18_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_20_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -42337,7 +43317,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_18_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -42355,7 +43335,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_18_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_18_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -42388,16 +43368,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_18_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_21___call__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19___call__]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_21___call__ > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_21___call__[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_21___call__]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -42410,11 +43390,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19__ return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___call__(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_21___call__(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___call__) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_21___call__) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -42422,8 +43402,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___ PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_target_value); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_19___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_19___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_21___call__ < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_21___call__[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_21___call__++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)o); } else #endif { @@ -42438,9 +43418,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___ } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19___call__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_21___call__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -42451,37 +43431,37 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19___ return 0; } -static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_19___call__(PyObject *o) { +static int __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_21___call__(PyObject *o) { PyObject* tmp; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__ *)o; tmp = ((PyObject*)p->__pyx_v_target_value); p->__pyx_v_target_value = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_19___call___slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___call__}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19___call__}, - {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_19___call__}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19___call__}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_21___call___slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_21___call__}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_21___call__}, + {Py_tp_clear, (void *)__pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_21___call__}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_21___call__}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_19___call___spec = { - "constraint.constraints.__pyx_scope_struct_19___call__", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_21___call___spec = { + "constraint.constraints.__pyx_scope_struct_21___call__", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_19___call___slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_21___call___slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_19___call__ = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_21___call__ = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_19___call__", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_21___call__", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21___call__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_19___call__, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_21___call__, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -42503,8 +43483,8 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_19_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_19___call__, /*tp_traverse*/ - __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_19___call__, /*tp_clear*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_21___call__, /*tp_traverse*/ + __pyx_tp_clear_10constraint_11constraints___pyx_scope_struct_21___call__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -42521,7 +43501,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_19_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_19___call__, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_21___call__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -42554,16 +43534,16 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_19_ }; #endif -static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_22_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)))) { - o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_20_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)); + if (likely((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_22_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr)))) { + o = (PyObject*)__pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_22_genexpr[--__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_22_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -42576,11 +43556,11 @@ static PyObject *__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_g return o; } -static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyObject *o) { - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o; +static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_22_genexpr(PyObject *o) { + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_22_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -42590,8 +43570,8 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_ge Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_p); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr)))) { - __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_20_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_20_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o); + if (((int)(__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_22_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr)))) { + __pyx_mstate_global->__pyx_freelist_10constraint_11constraints___pyx_scope_struct_22_genexpr[__pyx_mstate_global->__pyx_freecount_10constraint_11constraints___pyx_scope_struct_22_genexpr++] = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)o); } else #endif { @@ -42606,9 +43586,9 @@ static void __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_ge } } -static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_22_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr *)o; + struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *p = (struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; @@ -42625,27 +43605,27 @@ static int __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_ge return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr}, - {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr}, +static PyType_Slot __pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_22_genexpr}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_22_genexpr}, + {Py_tp_new, (void *)__pyx_tp_new_10constraint_11constraints___pyx_scope_struct_22_genexpr}, {0, 0}, }; -static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec = { - "constraint.constraints.__pyx_scope_struct_20_genexpr", - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr), +static PyType_Spec __pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr_spec = { + "constraint.constraints.__pyx_scope_struct_22_genexpr", + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_slots, + __pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr_slots, }; #else -static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr = { +static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr = { PyVarObject_HEAD_INIT(0, 0) - "constraint.constraints.""__pyx_scope_struct_20_genexpr", /*tp_name*/ - sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr), /*tp_basicsize*/ + "constraint.constraints.""__pyx_scope_struct_22_genexpr", /*tp_name*/ + sizeof(struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_10constraint_11constraints___pyx_scope_struct_22_genexpr, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -42667,7 +43647,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_20_ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_traverse*/ + __pyx_tp_traverse_10constraint_11constraints___pyx_scope_struct_22_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ @@ -42685,7 +43665,7 @@ static PyTypeObject __pyx_type_10constraint_11constraints___pyx_scope_struct_20_ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_20_genexpr, /*tp_new*/ + __pyx_tp_new_10constraint_11constraints___pyx_scope_struct_22_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -42964,15 +43944,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr)) __PYX_ERR(0, 780, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr)) __PYX_ERR(0, 781, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 781, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_11_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 780, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 781, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr->tp_getattro == PyObject_GenericGetAttr)) { @@ -42980,47 +43960,47 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__)) __PYX_ERR(0, 890, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__) < 0) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr)) __PYX_ERR(0, 810, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 810, __pyx_L1_error) #else - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_12___call__; + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_12_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__) < 0) __PYX_ERR(0, 890, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 810, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__->tp_getattro = PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr)) __PYX_ERR(0, 913, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr) < 0) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__)) __PYX_ERR(0, 895, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__) < 0) __PYX_ERR(0, 895, __pyx_L1_error) #else - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_13_genexpr; + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_13___call__; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr) < 0) __PYX_ERR(0, 913, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__) < 0) __PYX_ERR(0, 895, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr->tp_getattro = PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13___call__->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr)) __PYX_ERR(0, 914, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr)) __PYX_ERR(0, 918, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 918, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_14_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 914, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 918, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr->tp_getattro == PyObject_GenericGetAttr)) { @@ -43028,15 +44008,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr)) __PYX_ERR(0, 928, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr)) __PYX_ERR(0, 919, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 919, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_15_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 928, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 919, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15_genexpr->tp_getattro == PyObject_GenericGetAttr)) { @@ -43044,47 +44024,47 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__)) __PYX_ERR(0, 1034, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr)) __PYX_ERR(0, 933, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr) < 0) __PYX_ERR(0, 933, __pyx_L1_error) #else - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_16___call__; + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_16_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr) < 0) __PYX_ERR(0, 933, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16___call__->tp_getattro = PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr)) __PYX_ERR(0, 1070, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__)) __PYX_ERR(0, 1039, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) #else - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_17_genexpr; + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_17___call__; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr->tp_getattro = PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17___call__->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr)) __PYX_ERR(0, 1104, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr)) __PYX_ERR(0, 1075, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_18_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(0, 1104, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr->tp_getattro == PyObject_GenericGetAttr)) { @@ -43092,37 +44072,69 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__)) __PYX_ERR(0, 1205, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr)) __PYX_ERR(0, 1110, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr) < 0) __PYX_ERR(0, 1110, __pyx_L1_error) #else - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_19___call__; + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_19_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr) < 0) __PYX_ERR(0, 1110, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__->tp_getattro = PyObject_GenericGetAttr; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr)) __PYX_ERR(0, 1241, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr)) __PYX_ERR(0, 1139, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr) < 0) __PYX_ERR(0, 1139, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_20_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr) < 0) __PYX_ERR(0, 1241, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr) < 0) __PYX_ERR(0, 1139, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__)) __PYX_ERR(0, 1215, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_21___call__; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21___call__->tp_getattro = PyObject_GenericGetAttr; + } + #endif + #if CYTHON_USE_TYPE_SPECS + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr) < 0) __PYX_ERR(0, 1251, __pyx_L1_error) + #else + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_22_genexpr; + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + #endif + #if !CYTHON_USE_TYPE_SPECS + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr) < 0) __PYX_ERR(0, 1251, __pyx_L1_error) + #endif + #if !CYTHON_COMPILING_IN_LIMITED_API + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr->tp_getattro = PyObject_GenericGetAttr; + } + #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -43546,7 +44558,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 11, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 11, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 11, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_Constraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_Constraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_3); @@ -43567,7 +44579,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 36, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 36, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 36, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_Constraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_Constraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -43586,7 +44598,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 64, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 64, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 64, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_5forwardCheck, 0, __pyx_mstate_global->__pyx_n_u_Constraint_forwardCheck, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_10Constraint_5forwardCheck, 0, __pyx_mstate_global->__pyx_n_u_Constraint_forwardCheck, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __pyx_L1_error) @@ -43647,7 +44659,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_Callable) < 0) __PYX_ERR(0, 126, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assigned, __pyx_mstate_global->__pyx_n_u_bool) < 0) __PYX_ERR(0, 126, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18FunctionConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_FunctionConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18FunctionConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_FunctionConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); @@ -43667,7 +44679,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 138, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 138, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 138, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18FunctionConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_FunctionConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18FunctionConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_FunctionConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 138, __pyx_L1_error) @@ -43738,7 +44750,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 194, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assigned, __pyx_mstate_global->__pyx_n_u_bool) < 0) __PYX_ERR(0, 194, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_28CompilableFunctionConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint___i, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_28CompilableFunctionConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint___i, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3); @@ -43753,7 +44765,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); * raise NotImplementedError("CompilableFunctionConstraint can not be called directly") * */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_28CompilableFunctionConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint___c, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_28CompilableFunctionConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint___c, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) @@ -43815,7 +44827,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 213, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 213, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 213, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22AllDifferentConstraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22AllDifferentConstraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 213, __pyx_L1_error) @@ -43887,7 +44899,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 251, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 251, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 251, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18AllEqualConstraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18AllEqualConstraint_1__call__, 0, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 251, __pyx_L1_error) @@ -43958,7 +44970,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_exactsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 289, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 289, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); @@ -43979,7 +44991,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 301, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 301, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 301, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -43998,7 +45010,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 318, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 318, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 318, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18ExactSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); @@ -44056,7 +45068,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 377, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 377, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 377, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___ini_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___ini_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3); @@ -44077,7 +45089,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 396, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 396, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 396, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -44096,7 +45108,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 418, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 418, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 418, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___cal, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_26VariableExactSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___cal, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3); @@ -44153,7 +45165,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_minsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 481, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 481, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_5); @@ -44173,7 +45185,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 493, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 493, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 493, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); @@ -44231,7 +45243,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 524, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 524, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 524, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___init_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___init_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); @@ -44252,7 +45264,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 543, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 543, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 543, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint_preProc_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint_preProc_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44271,7 +45283,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 556, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 556, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 556, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMinSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); @@ -44328,7 +45340,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maxsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 595, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 595, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); @@ -44349,7 +45361,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 607, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 607, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 607, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -44368,7 +45380,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 642, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 642, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 642, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MaxSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); @@ -44426,7 +45438,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 694, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 694, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < 0) __PYX_ERR(0, 694, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___init_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___init_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); @@ -44447,7 +45459,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 713, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 713, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 713, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint_preProc_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint_preProc_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -44466,7 +45478,7 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 726, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 726, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 726, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_24VariableMaxSumConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); @@ -44522,51 +45534,51 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exactprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 765, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < 0) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":773 - * self._exactprod = exactprod + /* "constraint/constraints.py":774 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 773, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 773, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 773, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 773, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 774, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 774, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 774, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_3) < 0) __PYX_ERR(0, 773, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_3) < 0) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":801 + /* "constraint/constraints.py":802 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * exactprod = self._exactprod * prod = 1 */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 801, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 801, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 801, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 802, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 802, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19ExactProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 801, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "constraint/constraints.py":754 @@ -44584,862 +45596,862 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":828 + /* "constraint/constraints.py":833 * return True * * class VariableExactProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables equals the value of another variable. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 828, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 833, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":839 + /* "constraint/constraints.py":844 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< * """Instantiate a VariableExactProdConstraint. * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 839, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 839, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___in, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 844, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___in, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 839, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 844, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":849 + /* "constraint/constraints.py":854 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< * """Return min and max product of domains of product_vars (excluding `exclude_var` if given).""" * bounds = [] */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint__get, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 849, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint__get, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_3) < 0) __PYX_ERR(0, 849, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_3) < 0) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":869 + /* "constraint/constraints.py":874 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< * prod = 1 * for v in values: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint__saf, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint__saf, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_3) < 0) __PYX_ERR(0, 869, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_3) < 0) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":875 + /* "constraint/constraints.py":880 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 875, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 875, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 875, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 875, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint_preP, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 875, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 880, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint_preP, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 875, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":890 + /* "constraint/constraints.py":895 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 890, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 890, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 890, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_27VariableExactProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint___ca_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 890, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":828 + /* "constraint/constraints.py":833 * return True * * class VariableExactProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables equals the value of another variable. * */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 828, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":936 + /* "constraint/constraints.py":941 * * * class MinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at least a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 936, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 941, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":947 + /* "constraint/constraints.py":952 * """ * * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< * """Instantiate a MinProdConstraint. * */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_minprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 947, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 947, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_minprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 952, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < 0) __PYX_ERR(0, 947, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < 0) __PYX_ERR(0, 952, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":955 + /* "constraint/constraints.py":960 * self._minprod = minprod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 955, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 955, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 955, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 955, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 955, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 955, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 960, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 960, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 960, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 960, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < 0) __PYX_ERR(0, 955, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < 0) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":966 + /* "constraint/constraints.py":971 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * # check if each variable is in the assignments * for variable in variables: */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 966, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 966, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 966, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MinProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MinProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < 0) __PYX_ERR(0, 966, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < 0) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":936 + /* "constraint/constraints.py":941 * * * class MinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at least a given amount. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_4) < 0) __PYX_ERR(0, 936, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_4) < 0) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":982 + /* "constraint/constraints.py":987 * * * class VariableMinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at least the value of another variable. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 982, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 987, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":993 + /* "constraint/constraints.py":998 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< * self.target_var = target_var * self.product_vars = product_vars */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 993, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 993, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 993, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 998, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < 0) __PYX_ERR(0, 993, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < 0) __PYX_ERR(0, 998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":997 + /* "constraint/constraints.py":1002 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< * bounds = [] * for var in self.product_vars: */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint__get_p, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 997, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint__get_p, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_6) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_6) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1015 + /* "constraint/constraints.py":1020 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< * prod = 1 * for v in values: */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint__safe, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1015, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint__safe, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < 0) __PYX_ERR(0, 1015, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < 0) __PYX_ERR(0, 1020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1021 + /* "constraint/constraints.py":1026 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint_prePro, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1021, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1026, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1026, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1026, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint_prePro, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < 0) __PYX_ERR(0, 1021, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < 0) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1034 + /* "constraint/constraints.py":1039 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True # Can't evaluate yet */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___call_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1034, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMinProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint___call_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < 0) __PYX_ERR(0, 1034, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":982 + /* "constraint/constraints.py":987 * * * class VariableMinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at least the value of another variable. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 982, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_6) < 0) __PYX_ERR(0, 982, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_6) < 0) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1078 + /* "constraint/constraints.py":1083 * * * class MaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at most a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1078, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1083, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1089 + /* "constraint/constraints.py":1094 * """ * * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< * """Instantiate a MaxProdConstraint. * */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_maxprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 1089, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1089, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_maxprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < 0) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < 0) __PYX_ERR(0, 1089, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < 0) __PYX_ERR(0, 1094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1097 - * self._maxprod = maxprod + /* "constraint/constraints.py":1103 + * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_3) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_3) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1125 + /* "constraint/constraints.py":1131 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * maxprod = self._maxprod * prod = 1 */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_17MaxProdConstraint_5__call__, 0, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1078 + /* "constraint/constraints.py":1083 * * * class MaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at most a given amount. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_5) < 0) __PYX_ERR(0, 1078, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_5) < 0) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1153 + /* "constraint/constraints.py":1163 * * * class VariableMaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at most the value of another variable. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_pr_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1153, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1163, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1164 + /* "constraint/constraints.py":1174 * """ # noqa: E501 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< * self.target_var = target_var * self.product_vars = product_vars */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 1164, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 1164, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_mstate_global->__pyx_n_u_str) < 0) __PYX_ERR(0, 1174, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_product_vars, __pyx_mstate_global->__pyx_kp_u_Sequence_str) < 0) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 1164, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1168 + /* "constraint/constraints.py":1178 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< * bounds = [] * for var in self.product_vars: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint__get_p, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_3_get_product_bounds, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint__get_p, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_3) < 0) __PYX_ERR(0, 1168, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_3) < 0) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1186 + /* "constraint/constraints.py":1196 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< * prod = 1 * for v in values: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint__safe, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_5_safe_product, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint__safe, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_3) < 0) __PYX_ERR(0, 1186, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_3) < 0) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1192 + /* "constraint/constraints.py":1202 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint_prePro, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_7preProcess, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint_prePro, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 1192, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1205 + /* "constraint/constraints.py":1215 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * if self.target_var not in assignments: * return True # Can't evaluate yet */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___call_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_25VariableMaxProdConstraint_9__call__, 0, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint___call_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 1205, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1153 + /* "constraint/constraints.py":1163 * * * class VariableMaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at most the value of another variable. * */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 1153, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 1163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1249 + /* "constraint/constraints.py":1259 * * * class InSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are present in the given set. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_mstate_global->__pyx_n_u_InSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_mstate_global->__pyx_n_u_InSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1249, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1259, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1260 + /* "constraint/constraints.py":1270 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1268 + /* "constraint/constraints.py":1278 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * # preProcess() will remove it. * raise RuntimeError("Can't happen") */ - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[1]); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < 0) __PYX_ERR(0, 1268, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1272 + /* "constraint/constraints.py":1282 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * for variable in variables: */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_5preProcess, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_15InSetConstraint_5preProcess, 0, __pyx_mstate_global->__pyx_n_u_InSetConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1249 + /* "constraint/constraints.py":1259 * * * class InSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are present in the given set. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_4) < 0) __PYX_ERR(0, 1249, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_4) < 0) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1283 + /* "constraint/constraints.py":1293 * * * class NotInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are not present in the given set. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1283, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1293, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1294 + /* "constraint/constraints.py":1304 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < 0) __PYX_ERR(0, 1294, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1302 + /* "constraint/constraints.py":1312 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * # preProcess() will remove it. * raise RuntimeError("Can't happen") */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1302, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1306 + /* "constraint/constraints.py":1316 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * for variable in variables: */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_5preProcess, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1306, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_18NotInSetConstraint_5preProcess, 0, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint_preProcess, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1283 + /* "constraint/constraints.py":1293 * * * class NotInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are not present in the given set. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_6) < 0) __PYX_ERR(0, 1283, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_6) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1317 + /* "constraint/constraints.py":1327 * * * class SomeInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that at least some of the values of given variables must be present in a given set. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_at_lea); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_at_lea); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1317, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 1327, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1328 + /* "constraint/constraints.py":1338 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19SomeInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19SomeInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[4]); - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 1328, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_3) < 0) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1342 + /* "constraint/constraints.py":1352 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * missing = 0 */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19SomeInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1342, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_19SomeInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1317 + /* "constraint/constraints.py":1327 * * * class SomeInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that at least some of the values of given variables must be present in a given set. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_5) < 0) __PYX_ERR(0, 1317, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_5) < 0) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1379 + /* "constraint/constraints.py":1389 * * * class SomeNotInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that at least some of the values of given variables must not be present in a given set. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_at_lea_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_at_lea_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1379, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1389, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1390 + /* "constraint/constraints.py":1400 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22SomeNotInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22SomeNotInSetConstraint_1__init__, 0, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[4]); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < 0) __PYX_ERR(0, 1390, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < 0) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1404 + /* "constraint/constraints.py":1414 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * missing = 0 */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22SomeNotInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < 0) __PYX_ERR(0, 1414, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1414, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < 0) __PYX_ERR(0, 1414, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_22SomeNotInSetConstraint_3__call__, 0, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint___call, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 1404, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_3) < 0) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1379 + /* "constraint/constraints.py":1389 * * * class SomeNotInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that at least some of the values of given variables must not be present in a given set. * */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 1379, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_3) < 0) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -45556,6 +46568,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_Constraint_which_wraps_a_functio, sizeof(__pyx_k_Constraint_which_wraps_a_functio), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Constraint_which_wraps_a_functio */ {__pyx_k_ExactProdConstraint, sizeof(__pyx_k_ExactProdConstraint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint */ {__pyx_k_ExactProdConstraint___call, sizeof(__pyx_k_ExactProdConstraint___call), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint___call */ + {__pyx_k_ExactProdConstraint___call___loc, sizeof(__pyx_k_ExactProdConstraint___call___loc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint___call___loc */ {__pyx_k_ExactProdConstraint___init, sizeof(__pyx_k_ExactProdConstraint___init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint___init */ {__pyx_k_ExactProdConstraint_preProcess, sizeof(__pyx_k_ExactProdConstraint_preProcess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint_preProcess */ {__pyx_k_ExactProdConstraint_preProcess_l, sizeof(__pyx_k_ExactProdConstraint_preProcess_l), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ExactProdConstraint_preProcess_l */ @@ -45573,6 +46586,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_Last_multiplier_must_be_1_as_it, sizeof(__pyx_k_Last_multiplier_must_be_1_as_it), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_Last_multiplier_must_be_1_as_it */ {__pyx_k_MaxProdConstraint, sizeof(__pyx_k_MaxProdConstraint), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint */ {__pyx_k_MaxProdConstraint___call, sizeof(__pyx_k_MaxProdConstraint___call), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint___call */ + {__pyx_k_MaxProdConstraint___call___local, sizeof(__pyx_k_MaxProdConstraint___call___local), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint___call___local */ {__pyx_k_MaxProdConstraint___init, sizeof(__pyx_k_MaxProdConstraint___init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint___init */ {__pyx_k_MaxProdConstraint_preProcess, sizeof(__pyx_k_MaxProdConstraint_preProcess), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint_preProcess */ {__pyx_k_MaxProdConstraint_preProcess_loc, sizeof(__pyx_k_MaxProdConstraint_preProcess_loc), 0, 1, 1}, /* PyObject cname: __pyx_n_u_MaxProdConstraint_preProcess_loc */ @@ -45822,7 +46836,7 @@ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 405, __pyx_L1_error) __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 410, __pyx_L1_error) __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_min); if (!__pyx_builtin_min) __PYX_ERR(0, 415, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1280, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -45845,14 +46859,14 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - /* "constraint/constraints.py":862 + /* "constraint/constraints.py":867 * all_bounds = [b for b in bounds] * if not all_bounds: * return 1, 1 # <<<<<<<<<<<<<< * * # Get all combinations of min/max to find global min/max product */ - __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_1); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); @@ -45889,14 +46903,14 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); - /* "constraint/constraints.py":1328 + /* "constraint/constraints.py":1338 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_RefNannyFinishContext(); @@ -45989,339 +47003,349 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 780, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 781, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 913, 2}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 810, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 914, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 918, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 928, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 919, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; - __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1070, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 933, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1075, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p}; - __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + } + { + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1110, 2}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1104, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1139, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1241, 2}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1251, 2}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p}; - __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_k_Q_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11, 20}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck}; - __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 36, 109}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_3a_Q_y_WAQ_q_4t1Kz_1_wb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_3a_Q_y_WAQ_q_4t1Kz_1_wb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64, 151}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_unassigned, __pyx_mstate->__pyx_n_u_unassignedvariable, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_forwardCheck, __pyx_k_99LL___Q_L_y_q_c_1_q_1_4t1Ky_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_forwardCheck, __pyx_k_99LL___Q_L_y_q_c_1_q_1_4t1Ky_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 126, 25}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_n_u_assigned}; - __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_Zz_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_Zz_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138, 142}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_unassigned, __pyx_mstate->__pyx_n_u_parms, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_x}; - __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_A_E_r_A_WA_WAQ_1_82Q_D_3d_M_HC, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_A_E_r_A_WA_WAQ_1_82Q_D_3d_M_HC, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 194, 23}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_func, __pyx_mstate->__pyx_n_u_assigned}; - __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_U_A_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_U_A_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 198, 19}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_unassigned}; - __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_88XXY, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_88XXY, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 213, 146}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_unassigned, __pyx_mstate->__pyx_n_u_seen, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_domain}; - __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_q_L_Kt1Ja_vWA_6_A_1_AYa_1_A_9G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_q_L_Kt1Ja_vWA_6_A_1_AYa_1_A_9G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 251, 160}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_unassigned, __pyx_mstate->__pyx_n_u_singlevalue, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_domain}; - __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_a_L_Kt1Ja_3a_a_wl_fCq_q_L_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_A_a_L_Kt1Ja_3a_a_wl_fCq_q_L_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 289, 27}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exactsum, __pyx_mstate->__pyx_n_u_multipliers}; - __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_4M_M_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_4M_M_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 301, 149}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_exactsum, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_1_1Kq_IV1_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_1_1Kq_IV1_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 318, 375}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_exactsum, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4q_a_1_1Kq_9Cq_az_1_a_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4q_a_1_1Kq_9Cq_az_1_a_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 377, 86}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_sum_vars, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 396, 220}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_others_min, __pyx_mstate->__pyx_n_u_others_max, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_1_3at_a_IV1_vR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_1_3at_a_IV1_vR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 418, 347}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_sum_value, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_temp_sum}; - __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 481, 27}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_minsum, __pyx_mstate->__pyx_n_u_multipliers}; - __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_2_q_Kq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_2_q_Kq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 493, 135}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_minsum, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_n_u_multiplier}; - __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_L_y_q_q_d_Q_a_1_1Kq_Rq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_L_y_q_q_d_Q_a_1_1Kq_Rq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 524, 86}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_sum_vars, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 543, 114}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_others_max, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 556, 184}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_sum_value, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_multiplier}; - __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 595, 27}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maxsum, __pyx_mstate->__pyx_n_u_multipliers}; - __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_2_q_Kq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_2_q_Kq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 607, 257}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_variable_contains_negative, __pyx_mstate->__pyx_n_u_variable_with_negative, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_negative, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_maxsum, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6Q_L_7_gQa_q_d_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6Q_L_7_gQa_q_d_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 642, 334}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_maxsum, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_Q_a_1_1Kq_9Cq_az_1_z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_Q_a_1_1Kq_9Cq_az_1_z_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 694, 86}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_sum_vars, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 713, 114}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_others_min, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 726, 184}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_multipliers, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_sum_value, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_multiplier}; - __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 765, 14}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 765, 22}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exactprod}; - __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_N_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 773, 216}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 774, 216}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_variable_with_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_exactprod, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 801, 258}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_exactprod, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_D_q_a_J_c_T_y_1_1A_1_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 802, 297}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_exactprod, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_D_q_a_3at_Cs_1_A_7_Q_J_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 839, 25}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 844, 25}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_product_vars}; - __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 849, 161}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 854, 161}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domain_dict, __pyx_mstate->__pyx_n_u_exclude_var, __pyx_mstate->__pyx_n_u_bounds, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_dom, __pyx_mstate->__pyx_n_u_all_bounds, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_products, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_p}; - __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_Qb_E_4q_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_Qb_E_4q_3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 869, 24}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 874, 24}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_v}; - __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 875, 167}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 880, 167}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_target_domain, __pyx_mstate->__pyx_n_u_target_min, __pyx_mstate->__pyx_n_u_target_max, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_other_min, __pyx_mstate->__pyx_n_u_other_max, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_minval, __pyx_mstate->__pyx_n_u_maxval}; - __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_q_A_S_S_G4q_4_1I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_q_A_S_S_G4q_4_1I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 890, 427}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 32, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 895, 427}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_assigned_product, __pyx_mstate->__pyx_n_u_unassigned_vars, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_domain_bounds, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_possible_min, __pyx_mstate->__pyx_n_u_possible_max, __pyx_mstate->__pyx_n_u_others, __pyx_mstate->__pyx_n_u_others_bounds, __pyx_mstate->__pyx_n_u_other_products, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_1_G4q_t3a_Kq_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_1_G4q_t3a_Kq_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 947, 14}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 952, 14}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_minprod}; - __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 955, 92}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 960, 92}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_minprod, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_a_L_WAQ_q_6_Bd_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_a_L_WAQ_q_6_Bd_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 966, 95}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 971, 95}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_minprod, __pyx_mstate->__pyx_n_u_prod}; - __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_L_y_q_q_a_q_L_Kq_QfA_5_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_L_y_q_q_a_q_L_Kq_QfA_5_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 993, 23}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 998, 23}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_product_vars}; - __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 997, 148}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1002, 148}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domain_dict, __pyx_mstate->__pyx_n_u_exclude_var, __pyx_mstate->__pyx_n_u_bounds, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_dom, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_products, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_p}; - __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1015, 24}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1020, 24}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_v}; - __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1021, 138}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1026, 138}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_target_dom, __pyx_mstate->__pyx_n_u_t_min, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_min_others, __pyx_mstate->__pyx_n_u_max_others, __pyx_mstate->__pyx_n_u_dom, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_possible_prods}; - __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1034, 395}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1039, 395}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_assigned_prod, __pyx_mstate->__pyx_n_u_unassigned_2, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_domain_bounds, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_possible_prods, __pyx_mstate->__pyx_n_u_other_unassigned, __pyx_mstate->__pyx_n_u_bounds, __pyx_mstate->__pyx_n_u_other_products, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_prods, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1089, 14}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1094, 22}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maxprod}; - __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_L_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1097, 216}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1103, 216}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_variable_with_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_maxprod, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1125, 248}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_maxprod, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_a_q_a_J_c_T_y_1_1A_1_waq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1131, 287}; + PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_maxprod, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_lt1, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_contains_lt1, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; + __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_a_q_a_3at_Cs_1_A_7_Q_J_c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1164, 23}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1174, 23}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_target_var, __pyx_mstate->__pyx_n_u_product_vars}; - __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_6a_N_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1168, 148}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1178, 148}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domain_dict, __pyx_mstate->__pyx_n_u_exclude_var, __pyx_mstate->__pyx_n_u_bounds, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_dom, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_products, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_p}; - __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_k_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1186, 24}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1196, 24}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_prod, __pyx_mstate->__pyx_n_u_v}; - __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_k_A_q_E_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1192, 138}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1202, 138}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_target_dom, __pyx_mstate->__pyx_n_u_t_max, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_min_others, __pyx_mstate->__pyx_n_u_max_others, __pyx_mstate->__pyx_n_u_dom, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_possible_prods}; - __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1205, 395}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1215, 395}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_target_value, __pyx_mstate->__pyx_n_u_assigned_prod, __pyx_mstate->__pyx_n_u_unassigned_2, __pyx_mstate->__pyx_n_u_var, __pyx_mstate->__pyx_n_u_domain_bounds, __pyx_mstate->__pyx_n_u_candidates, __pyx_mstate->__pyx_n_u_possible_prods, __pyx_mstate->__pyx_n_u_other_unassigned, __pyx_mstate->__pyx_n_u_bounds, __pyx_mstate->__pyx_n_u_other_products, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_prods, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_lo, __pyx_mstate->__pyx_n_u_hi, __pyx_mstate->__pyx_n_u_o, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1260, 11}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1270, 11}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set}; - __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1268, 14}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1278, 14}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck}; - __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_8_l_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_8_l_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1272, 91}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1282, 91}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_d_L_WAQ_q_6_6_7_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_d_L_WAQ_q_6_6_7_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1294, 11}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1304, 11}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set}; - __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_A_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1302, 14}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1312, 14}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck}; - __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_8_l_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_8_l_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1306, 91}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1316, 91}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_d_L_WAQ_q_6_A_6_7_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_k_77JJeef_d_L_WAQ_q_6_A_6_7_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1328, 30}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1338, 30}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_exact}; - __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_E_HA_F_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_E_HA_F_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1342, 249}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1352, 249}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_found, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_L_y_1_AZs_1_1_t1_5_c_WH, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_L_y_1_AZs_1_1_t1_5_c_WH, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1390, 30}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1400, 30}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_exact}; - __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_E_HA_F_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_k_E_HA_F_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1404, 249}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1414, 249}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_assignments, __pyx_mstate->__pyx_n_u_forwardcheck, __pyx_mstate->__pyx_n_u_set, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_found, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_L_y_1_AZwa_1_1_t1_5_c_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_k_55H_a_d_L_y_1_AZwa_1_1_t1_5_c_W, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; diff --git a/constraint/constraints.py b/constraint/constraints.py index c5038b9..59f2ce9 100644 --- a/constraint/constraints.py +++ b/constraint/constraints.py @@ -769,6 +769,7 @@ def __init__(self, exactprod: Union[int, float]): exactprod: Value to be considered as the product """ self._exactprod = exactprod + self._variable_contains_lt1: list[bool] = list() def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -803,6 +804,10 @@ def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwar prod = 1 missing = False missing_lt1 = [] + # find out which variables contain values less than 1 if not preprocessed + if len(self._variable_contains_lt1) != len(variables): + for variable in variables: + self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): if variable in assignments: prod *= assignments[variable] @@ -1093,6 +1098,7 @@ def __init__(self, maxprod: Union[int, float]): maxprod: Value to be considered as the maximum product """ self._maxprod = maxprod + self._variable_contains_lt1: list[bool] = list() def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 Constraint.preProcess(self, variables, domains, constraints, vconstraints) @@ -1127,6 +1133,10 @@ def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwar prod = 1 missing = False missing_lt1 = [] + # find out which variables contain values less than 1 if not preprocessed + if len(self._variable_contains_lt1) != len(variables): + for variable in variables: + self._variable_contains_lt1.append(any(value < 1 for value in domains[variable])) for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): if variable in assignments: prod *= assignments[variable] diff --git a/pyproject.toml b/pyproject.toml index ca30069..e9dc285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [project] name = "python-constraint2" # when set back to "python-constraint", don't forget to remove '2' in other places (e.g. README) description = "python-constraint is a module for efficiently solving CSPs (Constraint Solving Problems) over finite domains." -version = "2.3.0" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55 +version = "2.3.1" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55 authors = [ {name = "Gustavo Niemeyer", email = "gustavo@niemeyer.net"}, {name = "Sébastien Celles", email = "s.celles@gmail.com"}, diff --git a/tests/test_parser.py b/tests/test_parser.py index 2d4117a..2219722 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -137,3 +137,22 @@ def test_compile_to_constraints_picklable(): assert callable(r) else: assert isinstance(r, expected) + +def test_compile_non_numeric(): + domains = {"x": ["a2", "b4", "c6"], "y": [True, False]} + constraints = [ + "x == 'a'", + "y == 'd' or x != 'b'", + "'a' <= x + y < 'c'" + ] + + compiled = compile_to_constraints(constraints, domains, picklable=False) + + assert len(compiled) == 4 + for r, vals, r_str in compiled: + assert isinstance(r, (Constraint, CompilableFunctionConstraint)) + assert isinstance(vals, Iterable) and all(isinstance(v, str) for v in vals) + if isinstance(r, (FunctionConstraint, CompilableFunctionConstraint)): + assert isinstance(r_str, str) + else: + assert r_str is None diff --git a/tests/test_solvers.py b/tests/test_solvers.py index adc4c31..2698537 100644 --- a/tests/test_solvers.py +++ b/tests/test_solvers.py @@ -94,7 +94,7 @@ def test_parallel_solver(): order = ["x", "y"] # get all solutions - solutions_list, solutions_dict, size = problem.getSolutionsAsListDict(order=order) + solutions_list, _, size = problem.getSolutionsAsListDict(order=order) # validate all solutions assert size == len(true_solutions) @@ -120,7 +120,7 @@ def test_parallel_solver_process_mode(): order = ["x", "y"] # get all solutions - solutions_list, solutions_dict, size = problem.getSolutionsAsListDict(order=order) + solutions_list, _, size = problem.getSolutionsAsListDict(order=order) # validate all solutions assert size == len(true_solutions) @@ -175,4 +175,32 @@ def create_problem(solver): base_solution = solutions_list else: assert size == len(base_solution) - # assert all(sol in solutions_list for sol in base_solution) \ No newline at end of file + # assert all(sol in solutions_list for sol in base_solution) + +def test_mixed_type_constraints(): + """Test that mixed type constraints are handled correctly.""" + problem = Problem() + domains = {"x": ["a", "b", "c"], "y": [True, False], "z": [0, 1]} + for var, domain in domains.items(): + problem.addVariable(var, domain) + constraints = [ + "x != 'a' or y < z", + "y or x != 'b'", + ] + problem.addConstraint(constraints) + solutions, _, _ = problem.getSolutionsAsListDict(order=list(domains.keys())) + + possible_solutions = [ + ('c', False, 1), + ('c', False, 0), + ('a', False, 1), + ('b', True, 0), + ('b', True, 1), + ('c', True, 0), + ('c', True, 1) + ] + + assert len(solutions) == len(possible_solutions), "Number of solutions does not match expected" + assert len(set(solutions)) == len(possible_solutions), "Number of unique solutions does not match expected" + for solution in solutions: + assert solution in possible_solutions, f"Unexpected solution: {solution}"