diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 9310699..3198fd7 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: # important: if this matrix is changed, also change EXPECTED_WHEELS_COUNT in `build_and_publish_as_package` below os: [ubuntu-22.04, ubuntu-latest, macos-latest, windows-latest] # ubuntu-22.04 is used to generate wheels for manylinux_2_35 in addition to the manylinux_2_39 of ubuntu-latest - pyversion: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + pyversion: ["3.11", "3.12", "3.13", "3.14"] exclude: - os: ubuntu-latest pyversion: "3.12" # exclude because we already use this OS and version for building the source package @@ -96,7 +96,7 @@ jobs: exit 1; fi - EXPECTED_WHEELS_COUNT=24 + EXPECTED_WHEELS_COUNT=16 WHEELS_COUNT=$(ls -lR ./dist/*.whl | wc -l) echo "Number of wheel distributions: $WHEELS_COUNT" if [ "$WHEELS_COUNT" -ne "$EXPECTED_WHEELS_COUNT" ]; then diff --git a/CHANGELOG.md b/CHANGELOG.md index d10936c..7b7c856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this code base will be documented in this file, for every released major and minor version. For all versions, see [releases](https://github.com/python-constraint/python-constraint/releases). +### Version 2.6.0 +- Released: 2026-06-29 +- Issues / Enhancements: + - Improved type specification. + - Resolved issue #108 relating to pruning (thank you @gaoflow). + - Various minor improvements. + - Updated build and documentation dependencies. + - Dropped Python 3.9 & 3.10 support. + ### Version 2.5.0 - Released: 2026-01-08 - Issues / Enhancements: diff --git a/README.rst b/README.rst index 9cab614..6adf220 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,6 @@ -|License| |Build Status| |Docs| |Python Versions| |Downloads| |Status| |Code Coverage| +|CondaDownloads| |Downloads| +|Python Versions| +|License| |Build Status| |Status| |Docs| |Code Coverage| .. image:: https://github.com/python-constraint/python-constraint/raw/main/docs/assets/logo/N-Queens_problem_Python.svg :align: center @@ -7,13 +9,16 @@ python-constraint ================= -| This software is now back to active development / maintainance status. -| IMPORTANT: the new version can be installed with `pip install python-constraint2`, as the original pip release will not be updated. +| ⚠️ IMPORTANT: this software must be installed with ``pip install python-constraint2``, as the original pip release will not be updated. +| A `Conda Forge `_ / `Mamba `_ version is also available: ``conda install python-constraint2``. +| + | For an overview of recent changes, visit the `Changelog `_. | The complete documentation can be found `here `_. +| | New: writing constraints in the new string format is preferable over functions and lambdas. -| These strings, even as compound statements, are automatically parsed to faster built-in constraints, are more concise, and do not require constraint solving familiarity by the user to be efficient. +| These strings, even as compound statements, are automatically parsed to faster built-in constraints, are more concise, and do not require constraint solving familiarity by the user to be efficient. | For example, :code:`problem.addConstraint(["50 <= x * y < 100"])` is parsed to :code:`[MinProdConstraint(50, ["x", "y"]), MaxProdConstraint(100, ["x", "y"])]`. | Similarly, :code:`problem.addConstraint(["x / y == z"])` is parsed to :code:`[ExactProdConstraint("x", ["z", "y"])]`. | This feature is in beta and subject to possible change, please provide feedback. @@ -155,6 +160,15 @@ Download and install $ pip install python-constraint2 +Conda / Mamba: + +.. code-block:: shell + + $ conda config --add channels conda-forge + $ conda config --set channel_priority strict + $ conda install python-constraint2 + $ mamba install python-constraint2 + Testing ------- @@ -208,6 +222,9 @@ But it's probably better to `open an issue @@ -1550,7 +1550,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars; struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr; -/* "constraint/constraints.py":64 +/* "constraint/constraints.py":65 * vconstraints[variable].remove((self, variables)) * * def forwardCheck(self, variables: Sequence, domains: dict, assignments: dict, _unassigned=Unassigned): # <<<<<<<<<<<<<< @@ -1563,7 +1563,7 @@ struct __pyx_defaults { }; -/* "constraint/constraints.py":432 +/* "constraint/constraints.py":433 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -1577,7 +1577,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct__genexpr { }; -/* "constraint/constraints.py":435 +/* "constraint/constraints.py":436 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -1591,7 +1591,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_1_preProcess { }; -/* "constraint/constraints.py":449 +/* "constraint/constraints.py":450 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -1609,7 +1609,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_2_genexpr { }; -/* "constraint/constraints.py":450 +/* "constraint/constraints.py":451 * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -1627,7 +1627,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_3_genexpr { }; -/* "constraint/constraints.py":614 +/* "constraint/constraints.py":615 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -1641,7 +1641,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_4_genexpr { }; -/* "constraint/constraints.py":617 +/* "constraint/constraints.py":618 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -1655,7 +1655,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_5_preProcess { }; -/* "constraint/constraints.py":625 +/* "constraint/constraints.py":626 * for var in self.sum_vars: * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -1673,7 +1673,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_6_genexpr { }; -/* "constraint/constraints.py":793 +/* "constraint/constraints.py":794 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -1687,7 +1687,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_7_genexpr { }; -/* "constraint/constraints.py":796 +/* "constraint/constraints.py":797 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -1701,7 +1701,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_8_preProcess { }; -/* "constraint/constraints.py":804 +/* "constraint/constraints.py":805 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -1719,7 +1719,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_9_genexpr { }; -/* "constraint/constraints.py":869 +/* "constraint/constraints.py":870 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -1733,7 +1733,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_10_genexpr { }; -/* "constraint/constraints.py":898 +/* "constraint/constraints.py":899 * 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])) # <<<<<<<<<<<<<< @@ -1747,7 +1747,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_11_genexpr { }; -/* "constraint/constraints.py":989 +/* "constraint/constraints.py":990 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -1760,7 +1760,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ { }; -/* "constraint/constraints.py":1012 +/* "constraint/constraints.py":1013 * 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) # <<<<<<<<<<<<<< @@ -1777,7 +1777,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr { }; -/* "constraint/constraints.py":1013 +/* "constraint/constraints.py":1014 * 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) # <<<<<<<<<<<<<< @@ -1794,7 +1794,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr { }; -/* "constraint/constraints.py":1145 +/* "constraint/constraints.py":1146 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -1807,7 +1807,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15___call__ { }; -/* "constraint/constraints.py":1181 +/* "constraint/constraints.py":1182 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< @@ -1822,7 +1822,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr { }; -/* "constraint/constraints.py":1221 +/* "constraint/constraints.py":1222 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -1836,7 +1836,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr { }; -/* "constraint/constraints.py":1250 +/* "constraint/constraints.py":1251 * 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])) # <<<<<<<<<<<<<< @@ -1850,7 +1850,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr { }; -/* "constraint/constraints.py":1332 +/* "constraint/constraints.py":1333 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -1863,7 +1863,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ { }; -/* "constraint/constraints.py":1368 +/* "constraint/constraints.py":1369 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< @@ -1878,7 +1878,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_20_genexpr { }; -/* "constraint/constraints.py":1570 +/* "constraint/constraints.py":1571 * # Utility functions * * def sum_other_vars(variables: Sequence, variable, values: dict): # <<<<<<<<<<<<<< @@ -1892,7 +1892,7 @@ struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars }; -/* "constraint/constraints.py":1572 +/* "constraint/constraints.py":1573 * def sum_other_vars(variables: Sequence, variable, values: dict): * """Calculate the sum of the given values of all other variables.""" * return sum(values[v] for v in variables if v != variable) # <<<<<<<<<<<<<< @@ -3274,7 +3274,7 @@ typedef struct { PyObject *__pyx_slice[1]; PyObject *__pyx_tuple[4]; PyObject *__pyx_codeobj_tab[78]; - PyObject *__pyx_string_tab[351]; + PyObject *__pyx_string_tab[348]; PyObject *__pyx_number_tab[3]; /* #### Code section: module_state_contents ### */ @@ -3466,16 +3466,16 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_u_Multipliers_must_be_numbers __pyx_string_tab[24] #define __pyx_kp_u_Multipliers_must_match_sum_varia __pyx_string_tab[25] #define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[26] -#define __pyx_kp_u_Optional_Sequence __pyx_string_tab[27] +#define __pyx_kp_u_Sequence_None __pyx_string_tab[27] #define __pyx_kp_u_Sequence_str __pyx_string_tab[28] -#define __pyx_kp_u_Union_int_float __pyx_string_tab[29] -#define __pyx_kp_u_Wrapper_function_for_picklable_s __pyx_string_tab[30] -#define __pyx_kp_u__2 __pyx_string_tab[31] -#define __pyx_kp_u_add_note __pyx_string_tab[32] -#define __pyx_kp_u_constraint_constraints_py __pyx_string_tab[33] -#define __pyx_kp_u_disable __pyx_string_tab[34] -#define __pyx_kp_u_enable __pyx_string_tab[35] -#define __pyx_kp_u_gc __pyx_string_tab[36] +#define __pyx_kp_u_Wrapper_function_for_picklable_s __pyx_string_tab[29] +#define __pyx_kp_u__2 __pyx_string_tab[30] +#define __pyx_kp_u_add_note __pyx_string_tab[31] +#define __pyx_kp_u_constraint_constraints_py __pyx_string_tab[32] +#define __pyx_kp_u_disable __pyx_string_tab[33] +#define __pyx_kp_u_enable __pyx_string_tab[34] +#define __pyx_kp_u_gc __pyx_string_tab[35] +#define __pyx_kp_u_int_float __pyx_string_tab[36] #define __pyx_kp_u_isenabled __pyx_string_tab[37] #define __pyx_kp_u_list_tuple __pyx_string_tab[38] #define __pyx_n_u_AllDifferentConstraint __pyx_string_tab[39] @@ -3529,267 +3529,264 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_NotInSetConstraint___call __pyx_string_tab[87] #define __pyx_n_u_NotInSetConstraint___init __pyx_string_tab[88] #define __pyx_n_u_NotInSetConstraint_preProcess __pyx_string_tab[89] -#define __pyx_n_u_Optional __pyx_string_tab[90] -#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[91] -#define __pyx_n_u_Sequence __pyx_string_tab[92] -#define __pyx_n_u_SomeInSetConstraint __pyx_string_tab[93] -#define __pyx_n_u_SomeInSetConstraint___call __pyx_string_tab[94] -#define __pyx_n_u_SomeInSetConstraint___init __pyx_string_tab[95] -#define __pyx_n_u_SomeNotInSetConstraint __pyx_string_tab[96] -#define __pyx_n_u_SomeNotInSetConstraint___call __pyx_string_tab[97] -#define __pyx_n_u_SomeNotInSetConstraint___init __pyx_string_tab[98] -#define __pyx_n_u_Unassigned __pyx_string_tab[99] -#define __pyx_n_u_Union __pyx_string_tab[100] -#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[101] -#define __pyx_n_u_VariableExactProdConstraint___ca __pyx_string_tab[102] -#define __pyx_n_u_VariableExactProdConstraint___ca_2 __pyx_string_tab[103] -#define __pyx_n_u_VariableExactProdConstraint___in __pyx_string_tab[104] -#define __pyx_n_u_VariableExactProdConstraint__get __pyx_string_tab[105] -#define __pyx_n_u_VariableExactProdConstraint__saf __pyx_string_tab[106] -#define __pyx_n_u_VariableExactProdConstraint_preP __pyx_string_tab[107] -#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[108] -#define __pyx_n_u_VariableExactSumConstraint___cal __pyx_string_tab[109] -#define __pyx_n_u_VariableExactSumConstraint___ini __pyx_string_tab[110] -#define __pyx_n_u_VariableExactSumConstraint___ini_2 __pyx_string_tab[111] -#define __pyx_n_u_VariableExactSumConstraint_prePr __pyx_string_tab[112] -#define __pyx_n_u_VariableExactSumConstraint_prePr_2 __pyx_string_tab[113] -#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[114] -#define __pyx_n_u_VariableMaxProdConstraint___call __pyx_string_tab[115] -#define __pyx_n_u_VariableMaxProdConstraint___call_2 __pyx_string_tab[116] -#define __pyx_n_u_VariableMaxProdConstraint___init __pyx_string_tab[117] -#define __pyx_n_u_VariableMaxProdConstraint__get_p __pyx_string_tab[118] -#define __pyx_n_u_VariableMaxProdConstraint__safe __pyx_string_tab[119] -#define __pyx_n_u_VariableMaxProdConstraint_prePro __pyx_string_tab[120] -#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[121] -#define __pyx_n_u_VariableMaxSumConstraint___call __pyx_string_tab[122] -#define __pyx_n_u_VariableMaxSumConstraint___init __pyx_string_tab[123] -#define __pyx_n_u_VariableMaxSumConstraint___init_2 __pyx_string_tab[124] -#define __pyx_n_u_VariableMaxSumConstraint_preProc __pyx_string_tab[125] -#define __pyx_n_u_VariableMaxSumConstraint_preProc_2 __pyx_string_tab[126] -#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[127] -#define __pyx_n_u_VariableMinProdConstraint___call __pyx_string_tab[128] -#define __pyx_n_u_VariableMinProdConstraint___call_2 __pyx_string_tab[129] -#define __pyx_n_u_VariableMinProdConstraint___init __pyx_string_tab[130] -#define __pyx_n_u_VariableMinProdConstraint__get_p __pyx_string_tab[131] -#define __pyx_n_u_VariableMinProdConstraint__safe __pyx_string_tab[132] -#define __pyx_n_u_VariableMinProdConstraint_prePro __pyx_string_tab[133] -#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[134] -#define __pyx_n_u_VariableMinSumConstraint___call __pyx_string_tab[135] -#define __pyx_n_u_VariableMinSumConstraint___init __pyx_string_tab[136] -#define __pyx_n_u_VariableMinSumConstraint___init_2 __pyx_string_tab[137] -#define __pyx_n_u_VariableMinSumConstraint_preProc __pyx_string_tab[138] -#define __pyx_n_u_VariableMinSumConstraint_preProc_2 __pyx_string_tab[139] -#define __pyx_n_u_all_bounds __pyx_string_tab[140] -#define __pyx_n_u_append __pyx_string_tab[141] -#define __pyx_n_u_assigned __pyx_string_tab[142] -#define __pyx_n_u_assigned_2 __pyx_string_tab[143] -#define __pyx_n_u_assigned_prod __pyx_string_tab[144] -#define __pyx_n_u_assigned_product __pyx_string_tab[145] -#define __pyx_n_u_assignments __pyx_string_tab[146] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[147] -#define __pyx_n_u_b __pyx_string_tab[148] -#define __pyx_n_u_bool __pyx_string_tab[149] -#define __pyx_n_u_bounds __pyx_string_tab[150] -#define __pyx_n_u_c __pyx_string_tab[151] -#define __pyx_n_u_call __pyx_string_tab[152] -#define __pyx_n_u_candidates __pyx_string_tab[153] -#define __pyx_n_u_class_getitem __pyx_string_tab[154] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[155] -#define __pyx_n_u_close __pyx_string_tab[156] -#define __pyx_n_u_collections_abc __pyx_string_tab[157] -#define __pyx_n_u_constraint_constraints __pyx_string_tab[158] -#define __pyx_n_u_constraint_domain __pyx_string_tab[159] -#define __pyx_n_u_constraints __pyx_string_tab[160] -#define __pyx_n_u_contains_lt1 __pyx_string_tab[161] -#define __pyx_n_u_dict __pyx_string_tab[162] -#define __pyx_n_u_doc __pyx_string_tab[163] -#define __pyx_n_u_dom __pyx_string_tab[164] -#define __pyx_n_u_domain __pyx_string_tab[165] -#define __pyx_n_u_domain_bounds __pyx_string_tab[166] -#define __pyx_n_u_domain_dict __pyx_string_tab[167] -#define __pyx_n_u_domains __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_n_u_genexpr __pyx_string_tab[182] -#define __pyx_n_u_get __pyx_string_tab[183] -#define __pyx_n_u_get_product_bounds __pyx_string_tab[184] -#define __pyx_n_u_hi __pyx_string_tab[185] -#define __pyx_n_u_hideValue __pyx_string_tab[186] -#define __pyx_n_u_index __pyx_string_tab[187] -#define __pyx_n_u_init __pyx_string_tab[188] -#define __pyx_n_u_is_coroutine __pyx_string_tab[189] -#define __pyx_n_u_items __pyx_string_tab[190] -#define __pyx_n_u_itertools __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_max_sum_missing __pyx_string_tab[197] -#define __pyx_n_u_maxprod __pyx_string_tab[198] -#define __pyx_n_u_maxprod_2 __pyx_string_tab[199] -#define __pyx_n_u_maxsum __pyx_string_tab[200] -#define __pyx_n_u_maxsum_2 __pyx_string_tab[201] -#define __pyx_n_u_maxval __pyx_string_tab[202] -#define __pyx_n_u_metaclass __pyx_string_tab[203] -#define __pyx_n_u_min __pyx_string_tab[204] -#define __pyx_n_u_min_others __pyx_string_tab[205] -#define __pyx_n_u_min_sum_missing __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_missing_negative __pyx_string_tab[214] -#define __pyx_n_u_module __pyx_string_tab[215] -#define __pyx_n_u_mro_entries __pyx_string_tab[216] -#define __pyx_n_u_multiplier __pyx_string_tab[217] -#define __pyx_n_u_multipliers __pyx_string_tab[218] -#define __pyx_n_u_multipliers_2 __pyx_string_tab[219] -#define __pyx_n_u_n __pyx_string_tab[220] -#define __pyx_n_u_n_2 __pyx_string_tab[221] -#define __pyx_n_u_name __pyx_string_tab[222] -#define __pyx_n_u_next __pyx_string_tab[223] -#define __pyx_n_u_o __pyx_string_tab[224] -#define __pyx_n_u_other_max __pyx_string_tab[225] -#define __pyx_n_u_other_min __pyx_string_tab[226] -#define __pyx_n_u_other_products __pyx_string_tab[227] -#define __pyx_n_u_other_unassigned __pyx_string_tab[228] -#define __pyx_n_u_other_vars_max __pyx_string_tab[229] -#define __pyx_n_u_other_vars_min __pyx_string_tab[230] -#define __pyx_n_u_others_max __pyx_string_tab[231] -#define __pyx_n_u_others_min __pyx_string_tab[232] -#define __pyx_n_u_p __pyx_string_tab[233] -#define __pyx_n_u_parms __pyx_string_tab[234] -#define __pyx_n_u_pop __pyx_string_tab[235] -#define __pyx_n_u_possible_max __pyx_string_tab[236] -#define __pyx_n_u_possible_min __pyx_string_tab[237] -#define __pyx_n_u_possible_prods __pyx_string_tab[238] -#define __pyx_n_u_preProcess __pyx_string_tab[239] -#define __pyx_n_u_prepare __pyx_string_tab[240] -#define __pyx_n_u_prod __pyx_string_tab[241] -#define __pyx_n_u_prods __pyx_string_tab[242] -#define __pyx_n_u_product __pyx_string_tab[243] -#define __pyx_n_u_product_vars __pyx_string_tab[244] -#define __pyx_n_u_products __pyx_string_tab[245] -#define __pyx_n_u_qualname __pyx_string_tab[246] -#define __pyx_n_u_remove __pyx_string_tab[247] -#define __pyx_n_u_round __pyx_string_tab[248] -#define __pyx_n_u_safe_product __pyx_string_tab[249] -#define __pyx_n_u_seen __pyx_string_tab[250] -#define __pyx_n_u_self __pyx_string_tab[251] -#define __pyx_n_u_send __pyx_string_tab[252] -#define __pyx_n_u_set __pyx_string_tab[253] -#define __pyx_n_u_set_2 __pyx_string_tab[254] -#define __pyx_n_u_set_name __pyx_string_tab[255] -#define __pyx_n_u_setdefault __pyx_string_tab[256] -#define __pyx_n_u_singlevalue __pyx_string_tab[257] -#define __pyx_n_u_str __pyx_string_tab[258] -#define __pyx_n_u_sum __pyx_string_tab[259] -#define __pyx_n_u_sum_other_vars __pyx_string_tab[260] -#define __pyx_n_u_sum_other_vars_locals_genexpr __pyx_string_tab[261] -#define __pyx_n_u_sum_value __pyx_string_tab[262] -#define __pyx_n_u_sum_vars __pyx_string_tab[263] -#define __pyx_n_u_t_max __pyx_string_tab[264] -#define __pyx_n_u_t_min __pyx_string_tab[265] -#define __pyx_n_u_target_dom __pyx_string_tab[266] -#define __pyx_n_u_target_domain __pyx_string_tab[267] -#define __pyx_n_u_target_max __pyx_string_tab[268] -#define __pyx_n_u_target_min __pyx_string_tab[269] -#define __pyx_n_u_target_value __pyx_string_tab[270] -#define __pyx_n_u_target_var __pyx_string_tab[271] -#define __pyx_n_u_temp_sum __pyx_string_tab[272] -#define __pyx_n_u_test __pyx_string_tab[273] -#define __pyx_n_u_throw __pyx_string_tab[274] -#define __pyx_n_u_typing __pyx_string_tab[275] -#define __pyx_n_u_unassigned __pyx_string_tab[276] -#define __pyx_n_u_unassigned_2 __pyx_string_tab[277] -#define __pyx_n_u_unassigned_vars __pyx_string_tab[278] -#define __pyx_n_u_unassignedvariable __pyx_string_tab[279] -#define __pyx_n_u_v __pyx_string_tab[280] -#define __pyx_n_u_val __pyx_string_tab[281] -#define __pyx_n_u_value __pyx_string_tab[282] -#define __pyx_n_u_values __pyx_string_tab[283] -#define __pyx_n_u_var __pyx_string_tab[284] -#define __pyx_n_u_var_is_negative __pyx_string_tab[285] -#define __pyx_n_u_var_max __pyx_string_tab[286] -#define __pyx_n_u_var_min __pyx_string_tab[287] -#define __pyx_n_u_variable __pyx_string_tab[288] -#define __pyx_n_u_variable_contains_lt1 __pyx_string_tab[289] -#define __pyx_n_u_variable_with_lt1 __pyx_string_tab[290] -#define __pyx_n_u_variables __pyx_string_tab[291] -#define __pyx_n_u_vconstraints __pyx_string_tab[292] -#define __pyx_n_u_x __pyx_string_tab[293] -#define __pyx_n_u_zip __pyx_string_tab[294] -#define __pyx_kp_b_iso88591_2_q_Kq_A_L __pyx_string_tab[295] -#define __pyx_kp_b_iso88591_2_q_Kq_A_L_2 __pyx_string_tab[296] -#define __pyx_kp_b_iso88591_3gQ __pyx_string_tab[297] -#define __pyx_kp_b_iso88591_4M_M_A_L_L __pyx_string_tab[298] -#define __pyx_kp_b_iso88591_55H_a_4_7_1_4q_1_G4q_t3a_Kq_waq __pyx_string_tab[299] -#define __pyx_kp_b_iso88591_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q __pyx_string_tab[300] -#define __pyx_kp_b_iso88591_55H_a_D_q_a_3at_Cs_1_A_7_Q_J_c __pyx_string_tab[301] -#define __pyx_kp_b_iso88591_55H_a_L_y_q_q_a_q_L_Kq_QfA_5_q __pyx_string_tab[302] -#define __pyx_kp_b_iso88591_55H_a_a_q_a_3at_Cs_1_A_7_Q_J_c __pyx_string_tab[303] -#define __pyx_kp_b_iso88591_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A __pyx_string_tab[304] -#define __pyx_kp_b_iso88591_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2 __pyx_string_tab[305] -#define __pyx_kp_b_iso88591_55H_a_d_4q_a_1_1_1Kq_9Cq_az_1_t __pyx_string_tab[306] -#define __pyx_kp_b_iso88591_55H_a_d_L_y_1_AZs_1_1_t1_5_c_WH __pyx_string_tab[307] -#define __pyx_kp_b_iso88591_55H_a_d_L_y_1_AZwa_1_1_t1_5_c_W __pyx_string_tab[308] -#define __pyx_kp_b_iso88591_55H_a_d_Q_a_1_1Kq_9Cq_az_1_t9AQ __pyx_string_tab[309] -#define __pyx_kp_b_iso88591_55H_a_d_Q_a_1_1_1Kq_9Cq_az_1_t9 __pyx_string_tab[310] -#define __pyx_kp_b_iso88591_55H_a_q __pyx_string_tab[311] -#define __pyx_kp_b_iso88591_6a_N_A __pyx_string_tab[312] -#define __pyx_kp_b_iso88591_6a_N_A_2 __pyx_string_tab[313] -#define __pyx_kp_b_iso88591_77JJeef_3a_Q_y_WAQ_q_4t1Kz_1_wb __pyx_string_tab[314] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J __pyx_string_tab[315] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J_2 __pyx_string_tab[316] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi __pyx_string_tab[317] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_a_L_WAQ_q_6_Bd_A __pyx_string_tab[318] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_1_3at_a_IV1_vR __pyx_string_tab[319] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_4q_L __pyx_string_tab[320] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_L_Cq __pyx_string_tab[321] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_Q_L_C __pyx_string_tab[322] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1 __pyx_string_tab[323] -#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_q_A_S_S_G4q_4_1I __pyx_string_tab[324] -#define __pyx_kp_b_iso88591_77JJeef_d_L_WAQ_q_6_6_7_F __pyx_string_tab[325] -#define __pyx_kp_b_iso88591_77JJeef_d_L_WAQ_q_6_A_6_7_F __pyx_string_tab[326] -#define __pyx_kp_b_iso88591_88XXY __pyx_string_tab[327] -#define __pyx_kp_b_iso88591_8_l_1 __pyx_string_tab[328] -#define __pyx_kp_b_iso88591_99LL___Q_L_y_q_c_1_q_1_4t1Ky_AQ __pyx_string_tab[329] -#define __pyx_kp_b_iso88591_A __pyx_string_tab[330] -#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[331] -#define __pyx_kp_b_iso88591_A_A_E_r_A_WA_WAQ_1_82Q_D_3d_M_HC __pyx_string_tab[332] -#define __pyx_kp_b_iso88591_A_HA __pyx_string_tab[333] -#define __pyx_kp_b_iso88591_A_a_L_Kt1Ja_3a_a_wl_fCq_q_L_q_A __pyx_string_tab[334] -#define __pyx_kp_b_iso88591_A_q_E_A_q __pyx_string_tab[335] -#define __pyx_kp_b_iso88591_A_q_L_Kt1Ja_vWA_6_A_1_AYa_1_A_9G __pyx_string_tab[336] -#define __pyx_kp_b_iso88591_E_HA_F_Ja __pyx_string_tab[337] -#define __pyx_kp_b_iso88591_L __pyx_string_tab[338] -#define __pyx_kp_b_iso88591_L_6a __pyx_string_tab[339] -#define __pyx_kp_b_iso88591_N_6a __pyx_string_tab[340] -#define __pyx_kp_b_iso88591_Q __pyx_string_tab[341] -#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[342] -#define __pyx_kp_b_iso88591_Q_3 __pyx_string_tab[343] -#define __pyx_kp_b_iso88591_Q_4 __pyx_string_tab[344] -#define __pyx_kp_b_iso88591_U_A_IQ_M __pyx_string_tab[345] -#define __pyx_kp_b_iso88591_Zz_IQ_M __pyx_string_tab[346] -#define __pyx_kp_b_iso88591__3 __pyx_string_tab[347] -#define __pyx_kp_b_iso88591_a_N_L_A_1_3a_Cs_Rs_J_b_3c __pyx_string_tab[348] -#define __pyx_kp_b_iso88591_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E __pyx_string_tab[349] -#define __pyx_kp_b_iso88591_q_G4q_t3a_Qa_t1_3avS_Qb_E_4q_3a __pyx_string_tab[350] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[90] +#define __pyx_n_u_Sequence __pyx_string_tab[91] +#define __pyx_n_u_SomeInSetConstraint __pyx_string_tab[92] +#define __pyx_n_u_SomeInSetConstraint___call __pyx_string_tab[93] +#define __pyx_n_u_SomeInSetConstraint___init __pyx_string_tab[94] +#define __pyx_n_u_SomeNotInSetConstraint __pyx_string_tab[95] +#define __pyx_n_u_SomeNotInSetConstraint___call __pyx_string_tab[96] +#define __pyx_n_u_SomeNotInSetConstraint___init __pyx_string_tab[97] +#define __pyx_n_u_Unassigned __pyx_string_tab[98] +#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[99] +#define __pyx_n_u_VariableExactProdConstraint___ca __pyx_string_tab[100] +#define __pyx_n_u_VariableExactProdConstraint___ca_2 __pyx_string_tab[101] +#define __pyx_n_u_VariableExactProdConstraint___in __pyx_string_tab[102] +#define __pyx_n_u_VariableExactProdConstraint__get __pyx_string_tab[103] +#define __pyx_n_u_VariableExactProdConstraint__saf __pyx_string_tab[104] +#define __pyx_n_u_VariableExactProdConstraint_preP __pyx_string_tab[105] +#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[106] +#define __pyx_n_u_VariableExactSumConstraint___cal __pyx_string_tab[107] +#define __pyx_n_u_VariableExactSumConstraint___ini __pyx_string_tab[108] +#define __pyx_n_u_VariableExactSumConstraint___ini_2 __pyx_string_tab[109] +#define __pyx_n_u_VariableExactSumConstraint_prePr __pyx_string_tab[110] +#define __pyx_n_u_VariableExactSumConstraint_prePr_2 __pyx_string_tab[111] +#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[112] +#define __pyx_n_u_VariableMaxProdConstraint___call __pyx_string_tab[113] +#define __pyx_n_u_VariableMaxProdConstraint___call_2 __pyx_string_tab[114] +#define __pyx_n_u_VariableMaxProdConstraint___init __pyx_string_tab[115] +#define __pyx_n_u_VariableMaxProdConstraint__get_p __pyx_string_tab[116] +#define __pyx_n_u_VariableMaxProdConstraint__safe __pyx_string_tab[117] +#define __pyx_n_u_VariableMaxProdConstraint_prePro __pyx_string_tab[118] +#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[119] +#define __pyx_n_u_VariableMaxSumConstraint___call __pyx_string_tab[120] +#define __pyx_n_u_VariableMaxSumConstraint___init __pyx_string_tab[121] +#define __pyx_n_u_VariableMaxSumConstraint___init_2 __pyx_string_tab[122] +#define __pyx_n_u_VariableMaxSumConstraint_preProc __pyx_string_tab[123] +#define __pyx_n_u_VariableMaxSumConstraint_preProc_2 __pyx_string_tab[124] +#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[125] +#define __pyx_n_u_VariableMinProdConstraint___call __pyx_string_tab[126] +#define __pyx_n_u_VariableMinProdConstraint___call_2 __pyx_string_tab[127] +#define __pyx_n_u_VariableMinProdConstraint___init __pyx_string_tab[128] +#define __pyx_n_u_VariableMinProdConstraint__get_p __pyx_string_tab[129] +#define __pyx_n_u_VariableMinProdConstraint__safe __pyx_string_tab[130] +#define __pyx_n_u_VariableMinProdConstraint_prePro __pyx_string_tab[131] +#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[132] +#define __pyx_n_u_VariableMinSumConstraint___call __pyx_string_tab[133] +#define __pyx_n_u_VariableMinSumConstraint___init __pyx_string_tab[134] +#define __pyx_n_u_VariableMinSumConstraint___init_2 __pyx_string_tab[135] +#define __pyx_n_u_VariableMinSumConstraint_preProc __pyx_string_tab[136] +#define __pyx_n_u_VariableMinSumConstraint_preProc_2 __pyx_string_tab[137] +#define __pyx_n_u_all_bounds __pyx_string_tab[138] +#define __pyx_n_u_append __pyx_string_tab[139] +#define __pyx_n_u_assigned __pyx_string_tab[140] +#define __pyx_n_u_assigned_2 __pyx_string_tab[141] +#define __pyx_n_u_assigned_prod __pyx_string_tab[142] +#define __pyx_n_u_assigned_product __pyx_string_tab[143] +#define __pyx_n_u_assignments __pyx_string_tab[144] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[145] +#define __pyx_n_u_b __pyx_string_tab[146] +#define __pyx_n_u_bool __pyx_string_tab[147] +#define __pyx_n_u_bounds __pyx_string_tab[148] +#define __pyx_n_u_c __pyx_string_tab[149] +#define __pyx_n_u_call __pyx_string_tab[150] +#define __pyx_n_u_candidates __pyx_string_tab[151] +#define __pyx_n_u_class_getitem __pyx_string_tab[152] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[153] +#define __pyx_n_u_close __pyx_string_tab[154] +#define __pyx_n_u_collections_abc __pyx_string_tab[155] +#define __pyx_n_u_constraint_constraints __pyx_string_tab[156] +#define __pyx_n_u_constraint_domain __pyx_string_tab[157] +#define __pyx_n_u_constraints __pyx_string_tab[158] +#define __pyx_n_u_contains_lt1 __pyx_string_tab[159] +#define __pyx_n_u_dict __pyx_string_tab[160] +#define __pyx_n_u_doc __pyx_string_tab[161] +#define __pyx_n_u_dom __pyx_string_tab[162] +#define __pyx_n_u_domain __pyx_string_tab[163] +#define __pyx_n_u_domain_bounds __pyx_string_tab[164] +#define __pyx_n_u_domain_dict __pyx_string_tab[165] +#define __pyx_n_u_domains __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_n_u_genexpr __pyx_string_tab[180] +#define __pyx_n_u_get __pyx_string_tab[181] +#define __pyx_n_u_get_product_bounds __pyx_string_tab[182] +#define __pyx_n_u_hi __pyx_string_tab[183] +#define __pyx_n_u_hideValue __pyx_string_tab[184] +#define __pyx_n_u_index __pyx_string_tab[185] +#define __pyx_n_u_init __pyx_string_tab[186] +#define __pyx_n_u_is_coroutine __pyx_string_tab[187] +#define __pyx_n_u_items __pyx_string_tab[188] +#define __pyx_n_u_itertools __pyx_string_tab[189] +#define __pyx_n_u_lo __pyx_string_tab[190] +#define __pyx_n_u_m __pyx_string_tab[191] +#define __pyx_n_u_main __pyx_string_tab[192] +#define __pyx_n_u_max __pyx_string_tab[193] +#define __pyx_n_u_max_others __pyx_string_tab[194] +#define __pyx_n_u_max_sum_missing __pyx_string_tab[195] +#define __pyx_n_u_maxprod __pyx_string_tab[196] +#define __pyx_n_u_maxprod_2 __pyx_string_tab[197] +#define __pyx_n_u_maxsum __pyx_string_tab[198] +#define __pyx_n_u_maxsum_2 __pyx_string_tab[199] +#define __pyx_n_u_maxval __pyx_string_tab[200] +#define __pyx_n_u_metaclass __pyx_string_tab[201] +#define __pyx_n_u_min __pyx_string_tab[202] +#define __pyx_n_u_min_others __pyx_string_tab[203] +#define __pyx_n_u_min_sum_missing __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_missing_negative __pyx_string_tab[212] +#define __pyx_n_u_module __pyx_string_tab[213] +#define __pyx_n_u_mro_entries __pyx_string_tab[214] +#define __pyx_n_u_multiplier __pyx_string_tab[215] +#define __pyx_n_u_multipliers __pyx_string_tab[216] +#define __pyx_n_u_multipliers_2 __pyx_string_tab[217] +#define __pyx_n_u_n __pyx_string_tab[218] +#define __pyx_n_u_n_2 __pyx_string_tab[219] +#define __pyx_n_u_name __pyx_string_tab[220] +#define __pyx_n_u_next __pyx_string_tab[221] +#define __pyx_n_u_o __pyx_string_tab[222] +#define __pyx_n_u_other_max __pyx_string_tab[223] +#define __pyx_n_u_other_min __pyx_string_tab[224] +#define __pyx_n_u_other_products __pyx_string_tab[225] +#define __pyx_n_u_other_unassigned __pyx_string_tab[226] +#define __pyx_n_u_other_vars_max __pyx_string_tab[227] +#define __pyx_n_u_other_vars_min __pyx_string_tab[228] +#define __pyx_n_u_others_max __pyx_string_tab[229] +#define __pyx_n_u_others_min __pyx_string_tab[230] +#define __pyx_n_u_p __pyx_string_tab[231] +#define __pyx_n_u_parms __pyx_string_tab[232] +#define __pyx_n_u_pop __pyx_string_tab[233] +#define __pyx_n_u_possible_max __pyx_string_tab[234] +#define __pyx_n_u_possible_min __pyx_string_tab[235] +#define __pyx_n_u_possible_prods __pyx_string_tab[236] +#define __pyx_n_u_preProcess __pyx_string_tab[237] +#define __pyx_n_u_prepare __pyx_string_tab[238] +#define __pyx_n_u_prod __pyx_string_tab[239] +#define __pyx_n_u_prods __pyx_string_tab[240] +#define __pyx_n_u_product __pyx_string_tab[241] +#define __pyx_n_u_product_vars __pyx_string_tab[242] +#define __pyx_n_u_products __pyx_string_tab[243] +#define __pyx_n_u_qualname __pyx_string_tab[244] +#define __pyx_n_u_remove __pyx_string_tab[245] +#define __pyx_n_u_round __pyx_string_tab[246] +#define __pyx_n_u_safe_product __pyx_string_tab[247] +#define __pyx_n_u_seen __pyx_string_tab[248] +#define __pyx_n_u_self __pyx_string_tab[249] +#define __pyx_n_u_send __pyx_string_tab[250] +#define __pyx_n_u_set __pyx_string_tab[251] +#define __pyx_n_u_set_2 __pyx_string_tab[252] +#define __pyx_n_u_set_name __pyx_string_tab[253] +#define __pyx_n_u_setdefault __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_other_vars __pyx_string_tab[258] +#define __pyx_n_u_sum_other_vars_locals_genexpr __pyx_string_tab[259] +#define __pyx_n_u_sum_value __pyx_string_tab[260] +#define __pyx_n_u_sum_vars __pyx_string_tab[261] +#define __pyx_n_u_t_max __pyx_string_tab[262] +#define __pyx_n_u_t_min __pyx_string_tab[263] +#define __pyx_n_u_target_dom __pyx_string_tab[264] +#define __pyx_n_u_target_domain __pyx_string_tab[265] +#define __pyx_n_u_target_max __pyx_string_tab[266] +#define __pyx_n_u_target_min __pyx_string_tab[267] +#define __pyx_n_u_target_value __pyx_string_tab[268] +#define __pyx_n_u_target_var __pyx_string_tab[269] +#define __pyx_n_u_temp_sum __pyx_string_tab[270] +#define __pyx_n_u_test __pyx_string_tab[271] +#define __pyx_n_u_throw __pyx_string_tab[272] +#define __pyx_n_u_unassigned __pyx_string_tab[273] +#define __pyx_n_u_unassigned_2 __pyx_string_tab[274] +#define __pyx_n_u_unassigned_vars __pyx_string_tab[275] +#define __pyx_n_u_unassignedvariable __pyx_string_tab[276] +#define __pyx_n_u_v __pyx_string_tab[277] +#define __pyx_n_u_val __pyx_string_tab[278] +#define __pyx_n_u_value __pyx_string_tab[279] +#define __pyx_n_u_values __pyx_string_tab[280] +#define __pyx_n_u_var __pyx_string_tab[281] +#define __pyx_n_u_var_is_negative __pyx_string_tab[282] +#define __pyx_n_u_var_max __pyx_string_tab[283] +#define __pyx_n_u_var_min __pyx_string_tab[284] +#define __pyx_n_u_variable __pyx_string_tab[285] +#define __pyx_n_u_variable_contains_lt1 __pyx_string_tab[286] +#define __pyx_n_u_variable_with_lt1 __pyx_string_tab[287] +#define __pyx_n_u_variables __pyx_string_tab[288] +#define __pyx_n_u_vconstraints __pyx_string_tab[289] +#define __pyx_n_u_x __pyx_string_tab[290] +#define __pyx_n_u_zip __pyx_string_tab[291] +#define __pyx_kp_b_iso88591_3gQ __pyx_string_tab[292] +#define __pyx_kp_b_iso88591_55H_a_4_7_1_4q_1_G4q_t3a_Kq_waq __pyx_string_tab[293] +#define __pyx_kp_b_iso88591_55H_a_4_7_1_4q_Q_G4q_t3a_AQ_4q __pyx_string_tab[294] +#define __pyx_kp_b_iso88591_55H_a_D_q_a_3at_Cs_1_A_7_Q_J_c __pyx_string_tab[295] +#define __pyx_kp_b_iso88591_55H_a_L_y_q_q_a_q_L_Kq_QfA_5_q __pyx_string_tab[296] +#define __pyx_kp_b_iso88591_55H_a_a_q_a_3at_Cs_1_A_7_Q_J_c __pyx_string_tab[297] +#define __pyx_kp_b_iso88591_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A __pyx_string_tab[298] +#define __pyx_kp_b_iso88591_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A_2 __pyx_string_tab[299] +#define __pyx_kp_b_iso88591_55H_a_d_4q_a_1_1_1Kq_9Cq_az_1_t __pyx_string_tab[300] +#define __pyx_kp_b_iso88591_55H_a_d_L_y_1_AZs_1_1_t1_5_c_WH __pyx_string_tab[301] +#define __pyx_kp_b_iso88591_55H_a_d_L_y_1_AZwa_1_1_t1_5_c_W __pyx_string_tab[302] +#define __pyx_kp_b_iso88591_55H_a_d_Q_a_1_1Kq_9Cq_az_1_t9AQ __pyx_string_tab[303] +#define __pyx_kp_b_iso88591_55H_a_d_Q_a_1_1_1Kq_9Cq_az_1_t9 __pyx_string_tab[304] +#define __pyx_kp_b_iso88591_55H_a_q __pyx_string_tab[305] +#define __pyx_kp_b_iso88591_6a_N_A __pyx_string_tab[306] +#define __pyx_kp_b_iso88591_6a_N_A_2 __pyx_string_tab[307] +#define __pyx_kp_b_iso88591_77JJeef_3a_Q_y_WAQ_q_4t1Kz_1_wb __pyx_string_tab[308] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J __pyx_string_tab[309] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_6a_A_L_gQ_waq_J_2 __pyx_string_tab[310] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_WAT_1A_G4q_T_Qi __pyx_string_tab[311] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_a_L_WAQ_q_6_Bd_A __pyx_string_tab[312] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_1_3at_a_IV1_vR __pyx_string_tab[313] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_4q_L __pyx_string_tab[314] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_L_Cq __pyx_string_tab[315] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_Q_L_C __pyx_string_tab[316] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4q_t1_S_A_IV1 __pyx_string_tab[317] +#define __pyx_kp_b_iso88591_77JJeef_QfKy_Q_q_A_S_S_G4q_4_1I __pyx_string_tab[318] +#define __pyx_kp_b_iso88591_77JJeef_d_L_WAQ_q_6_6_7_F __pyx_string_tab[319] +#define __pyx_kp_b_iso88591_77JJeef_d_L_WAQ_q_6_A_6_7_F __pyx_string_tab[320] +#define __pyx_kp_b_iso88591_88XXY __pyx_string_tab[321] +#define __pyx_kp_b_iso88591_8_l_1 __pyx_string_tab[322] +#define __pyx_kp_b_iso88591_99LL___Q_L_y_q_c_1_q_1_4t1Ky_AQ __pyx_string_tab[323] +#define __pyx_kp_b_iso88591_A __pyx_string_tab[324] +#define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[325] +#define __pyx_kp_b_iso88591_A_A_E_r_A_WA_WAQ_1_82Q_D_3d_M_HC __pyx_string_tab[326] +#define __pyx_kp_b_iso88591_A_HA __pyx_string_tab[327] +#define __pyx_kp_b_iso88591_A_a_L_Kt1Ja_3a_a_wl_fCq_q_L_q_A __pyx_string_tab[328] +#define __pyx_kp_b_iso88591_A_q_E_A_q __pyx_string_tab[329] +#define __pyx_kp_b_iso88591_A_q_L_Kt1Ja_vWA_6_A_1_AYa_1_A_9G __pyx_string_tab[330] +#define __pyx_kp_b_iso88591_E_HA_F_Ja __pyx_string_tab[331] +#define __pyx_kp_b_iso88591_L __pyx_string_tab[332] +#define __pyx_kp_b_iso88591_L_6a __pyx_string_tab[333] +#define __pyx_kp_b_iso88591_M_Kq_A_L __pyx_string_tab[334] +#define __pyx_kp_b_iso88591_M_Kq_A_L_2 __pyx_string_tab[335] +#define __pyx_kp_b_iso88591_N_6a __pyx_string_tab[336] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[337] +#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[338] +#define __pyx_kp_b_iso88591_Q_3 __pyx_string_tab[339] +#define __pyx_kp_b_iso88591_Q_4 __pyx_string_tab[340] +#define __pyx_kp_b_iso88591_U_A_IQ_M __pyx_string_tab[341] +#define __pyx_kp_b_iso88591_Zz_IQ_M __pyx_string_tab[342] +#define __pyx_kp_b_iso88591__3 __pyx_string_tab[343] +#define __pyx_kp_b_iso88591_a_N_L_A_1_3a_Cs_Rs_J_b_3c __pyx_string_tab[344] +#define __pyx_kp_b_iso88591_m1_M_A_L_L __pyx_string_tab[345] +#define __pyx_kp_b_iso88591_q_G4q_t3a_Qa_t1_3avS_4q_3a_Qb_E __pyx_string_tab[346] +#define __pyx_kp_b_iso88591_q_G4q_t3a_Qa_t1_3avS_Qb_E_4q_3a __pyx_string_tab[347] #define __pyx_int_0 __pyx_number_tab[0] #define __pyx_int_1 __pyx_number_tab[1] #define __pyx_int_10 __pyx_number_tab[2] @@ -3858,7 +3855,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<78; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<351; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<348; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ @@ -3936,7 +3933,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<78; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<351; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<348; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ @@ -3954,7 +3951,7 @@ return 0; #endif /* #### Code section: module_code ### */ -/* "constraint/constraints.py":11 +/* "constraint/constraints.py":12 * """Abstract base class for constraints.""" * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # <<<<<<<<<<<<<< @@ -4006,53 +4003,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, 11, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 12, __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, 11, __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, 12, __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, 11, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 12, __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, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 12, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 12, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 12, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 11, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 12, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -4066,7 +4063,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, 11, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4077,8 +4074,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, 11, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 11, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 12, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 12, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_10Constraint___call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -4103,7 +4100,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint___call__(CYTHO __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":34 + /* "constraint/constraints.py":35 * broken or not * """ * return True # <<<<<<<<<<<<<< @@ -4115,7 +4112,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint___call__(CYTHO __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":11 + /* "constraint/constraints.py":12 * """Abstract base class for constraints.""" * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # <<<<<<<<<<<<<< @@ -4130,7 +4127,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint___call__(CYTHO return __pyx_r; } -/* "constraint/constraints.py":36 +/* "constraint/constraints.py":37 * return True * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # <<<<<<<<<<<<<< @@ -4182,50 +4179,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, 36, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 37, __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, 36, __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, 37, __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, 36, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 37, __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, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 37, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 37, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 37, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 37, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 36, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 37, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -4235,7 +4232,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, 36, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 37, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4246,9 +4243,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, 36, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 36, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 36, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 37, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 37, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 37, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_10Constraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -4289,58 +4286,58 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":55 + /* "constraint/constraints.py":56 * of constraints affecting the given variables. * """ * if len(variables) == 1: # <<<<<<<<<<<<<< * variable = variables[0] * domain = domains[variable] */ - __pyx_t_1 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_1 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 56, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 == 1); if (__pyx_t_2) { - /* "constraint/constraints.py":56 + /* "constraint/constraints.py":57 * """ * if len(variables) == 1: * variable = variables[0] # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_variable = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":57 + /* "constraint/constraints.py":58 * if len(variables) == 1: * variable = variables[0] * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if not self(variables, domains, {variable: value}): */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_domain = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":58 + /* "constraint/constraints.py":59 * variable = variables[0] * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if not self(variables, domains, {variable: value}): * domain.remove(value) */ - __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, 58, __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, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -4349,7 +4346,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY { 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, 58, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 59, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } @@ -4359,7 +4356,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY { 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, 58, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 59, __pyx_L1_error) #endif if (__pyx_t_1 >= __pyx_temp) break; } @@ -4370,13 +4367,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY #endif ++__pyx_t_1; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_5(__pyx_t_4); 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, 58, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 59, __pyx_L1_error) PyErr_Clear(); } break; @@ -4386,7 +4383,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":59 + /* "constraint/constraints.py":60 * domain = domains[variable] * for value in domain[:]: * if not self(variables, domains, {variable: value}): # <<<<<<<<<<<<<< @@ -4396,9 +4393,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self); __pyx_t_7 = __pyx_v_self; - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_v_variable, __pyx_v_value) < (0)) __PYX_ERR(0, 59, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_v_variable, __pyx_v_value) < (0)) __PYX_ERR(0, 60, __pyx_L1_error) __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { @@ -4417,15 +4414,15 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (!__pyx_t_2); if (__pyx_t_10) { - /* "constraint/constraints.py":60 + /* "constraint/constraints.py":61 * for value in domain[:]: * if not self(variables, domains, {variable: value}): * domain.remove(value) # <<<<<<<<<<<<<< @@ -4439,12 +4436,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":59 + /* "constraint/constraints.py":60 * domain = domains[variable] * for value in domain[:]: * if not self(variables, domains, {variable: value}): # <<<<<<<<<<<<<< @@ -4453,7 +4450,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY */ } - /* "constraint/constraints.py":58 + /* "constraint/constraints.py":59 * variable = variables[0] * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -4463,45 +4460,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":61 + /* "constraint/constraints.py":62 * if not self(variables, domains, {variable: value}): * domain.remove(value) * constraints.remove((self, variables)) # <<<<<<<<<<<<<< * vconstraints[variable].remove((self, variables)) * */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 61, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 62, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 61, __pyx_L1_error); - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 62, __pyx_L1_error); + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_constraints, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":62 + /* "constraint/constraints.py":63 * domain.remove(value) * constraints.remove((self, variables)) * vconstraints[variable].remove((self, variables)) # <<<<<<<<<<<<<< * * def forwardCheck(self, variables: Sequence, domains: dict, assignments: dict, _unassigned=Unassigned): */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 62, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 63, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 62, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 63, __pyx_L1_error); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8}; @@ -4509,12 +4506,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 62, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":55 + /* "constraint/constraints.py":56 * of constraints affecting the given variables. * """ * if len(variables) == 1: # <<<<<<<<<<<<<< @@ -4523,7 +4520,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY */ } - /* "constraint/constraints.py":36 + /* "constraint/constraints.py":37 * return True * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # <<<<<<<<<<<<<< @@ -4551,7 +4548,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_2preProcess(CY return __pyx_r; } -/* "constraint/constraints.py":64 +/* "constraint/constraints.py":65 * vconstraints[variable].remove((self, variables)) * * def forwardCheck(self, variables: Sequence, domains: dict, assignments: dict, _unassigned=Unassigned): # <<<<<<<<<<<<<< @@ -4569,18 +4566,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_2__defaults__(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 64, __pyx_L1_error); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 65, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 64, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 65, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 64, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 65, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -4643,53 +4640,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_unassigned,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 64, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 65, __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, "forwardCheck", 0) < (0)) __PYX_ERR(0, 64, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "forwardCheck", 0) < (0)) __PYX_ERR(0, 65, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forwardCheck", 0, 4, 5, i); __PYX_ERR(0, 64, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forwardCheck", 0, 4, 5, i); __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 65, __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, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 65, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 65, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 65, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 64, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 65, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -4703,7 +4700,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("forwardCheck", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 64, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("forwardCheck", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 65, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4714,8 +4711,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, 64, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 64, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 65, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 65, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v__unassigned); /* function exit code */ @@ -4756,7 +4753,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("forwardCheck", 0); - /* "constraint/constraints.py":82 + /* "constraint/constraints.py":83 * broken or not * """ * unassignedvariable = _unassigned # <<<<<<<<<<<<<< @@ -4766,7 +4763,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __Pyx_INCREF(__pyx_v__unassigned); __pyx_v_unassignedvariable = __pyx_v__unassigned; - /* "constraint/constraints.py":83 + /* "constraint/constraints.py":84 * """ * unassignedvariable = _unassigned * for variable in variables: # <<<<<<<<<<<<<< @@ -4778,9 +4775,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __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, 83, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __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, 83, __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, 84, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -4788,7 +4785,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( { 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, 83, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 84, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4798,7 +4795,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( { 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, 83, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 84, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4809,13 +4806,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __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, 83, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 84, __pyx_L1_error) PyErr_Clear(); } break; @@ -4825,17 +4822,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":84 + /* "constraint/constraints.py":85 * unassignedvariable = _unassigned * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * if unassignedvariable is _unassigned: * unassignedvariable = variable */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 84, __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, 85, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":85 + /* "constraint/constraints.py":86 * for variable in variables: * if variable not in assignments: * if unassignedvariable is _unassigned: # <<<<<<<<<<<<<< @@ -4845,7 +4842,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __pyx_t_5 = (__pyx_v_unassignedvariable == __pyx_v__unassigned); if (__pyx_t_5) { - /* "constraint/constraints.py":86 + /* "constraint/constraints.py":87 * if variable not in assignments: * if unassignedvariable is _unassigned: * unassignedvariable = variable # <<<<<<<<<<<<<< @@ -4855,7 +4852,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __Pyx_INCREF(__pyx_v_variable); __Pyx_DECREF_SET(__pyx_v_unassignedvariable, __pyx_v_variable); - /* "constraint/constraints.py":85 + /* "constraint/constraints.py":86 * for variable in variables: * if variable not in assignments: * if unassignedvariable is _unassigned: # <<<<<<<<<<<<<< @@ -4865,7 +4862,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( goto __pyx_L6; } - /* "constraint/constraints.py":88 + /* "constraint/constraints.py":89 * unassignedvariable = variable * else: * break # <<<<<<<<<<<<<< @@ -4877,7 +4874,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( } __pyx_L6:; - /* "constraint/constraints.py":84 + /* "constraint/constraints.py":85 * unassignedvariable = _unassigned * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -4886,7 +4883,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( */ } - /* "constraint/constraints.py":83 + /* "constraint/constraints.py":84 * """ * unassignedvariable = _unassigned * for variable in variables: # <<<<<<<<<<<<<< @@ -4902,7 +4899,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( /*else*/ { __pyx_L7_for_else:; - /* "constraint/constraints.py":90 + /* "constraint/constraints.py":91 * break * else: * if unassignedvariable is not _unassigned: # <<<<<<<<<<<<<< @@ -4912,45 +4909,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __pyx_t_5 = (__pyx_v_unassignedvariable != __pyx_v__unassigned); if (__pyx_t_5) { - /* "constraint/constraints.py":93 + /* "constraint/constraints.py":94 * # Remove from the unassigned variable domain's all * # values which break our variable's constraints. * domain = domains[unassignedvariable] # <<<<<<<<<<<<<< * if domain: * for value in domain[:]: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_unassignedvariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_unassignedvariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_domain = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":94 + /* "constraint/constraints.py":95 * # values which break our variable's constraints. * domain = domains[unassignedvariable] * if domain: # <<<<<<<<<<<<<< * for value in domain[:]: * assignments[unassignedvariable] = value */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 95, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":95 + /* "constraint/constraints.py":96 * domain = domains[unassignedvariable] * if domain: * for value in domain[:]: # <<<<<<<<<<<<<< * assignments[unassignedvariable] = value * if not self(variables, domains, assignments): */ - __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, 95, __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, 96, __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_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __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, 95, __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, 96, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -4959,7 +4956,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( { 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, 95, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 96, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4969,7 +4966,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( { 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, 95, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 96, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4980,13 +4977,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __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, 95, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 96, __pyx_L1_error) PyErr_Clear(); } break; @@ -4996,16 +4993,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":96 + /* "constraint/constraints.py":97 * if domain: * for value in domain[:]: * assignments[unassignedvariable] = value # <<<<<<<<<<<<<< * if not self(variables, domains, assignments): * domain.hideValue(value) */ - if (unlikely((PyDict_SetItem(__pyx_v_assignments, __pyx_v_unassignedvariable, __pyx_v_value) < 0))) __PYX_ERR(0, 96, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_assignments, __pyx_v_unassignedvariable, __pyx_v_value) < 0))) __PYX_ERR(0, 97, __pyx_L1_error) - /* "constraint/constraints.py":97 + /* "constraint/constraints.py":98 * for value in domain[:]: * assignments[unassignedvariable] = value * if not self(variables, domains, assignments): # <<<<<<<<<<<<<< @@ -5032,15 +5029,15 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __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, 97, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (!__pyx_t_5); if (__pyx_t_9) { - /* "constraint/constraints.py":98 + /* "constraint/constraints.py":99 * assignments[unassignedvariable] = value * if not self(variables, domains, assignments): * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -5054,12 +5051,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":97 + /* "constraint/constraints.py":98 * for value in domain[:]: * assignments[unassignedvariable] = value * if not self(variables, domains, assignments): # <<<<<<<<<<<<<< @@ -5068,7 +5065,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( */ } - /* "constraint/constraints.py":95 + /* "constraint/constraints.py":96 * domain = domains[unassignedvariable] * if domain: * for value in domain[:]: # <<<<<<<<<<<<<< @@ -5078,16 +5075,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":99 + /* "constraint/constraints.py":100 * if not self(variables, domains, assignments): * domain.hideValue(value) * del assignments[unassignedvariable] # <<<<<<<<<<<<<< * if not domain: * return False */ - if (unlikely((PyDict_DelItem(__pyx_v_assignments, __pyx_v_unassignedvariable) < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely((PyDict_DelItem(__pyx_v_assignments, __pyx_v_unassignedvariable) < 0))) __PYX_ERR(0, 100, __pyx_L1_error) - /* "constraint/constraints.py":94 + /* "constraint/constraints.py":95 * # values which break our variable's constraints. * domain = domains[unassignedvariable] * if domain: # <<<<<<<<<<<<<< @@ -5096,18 +5093,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( */ } - /* "constraint/constraints.py":100 + /* "constraint/constraints.py":101 * domain.hideValue(value) * del assignments[unassignedvariable] * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 101, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_9); if (__pyx_t_5) { - /* "constraint/constraints.py":101 + /* "constraint/constraints.py":102 * del assignments[unassignedvariable] * if not domain: * return False # <<<<<<<<<<<<<< @@ -5119,7 +5116,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":100 + /* "constraint/constraints.py":101 * domain.hideValue(value) * del assignments[unassignedvariable] * if not domain: # <<<<<<<<<<<<<< @@ -5128,7 +5125,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( */ } - /* "constraint/constraints.py":90 + /* "constraint/constraints.py":91 * break * else: * if unassignedvariable is not _unassigned: # <<<<<<<<<<<<<< @@ -5139,7 +5136,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( } __pyx_L8_for_end:; - /* "constraint/constraints.py":102 + /* "constraint/constraints.py":103 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -5151,7 +5148,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":64 + /* "constraint/constraints.py":65 * vconstraints[variable].remove((self, variables)) * * def forwardCheck(self, variables: Sequence, domains: dict, assignments: dict, _unassigned=Unassigned): # <<<<<<<<<<<<<< @@ -5177,7 +5174,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_10Constraint_4forwardCheck( return __pyx_r; } -/* "constraint/constraints.py":133 +/* "constraint/constraints.py":134 * """ * * def __init__(self, func: Callable, assigned: bool = True): # <<<<<<<<<<<<<< @@ -5227,40 +5224,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_func,&__pyx_mstate_global->__pyx_n_u_assigned,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, 133, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 134, __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, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 134, __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, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 134, __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, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __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, 133, __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, 134, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 133, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 134, __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, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 134, __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, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 134, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 133, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 134, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -5268,14 +5265,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_self = values[0]; __pyx_v_func = values[1]; if (values[2]) { - __pyx_v_assigned = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_assigned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error) + __pyx_v_assigned = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_assigned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) } else { __pyx_v_assigned = ((int)((int)1)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 134, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5305,28 +5302,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint___init int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":142 + /* "constraint/constraints.py":143 * variables or not * """ * self._func = func # <<<<<<<<<<<<<< * self._assigned = assigned * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2, __pyx_v_func) < (0)) __PYX_ERR(0, 142, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2, __pyx_v_func) < (0)) __PYX_ERR(0, 143, __pyx_L1_error) - /* "constraint/constraints.py":143 + /* "constraint/constraints.py":144 * """ * self._func = func * self._assigned = assigned # <<<<<<<<<<<<<< * * def __call__( # noqa: D102 */ - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_assigned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_assigned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2, __pyx_t_1) < (0)) __PYX_ERR(0, 143, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2, __pyx_t_1) < (0)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":133 + /* "constraint/constraints.py":134 * """ * * def __init__(self, func: Callable, assigned: bool = True): # <<<<<<<<<<<<<< @@ -5347,7 +5344,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint___init return __pyx_r; } -/* "constraint/constraints.py":145 +/* "constraint/constraints.py":146 * self._assigned = assigned * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -5366,36 +5363,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_4__defaults__(CYTHON_UNUSED __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - /* "constraint/constraints.py":150 + /* "constraint/constraints.py":151 * domains: dict, * assignments: dict, * forwardcheck=False, # <<<<<<<<<<<<<< * _unassigned=Unassigned, * ): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 145, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 145, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); - /* "constraint/constraints.py":145 + /* "constraint/constraints.py":146 * self._assigned = assigned * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 145, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 145, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -5458,62 +5455,62 @@ 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,&__pyx_mstate_global->__pyx_n_u_unassigned,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 145, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 146, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 146, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 146, __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, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 146, __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, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __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, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __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, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __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, 145, __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, 146, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 145, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 146, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 146, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 146, __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, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 146, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 146, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 146, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 146, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -5529,7 +5526,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 145, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 146, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5540,8 +5537,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, 148, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 149, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 149, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 150, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_18FunctionConstraint_2__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck, __pyx_v__unassigned); /* function exit code */ @@ -5582,19 +5579,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":182 + /* "constraint/constraints.py":183 * * # single loop list: 0.11462 seconds, Cythonized: 0.08686 seconds * parms = list() # <<<<<<<<<<<<<< * missing = 0 * for x in variables: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_parms = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":183 + /* "constraint/constraints.py":184 * # single loop list: 0.11462 seconds, Cythonized: 0.08686 seconds * parms = list() * missing = 0 # <<<<<<<<<<<<<< @@ -5604,7 +5601,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":184 + /* "constraint/constraints.py":185 * parms = list() * missing = 0 * for x in variables: # <<<<<<<<<<<<<< @@ -5616,9 +5613,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal __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, 184, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __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, 184, __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, 185, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -5626,7 +5623,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal { 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, 184, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 185, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5636,7 +5633,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal { 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, 184, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 185, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5647,13 +5644,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __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, 184, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 185, __pyx_L1_error) PyErr_Clear(); } break; @@ -5663,29 +5660,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":185 + /* "constraint/constraints.py":186 * missing = 0 * for x in variables: * if x in assignments: # <<<<<<<<<<<<<< * parms.append(assignments[x]) * else: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_x, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_x, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":186 + /* "constraint/constraints.py":187 * for x in variables: * if x in assignments: * parms.append(assignments[x]) # <<<<<<<<<<<<<< * else: * parms.append(_unassigned) */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parms, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parms, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":185 + /* "constraint/constraints.py":186 * missing = 0 * for x in variables: * if x in assignments: # <<<<<<<<<<<<<< @@ -5695,7 +5692,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal goto __pyx_L5; } - /* "constraint/constraints.py":188 + /* "constraint/constraints.py":189 * parms.append(assignments[x]) * else: * parms.append(_unassigned) # <<<<<<<<<<<<<< @@ -5703,23 +5700,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal * */ /*else*/ { - __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parms, __pyx_v__unassigned); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 188, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parms, __pyx_v__unassigned); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error) - /* "constraint/constraints.py":189 + /* "constraint/constraints.py":190 * else: * parms.append(_unassigned) * missing += 1 # <<<<<<<<<<<<<< * * # if there are unassigned variables, do a forward check before executing the restriction function */ - __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_missing, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L5:; - /* "constraint/constraints.py":184 + /* "constraint/constraints.py":185 * parms = list() * missing = 0 * for x in variables: # <<<<<<<<<<<<<< @@ -5729,19 +5726,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":192 + /* "constraint/constraints.py":193 * * # if there are unassigned variables, do a forward check before executing the restriction function * if missing > 0: # <<<<<<<<<<<<<< * return (self._assigned or self._func(*parms)) and ( * not forwardcheck or missing != 1 or self.forwardCheck(variables, domains, assignments) */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_missing, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 192, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_missing, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":193 + /* "constraint/constraints.py":194 * # if there are unassigned variables, do a forward check before executing the restriction function * if missing > 0: * return (self._assigned or self._func(*parms)) and ( # <<<<<<<<<<<<<< @@ -5749,23 +5746,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal * ) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __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, 193, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_5) { } else { goto __pyx_L9_next_and; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PySequence_Tuple(__pyx_v_parms); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_7 = PySequence_Tuple(__pyx_v_parms); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) if (__pyx_t_5) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { @@ -5776,26 +5773,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal } __pyx_L9_next_and:; - /* "constraint/constraints.py":194 + /* "constraint/constraints.py":195 * if missing > 0: * return (self._assigned or self._func(*parms)) and ( * not forwardcheck or missing != 1 or self.forwardCheck(variables, domains, assignments) # <<<<<<<<<<<<<< * ) * return self._func(*parms) */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) __pyx_t_9 = (!__pyx_t_5); if (!__pyx_t_9) { } else { - __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L8_bool_binop_done; } - __pyx_t_8 = __Pyx_PyLong_NeObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyLong_NeObjC(__pyx_v_missing, __pyx_mstate_global->__pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) if (!__pyx_t_9) { __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { @@ -5811,7 +5808,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_forwardCheck, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_INCREF(__pyx_t_8); @@ -5822,7 +5819,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":192 + /* "constraint/constraints.py":193 * * # if there are unassigned variables, do a forward check before executing the restriction function * if missing > 0: # <<<<<<<<<<<<<< @@ -5831,7 +5828,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal */ } - /* "constraint/constraints.py":196 + /* "constraint/constraints.py":197 * not forwardcheck or missing != 1 or self.forwardCheck(variables, domains, assignments) * ) * return self._func(*parms) # <<<<<<<<<<<<<< @@ -5839,11 +5836,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal * class CompilableFunctionConstraint(Constraint): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_Tuple(__pyx_v_parms); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_8 = PySequence_Tuple(__pyx_v_parms); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -5851,7 +5848,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/constraints.py":145 + /* "constraint/constraints.py":146 * self._assigned = assigned * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -5876,7 +5873,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18FunctionConstraint_2__cal return __pyx_r; } -/* "constraint/constraints.py":201 +/* "constraint/constraints.py":202 * """Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.""" * * def __init__(self, func: str, assigned: bool = True): # noqa: D102, D107 # <<<<<<<<<<<<<< @@ -5925,40 +5922,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_func,&__pyx_mstate_global->__pyx_n_u_assigned,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, 201, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 202, __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, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 202, __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, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 202, __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, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 202, __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, 201, __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, 202, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 201, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 202, __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, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 202, __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, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 202, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 201, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 202, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -5966,14 +5963,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_self = values[0]; __pyx_v_func = ((PyObject*)values[1]); if (values[2]) { - __pyx_v_assigned = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_assigned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error) + __pyx_v_assigned = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_assigned == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 202, __pyx_L3_error) } else { __pyx_v_assigned = ((int)((int)1)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 201, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 202, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5984,7 +5981,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_func), (&PyUnicode_Type), 0, "func", 2))) __PYX_ERR(0, 201, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_func), (&PyUnicode_Type), 0, "func", 2))) __PYX_ERR(0, 202, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_28CompilableFunctionConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_func, __pyx_v_assigned); /* function exit code */ @@ -6013,28 +6010,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_28CompilableFunctionConstra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":202 + /* "constraint/constraints.py":203 * * def __init__(self, func: str, assigned: bool = True): # noqa: D102, D107 * self._func = func # <<<<<<<<<<<<<< * self._assigned = assigned * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2, __pyx_v_func) < (0)) __PYX_ERR(0, 202, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_func_2, __pyx_v_func) < (0)) __PYX_ERR(0, 203, __pyx_L1_error) - /* "constraint/constraints.py":203 + /* "constraint/constraints.py":204 * def __init__(self, func: str, assigned: bool = True): # noqa: D102, D107 * self._func = func * self._assigned = assigned # <<<<<<<<<<<<<< * * def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): # noqa: D102 */ - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_assigned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_assigned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2, __pyx_t_1) < (0)) __PYX_ERR(0, 203, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_assigned_2, __pyx_t_1) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":201 + /* "constraint/constraints.py":202 * """Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.""" * * def __init__(self, func: str, assigned: bool = True): # noqa: D102, D107 # <<<<<<<<<<<<<< @@ -6055,7 +6052,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_28CompilableFunctionConstra return __pyx_r; } -/* "constraint/constraints.py":205 +/* "constraint/constraints.py":206 * self._assigned = assigned * * def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): # noqa: D102 # <<<<<<<<<<<<<< @@ -6073,21 +6070,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_6__defaults__(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 206, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 205, __pyx_L1_error); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 206, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 206, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 205, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 206, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -6150,62 +6147,62 @@ 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,&__pyx_mstate_global->__pyx_n_u_unassigned,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 205, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 206, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 206, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 206, __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, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 206, __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, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 206, __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, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 206, __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, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 206, __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, 205, __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, 206, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 205, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 206, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 206, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 206, __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, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 206, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 206, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 206, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 206, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -6221,7 +6218,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 205, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 206, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6253,7 +6250,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_28CompilableFunctionConstra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":206 + /* "constraint/constraints.py":207 * * def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): # noqa: D102 * raise NotImplementedError("CompilableFunctionConstraint can not be called directly") # <<<<<<<<<<<<<< @@ -6266,14 +6263,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_28CompilableFunctionConstra PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_CompilableFunctionConstraint_can}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_NotImplementedError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __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, 206, __pyx_L1_error) + __PYX_ERR(0, 207, __pyx_L1_error) - /* "constraint/constraints.py":205 + /* "constraint/constraints.py":206 * self._assigned = assigned * * def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): # noqa: D102 # <<<<<<<<<<<<<< @@ -6292,7 +6289,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_28CompilableFunctionConstra return __pyx_r; } -/* "constraint/constraints.py":220 +/* "constraint/constraints.py":221 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -6311,36 +6308,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_8__defaults__(CYTHON_UNUSED __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - /* "constraint/constraints.py":225 + /* "constraint/constraints.py":226 * domains: dict, * assignments: dict, * forwardcheck=False, # <<<<<<<<<<<<<< * _unassigned=Unassigned, * ): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 220, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 220, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); - /* "constraint/constraints.py":220 + /* "constraint/constraints.py":221 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 220, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 220, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -6403,62 +6400,62 @@ 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,&__pyx_mstate_global->__pyx_n_u_unassigned,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 220, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 221, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 221, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 221, __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, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 221, __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, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 221, __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, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 221, __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, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __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, 220, __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, 221, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 220, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 221, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 221, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 221, __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, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 221, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 221, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 221, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -6474,7 +6471,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 220, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 221, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6485,8 +6482,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, 223, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 224, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_22AllDifferentConstraint___call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck, __pyx_v__unassigned); /* function exit code */ @@ -6531,19 +6528,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":228 + /* "constraint/constraints.py":229 * _unassigned=Unassigned, * ): * seen = {} # <<<<<<<<<<<<<< * for variable in variables: * value = assignments.get(variable, _unassigned) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_seen = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":229 + /* "constraint/constraints.py":230 * ): * seen = {} * for variable in variables: # <<<<<<<<<<<<<< @@ -6555,9 +6552,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __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, 229, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __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, 229, __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, 230, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -6565,7 +6562,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ { 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, 229, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 230, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6575,7 +6572,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ { 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, 229, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 230, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6586,13 +6583,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __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, 229, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 230, __pyx_L1_error) PyErr_Clear(); } break; @@ -6602,19 +6599,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":230 + /* "constraint/constraints.py":231 * seen = {} * for variable in variables: * value = assignments.get(variable, _unassigned) # <<<<<<<<<<<<<< * if value is not _unassigned: * if value in seen: */ - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_assignments, __pyx_v_variable, __pyx_v__unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_assignments, __pyx_v_variable, __pyx_v__unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":231 + /* "constraint/constraints.py":232 * for variable in variables: * value = assignments.get(variable, _unassigned) * if value is not _unassigned: # <<<<<<<<<<<<<< @@ -6624,17 +6621,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __pyx_t_5 = (__pyx_v_value != __pyx_v__unassigned); if (__pyx_t_5) { - /* "constraint/constraints.py":232 + /* "constraint/constraints.py":233 * value = assignments.get(variable, _unassigned) * if value is not _unassigned: * if value in seen: # <<<<<<<<<<<<<< * return False * seen[value] = True */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_value, __pyx_v_seen, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_value, __pyx_v_seen, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 233, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":233 + /* "constraint/constraints.py":234 * if value is not _unassigned: * if value in seen: * return False # <<<<<<<<<<<<<< @@ -6647,7 +6644,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":232 + /* "constraint/constraints.py":233 * value = assignments.get(variable, _unassigned) * if value is not _unassigned: * if value in seen: # <<<<<<<<<<<<<< @@ -6656,16 +6653,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ */ } - /* "constraint/constraints.py":234 + /* "constraint/constraints.py":235 * if value in seen: * return False * seen[value] = True # <<<<<<<<<<<<<< * if forwardcheck: * for variable in variables: */ - if (unlikely((PyDict_SetItem(__pyx_v_seen, __pyx_v_value, Py_True) < 0))) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_seen, __pyx_v_value, Py_True) < 0))) __PYX_ERR(0, 235, __pyx_L1_error) - /* "constraint/constraints.py":231 + /* "constraint/constraints.py":232 * for variable in variables: * value = assignments.get(variable, _unassigned) * if value is not _unassigned: # <<<<<<<<<<<<<< @@ -6674,7 +6671,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ */ } - /* "constraint/constraints.py":229 + /* "constraint/constraints.py":230 * ): * seen = {} * for variable in variables: # <<<<<<<<<<<<<< @@ -6684,17 +6681,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":235 + /* "constraint/constraints.py":236 * return False * seen[value] = True * if forwardcheck: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments: */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 236, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":236 + /* "constraint/constraints.py":237 * seen[value] = True * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -6706,9 +6703,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __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, 236, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __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, 236, __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, 237, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -6716,7 +6713,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ { 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, 236, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 237, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6726,7 +6723,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ { 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, 236, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 237, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6737,13 +6734,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __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, 236, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 237, __pyx_L1_error) PyErr_Clear(); } break; @@ -6753,29 +6750,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":237 + /* "constraint/constraints.py":238 * if forwardcheck: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in seen: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 237, __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, 238, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":238 + /* "constraint/constraints.py":239 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in seen: * if value in domain: */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":239 + /* "constraint/constraints.py":240 * if variable not in assignments: * domain = domains[variable] * for value in seen: # <<<<<<<<<<<<<< @@ -6783,7 +6780,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ * domain.hideValue(value) */ __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_seen, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_seen, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_9; @@ -6791,22 +6788,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_7, &__pyx_t_6, &__pyx_t_9, NULL, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 239, __pyx_L1_error) + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":240 + /* "constraint/constraints.py":241 * domain = domains[variable] * for value in seen: * if value in domain: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_domain, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_domain, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 241, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":241 + /* "constraint/constraints.py":242 * for value in seen: * if value in domain: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -6820,23 +6817,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_value}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 241, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":242 + /* "constraint/constraints.py":243 * if value in domain: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 243, __pyx_L1_error) __pyx_t_13 = (!__pyx_t_5); if (__pyx_t_13) { - /* "constraint/constraints.py":243 + /* "constraint/constraints.py":244 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -6850,7 +6847,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "constraint/constraints.py":242 + /* "constraint/constraints.py":243 * if value in domain: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -6859,7 +6856,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ */ } - /* "constraint/constraints.py":240 + /* "constraint/constraints.py":241 * domain = domains[variable] * for value in seen: * if value in domain: # <<<<<<<<<<<<<< @@ -6870,7 +6867,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":237 + /* "constraint/constraints.py":238 * if forwardcheck: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -6879,7 +6876,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ */ } - /* "constraint/constraints.py":236 + /* "constraint/constraints.py":237 * seen[value] = True * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -6889,7 +6886,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":235 + /* "constraint/constraints.py":236 * return False * seen[value] = True * if forwardcheck: # <<<<<<<<<<<<<< @@ -6898,7 +6895,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ */ } - /* "constraint/constraints.py":244 + /* "constraint/constraints.py":245 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -6910,7 +6907,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":220 + /* "constraint/constraints.py":221 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -6936,7 +6933,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22AllDifferentConstraint___ return __pyx_r; } -/* "constraint/constraints.py":258 +/* "constraint/constraints.py":259 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -6955,36 +6952,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_10__defaults__(CYTHON_UNUSE __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - /* "constraint/constraints.py":263 + /* "constraint/constraints.py":264 * domains: dict, * assignments: dict, * forwardcheck=False, # <<<<<<<<<<<<<< * _unassigned=Unassigned, * ): */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 258, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 259, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 258, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 259, __pyx_L1_error); - /* "constraint/constraints.py":258 + /* "constraint/constraints.py":259 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 258, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 259, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 258, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 259, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -7047,62 +7044,62 @@ 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,&__pyx_mstate_global->__pyx_n_u_unassigned,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 258, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 259, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 259, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 259, __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, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 259, __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, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 259, __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, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 259, __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, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 259, __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, 258, __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, 259, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 258, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, i); __PYX_ERR(0, 259, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 259, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 259, __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, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 259, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 259, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 259, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 258, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 259, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -7118,7 +7115,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 258, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 259, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7129,8 +7126,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, 261, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 262, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 262, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 263, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_18AllEqualConstraint___call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck, __pyx_v__unassigned); /* function exit code */ @@ -7173,7 +7170,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":266 + /* "constraint/constraints.py":267 * _unassigned=Unassigned, * ): * singlevalue = _unassigned # <<<<<<<<<<<<<< @@ -7183,7 +7180,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_INCREF(__pyx_v__unassigned); __pyx_v_singlevalue = __pyx_v__unassigned; - /* "constraint/constraints.py":267 + /* "constraint/constraints.py":268 * ): * singlevalue = _unassigned * for variable in variables: # <<<<<<<<<<<<<< @@ -7195,9 +7192,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 267, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __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, 267, __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, 268, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -7205,7 +7202,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 267, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 268, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -7215,7 +7212,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 267, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 268, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -7226,13 +7223,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __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, 267, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 268, __pyx_L1_error) PyErr_Clear(); } break; @@ -7242,19 +7239,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":268 + /* "constraint/constraints.py":269 * singlevalue = _unassigned * for variable in variables: * value = assignments.get(variable, _unassigned) # <<<<<<<<<<<<<< * if singlevalue is _unassigned: * singlevalue = value */ - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_assignments, __pyx_v_variable, __pyx_v__unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_assignments, __pyx_v_variable, __pyx_v__unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":269 + /* "constraint/constraints.py":270 * for variable in variables: * value = assignments.get(variable, _unassigned) * if singlevalue is _unassigned: # <<<<<<<<<<<<<< @@ -7264,7 +7261,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __pyx_t_5 = (__pyx_v_singlevalue == __pyx_v__unassigned); if (__pyx_t_5) { - /* "constraint/constraints.py":270 + /* "constraint/constraints.py":271 * value = assignments.get(variable, _unassigned) * if singlevalue is _unassigned: * singlevalue = value # <<<<<<<<<<<<<< @@ -7274,7 +7271,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_INCREF(__pyx_v_value); __Pyx_DECREF_SET(__pyx_v_singlevalue, __pyx_v_value); - /* "constraint/constraints.py":269 + /* "constraint/constraints.py":270 * for variable in variables: * value = assignments.get(variable, _unassigned) * if singlevalue is _unassigned: # <<<<<<<<<<<<<< @@ -7284,7 +7281,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call goto __pyx_L5; } - /* "constraint/constraints.py":271 + /* "constraint/constraints.py":272 * if singlevalue is _unassigned: * singlevalue = value * elif value is not _unassigned and value != singlevalue: # <<<<<<<<<<<<<< @@ -7297,14 +7294,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __pyx_t_5 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_v_singlevalue, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_v_singlevalue, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_6; __pyx_L6_bool_binop_done:; if (__pyx_t_5) { - /* "constraint/constraints.py":272 + /* "constraint/constraints.py":273 * singlevalue = value * elif value is not _unassigned and value != singlevalue: * return False # <<<<<<<<<<<<<< @@ -7317,7 +7314,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":271 + /* "constraint/constraints.py":272 * if singlevalue is _unassigned: * singlevalue = value * elif value is not _unassigned and value != singlevalue: # <<<<<<<<<<<<<< @@ -7327,7 +7324,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call } __pyx_L5:; - /* "constraint/constraints.py":267 + /* "constraint/constraints.py":268 * ): * singlevalue = _unassigned * for variable in variables: # <<<<<<<<<<<<<< @@ -7337,14 +7334,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":273 + /* "constraint/constraints.py":274 * elif value is not _unassigned and value != singlevalue: * return False * if forwardcheck and singlevalue is not _unassigned: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments: */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 274, __pyx_L1_error) if (__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; @@ -7355,7 +7352,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __pyx_L10_bool_binop_done:; if (__pyx_t_5) { - /* "constraint/constraints.py":274 + /* "constraint/constraints.py":275 * return False * if forwardcheck and singlevalue is not _unassigned: * for variable in variables: # <<<<<<<<<<<<<< @@ -7367,9 +7364,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 274, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __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, 274, __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, 275, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -7377,7 +7374,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 274, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 275, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -7387,7 +7384,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___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, 274, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 275, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -7398,13 +7395,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __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, 274, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 275, __pyx_L1_error) PyErr_Clear(); } break; @@ -7414,39 +7411,39 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":275 + /* "constraint/constraints.py":276 * if forwardcheck and singlevalue is not _unassigned: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * if singlevalue not in domain: */ - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 275, __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, 276, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":276 + /* "constraint/constraints.py":277 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * if singlevalue not in domain: * return False */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":277 + /* "constraint/constraints.py":278 * if variable not in assignments: * domain = domains[variable] * if singlevalue not in domain: # <<<<<<<<<<<<<< * return False * for value in domain[:]: */ - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_singlevalue, __pyx_v_domain, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_singlevalue, __pyx_v_domain, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 278, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":278 + /* "constraint/constraints.py":279 * domain = domains[variable] * if singlevalue not in domain: * return False # <<<<<<<<<<<<<< @@ -7459,7 +7456,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":277 + /* "constraint/constraints.py":278 * if variable not in assignments: * domain = domains[variable] * if singlevalue not in domain: # <<<<<<<<<<<<<< @@ -7468,23 +7465,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call */ } - /* "constraint/constraints.py":279 + /* "constraint/constraints.py":280 * if singlevalue not in domain: * return False * for value in domain[:]: # <<<<<<<<<<<<<< * if value != singlevalue: * domain.hideValue(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, 279, __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, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -7493,7 +7490,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call { 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, 279, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 280, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -7503,7 +7500,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call { 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, 279, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 280, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -7514,13 +7511,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_9(__pyx_t_7); 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, 279, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 280, __pyx_L1_error) PyErr_Clear(); } break; @@ -7530,19 +7527,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":280 + /* "constraint/constraints.py":281 * return False * for value in domain[:]: * if value != singlevalue: # <<<<<<<<<<<<<< * domain.hideValue(value) * return True */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_v_singlevalue, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 280, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_v_singlevalue, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":281 + /* "constraint/constraints.py":282 * for value in domain[:]: * if value != singlevalue: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -7556,12 +7553,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4)) __PYX_ERR(0, 281, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":280 + /* "constraint/constraints.py":281 * return False * for value in domain[:]: * if value != singlevalue: # <<<<<<<<<<<<<< @@ -7570,7 +7567,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call */ } - /* "constraint/constraints.py":279 + /* "constraint/constraints.py":280 * if singlevalue not in domain: * return False * for value in domain[:]: # <<<<<<<<<<<<<< @@ -7580,7 +7577,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":275 + /* "constraint/constraints.py":276 * if forwardcheck and singlevalue is not _unassigned: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -7589,7 +7586,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call */ } - /* "constraint/constraints.py":274 + /* "constraint/constraints.py":275 * return False * if forwardcheck and singlevalue is not _unassigned: * for variable in variables: # <<<<<<<<<<<<<< @@ -7599,7 +7596,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":273 + /* "constraint/constraints.py":274 * elif value is not _unassigned and value != singlevalue: * return False * if forwardcheck and singlevalue is not _unassigned: # <<<<<<<<<<<<<< @@ -7608,7 +7605,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call */ } - /* "constraint/constraints.py":282 + /* "constraint/constraints.py":283 * if value != singlevalue: * domain.hideValue(value) * return True # <<<<<<<<<<<<<< @@ -7620,7 +7617,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":258 + /* "constraint/constraints.py":259 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< @@ -7646,10 +7643,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18AllEqualConstraint___call return __pyx_r; } -/* "constraint/constraints.py":301 +/* "constraint/constraints.py":302 * """ * - * def __init__(self, exactsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, exactsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -7696,41 +7693,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_exactsum,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 301, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 302, __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, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 302, __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, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 302, __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, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 302, __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, 301, __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, 302, __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("__init__", 0, 2, 3, i); __PYX_ERR(0, 301, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 302, __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, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 302, __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, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 302, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 301, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 302, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -7742,7 +7739,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 301, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 302, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7772,64 +7769,64 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint___init int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":310 + /* "constraint/constraints.py":311 * summed to be checked * """ * self._exactsum = exactsum # <<<<<<<<<<<<<< * self._multipliers = multipliers * self._var_max = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2, __pyx_v_exactsum) < (0)) __PYX_ERR(0, 310, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2, __pyx_v_exactsum) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) - /* "constraint/constraints.py":311 + /* "constraint/constraints.py":312 * """ * self._exactsum = exactsum * self._multipliers = multipliers # <<<<<<<<<<<<<< * self._var_max = {} * self._var_min = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 311, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) - /* "constraint/constraints.py":312 + /* "constraint/constraints.py":313 * self._exactsum = exactsum * self._multipliers = multipliers * self._var_max = {} # <<<<<<<<<<<<<< * self._var_min = {} * self._var_is_negative = {} */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 312, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":313 + /* "constraint/constraints.py":314 * self._multipliers = multipliers * self._var_max = {} * self._var_min = {} # <<<<<<<<<<<<<< * self._var_is_negative = {} * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":314 + /* "constraint/constraints.py":315 * self._var_max = {} * self._var_min = {} * self._var_is_negative = {} # <<<<<<<<<<<<<< * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_1) < (0)) __PYX_ERR(0, 314, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_1) < (0)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":301 + /* "constraint/constraints.py":302 * """ * - * def __init__(self, exactsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, exactsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -7847,7 +7844,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint___init return __pyx_r; } -/* "constraint/constraints.py":316 +/* "constraint/constraints.py":317 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -7898,50 +7895,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, 316, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 317, __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, 316, __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, 317, __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, 316, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 317, __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, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 317, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 317, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 317, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 317, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 316, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 317, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -7951,7 +7948,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, 316, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 317, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7962,9 +7959,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, 316, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 316, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 316, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 317, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 317, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 317, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_18ExactSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -8022,7 +8019,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":317 + /* "constraint/constraints.py":318 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -8030,9 +8027,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * exactsum = self._exactsum */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __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, 317, __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, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -8052,36 +8049,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 317, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":318 + /* "constraint/constraints.py":319 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) # <<<<<<<<<<<<<< * exactsum = self._exactsum * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 318, __pyx_L1_error) - __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 318, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 319, __pyx_L1_error); } } __pyx_t_1 = __pyx_t_4; @@ -8090,19 +8087,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":319 + /* "constraint/constraints.py":320 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) * exactsum = self._exactsum # <<<<<<<<<<<<<< * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_max = { variable: max(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exactsum = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":320 + /* "constraint/constraints.py":321 * multipliers = self._multipliers if self._multipliers else [1] * len(variables) * exactsum = self._exactsum * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -8110,7 +8107,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_5 = 1; @@ -8118,7 +8115,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -8126,9 +8123,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -8137,7 +8134,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 320, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 321, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8147,7 +8144,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 320, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 321, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8158,13 +8155,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L5_error) } else { __pyx_t_4 = __pyx_t_8(__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, 320, __pyx_L5_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 321, __pyx_L5_error) PyErr_Clear(); } break; @@ -8177,7 +8174,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 320, __pyx_L5_error) + __PYX_ERR(0, 321, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8187,22 +8184,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -8210,7 +8207,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 320, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 321, __pyx_L5_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_unpacking_done; @@ -8218,7 +8215,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 320, __pyx_L5_error) + __PYX_ERR(0, 321, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_variable, __pyx_t_3); @@ -8226,7 +8223,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_multiplier, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_7genexpr__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_7genexpr__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; { @@ -8234,13 +8231,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_7genexpr__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L5_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_7genexpr__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 320, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 321, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8253,10 +8250,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr goto __pyx_L1_error; __pyx_L11_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 320, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":321 + /* "constraint/constraints.py":322 * exactsum = self._exactsum * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_max = { variable: max(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -8264,7 +8261,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * # preprocess the domains to remove values that cannot contribute to the exact sum */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_5 = 1; @@ -8272,7 +8269,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); } if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { @@ -8280,9 +8277,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 322, __pyx_L14_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -8291,7 +8288,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 321, __pyx_L14_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L14_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8301,7 +8298,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L14_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8312,13 +8309,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L14_error) } else { __pyx_t_2 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 322, __pyx_L14_error) PyErr_Clear(); } break; @@ -8331,7 +8328,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 321, __pyx_L14_error) + __PYX_ERR(0, 322, __pyx_L14_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8341,22 +8338,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -8364,7 +8361,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 321, __pyx_L14_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 322, __pyx_L14_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L18_unpacking_done; @@ -8372,7 +8369,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 321, __pyx_L14_error) + __PYX_ERR(0, 322, __pyx_L14_error) __pyx_L18_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_variable, __pyx_t_4); @@ -8380,7 +8377,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_multiplier, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr1__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr1__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; { @@ -8388,13 +8385,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_8genexpr1__pyx_v_multiplier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L14_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_8genexpr1__pyx_v_multiplier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_variable, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 321, __pyx_L14_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_variable, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -8407,10 +8404,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr goto __pyx_L1_error; __pyx_L20_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 321, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":324 + /* "constraint/constraints.py":325 * * # preprocess the domains to remove values that cannot contribute to the exact sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -8423,7 +8420,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -8431,9 +8428,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 325, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8442,7 +8439,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 324, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 325, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8452,7 +8449,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 325, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8463,13 +8460,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__pyx_t_3); 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, 324, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 325, __pyx_L1_error) PyErr_Clear(); } break; @@ -8482,7 +8479,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 324, __pyx_L1_error) + __PYX_ERR(0, 325, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8492,22 +8489,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #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, 324, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -8515,7 +8512,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_2 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L23_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 324, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 325, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L24_unpacking_done; @@ -8523,7 +8520,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 324, __pyx_L1_error) + __PYX_ERR(0, 325, __pyx_L1_error) __pyx_L24_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); @@ -8531,19 +8528,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":325 + /* "constraint/constraints.py":326 * # preprocess the domains to remove values that cannot contribute to the exact sum * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] # <<<<<<<<<<<<<< * other_vars_min = sum_other_vars(variables, variable, self._var_min) * other_vars_max = sum_other_vars(variables, variable, self._var_max) */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":326 + /* "constraint/constraints.py":327 * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] * other_vars_min = sum_other_vars(variables, variable, self._var_min) # <<<<<<<<<<<<<< @@ -8551,9 +8548,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * for value in domain[:]: */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 326, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 326, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -8573,13 +8570,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_other_vars_min, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":327 + /* "constraint/constraints.py":328 * domain = domains[variable] * other_vars_min = sum_other_vars(variables, variable, self._var_min) * other_vars_max = sum_other_vars(variables, variable, self._var_max) # <<<<<<<<<<<<<< @@ -8587,9 +8584,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * if value * multiplier + other_vars_min > exactsum: */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -8609,29 +8606,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_other_vars_max, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":328 + /* "constraint/constraints.py":329 * other_vars_min = sum_other_vars(variables, variable, self._var_min) * other_vars_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: # <<<<<<<<<<<<<< * if value * multiplier + other_vars_min > exactsum: * 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, 328, __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, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 329, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8640,7 +8637,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 328, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 329, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -8650,7 +8647,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 328, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 329, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -8661,13 +8658,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_13(__pyx_t_9); 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, 328, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 329, __pyx_L1_error) PyErr_Clear(); } break; @@ -8677,25 +8674,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":329 + /* "constraint/constraints.py":330 * other_vars_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: * if value * multiplier + other_vars_min > exactsum: # <<<<<<<<<<<<<< * domain.remove(value) * if value * multiplier + other_vars_max < exactsum: */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":330 + /* "constraint/constraints.py":331 * for value in domain[:]: * if value * multiplier + other_vars_min > exactsum: * domain.remove(value) # <<<<<<<<<<<<<< @@ -8709,12 +8706,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":329 + /* "constraint/constraints.py":330 * other_vars_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: * if value * multiplier + other_vars_min > exactsum: # <<<<<<<<<<<<<< @@ -8723,25 +8720,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr */ } - /* "constraint/constraints.py":331 + /* "constraint/constraints.py":332 * if value * multiplier + other_vars_min > exactsum: * domain.remove(value) * if value * multiplier + other_vars_max < exactsum: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_max); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":332 + /* "constraint/constraints.py":333 * domain.remove(value) * if value * multiplier + other_vars_max < exactsum: * domain.remove(value) # <<<<<<<<<<<<<< @@ -8755,12 +8752,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":331 + /* "constraint/constraints.py":332 * if value * multiplier + other_vars_min > exactsum: * domain.remove(value) * if value * multiplier + other_vars_max < exactsum: # <<<<<<<<<<<<<< @@ -8769,7 +8766,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr */ } - /* "constraint/constraints.py":328 + /* "constraint/constraints.py":329 * other_vars_min = sum_other_vars(variables, variable, self._var_min) * other_vars_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -8779,7 +8776,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":324 + /* "constraint/constraints.py":325 * * # preprocess the domains to remove values that cannot contribute to the exact sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -8789,7 +8786,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":335 + /* "constraint/constraints.py":336 * * # recalculate the min and max after pruning * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -8797,7 +8794,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } */ { /* enter inner scope */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; __pyx_t_5 = 1; @@ -8805,7 +8802,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_9); } if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { @@ -8813,9 +8810,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 336, __pyx_L33_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -8824,7 +8821,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 335, __pyx_L33_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L33_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8834,7 +8831,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 335, __pyx_L33_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L33_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -8845,13 +8842,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 336, __pyx_L33_error) } else { __pyx_t_9 = __pyx_t_8(__pyx_t_1); 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, 335, __pyx_L33_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 336, __pyx_L33_error) PyErr_Clear(); } break; @@ -8864,7 +8861,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 335, __pyx_L33_error) + __PYX_ERR(0, 336, __pyx_L33_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8874,22 +8871,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_XGOTREF(__pyx_t_4); } #else - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -8897,7 +8894,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L36_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 335, __pyx_L33_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 336, __pyx_L33_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L37_unpacking_done; @@ -8905,21 +8902,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 335, __pyx_L33_error) + __PYX_ERR(0, 336, __pyx_L33_error) __pyx_L37_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_variable, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_multiplier, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr2__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr2__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_12 > 0); if (__pyx_t_6) { __pyx_t_2 = NULL; - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr2__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr2__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; { @@ -8927,10 +8924,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr2__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L33_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr2__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __pyx_t_10; @@ -8939,7 +8936,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_t_9 = __pyx_mstate_global->__pyx_int_0; } - if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr2__pyx_v_variable, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 335, __pyx_L33_error) + if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr2__pyx_v_variable, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 336, __pyx_L33_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8952,10 +8949,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr goto __pyx_L1_error; __pyx_L39_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_3) < (0)) __PYX_ERR(0, 335, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_3) < (0)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":336 + /* "constraint/constraints.py":337 * # recalculate the min and max after pruning * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_min = { variable: min(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -8963,7 +8960,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * */ { /* enter inner scope */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; __pyx_t_5 = 1; @@ -8971,7 +8968,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -8979,9 +8976,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L42_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -8990,7 +8987,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 336, __pyx_L42_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 337, __pyx_L42_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -9000,7 +8997,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 337, __pyx_L42_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -9011,13 +9008,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L42_error) } else { __pyx_t_1 = __pyx_t_8(__pyx_t_9); 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, 336, __pyx_L42_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 337, __pyx_L42_error) PyErr_Clear(); } break; @@ -9030,7 +9027,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 336, __pyx_L42_error) + __PYX_ERR(0, 337, __pyx_L42_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -9040,22 +9037,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_XGOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_XGOTREF(__pyx_t_4); } #else - __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); @@ -9063,7 +9060,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L45_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 336, __pyx_L42_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 337, __pyx_L42_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L46_unpacking_done; @@ -9071,21 +9068,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 336, __pyx_L42_error) + __PYX_ERR(0, 337, __pyx_L42_error) __pyx_L46_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_variable, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_multiplier, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr3__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr3__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_12 > 0); if (__pyx_t_6) { __pyx_t_10 = NULL; - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr3__pyx_v_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr3__pyx_v_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; { @@ -9093,10 +9090,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr3__pyx_v_multiplier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L42_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr3__pyx_v_multiplier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; @@ -9105,7 +9102,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_t_1 = __pyx_mstate_global->__pyx_int_0; } - if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr3__pyx_v_variable, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 336, __pyx_L42_error) + if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr3__pyx_v_variable, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 337, __pyx_L42_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -9118,10 +9115,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr goto __pyx_L1_error; __pyx_L48_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_3) < (0)) __PYX_ERR(0, 336, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_3) < (0)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":337 + /* "constraint/constraints.py":338 * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_min = { variable: min(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } # <<<<<<<<<<<<<< @@ -9129,16 +9126,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 */ { /* enter inner scope */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_v_variables)) || PyTuple_CheckExact(__pyx_v_variables)) { __pyx_t_9 = __pyx_v_variables; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 338, __pyx_L51_error) } for (;;) { if (likely(!__pyx_t_8)) { @@ -9146,7 +9143,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { 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, 337, __pyx_L51_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 338, __pyx_L51_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -9156,7 +9153,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 337, __pyx_L51_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 338, __pyx_L51_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -9167,13 +9164,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L51_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L51_error) } else { __pyx_t_1 = __pyx_t_8(__pyx_t_9); 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, 337, __pyx_L51_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 338, __pyx_L51_error) PyErr_Clear(); } break; @@ -9182,14 +9179,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_8genexpr4__pyx_v_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_8genexpr4__pyx_v_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L51_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr4__pyx_v_variable, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 337, __pyx_L51_error) + if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr4__pyx_v_variable, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 338, __pyx_L51_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -9200,10 +9197,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr goto __pyx_L1_error; __pyx_L55_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_3) < (0)) __PYX_ERR(0, 337, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_3) < (0)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":316 + /* "constraint/constraints.py":317 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -9246,7 +9243,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_2prePr return __pyx_r; } -/* "constraint/constraints.py":339 +/* "constraint/constraints.py":340 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -9297,53 +9294,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, 339, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 340, __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, 339, __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, 340, __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, 339, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 340, __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, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 340, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 340, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 340, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 339, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 340, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -9357,7 +9354,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, 339, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 340, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9368,8 +9365,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, 339, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 339, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 340, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 340, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -9421,31 +9418,31 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":340 + /* "constraint/constraints.py":341 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * exactsum = self._exactsum * sum = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":341 + /* "constraint/constraints.py":342 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers * exactsum = self._exactsum # <<<<<<<<<<<<<< * sum = 0 * min_sum_missing = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exactsum = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":342 + /* "constraint/constraints.py":343 * multipliers = self._multipliers * exactsum = self._exactsum * sum = 0 # <<<<<<<<<<<<<< @@ -9455,7 +9452,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":343 + /* "constraint/constraints.py":344 * exactsum = self._exactsum * sum = 0 * min_sum_missing = 0 # <<<<<<<<<<<<<< @@ -9465,7 +9462,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_min_sum_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":344 + /* "constraint/constraints.py":345 * sum = 0 * min_sum_missing = 0 * max_sum_missing = 0 # <<<<<<<<<<<<<< @@ -9475,7 +9472,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_max_sum_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":345 + /* "constraint/constraints.py":346 * min_sum_missing = 0 * max_sum_missing = 0 * missing = False # <<<<<<<<<<<<<< @@ -9484,7 +9481,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing = 0; - /* "constraint/constraints.py":346 + /* "constraint/constraints.py":347 * max_sum_missing = 0 * missing = False * missing_negative = False # <<<<<<<<<<<<<< @@ -9493,17 +9490,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing_negative = 0; - /* "constraint/constraints.py":347 + /* "constraint/constraints.py":348 * missing = False * missing_negative = False * if multipliers: # <<<<<<<<<<<<<< * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 348, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":348 + /* "constraint/constraints.py":349 * missing_negative = False * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -9516,7 +9513,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -9524,9 +9521,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 349, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -9535,7 +9532,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { 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, 348, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 349, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -9545,7 +9542,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 349, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -9556,13 +9553,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_6(__pyx_t_3); 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, 348, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 349, __pyx_L1_error) PyErr_Clear(); } break; @@ -9575,7 +9572,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 348, __pyx_L1_error) + __PYX_ERR(0, 349, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -9585,22 +9582,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 348, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #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, 348, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 349, __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); @@ -9608,7 +9605,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 348, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 349, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -9616,7 +9613,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 348, __pyx_L1_error) + __PYX_ERR(0, 349, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); @@ -9624,35 +9621,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":349 + /* "constraint/constraints.py":350 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 350, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":350 + /* "constraint/constraints.py":351 * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: * sum += assignments[variable] * multiplier # <<<<<<<<<<<<<< * else: * min_sum_missing += self._var_min[variable] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":349 + /* "constraint/constraints.py":350 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< @@ -9662,7 +9659,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal goto __pyx_L8; } - /* "constraint/constraints.py":352 + /* "constraint/constraints.py":353 * sum += assignments[variable] * multiplier * else: * min_sum_missing += self._var_min[variable] # <<<<<<<<<<<<<< @@ -9670,36 +9667,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal * missing = True */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_min_sum_missing, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":353 + /* "constraint/constraints.py":354 * else: * min_sum_missing += self._var_min[variable] * max_sum_missing += self._var_max[variable] # <<<<<<<<<<<<<< * missing = True * if self._var_is_negative[variable]: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_max_sum_missing, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":354 + /* "constraint/constraints.py":355 * min_sum_missing += self._var_min[variable] * max_sum_missing += self._var_max[variable] * missing = True # <<<<<<<<<<<<<< @@ -9708,23 +9705,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing = 1; - /* "constraint/constraints.py":355 + /* "constraint/constraints.py":356 * max_sum_missing += self._var_max[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< * missing_negative = True * if isinstance(sum, float): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":356 + /* "constraint/constraints.py":357 * missing = True * if self._var_is_negative[variable]: * missing_negative = True # <<<<<<<<<<<<<< @@ -9733,7 +9730,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing_negative = 1; - /* "constraint/constraints.py":355 + /* "constraint/constraints.py":356 * max_sum_missing += self._var_max[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< @@ -9744,7 +9741,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __pyx_L8:; - /* "constraint/constraints.py":348 + /* "constraint/constraints.py":349 * missing_negative = False * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -9754,7 +9751,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":357 + /* "constraint/constraints.py":358 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -9764,7 +9761,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_2 = PyFloat_Check(__pyx_v_sum); if (__pyx_t_2) { - /* "constraint/constraints.py":358 + /* "constraint/constraints.py":359 * missing_negative = True * if isinstance(sum, float): * sum = round(sum, 10) # <<<<<<<<<<<<<< @@ -9777,13 +9774,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sum, __pyx_mstate_global->__pyx_int_10}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":357 + /* "constraint/constraints.py":358 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -9792,35 +9789,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":359 + /* "constraint/constraints.py":360 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: # <<<<<<<<<<<<<< * return False * if forwardcheck and missing and not missing_negative: */ - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (!__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L13_bool_binop_done; } - __pyx_t_8 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_11; __pyx_L13_bool_binop_done:; if (__pyx_t_2) { - /* "constraint/constraints.py":360 + /* "constraint/constraints.py":361 * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False # <<<<<<<<<<<<<< @@ -9832,7 +9829,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":359 + /* "constraint/constraints.py":360 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: # <<<<<<<<<<<<<< @@ -9841,14 +9838,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":361 + /* "constraint/constraints.py":362 * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 361, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 362, __pyx_L1_error) if (__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; @@ -9864,7 +9861,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_L16_bool_binop_done:; if (__pyx_t_2) { - /* "constraint/constraints.py":362 + /* "constraint/constraints.py":363 * return False * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -9877,7 +9874,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -9885,9 +9882,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 363, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -9896,7 +9893,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 363, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -9906,7 +9903,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 363, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -9917,13 +9914,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_6(__pyx_t_8); 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, 362, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 363, __pyx_L1_error) PyErr_Clear(); } break; @@ -9936,7 +9933,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 362, __pyx_L1_error) + __PYX_ERR(0, 363, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -9946,22 +9943,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -9969,7 +9966,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 362, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 363, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L22_unpacking_done; @@ -9977,7 +9974,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 362, __pyx_L1_error) + __PYX_ERR(0, 363, __pyx_L1_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); @@ -9985,45 +9982,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":363 + /* "constraint/constraints.py":364 * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 364, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":364 + /* "constraint/constraints.py":365 * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if sum + value * multiplier > exactsum: */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":365 + /* "constraint/constraints.py":366 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if sum + value * multiplier > exactsum: * domain.hideValue(value) */ - __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, 365, __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, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 366, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -10032,7 +10029,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { 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, 365, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 366, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -10042,7 +10039,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { 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, 365, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 366, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -10053,13 +10050,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_13(__pyx_t_7); 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, 365, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 366, __pyx_L1_error) PyErr_Clear(); } break; @@ -10069,25 +10066,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":366 + /* "constraint/constraints.py":367 * domain = domains[variable] * for value in domain[:]: * if sum + value * multiplier > exactsum: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":367 + /* "constraint/constraints.py":368 * for value in domain[:]: * if sum + value * multiplier > exactsum: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -10101,12 +10098,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":366 + /* "constraint/constraints.py":367 * domain = domains[variable] * for value in domain[:]: * if sum + value * multiplier > exactsum: # <<<<<<<<<<<<<< @@ -10115,7 +10112,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":365 + /* "constraint/constraints.py":366 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -10125,18 +10122,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":368 + /* "constraint/constraints.py":369 * if sum + value * multiplier > exactsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 369, __pyx_L1_error) __pyx_t_11 = (!__pyx_t_2); if (__pyx_t_11) { - /* "constraint/constraints.py":369 + /* "constraint/constraints.py":370 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -10149,7 +10146,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; - /* "constraint/constraints.py":368 + /* "constraint/constraints.py":369 * if sum + value * multiplier > exactsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -10158,7 +10155,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":363 + /* "constraint/constraints.py":364 * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: # <<<<<<<<<<<<<< @@ -10167,7 +10164,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":362 + /* "constraint/constraints.py":363 * return False * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -10177,7 +10174,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":361 + /* "constraint/constraints.py":362 * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< @@ -10186,7 +10183,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":347 + /* "constraint/constraints.py":348 * missing = False * missing_negative = False * if multipliers: # <<<<<<<<<<<<<< @@ -10196,7 +10193,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal goto __pyx_L3; } - /* "constraint/constraints.py":371 + /* "constraint/constraints.py":372 * return False * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -10209,9 +10206,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -10219,7 +10216,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 371, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 372, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -10229,7 +10226,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 371, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 372, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -10240,13 +10237,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error) } else { __pyx_t_7 = __pyx_t_6(__pyx_t_8); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 371, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 372, __pyx_L1_error) PyErr_Clear(); } break; @@ -10256,32 +10253,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":372 + /* "constraint/constraints.py":373 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * else: */ - __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 373, __pyx_L1_error) if (__pyx_t_11) { - /* "constraint/constraints.py":373 + /* "constraint/constraints.py":374 * for variable in variables: * if variable in assignments: * sum += assignments[variable] # <<<<<<<<<<<<<< * else: * min_sum_missing += self._var_min[variable] */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":372 + /* "constraint/constraints.py":373 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -10291,7 +10288,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal goto __pyx_L32; } - /* "constraint/constraints.py":375 + /* "constraint/constraints.py":376 * sum += assignments[variable] * else: * min_sum_missing += self._var_min[variable] # <<<<<<<<<<<<<< @@ -10299,36 +10296,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal * missing = True */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_min_sum_missing, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":376 + /* "constraint/constraints.py":377 * else: * min_sum_missing += self._var_min[variable] * max_sum_missing += self._var_max[variable] # <<<<<<<<<<<<<< * missing = True * if self._var_is_negative[variable]: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_max_sum_missing, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":377 + /* "constraint/constraints.py":378 * min_sum_missing += self._var_min[variable] * max_sum_missing += self._var_max[variable] * missing = True # <<<<<<<<<<<<<< @@ -10337,23 +10334,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing = 1; - /* "constraint/constraints.py":378 + /* "constraint/constraints.py":379 * max_sum_missing += self._var_max[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< * missing_negative = True * if isinstance(sum, float): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":379 + /* "constraint/constraints.py":380 * missing = True * if self._var_is_negative[variable]: * missing_negative = True # <<<<<<<<<<<<<< @@ -10362,7 +10359,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ __pyx_v_missing_negative = 1; - /* "constraint/constraints.py":378 + /* "constraint/constraints.py":379 * max_sum_missing += self._var_max[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< @@ -10373,7 +10370,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __pyx_L32:; - /* "constraint/constraints.py":371 + /* "constraint/constraints.py":372 * return False * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -10383,7 +10380,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":380 + /* "constraint/constraints.py":381 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -10393,7 +10390,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_11 = PyFloat_Check(__pyx_v_sum); if (__pyx_t_11) { - /* "constraint/constraints.py":381 + /* "constraint/constraints.py":382 * missing_negative = True * if isinstance(sum, float): * sum = round(sum, 10) # <<<<<<<<<<<<<< @@ -10406,13 +10403,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_sum, __pyx_mstate_global->__pyx_int_10}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 381, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":380 + /* "constraint/constraints.py":381 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -10421,35 +10418,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":382 + /* "constraint/constraints.py":383 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: # <<<<<<<<<<<<<< * return False * if forwardcheck and missing and not missing_negative: */ - __pyx_t_8 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_8 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!__pyx_t_2) { } else { __pyx_t_11 = __pyx_t_2; goto __pyx_L37_bool_binop_done; } - __pyx_t_7 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exactsum, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __pyx_t_2; __pyx_L37_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":383 + /* "constraint/constraints.py":384 * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False # <<<<<<<<<<<<<< @@ -10461,7 +10458,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":382 + /* "constraint/constraints.py":383 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: # <<<<<<<<<<<<<< @@ -10470,14 +10467,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":384 + /* "constraint/constraints.py":385 * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 385, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_11 = __pyx_t_2; @@ -10493,7 +10490,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_L40_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":385 + /* "constraint/constraints.py":386 * return False * if forwardcheck and missing and not missing_negative: * for variable in variables: # <<<<<<<<<<<<<< @@ -10505,9 +10502,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 386, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -10515,7 +10512,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 385, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 386, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -10525,7 +10522,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 385, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 386, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -10536,13 +10533,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 385, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 386, __pyx_L1_error) } else { __pyx_t_7 = __pyx_t_6(__pyx_t_8); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 385, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 386, __pyx_L1_error) PyErr_Clear(); } break; @@ -10552,45 +10549,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":386 + /* "constraint/constraints.py":387 * if forwardcheck and missing and not missing_negative: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 387, __pyx_L1_error) if (__pyx_t_11) { - /* "constraint/constraints.py":387 + /* "constraint/constraints.py":388 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if sum + value > exactsum: */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":388 + /* "constraint/constraints.py":389 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if sum + value > exactsum: * domain.hideValue(value) */ - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_3 = __pyx_t_7; __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 389, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -10599,7 +10596,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { 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, 388, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 389, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -10609,7 +10606,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 388, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 389, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -10620,13 +10617,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 388, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error) } else { __pyx_t_7 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 388, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 389, __pyx_L1_error) PyErr_Clear(); } break; @@ -10636,22 +10633,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":389 + /* "constraint/constraints.py":390 * domain = domains[variable] * for value in domain[:]: * if sum + value > exactsum: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_7 = PyNumber_Add(__pyx_v_sum, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_v_sum, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_exactsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":390 + /* "constraint/constraints.py":391 * for value in domain[:]: * if sum + value > exactsum: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -10665,12 +10662,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":389 + /* "constraint/constraints.py":390 * domain = domains[variable] * for value in domain[:]: * if sum + value > exactsum: # <<<<<<<<<<<<<< @@ -10679,7 +10676,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":388 + /* "constraint/constraints.py":389 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -10689,18 +10686,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":391 + /* "constraint/constraints.py":392 * if sum + value > exactsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * if missing: */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 392, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_11); if (__pyx_t_2) { - /* "constraint/constraints.py":392 + /* "constraint/constraints.py":393 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -10713,7 +10710,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; - /* "constraint/constraints.py":391 + /* "constraint/constraints.py":392 * if sum + value > exactsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -10722,7 +10719,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":386 + /* "constraint/constraints.py":387 * if forwardcheck and missing and not missing_negative: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -10731,7 +10728,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":385 + /* "constraint/constraints.py":386 * return False * if forwardcheck and missing and not missing_negative: * for variable in variables: # <<<<<<<<<<<<<< @@ -10741,7 +10738,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":384 + /* "constraint/constraints.py":385 * if sum + min_sum_missing > exactsum or sum + max_sum_missing < exactsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< @@ -10752,7 +10749,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal } __pyx_L3:; - /* "constraint/constraints.py":393 + /* "constraint/constraints.py":394 * if not domain: * return False * if missing: # <<<<<<<<<<<<<< @@ -10761,7 +10758,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ if (__pyx_v_missing) { - /* "constraint/constraints.py":394 + /* "constraint/constraints.py":395 * return False * if missing: * return sum + min_sum_missing <= exactsum and sum + max_sum_missing >= exactsum # <<<<<<<<<<<<<< @@ -10769,11 +10766,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal * return sum == exactsum */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_exactsum, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_exactsum, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 395, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { @@ -10782,9 +10779,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L53_bool_binop_done; } - __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactsum, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_exactsum, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = __pyx_t_3; @@ -10794,7 +10791,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal __pyx_t_8 = 0; goto __pyx_L0; - /* "constraint/constraints.py":393 + /* "constraint/constraints.py":394 * if not domain: * return False * if missing: # <<<<<<<<<<<<<< @@ -10803,7 +10800,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ } - /* "constraint/constraints.py":396 + /* "constraint/constraints.py":397 * return sum + min_sum_missing <= exactsum and sum + max_sum_missing >= exactsum * else: * return sum == exactsum # <<<<<<<<<<<<<< @@ -10812,13 +10809,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = PyObject_RichCompare(__pyx_v_sum, __pyx_v_exactsum, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_v_sum, __pyx_v_exactsum, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error) __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; } - /* "constraint/constraints.py":339 + /* "constraint/constraints.py":340 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -10850,10 +10847,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_18ExactSumConstraint_4__cal return __pyx_r; } -/* "constraint/constraints.py":416 +/* "constraint/constraints.py":417 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -10901,47 +10898,47 @@ 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_sum_vars,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 416, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 417, __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, 416, __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, 417, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 416, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 417, __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, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 417, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 417, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 416, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 417, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -10954,7 +10951,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 416, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 417, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10965,7 +10962,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, 416, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 417, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_sum_vars, __pyx_v_multipliers); /* function exit code */ @@ -10986,7 +10983,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_8__init___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":432 +/* "constraint/constraints.py":433 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -11006,7 +11003,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct__genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 432, __pyx_L1_error) + __PYX_ERR(0, 433, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11014,7 +11011,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __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_26VariableExactSumConstraint_8__init___2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___ini, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_8__init___2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint___ini, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11052,16 +11049,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 432, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 432, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 433, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 433, __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, 432, __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, 433, __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, 432, __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, 433, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -11069,7 +11066,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 432, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 433, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11079,7 +11076,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 432, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 433, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11090,13 +11087,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __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, 432, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 433, __pyx_L1_error) PyErr_Clear(); } break; @@ -11154,10 +11151,10 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain return __pyx_r; } -/* "constraint/constraints.py":416 +/* "constraint/constraints.py":417 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -11176,44 +11173,44 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":426 + /* "constraint/constraints.py":427 * summed to match the last variable. * """ * self.target_var = target_var # <<<<<<<<<<<<<< * self.sum_vars = sum_vars * self._multipliers = multipliers */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < (0)) __PYX_ERR(0, 426, __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, 427, __pyx_L1_error) - /* "constraint/constraints.py":427 + /* "constraint/constraints.py":428 * """ * self.target_var = target_var * self.sum_vars = sum_vars # <<<<<<<<<<<<<< * self._multipliers = multipliers * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 427, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 428, __pyx_L1_error) - /* "constraint/constraints.py":428 + /* "constraint/constraints.py":429 * self.target_var = target_var * self.sum_vars = sum_vars * self._multipliers = multipliers # <<<<<<<<<<<<<< * * if multipliers: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 428, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 429, __pyx_L1_error) - /* "constraint/constraints.py":430 + /* "constraint/constraints.py":431 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 431, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/constraints.py":431 + /* "constraint/constraints.py":432 * * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." # <<<<<<<<<<<<<< @@ -11222,19 +11219,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 431, __pyx_L1_error) - __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 432, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 == (__pyx_t_3 + 1)); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_match_sum_varia, 0, 0); - __PYX_ERR(0, 431, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 431, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 432, __pyx_L1_error) #endif - /* "constraint/constraints.py":432 + /* "constraint/constraints.py":433 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -11243,23 +11240,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_4 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_4 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_be_numbers, 0, 0); - __PYX_ERR(0, 432, __pyx_L1_error) + __PYX_ERR(0, 433, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 432, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 433, __pyx_L1_error) #endif - /* "constraint/constraints.py":433 + /* "constraint/constraints.py":434 * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." # <<<<<<<<<<<<<< @@ -11268,20 +11265,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Last_multiplier_must_be_1_as_it, 0, 0); - __PYX_ERR(0, 433, __pyx_L1_error) + __PYX_ERR(0, 434, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 433, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 434, __pyx_L1_error) #endif - /* "constraint/constraints.py":430 + /* "constraint/constraints.py":431 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< @@ -11290,10 +11287,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":416 + /* "constraint/constraints.py":417 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -11313,7 +11310,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain return __pyx_r; } -/* "constraint/constraints.py":435 +/* "constraint/constraints.py":436 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -11364,50 +11361,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, 435, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 436, __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, 435, __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, 436, __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, 435, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 436, __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, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 436, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 436, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 436, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 436, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 435, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 436, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -11417,7 +11414,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, 435, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 436, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11428,9 +11425,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, 435, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 435, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 435, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 436, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 436, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 436, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -11451,7 +11448,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":449 +/* "constraint/constraints.py":450 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -11471,7 +11468,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 449, __pyx_L1_error) + __PYX_ERR(0, 450, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11482,7 +11479,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __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_26VariableExactSumConstraint_10preProcess_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11525,17 +11522,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __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, 449, __pyx_L1_error) + __PYX_ERR(0, 450, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 449, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 450, __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, 449, __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, 450, __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, 449, __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, 450, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -11543,7 +11540,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 449, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 450, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11553,7 +11550,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 449, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 450, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11564,13 +11561,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __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, 449, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 450, __pyx_L1_error) PyErr_Clear(); } break; @@ -11581,18 +11578,18 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 449, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 450, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __pyx_t_6 = NULL; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 449, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 450, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 449, __pyx_L1_error) + __PYX_ERR(0, 450, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; { @@ -11600,7 +11597,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; @@ -11621,7 +11618,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 450, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11651,7 +11648,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain } static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":450 +/* "constraint/constraints.py":451 * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -11671,7 +11668,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_3_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 450, __pyx_L1_error) + __PYX_ERR(0, 451, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11682,7 +11679,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __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_26VariableExactSumConstraint_10preProcess_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint_prePr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -11725,17 +11722,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __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, 450, __pyx_L1_error) + __PYX_ERR(0, 451, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 450, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 451, __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, 450, __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, 451, __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, 450, __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, 451, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -11743,7 +11740,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 450, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 451, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11753,7 +11750,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain { 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, 450, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 451, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -11764,13 +11761,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __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, 450, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 451, __pyx_L1_error) PyErr_Clear(); } break; @@ -11781,18 +11778,18 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 450, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 450, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 451, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __pyx_t_6 = NULL; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 450, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 451, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 450, __pyx_L1_error) + __PYX_ERR(0, 451, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; { @@ -11800,7 +11797,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; @@ -11821,7 +11818,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 450, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 451, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11850,7 +11847,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_26VariableExactSumConstrain return __pyx_r; } -/* "constraint/constraints.py":435 +/* "constraint/constraints.py":436 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -11892,7 +11889,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_1_preProcess *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 435, __pyx_L1_error) + __PYX_ERR(0, 436, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -11900,7 +11897,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_INCREF(__pyx_cur_scope->__pyx_v_domains); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_domains); - /* "constraint/constraints.py":436 + /* "constraint/constraints.py":437 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -11908,9 +11905,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * multipliers = self._multipliers */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 437, __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, 436, __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, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -11930,34 +11927,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 436, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":438 + /* "constraint/constraints.py":439 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if multipliers: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":440 + /* "constraint/constraints.py":441 * multipliers = self._multipliers * * if multipliers: # <<<<<<<<<<<<<< * for var, multiplier in zip(self.sum_vars, multipliers): * domain = domains[var] */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 441, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/constraints.py":441 + /* "constraint/constraints.py":442 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -11965,7 +11962,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * for value in domain[:]: */ __pyx_t_4 = NULL; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; { @@ -11973,7 +11970,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -11981,9 +11978,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 442, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -11992,7 +11989,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 441, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 442, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12002,7 +11999,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 441, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 442, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12013,13 +12010,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__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, 441, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 442, __pyx_L1_error) PyErr_Clear(); } break; @@ -12032,7 +12029,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 441, __pyx_L1_error) + __PYX_ERR(0, 442, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12042,22 +12039,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 441, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #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, 441, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 442, __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); @@ -12065,7 +12062,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 441, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 442, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -12073,7 +12070,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 441, __pyx_L1_error) + __PYX_ERR(0, 442, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_var); @@ -12083,35 +12080,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":442 + /* "constraint/constraints.py":443 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * domain = domains[var] # <<<<<<<<<<<<<< * for value in domain[:]: * if value * multiplier > max(domains[self.target_var]): */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":443 + /* "constraint/constraints.py":444 * for var, multiplier in zip(self.sum_vars, multipliers): * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< * if value * multiplier > max(domains[self.target_var]): * 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, 443, __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, 444, __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_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 444, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -12120,7 +12117,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 443, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 444, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -12130,7 +12127,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 443, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 444, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -12141,13 +12138,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_12(__pyx_t_3); 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, 443, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 444, __pyx_L1_error) PyErr_Clear(); } break; @@ -12157,19 +12154,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":444 + /* "constraint/constraints.py":445 * domain = domains[var] * for value in domain[:]: * if value * multiplier > max(domains[self.target_var]): # <<<<<<<<<<<<<< * domain.remove(value) * else: */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = 1; @@ -12178,17 +12175,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":445 + /* "constraint/constraints.py":446 * for value in domain[:]: * if value * multiplier > max(domains[self.target_var]): * domain.remove(value) # <<<<<<<<<<<<<< @@ -12202,12 +12199,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 445, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "constraint/constraints.py":444 + /* "constraint/constraints.py":445 * domain = domains[var] * for value in domain[:]: * if value * multiplier > max(domains[self.target_var]): # <<<<<<<<<<<<<< @@ -12216,7 +12213,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":443 + /* "constraint/constraints.py":444 * for var, multiplier in zip(self.sum_vars, multipliers): * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -12226,7 +12223,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":441 + /* "constraint/constraints.py":442 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -12236,7 +12233,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":440 + /* "constraint/constraints.py":441 * multipliers = self._multipliers * * if multipliers: # <<<<<<<<<<<<<< @@ -12246,7 +12243,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain goto __pyx_L3; } - /* "constraint/constraints.py":447 + /* "constraint/constraints.py":448 * domain.remove(value) * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -12254,16 +12251,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 448, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -12272,7 +12269,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 447, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 448, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12282,7 +12279,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 447, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 448, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12293,13 +12290,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 447, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 448, __pyx_L1_error) PyErr_Clear(); } break; @@ -12311,19 +12308,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":448 + /* "constraint/constraints.py":449 * else: * for var in self.sum_vars: * domain = domains[var] # <<<<<<<<<<<<<< * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) */ - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":449 + /* "constraint/constraints.py":450 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -12331,9 +12328,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * for value in domain[:]: */ __pyx_t_14 = NULL; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; @@ -12342,13 +12339,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_others_min, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":450 + /* "constraint/constraints.py":451 * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -12356,9 +12353,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * if value + others_min > max(domains[self.target_var]): */ __pyx_t_1 = NULL; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_3genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_4 = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_10preProcess_3genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_5 = 1; @@ -12367,29 +12364,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_others_max, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":451 + /* "constraint/constraints.py":452 * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< * if value + others_min > max(domains[self.target_var]): * domain.remove(value) */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 452, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -12398,7 +12395,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 451, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 452, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -12408,7 +12405,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 451, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 452, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -12419,13 +12416,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_12(__pyx_t_4); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 451, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 452, __pyx_L1_error) PyErr_Clear(); } break; @@ -12435,19 +12432,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":452 + /* "constraint/constraints.py":453 * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): # <<<<<<<<<<<<<< * domain.remove(value) * if value + others_max < min(domains[self.target_var]): */ - __pyx_t_2 = PyNumber_Add(__pyx_v_value, __pyx_v_others_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_value, __pyx_v_others_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = NULL; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = 1; @@ -12456,17 +12453,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":453 + /* "constraint/constraints.py":454 * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): * domain.remove(value) # <<<<<<<<<<<<<< @@ -12480,12 +12477,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 453, __pyx_L1_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "constraint/constraints.py":452 + /* "constraint/constraints.py":453 * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): # <<<<<<<<<<<<<< @@ -12494,19 +12491,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":454 + /* "constraint/constraints.py":455 * if value + others_min > max(domains[self.target_var]): * domain.remove(value) * if value + others_max < min(domains[self.target_var]): # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_13 = PyNumber_Add(__pyx_v_value, __pyx_v_others_max); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_13 = PyNumber_Add(__pyx_v_value, __pyx_v_others_max); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = NULL; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_5 = 1; @@ -12515,17 +12512,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_9 = PyObject_RichCompare(__pyx_t_13, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_t_13, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":455 + /* "constraint/constraints.py":456 * domain.remove(value) * if value + others_max < min(domains[self.target_var]): * domain.remove(value) # <<<<<<<<<<<<<< @@ -12539,12 +12536,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 455, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":454 + /* "constraint/constraints.py":455 * if value + others_min > max(domains[self.target_var]): * domain.remove(value) * if value + others_max < min(domains[self.target_var]): # <<<<<<<<<<<<<< @@ -12553,7 +12550,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":451 + /* "constraint/constraints.py":452 * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -12563,7 +12560,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":447 + /* "constraint/constraints.py":448 * domain.remove(value) * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -12575,7 +12572,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __pyx_L3:; - /* "constraint/constraints.py":435 + /* "constraint/constraints.py":436 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -12611,7 +12608,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain return __pyx_r; } -/* "constraint/constraints.py":457 +/* "constraint/constraints.py":458 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -12662,53 +12659,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, 457, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 458, __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, 457, __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, 458, __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, 457, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 458, __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, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 458, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 458, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 458, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 457, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 458, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -12722,7 +12719,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, 457, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 458, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12733,8 +12730,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, 457, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 457, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 458, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 458, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_26VariableExactSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -12784,32 +12781,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":458 + /* "constraint/constraints.py":459 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if self.target_var not in assignments: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":460 + /* "constraint/constraints.py":461 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True # can't evaluate without target, defer to later * */ - __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, 460, __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, 461, __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, 460, __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, 461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":461 + /* "constraint/constraints.py":462 * * if self.target_var not in assignments: * return True # can't evaluate without target, defer to later # <<<<<<<<<<<<<< @@ -12821,7 +12818,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":460 + /* "constraint/constraints.py":461 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -12830,22 +12827,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":463 + /* "constraint/constraints.py":464 * return True # can't evaluate without target, defer to later * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * sum_value = 0 * missing = False */ - __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, 463, __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, 464, __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, 463, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":464 + /* "constraint/constraints.py":465 * * target_value = assignments[self.target_var] * sum_value = 0 # <<<<<<<<<<<<<< @@ -12855,7 +12852,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum_value = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":465 + /* "constraint/constraints.py":466 * target_value = assignments[self.target_var] * sum_value = 0 * missing = False # <<<<<<<<<<<<<< @@ -12864,17 +12861,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ __pyx_v_missing = 0; - /* "constraint/constraints.py":467 + /* "constraint/constraints.py":468 * missing = False * * if multipliers: # <<<<<<<<<<<<<< * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 468, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":468 + /* "constraint/constraints.py":469 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -12882,7 +12879,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * sum_value += assignments[var] * multiplier */ __pyx_t_1 = NULL; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; { @@ -12890,7 +12887,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -12898,9 +12895,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 469, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -12909,7 +12906,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 468, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 469, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -12919,7 +12916,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 468, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 469, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -12930,13 +12927,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); 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, 468, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 469, __pyx_L1_error) PyErr_Clear(); } break; @@ -12949,7 +12946,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 468, __pyx_L1_error) + __PYX_ERR(0, 469, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12959,22 +12956,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -12982,7 +12979,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 468, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 469, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_unpacking_done; @@ -12990,7 +12987,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 468, __pyx_L1_error) + __PYX_ERR(0, 469, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); @@ -12998,35 +12995,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":469 + /* "constraint/constraints.py":470 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< * sum_value += assignments[var] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 469, __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, 470, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":470 + /* "constraint/constraints.py":471 * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: * sum_value += assignments[var] * multiplier # <<<<<<<<<<<<<< * else: * missing = True */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":469 + /* "constraint/constraints.py":470 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< @@ -13036,7 +13033,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain goto __pyx_L9; } - /* "constraint/constraints.py":472 + /* "constraint/constraints.py":473 * sum_value += assignments[var] * multiplier * else: * missing = True # <<<<<<<<<<<<<< @@ -13048,7 +13045,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __pyx_L9:; - /* "constraint/constraints.py":468 + /* "constraint/constraints.py":469 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -13058,7 +13055,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":467 + /* "constraint/constraints.py":468 * missing = False * * if multipliers: # <<<<<<<<<<<<<< @@ -13068,7 +13065,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain goto __pyx_L4; } - /* "constraint/constraints.py":474 + /* "constraint/constraints.py":475 * missing = True * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -13076,16 +13073,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain * sum_value += assignments[var] */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __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, 474, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 475, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -13094,7 +13091,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 474, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -13104,7 +13101,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 474, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -13115,13 +13112,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_3); 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, 474, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 475, __pyx_L1_error) PyErr_Clear(); } break; @@ -13131,32 +13128,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":475 + /* "constraint/constraints.py":476 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< * sum_value += 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, 475, __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, 476, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":476 + /* "constraint/constraints.py":477 * for var in self.sum_vars: * if var in assignments: * sum_value += assignments[var] # <<<<<<<<<<<<<< * else: * sum_value += min(domains[var]) # use min value if not assigned */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":475 + /* "constraint/constraints.py":476 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -13166,7 +13163,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain goto __pyx_L13; } - /* "constraint/constraints.py":478 + /* "constraint/constraints.py":479 * sum_value += assignments[var] * else: * sum_value += min(domains[var]) # use min value if not assigned # <<<<<<<<<<<<<< @@ -13175,7 +13172,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ /*else*/ { __pyx_t_4 = NULL; - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 1; { @@ -13183,16 +13180,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 478, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":479 + /* "constraint/constraints.py":480 * else: * sum_value += min(domains[var]) # use min value if not assigned * missing = True # <<<<<<<<<<<<<< @@ -13203,7 +13200,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __pyx_L13:; - /* "constraint/constraints.py":474 + /* "constraint/constraints.py":475 * missing = True * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -13215,7 +13212,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __pyx_L4:; - /* "constraint/constraints.py":481 + /* "constraint/constraints.py":482 * missing = True * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -13225,7 +13222,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_2 = PyFloat_Check(__pyx_v_sum_value); if (__pyx_t_2) { - /* "constraint/constraints.py":482 + /* "constraint/constraints.py":483 * * if isinstance(sum_value, float): * sum_value = round(sum_value, 10) # <<<<<<<<<<<<<< @@ -13238,13 +13235,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_sum_value, __pyx_mstate_global->__pyx_int_10}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":481 + /* "constraint/constraints.py":482 * missing = True * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -13253,7 +13250,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":484 + /* "constraint/constraints.py":485 * sum_value = round(sum_value, 10) * * if missing: # <<<<<<<<<<<<<< @@ -13262,19 +13259,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ if (__pyx_v_missing) { - /* "constraint/constraints.py":486 + /* "constraint/constraints.py":487 * if missing: * # Partial assignments: only check feasibility * if sum_value > target_value: # <<<<<<<<<<<<<< * return False * if forwardcheck: */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":487 + /* "constraint/constraints.py":488 * # Partial assignments: only check feasibility * if sum_value > target_value: * return False # <<<<<<<<<<<<<< @@ -13286,7 +13283,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":486 + /* "constraint/constraints.py":487 * if missing: * # Partial assignments: only check feasibility * if sum_value > target_value: # <<<<<<<<<<<<<< @@ -13295,33 +13292,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":488 + /* "constraint/constraints.py":489 * if sum_value > target_value: * return False * if forwardcheck: # <<<<<<<<<<<<<< * for var in self.sum_vars: * if var not in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 489, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":489 + /* "constraint/constraints.py":490 * return False * if forwardcheck: * for var in self.sum_vars: # <<<<<<<<<<<<<< * if var not in assignments: * domain = domains[var] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __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_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __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, 489, __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, 490, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -13330,7 +13327,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 489, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 490, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -13340,7 +13337,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { 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, 489, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 490, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -13351,13 +13348,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_7(__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, 489, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 490, __pyx_L1_error) PyErr_Clear(); } break; @@ -13367,55 +13364,55 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":490 + /* "constraint/constraints.py":491 * if forwardcheck: * for var in self.sum_vars: * if var not in assignments: # <<<<<<<<<<<<<< * domain = domains[var] * if multipliers: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 490, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 491, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":491 + /* "constraint/constraints.py":492 * for var in self.sum_vars: * if var not in assignments: * domain = domains[var] # <<<<<<<<<<<<<< * if multipliers: * for value in domain[:]: */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":492 + /* "constraint/constraints.py":493 * if var not in assignments: * domain = domains[var] * if multipliers: # <<<<<<<<<<<<<< * for value in domain[:]: * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 493, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":493 + /* "constraint/constraints.py":494 * domain = domains[var] * if multipliers: * for value in domain[:]: # <<<<<<<<<<<<<< * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) * if temp_sum > target_value: */ - __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, 493, __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, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 494, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -13424,7 +13421,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 493, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 494, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -13434,7 +13431,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 493, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 494, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -13445,13 +13442,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_12(__pyx_t_8); 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, 493, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 494, __pyx_L1_error) PyErr_Clear(); } break; @@ -13461,14 +13458,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":494 + /* "constraint/constraints.py":495 * if multipliers: * for value in domain[:]: * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) # <<<<<<<<<<<<<< * if temp_sum > target_value: * domain.hideValue(value) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __pyx_t_9; __Pyx_INCREF(__pyx_t_4); @@ -13478,39 +13475,39 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_index, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_multipliers, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_multipliers, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_Add(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_9 = PyNumber_Add(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_temp_sum, __pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":495 + /* "constraint/constraints.py":496 * for value in domain[:]: * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) * if temp_sum > target_value: # <<<<<<<<<<<<<< * domain.hideValue(value) * else: */ - __pyx_t_9 = PyObject_RichCompare(__pyx_v_temp_sum, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 495, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_v_temp_sum, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":496 + /* "constraint/constraints.py":497 * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) * if temp_sum > target_value: * domain.hideValue(value) # <<<<<<<<<<<<<< * else: - * for value in domain[:]: + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars */ __pyx_t_3 = __pyx_v_domain; __Pyx_INCREF(__pyx_t_3); @@ -13519,12 +13516,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __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_9)) __PYX_ERR(0, 496, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":495 + /* "constraint/constraints.py":496 * for value in domain[:]: * temp_sum = sum_value + (value * multipliers[self.sum_vars.index(var)]) * if temp_sum > target_value: # <<<<<<<<<<<<<< @@ -13533,7 +13530,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":493 + /* "constraint/constraints.py":494 * domain = domains[var] * if multipliers: * for value in domain[:]: # <<<<<<<<<<<<<< @@ -13543,7 +13540,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":492 + /* "constraint/constraints.py":493 * if var not in assignments: * domain = domains[var] * if multipliers: # <<<<<<<<<<<<<< @@ -13553,145 +13550,158 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain goto __pyx_L22; } - /* "constraint/constraints.py":498 + /* "constraint/constraints.py":499 * domain.hideValue(value) * else: - * for value in domain[:]: # <<<<<<<<<<<<<< - * temp_sum = sum_value + value - * if temp_sum > target_value: + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars # <<<<<<<<<<<<<< + * for value in domain[:]: + * if temp_sum + value > target_value: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { - __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); + __pyx_t_9 = NULL; + __pyx_t_5 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_domain}; + __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + } + __pyx_t_9 = PyNumber_Subtract(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_temp_sum, __pyx_t_9); + __pyx_t_9 = 0; + + /* "constraint/constraints.py":500 + * else: + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars + * for value in domain[:]: # <<<<<<<<<<<<<< + * if temp_sum + value > target_value: + * domain.hideValue(value) +*/ + __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { + __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 498, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 500, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (likely(!__pyx_t_12)) { - if (likely(PyList_CheckExact(__pyx_t_9))) { + if (likely(PyList_CheckExact(__pyx_t_8))) { { - Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); + Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 500, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } - __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); + __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_11, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_11; } else { { - Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); + Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 500, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_11)); + __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11)); #else - __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_11); + __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_11); #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 500, __pyx_L1_error) } else { - __pyx_t_8 = __pyx_t_12(__pyx_t_9); - if (unlikely(!__pyx_t_8)) { + __pyx_t_9 = __pyx_t_12(__pyx_t_8); + 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, 498, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 500, __pyx_L1_error) PyErr_Clear(); } break; } } - __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); - __pyx_t_8 = 0; - - /* "constraint/constraints.py":499 - * else: - * for value in domain[:]: - * temp_sum = sum_value + value # <<<<<<<<<<<<<< - * if temp_sum > target_value: - * domain.hideValue(value) -*/ - __pyx_t_8 = PyNumber_Add(__pyx_v_sum_value, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_v_temp_sum, __pyx_t_8); - __pyx_t_8 = 0; + __Pyx_GOTREF(__pyx_t_9); + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_9); + __pyx_t_9 = 0; - /* "constraint/constraints.py":500 + /* "constraint/constraints.py":501 + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars * for value in domain[:]: - * temp_sum = sum_value + value - * if temp_sum > target_value: # <<<<<<<<<<<<<< + * if temp_sum + value > target_value: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_8 = PyObject_RichCompare(__pyx_v_temp_sum, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 500, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = PyNumber_Add(__pyx_v_temp_sum, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":501 - * temp_sum = sum_value + value - * if temp_sum > target_value: + /* "constraint/constraints.py":502 + * for value in domain[:]: + * if temp_sum + value > target_value: * domain.hideValue(value) # <<<<<<<<<<<<<< * if not domain: * return False */ - __pyx_t_3 = __pyx_v_domain; - __Pyx_INCREF(__pyx_t_3); + __pyx_t_9 = __pyx_v_domain; + __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __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_8)) __PYX_ERR(0, 501, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_value}; + __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":500 + /* "constraint/constraints.py":501 + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars * for value in domain[:]: - * temp_sum = sum_value + value - * if temp_sum > target_value: # <<<<<<<<<<<<<< + * if temp_sum + value > target_value: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ } - /* "constraint/constraints.py":498 - * domain.hideValue(value) + /* "constraint/constraints.py":500 * else: + * temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars * for value in domain[:]: # <<<<<<<<<<<<<< - * temp_sum = sum_value + value - * if temp_sum > target_value: + * if temp_sum + value > target_value: + * domain.hideValue(value) */ } - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L22:; - /* "constraint/constraints.py":502 - * if temp_sum > target_value: + /* "constraint/constraints.py":503 + * if temp_sum + value > target_value: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 503, __pyx_L1_error) __pyx_t_13 = (!__pyx_t_2); if (__pyx_t_13) { - /* "constraint/constraints.py":503 + /* "constraint/constraints.py":504 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -13704,8 +13714,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":502 - * if temp_sum > target_value: + /* "constraint/constraints.py":503 + * if temp_sum + value > target_value: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False @@ -13713,7 +13723,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":490 + /* "constraint/constraints.py":491 * if forwardcheck: * for var in self.sum_vars: * if var not in assignments: # <<<<<<<<<<<<<< @@ -13722,7 +13732,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":489 + /* "constraint/constraints.py":490 * return False * if forwardcheck: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -13732,7 +13742,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":488 + /* "constraint/constraints.py":489 * if sum_value > target_value: * return False * if forwardcheck: # <<<<<<<<<<<<<< @@ -13741,7 +13751,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":504 + /* "constraint/constraints.py":505 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -13753,7 +13763,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":484 + /* "constraint/constraints.py":485 * sum_value = round(sum_value, 10) * * if missing: # <<<<<<<<<<<<<< @@ -13762,7 +13772,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ } - /* "constraint/constraints.py":506 + /* "constraint/constraints.py":507 * return True * else: * return sum_value == target_value # <<<<<<<<<<<<<< @@ -13771,13 +13781,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } - /* "constraint/constraints.py":457 + /* "constraint/constraints.py":458 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -13808,10 +13818,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_26VariableExactSumConstrain return __pyx_r; } -/* "constraint/constraints.py":525 +/* "constraint/constraints.py":526 * """ * - * def __init__(self, minsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, minsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -13858,41 +13868,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_minsum,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 525, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 526, __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, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 526, __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, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 526, __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, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __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, 525, __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, 526, __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("__init__", 0, 2, 3, i); __PYX_ERR(0, 525, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 526, __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, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 526, __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, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 526, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 525, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -13904,7 +13914,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 525, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 526, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13934,40 +13944,40 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint___init__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":534 + /* "constraint/constraints.py":535 * summed to be checked * """ * self._minsum = minsum # <<<<<<<<<<<<<< * self._multipliers = multipliers * self._var_max = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2, __pyx_v_minsum) < (0)) __PYX_ERR(0, 534, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2, __pyx_v_minsum) < (0)) __PYX_ERR(0, 535, __pyx_L1_error) - /* "constraint/constraints.py":535 + /* "constraint/constraints.py":536 * """ * self._minsum = minsum * self._multipliers = multipliers # <<<<<<<<<<<<<< * self._var_max = {} * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 535, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 536, __pyx_L1_error) - /* "constraint/constraints.py":536 + /* "constraint/constraints.py":537 * self._minsum = minsum * self._multipliers = multipliers * self._var_max = {} # <<<<<<<<<<<<<< * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 536, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":525 + /* "constraint/constraints.py":526 * """ * - * def __init__(self, minsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, minsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -13985,7 +13995,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint___init__ return __pyx_r; } -/* "constraint/constraints.py":538 +/* "constraint/constraints.py":539 * self._var_max = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -14036,50 +14046,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, 538, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 539, __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, 538, __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, 539, __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, 538, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 539, __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, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 539, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 539, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 539, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 539, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 538, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 539, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -14089,7 +14099,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, 538, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 539, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14100,9 +14110,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, 538, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 538, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 538, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 539, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 539, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 539, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -14153,7 +14163,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":539 + /* "constraint/constraints.py":540 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -14161,9 +14171,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc * self._var_max = { variable: max(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __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, 539, __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, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -14183,36 +14193,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 539, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":540 + /* "constraint/constraints.py":541 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) # <<<<<<<<<<<<<< * self._var_max = { variable: max(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 540, __pyx_L1_error) - __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 541, __pyx_L1_error) + __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 540, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 541, __pyx_L1_error); } } __pyx_t_1 = __pyx_t_4; @@ -14221,7 +14231,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":541 + /* "constraint/constraints.py":542 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) * self._var_max = { variable: max(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -14229,7 +14239,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc * # preprocess the domains to remove values that cannot contribute to the minimum sum */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_5 = 1; @@ -14237,7 +14247,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -14245,9 +14255,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -14256,7 +14266,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 541, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14266,7 +14276,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 541, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14277,13 +14287,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L5_error) } else { __pyx_t_4 = __pyx_t_8(__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, 541, __pyx_L5_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L5_error) PyErr_Clear(); } break; @@ -14296,7 +14306,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 541, __pyx_L5_error) + __PYX_ERR(0, 542, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14306,22 +14316,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -14329,7 +14339,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 541, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 542, __pyx_L5_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_unpacking_done; @@ -14337,7 +14347,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 541, __pyx_L5_error) + __PYX_ERR(0, 542, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_variable, __pyx_t_3); @@ -14345,7 +14355,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_multiplier, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr8__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr8__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; { @@ -14353,13 +14363,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr8__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L5_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_8genexpr8__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr8__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 541, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr8__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 542, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14372,10 +14382,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc goto __pyx_L1_error; __pyx_L11_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 541, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_1) < (0)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":544 + /* "constraint/constraints.py":545 * * # preprocess the domains to remove values that cannot contribute to the minimum sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -14388,7 +14398,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -14396,9 +14406,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14407,7 +14417,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 544, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 545, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14417,7 +14427,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 544, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 545, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14428,13 +14438,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__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, 544, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 545, __pyx_L1_error) PyErr_Clear(); } break; @@ -14447,7 +14457,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 544, __pyx_L1_error) + __PYX_ERR(0, 545, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14457,22 +14467,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __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, 544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __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, 544, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -14480,7 +14490,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 544, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 545, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_unpacking_done; @@ -14488,7 +14498,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 544, __pyx_L1_error) + __PYX_ERR(0, 545, __pyx_L1_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_3); @@ -14496,19 +14506,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":545 + /* "constraint/constraints.py":546 * # preprocess the domains to remove values that cannot contribute to the minimum sum * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] # <<<<<<<<<<<<<< * others_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":546 + /* "constraint/constraints.py":547 * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] * others_max = sum_other_vars(variables, variable, self._var_max) # <<<<<<<<<<<<<< @@ -14516,9 +14526,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc * if value * multiplier + others_max < self._minsum: */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -14538,29 +14548,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_others_max, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":547 + /* "constraint/constraints.py":548 * domain = domains[variable] * others_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: # <<<<<<<<<<<<<< * if value * multiplier + others_max < self._minsum: * 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, 547, __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, 548, __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_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 548, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -14569,7 +14579,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 547, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 548, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -14579,7 +14589,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 547, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 548, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -14590,13 +14600,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_13(__pyx_t_3); 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, 547, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 548, __pyx_L1_error) PyErr_Clear(); } break; @@ -14606,28 +14616,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":548 + /* "constraint/constraints.py":549 * others_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: * if value * multiplier + others_max < self._minsum: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_v_others_max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_v_others_max); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":549 + /* "constraint/constraints.py":550 * for value in domain[:]: * if value * multiplier + others_max < self._minsum: * domain.remove(value) # <<<<<<<<<<<<<< @@ -14641,12 +14651,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":548 + /* "constraint/constraints.py":549 * others_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: * if value * multiplier + others_max < self._minsum: # <<<<<<<<<<<<<< @@ -14655,7 +14665,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc */ } - /* "constraint/constraints.py":547 + /* "constraint/constraints.py":548 * domain = domains[variable] * others_max = sum_other_vars(variables, variable, self._var_max) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -14665,7 +14675,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":544 + /* "constraint/constraints.py":545 * * # preprocess the domains to remove values that cannot contribute to the minimum sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -14675,7 +14685,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":552 + /* "constraint/constraints.py":553 * * # recalculate the max after pruning * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -14683,7 +14693,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 1; @@ -14691,7 +14701,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -14699,9 +14709,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 553, __pyx_L23_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -14710,7 +14720,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 552, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 553, __pyx_L23_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14720,7 +14730,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc { 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, 552, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 553, __pyx_L23_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -14731,13 +14741,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L23_error) } else { __pyx_t_3 = __pyx_t_8(__pyx_t_4); 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, 552, __pyx_L23_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 553, __pyx_L23_error) PyErr_Clear(); } break; @@ -14750,7 +14760,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 552, __pyx_L23_error) + __PYX_ERR(0, 553, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14760,22 +14770,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -14783,7 +14793,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 552, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 553, __pyx_L23_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L27_unpacking_done; @@ -14791,21 +14801,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 552, __pyx_L23_error) + __PYX_ERR(0, 553, __pyx_L23_error) __pyx_L27_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_multiplier, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr9__pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr9__pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_12 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_12 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = (__pyx_t_12 > 0); if (__pyx_t_6) { __pyx_t_1 = NULL; - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr9__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_8genexpr9__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; { @@ -14813,10 +14823,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); } - __pyx_t_10 = PyNumber_Multiply(__pyx_t_9, __pyx_8genexpr9__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 552, __pyx_L23_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_t_9, __pyx_8genexpr9__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = __pyx_t_10; @@ -14825,7 +14835,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_t_3 = __pyx_mstate_global->__pyx_int_0; } - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr9__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 552, __pyx_L23_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr9__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 553, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -14838,10 +14848,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc goto __pyx_L1_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_2) < (0)) __PYX_ERR(0, 552, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max, __pyx_t_2) < (0)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":538 + /* "constraint/constraints.py":539 * self._var_max = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -14877,7 +14887,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_2preProc return __pyx_r; } -/* "constraint/constraints.py":554 +/* "constraint/constraints.py":555 * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -14928,53 +14938,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, 554, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 555, __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, 554, __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, 555, __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, 554, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 555, __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, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 555, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 555, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 555, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 555, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -14988,7 +14998,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, 554, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 555, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14999,8 +15009,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, 554, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 554, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 555, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 555, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -15045,31 +15055,31 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":555 + /* "constraint/constraints.py":556 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * minsum = self._minsum * sum = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":556 + /* "constraint/constraints.py":557 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers * minsum = self._minsum # <<<<<<<<<<<<<< * sum = 0 * missing = False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_minsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_minsum = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":557 + /* "constraint/constraints.py":558 * multipliers = self._multipliers * minsum = self._minsum * sum = 0 # <<<<<<<<<<<<<< @@ -15079,7 +15089,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":558 + /* "constraint/constraints.py":559 * minsum = self._minsum * sum = 0 * missing = False # <<<<<<<<<<<<<< @@ -15088,7 +15098,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ */ __pyx_v_missing = 0; - /* "constraint/constraints.py":559 + /* "constraint/constraints.py":560 * sum = 0 * missing = False * max_sum_missing = 0 # <<<<<<<<<<<<<< @@ -15098,17 +15108,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_max_sum_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":560 + /* "constraint/constraints.py":561 * missing = False * max_sum_missing = 0 * if multipliers: # <<<<<<<<<<<<<< * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 561, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":561 + /* "constraint/constraints.py":562 * max_sum_missing = 0 * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -15121,7 +15131,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -15129,9 +15139,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -15140,7 +15150,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ { 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, 561, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 562, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -15150,7 +15160,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 562, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -15161,13 +15171,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_6(__pyx_t_3); 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, 561, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 562, __pyx_L1_error) PyErr_Clear(); } break; @@ -15180,7 +15190,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 562, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15190,22 +15200,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #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, 561, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 562, __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); @@ -15213,7 +15223,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 561, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 562, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -15221,7 +15231,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 562, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); @@ -15229,35 +15239,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":562 + /* "constraint/constraints.py":563 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 563, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":563 + /* "constraint/constraints.py":564 * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: * sum += assignments[variable] * multiplier # <<<<<<<<<<<<<< * else: * max_sum_missing += self._var_max[variable] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":562 + /* "constraint/constraints.py":563 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< @@ -15267,7 +15277,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ goto __pyx_L8; } - /* "constraint/constraints.py":565 + /* "constraint/constraints.py":566 * sum += assignments[variable] * multiplier * else: * max_sum_missing += self._var_max[variable] # <<<<<<<<<<<<<< @@ -15275,18 +15285,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ * else: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_max_sum_missing, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":566 + /* "constraint/constraints.py":567 * else: * max_sum_missing += self._var_max[variable] * missing = True # <<<<<<<<<<<<<< @@ -15297,7 +15307,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ } __pyx_L8:; - /* "constraint/constraints.py":561 + /* "constraint/constraints.py":562 * max_sum_missing = 0 * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -15307,7 +15317,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":560 + /* "constraint/constraints.py":561 * missing = False * max_sum_missing = 0 * if multipliers: # <<<<<<<<<<<<<< @@ -15317,7 +15327,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ goto __pyx_L3; } - /* "constraint/constraints.py":568 + /* "constraint/constraints.py":569 * missing = True * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -15330,9 +15340,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 569, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -15340,7 +15350,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ { 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, 568, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 569, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -15350,7 +15360,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 568, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 569, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -15361,13 +15371,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_6(__pyx_t_3); 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, 568, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 569, __pyx_L1_error) PyErr_Clear(); } break; @@ -15377,32 +15387,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":569 + /* "constraint/constraints.py":570 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 569, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 570, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":570 + /* "constraint/constraints.py":571 * for variable in variables: * if variable in assignments: * sum += assignments[variable] # <<<<<<<<<<<<<< * else: * max_sum_missing += self._var_max[variable] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":569 + /* "constraint/constraints.py":570 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -15412,7 +15422,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ goto __pyx_L12; } - /* "constraint/constraints.py":572 + /* "constraint/constraints.py":573 * sum += assignments[variable] * else: * max_sum_missing += self._var_max[variable] # <<<<<<<<<<<<<< @@ -15420,18 +15430,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ * */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_max); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_max_sum_missing, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_max_sum_missing, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":573 + /* "constraint/constraints.py":574 * else: * max_sum_missing += self._var_max[variable] * missing = True # <<<<<<<<<<<<<< @@ -15442,7 +15452,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ } __pyx_L12:; - /* "constraint/constraints.py":568 + /* "constraint/constraints.py":569 * missing = True * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -15454,7 +15464,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ } __pyx_L3:; - /* "constraint/constraints.py":575 + /* "constraint/constraints.py":576 * missing = True * * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -15464,7 +15474,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __pyx_t_2 = PyFloat_Check(__pyx_v_sum); if (__pyx_t_2) { - /* "constraint/constraints.py":576 + /* "constraint/constraints.py":577 * * if isinstance(sum, float): * sum = round(sum, 10) # <<<<<<<<<<<<<< @@ -15477,13 +15487,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sum, __pyx_mstate_global->__pyx_int_10}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":575 + /* "constraint/constraints.py":576 * missing = True * * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -15492,22 +15502,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ */ } - /* "constraint/constraints.py":577 + /* "constraint/constraints.py":578 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + max_sum_missing < minsum: # <<<<<<<<<<<<<< * return False * return sum >= minsum or missing */ - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_max_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_minsum, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_minsum, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":578 + /* "constraint/constraints.py":579 * sum = round(sum, 10) * if sum + max_sum_missing < minsum: * return False # <<<<<<<<<<<<<< @@ -15519,7 +15529,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":577 + /* "constraint/constraints.py":578 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + max_sum_missing < minsum: # <<<<<<<<<<<<<< @@ -15528,7 +15538,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ */ } - /* "constraint/constraints.py":579 + /* "constraint/constraints.py":580 * if sum + max_sum_missing < minsum: * return False * return sum >= minsum or missing # <<<<<<<<<<<<<< @@ -15536,8 +15546,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ * class VariableMinSumConstraint(Constraint): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_sum, __pyx_v_minsum, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_sum, __pyx_v_minsum, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 580, __pyx_L1_error) if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -15546,7 +15556,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __pyx_t_3; __pyx_t_3 = 0; @@ -15555,7 +15565,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ __pyx_t_8 = 0; goto __pyx_L0; - /* "constraint/constraints.py":554 + /* "constraint/constraints.py":555 * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -15584,10 +15594,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MinSumConstraint_4__call_ return __pyx_r; } -/* "constraint/constraints.py":598 +/* "constraint/constraints.py":599 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -15635,47 +15645,47 @@ 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_sum_vars,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 598, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 599, __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, 598, __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, 599, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 598, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 599, __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, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 599, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 599, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 598, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 599, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -15688,7 +15698,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 598, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 599, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15699,7 +15709,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, 598, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 599, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_sum_vars, __pyx_v_multipliers); /* function exit code */ @@ -15720,7 +15730,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":614 +/* "constraint/constraints.py":615 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -15740,7 +15750,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_4_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 614, __pyx_L1_error) + __PYX_ERR(0, 615, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -15748,7 +15758,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __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_24VariableMinSumConstraint_8__init___2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___init, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_8__init___2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint___init, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -15786,16 +15796,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 614, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 614, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 615, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 615, __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, 614, __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, 615, __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, 614, __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, 615, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -15803,7 +15813,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 614, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 615, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -15813,7 +15823,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 614, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 615, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -15824,13 +15834,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __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, 614, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 615, __pyx_L1_error) PyErr_Clear(); } break; @@ -15888,10 +15898,10 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":598 +/* "constraint/constraints.py":599 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -15910,44 +15920,44 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":608 + /* "constraint/constraints.py":609 * summed to match the last variable. * """ * self.target_var = target_var # <<<<<<<<<<<<<< * self.sum_vars = sum_vars * self._multipliers = multipliers */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < (0)) __PYX_ERR(0, 608, __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, 609, __pyx_L1_error) - /* "constraint/constraints.py":609 + /* "constraint/constraints.py":610 * """ * self.target_var = target_var * self.sum_vars = sum_vars # <<<<<<<<<<<<<< * self._multipliers = multipliers * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 609, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 610, __pyx_L1_error) - /* "constraint/constraints.py":610 + /* "constraint/constraints.py":611 * self.target_var = target_var * self.sum_vars = sum_vars * self._multipliers = multipliers # <<<<<<<<<<<<<< * * if multipliers: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 610, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 611, __pyx_L1_error) - /* "constraint/constraints.py":612 + /* "constraint/constraints.py":613 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 613, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/constraints.py":613 + /* "constraint/constraints.py":614 * * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." # <<<<<<<<<<<<<< @@ -15956,19 +15966,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 613, __pyx_L1_error) - __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 614, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 == (__pyx_t_3 + 1)); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_match_sum_varia, 0, 0); - __PYX_ERR(0, 613, __pyx_L1_error) + __PYX_ERR(0, 614, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 613, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 614, __pyx_L1_error) #endif - /* "constraint/constraints.py":614 + /* "constraint/constraints.py":615 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -15977,23 +15987,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_4 = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_4 = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_be_numbers, 0, 0); - __PYX_ERR(0, 614, __pyx_L1_error) + __PYX_ERR(0, 615, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 614, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 615, __pyx_L1_error) #endif - /* "constraint/constraints.py":615 + /* "constraint/constraints.py":616 * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." # <<<<<<<<<<<<<< @@ -16002,20 +16012,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Last_multiplier_must_be_1_as_it, 0, 0); - __PYX_ERR(0, 615, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 615, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 616, __pyx_L1_error) #endif - /* "constraint/constraints.py":612 + /* "constraint/constraints.py":613 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< @@ -16024,10 +16034,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ } - /* "constraint/constraints.py":598 + /* "constraint/constraints.py":599 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -16047,7 +16057,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":617 +/* "constraint/constraints.py":618 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -16098,50 +16108,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, 617, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 618, __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, 617, __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, 618, __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, 617, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 618, __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, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 618, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 618, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 618, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 618, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 617, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 618, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -16151,7 +16161,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, 617, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 618, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16162,9 +16172,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, 617, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 617, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 617, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 618, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 618, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 618, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -16185,7 +16195,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_10preProcess_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":625 +/* "constraint/constraints.py":626 * for var in self.sum_vars: * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -16205,7 +16215,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_6_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 625, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -16216,7 +16226,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __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_24VariableMinSumConstraint_10preProcess_2generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint_preProc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_10preProcess_2generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint_preProc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -16259,17 +16269,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ __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, 625, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 625, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 626, __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, 625, __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, 626, __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, 625, __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, 626, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -16277,7 +16287,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 625, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 626, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -16287,7 +16297,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 625, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 626, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -16298,13 +16308,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __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, 625, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 626, __pyx_L1_error) PyErr_Clear(); } break; @@ -16315,18 +16325,18 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 625, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 625, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 626, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __pyx_t_6 = NULL; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 625, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 626, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 625, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; { @@ -16334,7 +16344,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 625, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; @@ -16355,7 +16365,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 625, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 626, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -16384,7 +16394,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMinSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":617 +/* "constraint/constraints.py":618 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -16423,7 +16433,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_5_preProcess *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 617, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -16431,7 +16441,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_domains); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_domains); - /* "constraint/constraints.py":618 + /* "constraint/constraints.py":619 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -16439,9 +16449,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ * multipliers = self._multipliers */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __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, 618, __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, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -16461,51 +16471,51 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 618, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":620 + /* "constraint/constraints.py":621 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if not multipliers: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":622 + /* "constraint/constraints.py":623 * multipliers = self._multipliers * * if not multipliers: # <<<<<<<<<<<<<< * for var in self.sum_vars: * domain = domains[var] */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 623, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { - /* "constraint/constraints.py":623 + /* "constraint/constraints.py":624 * * if not multipliers: * for var in self.sum_vars: # <<<<<<<<<<<<<< * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __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_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 624, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -16514,7 +16524,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 623, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -16524,7 +16534,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 623, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -16535,13 +16545,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_9(__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, 623, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 624, __pyx_L1_error) PyErr_Clear(); } break; @@ -16553,19 +16563,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":624 + /* "constraint/constraints.py":625 * if not multipliers: * for var in self.sum_vars: * domain = domains[var] # <<<<<<<<<<<<<< * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":625 + /* "constraint/constraints.py":626 * for var in self.sum_vars: * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -16573,9 +16583,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ * if value + others_max < min(domains[self.target_var]): */ __pyx_t_2 = NULL; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_10 = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -16584,29 +16594,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __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_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_others_max, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":626 + /* "constraint/constraints.py":627 * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< * if value + others_max < min(domains[self.target_var]): * 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, 626, __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, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 627, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -16615,7 +16625,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 626, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -16625,7 +16635,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 626, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 627, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -16636,13 +16646,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_12(__pyx_t_10); 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, 626, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 627, __pyx_L1_error) PyErr_Clear(); } break; @@ -16652,19 +16662,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":627 + /* "constraint/constraints.py":628 * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_max < min(domains[self.target_var]): # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_v_others_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_v_others_max); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = 1; @@ -16673,17 +16683,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":628 + /* "constraint/constraints.py":629 * for value in domain[:]: * if value + others_max < min(domains[self.target_var]): * domain.remove(value) # <<<<<<<<<<<<<< @@ -16697,12 +16707,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 628, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "constraint/constraints.py":627 + /* "constraint/constraints.py":628 * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_max < min(domains[self.target_var]): # <<<<<<<<<<<<<< @@ -16711,7 +16721,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ } - /* "constraint/constraints.py":626 + /* "constraint/constraints.py":627 * domain = domains[var] * others_max = sum(max(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -16721,7 +16731,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":623 + /* "constraint/constraints.py":624 * * if not multipliers: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -16731,7 +16741,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":622 + /* "constraint/constraints.py":623 * multipliers = self._multipliers * * if not multipliers: # <<<<<<<<<<<<<< @@ -16740,7 +16750,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ } - /* "constraint/constraints.py":617 + /* "constraint/constraints.py":618 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -16773,7 +16783,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":630 +/* "constraint/constraints.py":631 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -16824,53 +16834,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, 630, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __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, 630, __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, 631, __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, 630, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 631, __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, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 631, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 631, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 631, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 630, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 631, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -16884,7 +16894,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, 630, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 631, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16895,8 +16905,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, 630, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 630, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 631, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 631, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -16939,32 +16949,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":631 + /* "constraint/constraints.py":632 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if self.target_var not in assignments: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":633 + /* "constraint/constraints.py":634 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True # can't evaluate without target, defer to later * */ - __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, 633, __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, 634, __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, 633, __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, 634, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":634 + /* "constraint/constraints.py":635 * * if self.target_var not in assignments: * return True # can't evaluate without target, defer to later # <<<<<<<<<<<<<< @@ -16976,7 +16986,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":633 + /* "constraint/constraints.py":634 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -16985,22 +16995,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ } - /* "constraint/constraints.py":636 + /* "constraint/constraints.py":637 * return True # can't evaluate without target, defer to later * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * sum_value = 0 * */ - __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, 636, __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, 637, __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, 636, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":637 + /* "constraint/constraints.py":638 * * target_value = assignments[self.target_var] * sum_value = 0 # <<<<<<<<<<<<<< @@ -17010,17 +17020,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum_value = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":639 + /* "constraint/constraints.py":640 * sum_value = 0 * * if multipliers: # <<<<<<<<<<<<<< * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 640, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":640 + /* "constraint/constraints.py":641 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -17028,7 +17038,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ * sum_value += assignments[var] * multiplier */ __pyx_t_1 = NULL; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; { @@ -17036,7 +17046,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -17044,9 +17054,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 641, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -17055,7 +17065,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 640, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 641, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -17065,7 +17075,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 640, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 641, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -17076,13 +17086,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); 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, 640, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 641, __pyx_L1_error) PyErr_Clear(); } break; @@ -17095,7 +17105,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 640, __pyx_L1_error) + __PYX_ERR(0, 641, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17105,22 +17115,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -17128,7 +17138,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 640, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 641, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_unpacking_done; @@ -17136,7 +17146,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 640, __pyx_L1_error) + __PYX_ERR(0, 641, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); @@ -17144,35 +17154,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":641 + /* "constraint/constraints.py":642 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< * sum_value += assignments[var] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 641, __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, 642, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":642 + /* "constraint/constraints.py":643 * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: * sum_value += assignments[var] * multiplier # <<<<<<<<<<<<<< * else: * sum_value += max(domains[var] * multiplier) # use max value if not assigned */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":641 + /* "constraint/constraints.py":642 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< @@ -17182,7 +17192,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ goto __pyx_L9; } - /* "constraint/constraints.py":644 + /* "constraint/constraints.py":645 * sum_value += assignments[var] * multiplier * else: * sum_value += max(domains[var] * multiplier) # use max value if not assigned # <<<<<<<<<<<<<< @@ -17191,9 +17201,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ /*else*/ { __pyx_t_8 = NULL; - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = 1; @@ -17202,10 +17212,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_9); @@ -17213,7 +17223,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __pyx_L9:; - /* "constraint/constraints.py":640 + /* "constraint/constraints.py":641 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -17223,7 +17233,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":639 + /* "constraint/constraints.py":640 * sum_value = 0 * * if multipliers: # <<<<<<<<<<<<<< @@ -17233,7 +17243,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ goto __pyx_L4; } - /* "constraint/constraints.py":646 + /* "constraint/constraints.py":647 * sum_value += max(domains[var] * multiplier) # use max value if not assigned * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -17241,16 +17251,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ * sum_value += assignments[var] */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -17259,7 +17269,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { 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, 646, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 647, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -17269,7 +17279,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 646, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 647, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -17280,13 +17290,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_9); 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, 646, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 647, __pyx_L1_error) PyErr_Clear(); } break; @@ -17296,32 +17306,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":647 + /* "constraint/constraints.py":648 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< * sum_value += 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, 647, __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, 648, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":648 + /* "constraint/constraints.py":649 * for var in self.sum_vars: * if var in assignments: * sum_value += assignments[var] # <<<<<<<<<<<<<< * else: * sum_value += max(domains[var]) # use max value if not assigned */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":647 + /* "constraint/constraints.py":648 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -17331,7 +17341,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ goto __pyx_L13; } - /* "constraint/constraints.py":650 + /* "constraint/constraints.py":651 * sum_value += assignments[var] * else: * sum_value += max(domains[var]) # use max value if not assigned # <<<<<<<<<<<<<< @@ -17340,7 +17350,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ /*else*/ { __pyx_t_4 = NULL; - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; { @@ -17348,10 +17358,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 650, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_8); @@ -17359,7 +17369,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __pyx_L13:; - /* "constraint/constraints.py":646 + /* "constraint/constraints.py":647 * sum_value += max(domains[var] * multiplier) # use max value if not assigned * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -17371,7 +17381,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ } __pyx_L4:; - /* "constraint/constraints.py":652 + /* "constraint/constraints.py":653 * sum_value += max(domains[var]) # use max value if not assigned * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -17381,7 +17391,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ __pyx_t_2 = PyFloat_Check(__pyx_v_sum_value); if (__pyx_t_2) { - /* "constraint/constraints.py":653 + /* "constraint/constraints.py":654 * * if isinstance(sum_value, float): * sum_value = round(sum_value, 10) # <<<<<<<<<<<<<< @@ -17394,13 +17404,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sum_value, __pyx_mstate_global->__pyx_int_10}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 653, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":652 + /* "constraint/constraints.py":653 * sum_value += max(domains[var]) # use max value if not assigned * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -17409,7 +17419,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ */ } - /* "constraint/constraints.py":655 + /* "constraint/constraints.py":656 * sum_value = round(sum_value, 10) * * return sum_value >= target_value # <<<<<<<<<<<<<< @@ -17417,12 +17427,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 656, __pyx_L1_error) __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "constraint/constraints.py":630 + /* "constraint/constraints.py":631 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -17450,10 +17460,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMinSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":674 +/* "constraint/constraints.py":675 * """ * - * def __init__(self, maxsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, maxsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -17500,41 +17510,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_maxsum,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 674, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 675, __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, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 675, __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, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 675, __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, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __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, 674, __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, 675, __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("__init__", 0, 2, 3, i); __PYX_ERR(0, 674, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, i); __PYX_ERR(0, 675, __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, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 675, __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, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 675, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 674, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 675, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -17546,7 +17556,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 674, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 675, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17576,52 +17586,52 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint___init__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":683 + /* "constraint/constraints.py":684 * summed to be checked * """ * self._maxsum = maxsum # <<<<<<<<<<<<<< * self._multipliers = multipliers * self._var_min = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2, __pyx_v_maxsum) < (0)) __PYX_ERR(0, 683, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2, __pyx_v_maxsum) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) - /* "constraint/constraints.py":684 + /* "constraint/constraints.py":685 * """ * self._maxsum = maxsum * self._multipliers = multipliers # <<<<<<<<<<<<<< * self._var_min = {} * self._var_is_negative = {} */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 684, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 685, __pyx_L1_error) - /* "constraint/constraints.py":685 + /* "constraint/constraints.py":686 * self._maxsum = maxsum * self._multipliers = multipliers * self._var_min = {} # <<<<<<<<<<<<<< * self._var_is_negative = {} * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 685, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":686 + /* "constraint/constraints.py":687 * self._multipliers = multipliers * self._var_min = {} * self._var_is_negative = {} # <<<<<<<<<<<<<< * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_1) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_1) < (0)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":674 + /* "constraint/constraints.py":675 * """ * - * def __init__(self, maxsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, maxsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -17639,7 +17649,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint___init__ return __pyx_r; } -/* "constraint/constraints.py":688 +/* "constraint/constraints.py":689 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -17690,50 +17700,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, 688, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 689, __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, 688, __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, 689, __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, 688, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 689, __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, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 689, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 689, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 689, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 689, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 688, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 689, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -17743,7 +17753,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, 688, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 689, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17754,9 +17764,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, 688, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 688, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 688, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 689, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 689, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 689, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -17809,7 +17819,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":689 + /* "constraint/constraints.py":690 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -17817,9 +17827,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc * maxsum = self._maxsum */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __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, 689, __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, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -17839,36 +17849,36 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 689, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":690 + /* "constraint/constraints.py":691 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) # <<<<<<<<<<<<<< * maxsum = self._maxsum * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 690, __pyx_L1_error) - __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_4 = PyList_New(1 * ((__pyx_t_7<0) ? 0:__pyx_t_7)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_t_7; __pyx_temp++) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 690, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 691, __pyx_L1_error); } } __pyx_t_1 = __pyx_t_4; @@ -17877,19 +17887,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":691 + /* "constraint/constraints.py":692 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) * maxsum = self._maxsum # <<<<<<<<<<<<<< * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_maxsum = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":692 + /* "constraint/constraints.py":693 * multipliers = self._multipliers if self._multipliers else [1] * len(variables) * maxsum = self._maxsum * self._var_min = { variable: min(domains[variable]) * multiplier for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -17897,7 +17907,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc * # preprocess the domains to remove values that cannot contribute to the sum */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = NULL; __pyx_t_5 = 1; @@ -17905,7 +17915,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { @@ -17913,9 +17923,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 693, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -17924,7 +17934,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 692, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 693, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -17934,7 +17944,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 692, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 693, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -17945,13 +17955,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L5_error) } else { __pyx_t_4 = __pyx_t_8(__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, 692, __pyx_L5_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 693, __pyx_L5_error) PyErr_Clear(); } break; @@ -17964,7 +17974,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 692, __pyx_L5_error) + __PYX_ERR(0, 693, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17974,22 +17984,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_INCREF(__pyx_t_9); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_9); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -17997,7 +18007,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 692, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 693, __pyx_L5_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_unpacking_done; @@ -18005,7 +18015,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 692, __pyx_L5_error) + __PYX_ERR(0, 693, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_variable, __pyx_t_3); @@ -18013,7 +18023,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_multiplier, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr12__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr12__pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; { @@ -18021,13 +18031,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_9genexpr12__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L5_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_t_4, __pyx_9genexpr12__pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr12__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 692, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr12__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 693, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -18040,10 +18050,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc goto __pyx_L1_error; __pyx_L11_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 692, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_1) < (0)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":695 + /* "constraint/constraints.py":696 * * # preprocess the domains to remove values that cannot contribute to the sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -18056,7 +18066,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -18064,9 +18074,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18075,7 +18085,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 695, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 696, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18085,7 +18095,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 695, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 696, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18096,13 +18106,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__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, 695, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 696, __pyx_L1_error) PyErr_Clear(); } break; @@ -18115,7 +18125,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 695, __pyx_L1_error) + __PYX_ERR(0, 696, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -18125,22 +18135,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __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, 695, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __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, 695, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -18148,7 +18158,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 695, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 696, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_unpacking_done; @@ -18156,7 +18166,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 695, __pyx_L1_error) + __PYX_ERR(0, 696, __pyx_L1_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_3); @@ -18164,19 +18174,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":696 + /* "constraint/constraints.py":697 * # preprocess the domains to remove values that cannot contribute to the sum * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] # <<<<<<<<<<<<<< * other_vars_min = sum_other_vars(variables, variable, self._var_min) * for value in domain[:]: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":697 + /* "constraint/constraints.py":698 * for variable, multiplier in zip(variables, multipliers): * domain = domains[variable] * other_vars_min = sum_other_vars(variables, variable, self._var_min) # <<<<<<<<<<<<<< @@ -18184,9 +18194,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc * if value * multiplier + other_vars_min > maxsum: */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sum_other_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -18206,29 +18216,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_other_vars_min, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":698 + /* "constraint/constraints.py":699 * domain = domains[variable] * other_vars_min = sum_other_vars(variables, variable, self._var_min) * for value in domain[:]: # <<<<<<<<<<<<<< * if value * multiplier + other_vars_min > maxsum: * 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, 698, __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, 699, __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_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 699, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18237,7 +18247,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 698, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 699, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -18247,7 +18257,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 698, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 699, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -18258,13 +18268,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_13(__pyx_t_3); 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, 698, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 699, __pyx_L1_error) PyErr_Clear(); } break; @@ -18274,25 +18284,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":699 + /* "constraint/constraints.py":700 * other_vars_min = sum_other_vars(variables, variable, self._var_min) * for value in domain[:]: * if value * multiplier + other_vars_min > maxsum: # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_9 = PyNumber_Add(__pyx_t_1, __pyx_v_other_vars_min); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "constraint/constraints.py":700 + /* "constraint/constraints.py":701 * for value in domain[:]: * if value * multiplier + other_vars_min > maxsum: * domain.remove(value) # <<<<<<<<<<<<<< @@ -18306,12 +18316,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":699 + /* "constraint/constraints.py":700 * other_vars_min = sum_other_vars(variables, variable, self._var_min) * for value in domain[:]: * if value * multiplier + other_vars_min > maxsum: # <<<<<<<<<<<<<< @@ -18320,7 +18330,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc */ } - /* "constraint/constraints.py":698 + /* "constraint/constraints.py":699 * domain = domains[variable] * other_vars_min = sum_other_vars(variables, variable, self._var_min) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -18330,7 +18340,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":695 + /* "constraint/constraints.py":696 * * # preprocess the domains to remove values that cannot contribute to the sum * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -18340,7 +18350,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":703 + /* "constraint/constraints.py":704 * * # recalculate the min after pruning * self._var_min = { variable: min(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 # <<<<<<<<<<<<<< @@ -18348,7 +18358,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc * */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_5 = 1; @@ -18356,7 +18366,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -18364,9 +18374,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 704, __pyx_L23_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -18375,7 +18385,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 703, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 704, __pyx_L23_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18385,7 +18395,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 703, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 704, __pyx_L23_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18396,13 +18406,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L23_error) } else { __pyx_t_3 = __pyx_t_8(__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, 703, __pyx_L23_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 704, __pyx_L23_error) PyErr_Clear(); } break; @@ -18415,7 +18425,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 703, __pyx_L23_error) + __PYX_ERR(0, 704, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -18425,22 +18435,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_4); } #else - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); @@ -18448,7 +18458,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 703, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < (0)) __PYX_ERR(0, 704, __pyx_L23_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L27_unpacking_done; @@ -18456,21 +18466,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 703, __pyx_L23_error) + __PYX_ERR(0, 704, __pyx_L23_error) __pyx_L27_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_variable, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_multiplier, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (__pyx_t_12 > 0); if (__pyx_t_6) { __pyx_t_9 = NULL; - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr13__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; { @@ -18478,10 +18488,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); } - __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_9genexpr13__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 703, __pyx_L23_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_t_4, __pyx_9genexpr13__pyx_v_multiplier); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_10; @@ -18490,7 +18500,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_t_3 = __pyx_mstate_global->__pyx_int_0; } - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr13__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 703, __pyx_L23_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr13__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 704, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -18503,10 +18513,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc goto __pyx_L1_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_2) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min, __pyx_t_2) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":704 + /* "constraint/constraints.py":705 * # recalculate the min after pruning * self._var_min = { variable: min(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } # <<<<<<<<<<<<<< @@ -18514,16 +18524,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_2); 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_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 705, __pyx_L32_error) } for (;;) { if (likely(!__pyx_t_8)) { @@ -18531,7 +18541,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 704, __pyx_L32_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 705, __pyx_L32_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18541,7 +18551,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc { 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, 704, __pyx_L32_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 705, __pyx_L32_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -18552,13 +18562,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L32_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L32_error) } else { __pyx_t_3 = __pyx_t_8(__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, 704, __pyx_L32_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 705, __pyx_L32_error) PyErr_Clear(); } break; @@ -18567,14 +18577,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_variable, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_9genexpr14__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_9genexpr14__pyx_v_variable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_10, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L32_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_10, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr14__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 704, __pyx_L32_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr14__pyx_v_variable, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 705, __pyx_L32_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -18585,10 +18595,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc goto __pyx_L1_error; __pyx_L36_exit_scope:; } /* exit inner scope */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_2) < (0)) __PYX_ERR(0, 704, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative, __pyx_t_2) < (0)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":688 + /* "constraint/constraints.py":689 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -18626,7 +18636,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_2preProc return __pyx_r; } -/* "constraint/constraints.py":706 +/* "constraint/constraints.py":707 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -18677,53 +18687,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, 706, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __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, 706, __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, 707, __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, 706, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 707, __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, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 707, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 707, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 707, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 706, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 707, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -18737,7 +18747,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, 706, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 707, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -18748,8 +18758,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, 706, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 706, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 707, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 707, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -18800,31 +18810,31 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":707 + /* "constraint/constraints.py":708 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * maxsum = self._maxsum * sum = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":708 + /* "constraint/constraints.py":709 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers * maxsum = self._maxsum # <<<<<<<<<<<<<< * sum = 0 * min_sum_missing = 0 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxsum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_maxsum = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":709 + /* "constraint/constraints.py":710 * multipliers = self._multipliers * maxsum = self._maxsum * sum = 0 # <<<<<<<<<<<<<< @@ -18834,7 +18844,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":710 + /* "constraint/constraints.py":711 * maxsum = self._maxsum * sum = 0 * min_sum_missing = 0 # <<<<<<<<<<<<<< @@ -18844,7 +18854,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_min_sum_missing = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":711 + /* "constraint/constraints.py":712 * sum = 0 * min_sum_missing = 0 * missing = False # <<<<<<<<<<<<<< @@ -18853,7 +18863,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing = 0; - /* "constraint/constraints.py":712 + /* "constraint/constraints.py":713 * min_sum_missing = 0 * missing = False * missing_negative = False # <<<<<<<<<<<<<< @@ -18862,17 +18872,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing_negative = 0; - /* "constraint/constraints.py":713 + /* "constraint/constraints.py":714 * missing = False * missing_negative = False * if multipliers: # <<<<<<<<<<<<<< * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 714, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":714 + /* "constraint/constraints.py":715 * missing_negative = False * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -18885,7 +18895,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -18893,9 +18903,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 715, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -18904,7 +18914,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 714, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 715, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -18914,7 +18924,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 714, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 715, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -18925,13 +18935,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_6(__pyx_t_3); 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, 714, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 715, __pyx_L1_error) PyErr_Clear(); } break; @@ -18944,7 +18954,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 714, __pyx_L1_error) + __PYX_ERR(0, 715, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -18954,22 +18964,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 714, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #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, 714, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 715, __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); @@ -18977,7 +18987,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 714, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 715, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; @@ -18985,7 +18995,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 714, __pyx_L1_error) + __PYX_ERR(0, 715, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); @@ -18993,35 +19003,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":715 + /* "constraint/constraints.py":716 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 716, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":716 + /* "constraint/constraints.py":717 * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: * sum += assignments[variable] * multiplier # <<<<<<<<<<<<<< * else: * min_sum_missing += self._var_min[variable] */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":715 + /* "constraint/constraints.py":716 * if multipliers: * for variable, multiplier in zip(variables, multipliers): * if variable in assignments: # <<<<<<<<<<<<<< @@ -19031,7 +19041,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ goto __pyx_L8; } - /* "constraint/constraints.py":718 + /* "constraint/constraints.py":719 * sum += assignments[variable] * multiplier * else: * min_sum_missing += self._var_min[variable] # <<<<<<<<<<<<<< @@ -19039,18 +19049,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ * if self._var_is_negative[variable]: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_min_sum_missing, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":719 + /* "constraint/constraints.py":720 * else: * min_sum_missing += self._var_min[variable] * missing = True # <<<<<<<<<<<<<< @@ -19059,23 +19069,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing = 1; - /* "constraint/constraints.py":720 + /* "constraint/constraints.py":721 * min_sum_missing += self._var_min[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< * missing_negative = True * if isinstance(sum, float): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":721 + /* "constraint/constraints.py":722 * missing = True * if self._var_is_negative[variable]: * missing_negative = True # <<<<<<<<<<<<<< @@ -19084,7 +19094,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing_negative = 1; - /* "constraint/constraints.py":720 + /* "constraint/constraints.py":721 * min_sum_missing += self._var_min[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< @@ -19095,7 +19105,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __pyx_L8:; - /* "constraint/constraints.py":714 + /* "constraint/constraints.py":715 * missing_negative = False * if multipliers: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -19105,7 +19115,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":722 + /* "constraint/constraints.py":723 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -19115,7 +19125,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_2 = PyFloat_Check(__pyx_v_sum); if (__pyx_t_2) { - /* "constraint/constraints.py":723 + /* "constraint/constraints.py":724 * missing_negative = True * if isinstance(sum, float): * sum = round(sum, 10) # <<<<<<<<<<<<<< @@ -19128,13 +19138,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sum, __pyx_mstate_global->__pyx_int_10}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 723, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":722 + /* "constraint/constraints.py":723 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -19143,22 +19153,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":724 + /* "constraint/constraints.py":725 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: # <<<<<<<<<<<<<< * return False * if forwardcheck and missing and not missing_negative: */ - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":725 + /* "constraint/constraints.py":726 * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: * return False # <<<<<<<<<<<<<< @@ -19170,7 +19180,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":724 + /* "constraint/constraints.py":725 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: # <<<<<<<<<<<<<< @@ -19179,14 +19189,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":726 + /* "constraint/constraints.py":727 * if sum + min_sum_missing > maxsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 727, __pyx_L1_error) if (__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; @@ -19202,7 +19212,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "constraint/constraints.py":727 + /* "constraint/constraints.py":728 * return False * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -19215,7 +19225,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_variables, __pyx_v_multipliers}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 727, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { @@ -19223,9 +19233,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 728, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -19234,7 +19244,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 727, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 728, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19244,7 +19254,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 727, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 728, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19255,13 +19265,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 727, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_6(__pyx_t_3); 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, 727, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 728, __pyx_L1_error) PyErr_Clear(); } break; @@ -19274,7 +19284,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 727, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -19284,22 +19294,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -19307,7 +19317,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 727, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 728, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L20_unpacking_done; @@ -19315,7 +19325,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 727, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); @@ -19323,45 +19333,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":728 + /* "constraint/constraints.py":729 * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 729, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":729 + /* "constraint/constraints.py":730 * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if sum + value * multiplier > maxsum: */ - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":730 + /* "constraint/constraints.py":731 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if sum + value * multiplier > maxsum: * domain.hideValue(value) */ - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 731, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -19370,7 +19380,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 730, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 731, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -19380,7 +19390,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 730, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 731, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -19391,13 +19401,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 730, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_13(__pyx_t_7); 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, 730, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 731, __pyx_L1_error) PyErr_Clear(); } break; @@ -19407,25 +19417,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":731 + /* "constraint/constraints.py":732 * domain = domains[variable] * for value in domain[:]: * if sum + value * multiplier > maxsum: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_8 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_v_value, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_sum, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 732, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":732 + /* "constraint/constraints.py":733 * for value in domain[:]: * if sum + value * multiplier > maxsum: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -19439,12 +19449,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_value}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 732, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":731 + /* "constraint/constraints.py":732 * domain = domains[variable] * for value in domain[:]: * if sum + value * multiplier > maxsum: # <<<<<<<<<<<<<< @@ -19453,7 +19463,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":730 + /* "constraint/constraints.py":731 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -19463,18 +19473,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":733 + /* "constraint/constraints.py":734 * if sum + value * multiplier > maxsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 734, __pyx_L1_error) __pyx_t_11 = (!__pyx_t_2); if (__pyx_t_11) { - /* "constraint/constraints.py":734 + /* "constraint/constraints.py":735 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -19487,7 +19497,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "constraint/constraints.py":733 + /* "constraint/constraints.py":734 * if sum + value * multiplier > maxsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -19496,7 +19506,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":728 + /* "constraint/constraints.py":729 * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): * if variable not in assignments: # <<<<<<<<<<<<<< @@ -19505,7 +19515,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":727 + /* "constraint/constraints.py":728 * return False * if forwardcheck and missing and not missing_negative: * for variable, multiplier in zip(variables, multipliers): # <<<<<<<<<<<<<< @@ -19515,7 +19525,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":726 + /* "constraint/constraints.py":727 * if sum + min_sum_missing > maxsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< @@ -19524,7 +19534,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":713 + /* "constraint/constraints.py":714 * missing = False * missing_negative = False * if multipliers: # <<<<<<<<<<<<<< @@ -19534,7 +19544,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ goto __pyx_L3; } - /* "constraint/constraints.py":736 + /* "constraint/constraints.py":737 * return False * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -19547,9 +19557,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 737, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -19557,7 +19567,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 736, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 737, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19567,7 +19577,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 736, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 737, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19578,13 +19588,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 736, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 737, __pyx_L1_error) } else { __pyx_t_7 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 736, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 737, __pyx_L1_error) PyErr_Clear(); } break; @@ -19594,32 +19604,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":737 + /* "constraint/constraints.py":738 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< * sum += assignments[variable] * else: */ - __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 738, __pyx_L1_error) if (__pyx_t_11) { - /* "constraint/constraints.py":738 + /* "constraint/constraints.py":739 * for variable in variables: * if variable in assignments: * sum += assignments[variable] # <<<<<<<<<<<<<< * else: * min_sum_missing += self._var_min[variable] */ - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 738, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":737 + /* "constraint/constraints.py":738 * else: * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -19629,7 +19639,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ goto __pyx_L30; } - /* "constraint/constraints.py":740 + /* "constraint/constraints.py":741 * sum += assignments[variable] * else: * min_sum_missing += self._var_min[variable] # <<<<<<<<<<<<<< @@ -19637,18 +19647,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ * if self._var_is_negative[variable]: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_min_sum_missing, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_min_sum_missing, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":741 + /* "constraint/constraints.py":742 * else: * min_sum_missing += self._var_min[variable] * missing = True # <<<<<<<<<<<<<< @@ -19657,23 +19667,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing = 1; - /* "constraint/constraints.py":742 + /* "constraint/constraints.py":743 * min_sum_missing += self._var_min[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< * missing_negative = True * if isinstance(sum, float): */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_var_is_negative); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":743 + /* "constraint/constraints.py":744 * missing = True * if self._var_is_negative[variable]: * missing_negative = True # <<<<<<<<<<<<<< @@ -19682,7 +19692,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ __pyx_v_missing_negative = 1; - /* "constraint/constraints.py":742 + /* "constraint/constraints.py":743 * min_sum_missing += self._var_min[variable] * missing = True * if self._var_is_negative[variable]: # <<<<<<<<<<<<<< @@ -19693,7 +19703,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __pyx_L30:; - /* "constraint/constraints.py":736 + /* "constraint/constraints.py":737 * return False * else: * for variable in variables: # <<<<<<<<<<<<<< @@ -19703,7 +19713,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":744 + /* "constraint/constraints.py":745 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -19713,7 +19723,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_11 = PyFloat_Check(__pyx_v_sum); if (__pyx_t_11) { - /* "constraint/constraints.py":745 + /* "constraint/constraints.py":746 * missing_negative = True * if isinstance(sum, float): * sum = round(sum, 10) # <<<<<<<<<<<<<< @@ -19726,13 +19736,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_sum, __pyx_mstate_global->__pyx_int_10}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 745, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_sum, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":744 + /* "constraint/constraints.py":745 * if self._var_is_negative[variable]: * missing_negative = True * if isinstance(sum, float): # <<<<<<<<<<<<<< @@ -19741,22 +19751,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":746 + /* "constraint/constraints.py":747 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: # <<<<<<<<<<<<<< * return False * if forwardcheck and missing and not missing_negative: */ - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_min_sum_missing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":747 + /* "constraint/constraints.py":748 * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: * return False # <<<<<<<<<<<<<< @@ -19768,7 +19778,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":746 + /* "constraint/constraints.py":747 * if isinstance(sum, float): * sum = round(sum, 10) * if sum + min_sum_missing > maxsum: # <<<<<<<<<<<<<< @@ -19777,14 +19787,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":748 + /* "constraint/constraints.py":749 * if sum + min_sum_missing > maxsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< * for variable in variables: * if variable not in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 748, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 749, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_11 = __pyx_t_2; @@ -19800,7 +19810,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_L36_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":749 + /* "constraint/constraints.py":750 * return False * if forwardcheck and missing and not missing_negative: * for variable in variables: # <<<<<<<<<<<<<< @@ -19812,9 +19822,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -19822,7 +19832,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 749, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19832,7 +19842,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { 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, 749, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 750, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -19843,13 +19853,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 749, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_6(__pyx_t_7); 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, 749, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 750, __pyx_L1_error) PyErr_Clear(); } break; @@ -19859,45 +19869,45 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":750 + /* "constraint/constraints.py":751 * if forwardcheck and missing and not missing_negative: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< * domain = domains[variable] * for value in domain[:]: */ - __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 751, __pyx_L1_error) if (__pyx_t_11) { - /* "constraint/constraints.py":751 + /* "constraint/constraints.py":752 * for variable in variables: * if variable not in assignments: * domain = domains[variable] # <<<<<<<<<<<<<< * for value in domain[:]: * if sum + value > maxsum: */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 751, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":752 + /* "constraint/constraints.py":753 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if sum + value > maxsum: * domain.hideValue(value) */ - __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, 752, __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, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 753, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 753, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -19906,7 +19916,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 752, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 753, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -19916,7 +19926,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 752, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 753, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } @@ -19927,13 +19937,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ #endif ++__pyx_t_12; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_13(__pyx_t_8); 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, 752, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 753, __pyx_L1_error) PyErr_Clear(); } break; @@ -19943,22 +19953,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":753 + /* "constraint/constraints.py":754 * domain = domains[variable] * for value in domain[:]: * if sum + value > maxsum: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_sum, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_maxsum, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":754 + /* "constraint/constraints.py":755 * for value in domain[:]: * if sum + value > maxsum: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -19972,12 +19982,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_hideValue, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":753 + /* "constraint/constraints.py":754 * domain = domains[variable] * for value in domain[:]: * if sum + value > maxsum: # <<<<<<<<<<<<<< @@ -19986,7 +19996,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":752 + /* "constraint/constraints.py":753 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -19996,18 +20006,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":755 + /* "constraint/constraints.py":756 * if sum + value > maxsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 756, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_11); if (__pyx_t_2) { - /* "constraint/constraints.py":756 + /* "constraint/constraints.py":757 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -20020,7 +20030,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/constraints.py":755 + /* "constraint/constraints.py":756 * if sum + value > maxsum: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -20029,7 +20039,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":750 + /* "constraint/constraints.py":751 * if forwardcheck and missing and not missing_negative: * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -20038,7 +20048,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ */ } - /* "constraint/constraints.py":749 + /* "constraint/constraints.py":750 * return False * if forwardcheck and missing and not missing_negative: * for variable in variables: # <<<<<<<<<<<<<< @@ -20048,7 +20058,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":748 + /* "constraint/constraints.py":749 * if sum + min_sum_missing > maxsum: * return False * if forwardcheck and missing and not missing_negative: # <<<<<<<<<<<<<< @@ -20059,7 +20069,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ } __pyx_L3:; - /* "constraint/constraints.py":757 + /* "constraint/constraints.py":758 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -20071,7 +20081,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":706 + /* "constraint/constraints.py":707 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -20102,10 +20112,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_16MaxSumConstraint_4__call_ return __pyx_r; } -/* "constraint/constraints.py":777 +/* "constraint/constraints.py":778 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -20153,47 +20163,47 @@ 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_sum_vars,&__pyx_mstate_global->__pyx_n_u_multipliers,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, 777, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 778, __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, 777, __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, 778, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 777, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 778, __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, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 778, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 778, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 777, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 778, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -20206,7 +20216,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 777, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 778, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20217,7 +20227,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, 777, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 778, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint___init__(__pyx_self, __pyx_v_self, __pyx_v_target_var, __pyx_v_sum_vars, __pyx_v_multipliers); /* function exit code */ @@ -20238,7 +20248,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_8__init___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":793 +/* "constraint/constraints.py":794 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -20258,7 +20268,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 793, __pyx_L1_error) + __PYX_ERR(0, 794, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20266,7 +20276,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __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_24VariableMaxSumConstraint_8__init___2generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___init, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_8__init___2generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint___init, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -20304,16 +20314,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 793, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 793, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 794, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 794, __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, 793, __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, 794, __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, 793, __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, 794, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -20321,7 +20331,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 793, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 794, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20331,7 +20341,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 793, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 794, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20342,13 +20352,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __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, 793, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 794, __pyx_L1_error) PyErr_Clear(); } break; @@ -20406,10 +20416,10 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":777 +/* "constraint/constraints.py":778 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -20428,44 +20438,44 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":787 + /* "constraint/constraints.py":788 * summed to match the last variable. * """ * self.target_var = target_var # <<<<<<<<<<<<<< * self.sum_vars = sum_vars * self._multipliers = multipliers */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var, __pyx_v_target_var) < (0)) __PYX_ERR(0, 787, __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, 788, __pyx_L1_error) - /* "constraint/constraints.py":788 + /* "constraint/constraints.py":789 * """ * self.target_var = target_var * self.sum_vars = sum_vars # <<<<<<<<<<<<<< * self._multipliers = multipliers * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 788, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars, __pyx_v_sum_vars) < (0)) __PYX_ERR(0, 789, __pyx_L1_error) - /* "constraint/constraints.py":789 + /* "constraint/constraints.py":790 * self.target_var = target_var * self.sum_vars = sum_vars * self._multipliers = multipliers # <<<<<<<<<<<<<< * * if multipliers: */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 789, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2, __pyx_v_multipliers) < (0)) __PYX_ERR(0, 790, __pyx_L1_error) - /* "constraint/constraints.py":791 + /* "constraint/constraints.py":792 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 792, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/constraints.py":792 + /* "constraint/constraints.py":793 * * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." # <<<<<<<<<<<<<< @@ -20474,19 +20484,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 792, __pyx_L1_error) - __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_v_multipliers); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_sum_vars); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 793, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 == (__pyx_t_3 + 1)); if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_match_sum_varia, 0, 0); - __PYX_ERR(0, 792, __pyx_L1_error) + __PYX_ERR(0, 793, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 792, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 793, __pyx_L1_error) #endif - /* "constraint/constraints.py":793 + /* "constraint/constraints.py":794 * if multipliers: * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." # <<<<<<<<<<<<<< @@ -20495,23 +20505,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_4 = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_4 = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_8__init___genexpr(NULL, __pyx_v_multipliers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Multipliers_must_be_numbers, 0, 0); - __PYX_ERR(0, 793, __pyx_L1_error) + __PYX_ERR(0, 794, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 793, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 794, __pyx_L1_error) #endif - /* "constraint/constraints.py":794 + /* "constraint/constraints.py":795 * assert len(multipliers) == len(sum_vars) + 1, "Multipliers must match sum variables and +1 for target." * assert all(isinstance(m, (int, float)) for m in multipliers), "Multipliers must be numbers." * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." # <<<<<<<<<<<<<< @@ -20520,20 +20530,20 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_multipliers, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 794, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_Last_multiplier_must_be_1_as_it, 0, 0); - __PYX_ERR(0, 794, __pyx_L1_error) + __PYX_ERR(0, 795, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 794, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 795, __pyx_L1_error) #endif - /* "constraint/constraints.py":791 + /* "constraint/constraints.py":792 * self._multipliers = multipliers * * if multipliers: # <<<<<<<<<<<<<< @@ -20542,10 +20552,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ } - /* "constraint/constraints.py":777 + /* "constraint/constraints.py":778 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ @@ -20565,7 +20575,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":796 +/* "constraint/constraints.py":797 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -20616,50 +20626,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, 796, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 797, __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, 796, __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, 797, __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, 796, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 797, __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, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 797, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 797, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 797, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 797, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 796, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 797, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -20669,7 +20679,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, 796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 797, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -20680,9 +20690,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, 796, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 796, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 796, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 797, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 797, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 797, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_2preProcess(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints); /* function exit code */ @@ -20703,7 +20713,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_10preProcess_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":804 +/* "constraint/constraints.py":805 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -20723,7 +20733,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_9_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 804, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20734,7 +20744,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __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_24VariableMaxSumConstraint_10preProcess_2generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint_preProc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_10preProcess_2generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint_preProc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -20777,17 +20787,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ __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, 804, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 804, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 805, __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, 804, __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, 805, __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, 804, __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, 805, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -20795,7 +20805,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 804, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20805,7 +20815,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 804, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 805, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -20816,13 +20826,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __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, 804, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 805, __pyx_L1_error) PyErr_Clear(); } break; @@ -20833,18 +20843,18 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 804, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_var)) { __Pyx_RaiseClosureNameError("var"); __PYX_ERR(0, 805, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __pyx_t_6 = NULL; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 804, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains)) { __Pyx_RaiseClosureNameError("domains"); __PYX_ERR(0, 805, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 804, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; { @@ -20852,7 +20862,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; @@ -20873,7 +20883,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 805, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -20902,7 +20912,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_24VariableMaxSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":796 +/* "constraint/constraints.py":797 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -20941,7 +20951,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_8_preProcess *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 796, __pyx_L1_error) + __PYX_ERR(0, 797, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -20949,7 +20959,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_domains); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_domains); - /* "constraint/constraints.py":797 + /* "constraint/constraints.py":798 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -20957,9 +20967,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ * multipliers = self._multipliers */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __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, 797, __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, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -20979,51 +20989,51 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 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":799 + /* "constraint/constraints.py":800 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if not multipliers: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":801 + /* "constraint/constraints.py":802 * multipliers = self._multipliers * * if not multipliers: # <<<<<<<<<<<<<< * for var in self.sum_vars: * domain = domains[var] */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 802, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { - /* "constraint/constraints.py":802 + /* "constraint/constraints.py":803 * * if not multipliers: * for var in self.sum_vars: # <<<<<<<<<<<<<< * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); 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_sum_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __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_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 803, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21032,7 +21042,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 802, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 803, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -21042,7 +21052,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 802, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 803, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -21053,13 +21063,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_9(__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, 802, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 803, __pyx_L1_error) PyErr_Clear(); } break; @@ -21071,19 +21081,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":803 + /* "constraint/constraints.py":804 * if not multipliers: * for var in self.sum_vars: * domain = domains[var] # <<<<<<<<<<<<<< * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_cur_scope->__pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":804 + /* "constraint/constraints.py":805 * for var in self.sum_vars: * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) # <<<<<<<<<<<<<< @@ -21091,9 +21101,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ * if value + others_min > max(domains[self.target_var]): */ __pyx_t_2 = NULL; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_10 = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_10preProcess_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -21102,29 +21112,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __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_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_others_min, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":805 + /* "constraint/constraints.py":806 * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< * if value + others_min > max(domains[self.target_var]): * 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, 805, __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, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 806, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -21133,7 +21143,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 805, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 806, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -21143,7 +21153,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 805, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 806, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -21154,13 +21164,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_12(__pyx_t_10); 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, 805, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 806, __pyx_L1_error) PyErr_Clear(); } break; @@ -21170,19 +21180,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":806 + /* "constraint/constraints.py":807 * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): # <<<<<<<<<<<<<< * domain.remove(value) * */ - __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_v_others_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_value, __pyx_v_others_min); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_target_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_domains, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_5 = 1; @@ -21191,17 +21201,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":807 + /* "constraint/constraints.py":808 * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): * domain.remove(value) # <<<<<<<<<<<<<< @@ -21215,12 +21225,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_value}; __pyx_t_14 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 807, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "constraint/constraints.py":806 + /* "constraint/constraints.py":807 * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: * if value + others_min > max(domains[self.target_var]): # <<<<<<<<<<<<<< @@ -21229,7 +21239,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ } - /* "constraint/constraints.py":805 + /* "constraint/constraints.py":806 * domain = domains[var] * others_min = sum(min(domains[v]) for v in self.sum_vars if v != var) * for value in domain[:]: # <<<<<<<<<<<<<< @@ -21239,7 +21249,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":802 + /* "constraint/constraints.py":803 * * if not multipliers: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -21249,7 +21259,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":801 + /* "constraint/constraints.py":802 * multipliers = self._multipliers * * if not multipliers: # <<<<<<<<<<<<<< @@ -21258,7 +21268,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ } - /* "constraint/constraints.py":796 + /* "constraint/constraints.py":797 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -21291,7 +21301,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":809 +/* "constraint/constraints.py":810 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -21342,53 +21352,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, 809, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 810, __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, 809, __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, 810, __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, 809, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 810, __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, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 810, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 810, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 810, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 809, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 810, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -21402,7 +21412,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, 809, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 810, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -21413,8 +21423,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, 809, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 809, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 810, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 810, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_4__call__(__pyx_self, __pyx_v_self, __pyx_v_variables, __pyx_v_domains, __pyx_v_assignments, __pyx_v_forwardcheck); /* function exit code */ @@ -21457,32 +21467,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":810 + /* "constraint/constraints.py":811 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * multipliers = self._multipliers # <<<<<<<<<<<<<< * * if self.target_var not in assignments: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_multipliers_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_multipliers = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":812 + /* "constraint/constraints.py":813 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< * return True # can't evaluate without target, defer to later * */ - __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, 812, __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, 813, __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, 812, __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, 813, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":813 + /* "constraint/constraints.py":814 * * if self.target_var not in assignments: * return True # can't evaluate without target, defer to later # <<<<<<<<<<<<<< @@ -21494,7 +21504,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":812 + /* "constraint/constraints.py":813 * multipliers = self._multipliers * * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -21503,22 +21513,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ } - /* "constraint/constraints.py":815 + /* "constraint/constraints.py":816 * return True # can't evaluate without target, defer to later * * target_value = assignments[self.target_var] # <<<<<<<<<<<<<< * sum_value = 0 * */ - __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, 815, __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, 816, __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, 815, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":816 + /* "constraint/constraints.py":817 * * target_value = assignments[self.target_var] * sum_value = 0 # <<<<<<<<<<<<<< @@ -21528,17 +21538,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_sum_value = __pyx_mstate_global->__pyx_int_0; - /* "constraint/constraints.py":818 + /* "constraint/constraints.py":819 * sum_value = 0 * * if multipliers: # <<<<<<<<<<<<<< * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_multipliers); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 819, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":819 + /* "constraint/constraints.py":820 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -21546,7 +21556,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ * sum_value += assignments[var] * multiplier */ __pyx_t_1 = NULL; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; { @@ -21554,7 +21564,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { @@ -21562,9 +21572,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 820, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -21573,7 +21583,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 819, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 820, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21583,7 +21593,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 819, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 820, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21594,13 +21604,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); 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, 819, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 820, __pyx_L1_error) PyErr_Clear(); } break; @@ -21613,7 +21623,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 819, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -21623,22 +21633,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 819, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -21646,7 +21656,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 819, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 820, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L8_unpacking_done; @@ -21654,7 +21664,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 819, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); @@ -21662,35 +21672,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_multiplier, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":820 + /* "constraint/constraints.py":821 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< * sum_value += assignments[var] * multiplier * else: */ - __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_var, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 820, __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, 821, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":821 + /* "constraint/constraints.py":822 * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: * sum_value += assignments[var] * multiplier # <<<<<<<<<<<<<< * else: * sum_value += min(domains[var] * multiplier) # use min value if not assigned */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":820 + /* "constraint/constraints.py":821 * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): * if var in assignments: # <<<<<<<<<<<<<< @@ -21700,7 +21710,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ goto __pyx_L9; } - /* "constraint/constraints.py":823 + /* "constraint/constraints.py":824 * sum_value += assignments[var] * multiplier * else: * sum_value += min(domains[var] * multiplier) # use min value if not assigned # <<<<<<<<<<<<<< @@ -21709,9 +21719,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ /*else*/ { __pyx_t_8 = NULL; - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = 1; @@ -21720,10 +21730,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_9); @@ -21731,7 +21741,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __pyx_L9:; - /* "constraint/constraints.py":819 + /* "constraint/constraints.py":820 * * if multipliers: * for var, multiplier in zip(self.sum_vars, multipliers): # <<<<<<<<<<<<<< @@ -21741,7 +21751,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":818 + /* "constraint/constraints.py":819 * sum_value = 0 * * if multipliers: # <<<<<<<<<<<<<< @@ -21751,7 +21761,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ goto __pyx_L4; } - /* "constraint/constraints.py":825 + /* "constraint/constraints.py":826 * sum_value += min(domains[var] * multiplier) # use min value if not assigned * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -21759,16 +21769,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ * sum_value += assignments[var] */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sum_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -21777,7 +21787,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { 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, 825, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 826, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21787,7 +21797,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 825, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 826, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -21798,13 +21808,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_9); 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, 825, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 826, __pyx_L1_error) PyErr_Clear(); } break; @@ -21814,32 +21824,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":826 + /* "constraint/constraints.py":827 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< * sum_value += 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, 826, __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, 827, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":827 + /* "constraint/constraints.py":828 * for var in self.sum_vars: * if var in assignments: * sum_value += assignments[var] # <<<<<<<<<<<<<< * else: * sum_value += min(domains[var]) # use min value if not assigned */ - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":826 + /* "constraint/constraints.py":827 * else: * for var in self.sum_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -21849,7 +21859,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ goto __pyx_L13; } - /* "constraint/constraints.py":829 + /* "constraint/constraints.py":830 * sum_value += assignments[var] * else: * sum_value += min(domains[var]) # use min value if not assigned # <<<<<<<<<<<<<< @@ -21858,7 +21868,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ /*else*/ { __pyx_t_4 = NULL; - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; { @@ -21866,10 +21876,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_sum_value, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_8); @@ -21877,7 +21887,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __pyx_L13:; - /* "constraint/constraints.py":825 + /* "constraint/constraints.py":826 * sum_value += min(domains[var] * multiplier) # use min value if not assigned * else: * for var in self.sum_vars: # <<<<<<<<<<<<<< @@ -21889,7 +21899,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ } __pyx_L4:; - /* "constraint/constraints.py":831 + /* "constraint/constraints.py":832 * sum_value += min(domains[var]) # use min value if not assigned * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -21899,7 +21909,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ __pyx_t_2 = PyFloat_Check(__pyx_v_sum_value); if (__pyx_t_2) { - /* "constraint/constraints.py":832 + /* "constraint/constraints.py":833 * * if isinstance(sum_value, float): * sum_value = round(sum_value, 10) # <<<<<<<<<<<<<< @@ -21912,13 +21922,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_sum_value, __pyx_mstate_global->__pyx_int_10}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 832, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF_SET(__pyx_v_sum_value, __pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":831 + /* "constraint/constraints.py":832 * sum_value += min(domains[var]) # use min value if not assigned * * if isinstance(sum_value, float): # <<<<<<<<<<<<<< @@ -21927,7 +21937,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ */ } - /* "constraint/constraints.py":834 + /* "constraint/constraints.py":835 * sum_value = round(sum_value, 10) * * return sum_value <= target_value # <<<<<<<<<<<<<< @@ -21935,12 +21945,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_v_sum_value, __pyx_v_target_value, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 835, __pyx_L1_error) __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "constraint/constraints.py":809 + /* "constraint/constraints.py":810 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -21968,10 +21978,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_24VariableMaxSumConstraint_ return __pyx_r; } -/* "constraint/constraints.py":853 +/* "constraint/constraints.py":854 * """ * - * def __init__(self, exactprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, exactprod: int | float): # <<<<<<<<<<<<<< * """Instantiate an ExactProdConstraint. * */ @@ -22017,39 +22027,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_exactprod,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, 853, __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 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 853, __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, 853, __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, "__init__", 0) < (0)) __PYX_ERR(0, 853, __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, 854, __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, 853, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 854, __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, 853, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 854, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 853, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 854, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_exactprod = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 853, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 854, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22079,31 +22089,31 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":859 + /* "constraint/constraints.py":860 * exactprod: Value to be considered as the product * """ * self._exactprod = exactprod # <<<<<<<<<<<<<< * self._variable_contains_lt1: list[bool] = list() * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2, __pyx_v_exactprod) < (0)) __PYX_ERR(0, 859, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_exactprod_2, __pyx_v_exactprod) < (0)) __PYX_ERR(0, 860, __pyx_L1_error) - /* "constraint/constraints.py":860 + /* "constraint/constraints.py":861 * """ * 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, 860, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __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, 860, __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, 861, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":853 + /* "constraint/constraints.py":854 * """ * - * def __init__(self, exactprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, exactprod: int | float): # <<<<<<<<<<<<<< * """Instantiate an ExactProdConstraint. * */ @@ -22121,7 +22131,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint___ini return __pyx_r; } -/* "constraint/constraints.py":862 +/* "constraint/constraints.py":863 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -22172,50 +22182,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, 862, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 863, __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, 862, __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, 863, __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, 862, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 863, __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, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 863, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 863, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 863, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 863, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 862, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 863, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -22225,7 +22235,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, 862, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 863, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -22236,9 +22246,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, 862, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 862, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 862, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 863, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 863, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 863, __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 */ @@ -22259,7 +22269,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10preProcess_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":869 +/* "constraint/constraints.py":870 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -22279,7 +22289,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_10_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 869, __pyx_L1_error) + __PYX_ERR(0, 870, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -22287,7 +22297,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_2generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (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, 869, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_19ExactProdConstraint_10preProcess_2generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (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, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -22324,16 +22334,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 869, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 869, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 870, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 870, __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, 869, __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, 870, __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, 869, __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, 870, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -22341,7 +22351,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, 869, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -22351,7 +22361,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, 869, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 870, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -22362,13 +22372,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __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, 869, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 870, __pyx_L1_error) PyErr_Clear(); } break; @@ -22379,8 +22389,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, 869, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 869, __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, 870, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -22419,7 +22429,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_10pre return __pyx_r; } -/* "constraint/constraints.py":862 +/* "constraint/constraints.py":863 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -22456,7 +22466,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":863 + /* "constraint/constraints.py":864 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -22464,9 +22474,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, 863, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __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, 863, __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, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -22486,24 +22496,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 863, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":866 + /* "constraint/constraints.py":867 * * # 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, 866, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __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, 866, __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, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":867 + /* "constraint/constraints.py":868 * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None # <<<<<<<<<<<<<< @@ -22513,7 +22523,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_INCREF(Py_None); __pyx_v_variable_with_lt1 = Py_None; - /* "constraint/constraints.py":868 + /* "constraint/constraints.py":869 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -22525,9 +22535,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, 868, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __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, 868, __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, 869, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -22535,7 +22545,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, 868, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 869, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22545,7 +22555,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, 868, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 869, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22556,13 +22566,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __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, 868, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 869, __pyx_L1_error) PyErr_Clear(); } break; @@ -22572,37 +22582,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":869 + /* "constraint/constraints.py":870 * 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, 869, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __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, 869, __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, 870, __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, 869, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __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":870 + /* "constraint/constraints.py":871 * 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, 870, __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, 871, __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, 870, __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, 871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":868 + /* "constraint/constraints.py":869 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -22612,7 +22622,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":871 + /* "constraint/constraints.py":872 * 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): # <<<<<<<<<<<<<< @@ -22620,7 +22630,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP * if variable_with_lt1 is not None: */ __pyx_t_4 = NULL; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; { @@ -22628,7 +22638,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -22636,9 +22646,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, 871, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __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, 871, __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, 872, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -22647,7 +22657,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, 871, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 872, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22657,7 +22667,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, 871, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 872, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22668,13 +22678,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __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, 871, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 872, __pyx_L1_error) PyErr_Clear(); } break; @@ -22687,7 +22697,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, 871, __pyx_L1_error) + __PYX_ERR(0, 872, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22697,22 +22707,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #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, 871, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 872, __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); @@ -22720,7 +22730,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 871, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -22728,7 +22738,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, 871, __pyx_L1_error) + __PYX_ERR(0, 872, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); @@ -22736,7 +22746,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":872 + /* "constraint/constraints.py":873 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -22746,7 +22756,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":873 + /* "constraint/constraints.py":874 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -22756,7 +22766,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":875 + /* "constraint/constraints.py":876 * if variable_with_lt1 is not None: * # if more than one associated variables contain less than 1, we can't prune * return # <<<<<<<<<<<<<< @@ -22768,7 +22778,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/constraints.py":873 + /* "constraint/constraints.py":874 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -22777,7 +22787,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":876 + /* "constraint/constraints.py":877 * # if more than one associated variables contain less than 1, we can't prune * return * variable_with_lt1 = variable # <<<<<<<<<<<<<< @@ -22787,7 +22797,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":872 + /* "constraint/constraints.py":873 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -22796,7 +22806,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":871 + /* "constraint/constraints.py":872 * 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): # <<<<<<<<<<<<<< @@ -22806,19 +22816,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":879 + /* "constraint/constraints.py":880 * * # 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, 879, __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, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_exactprod = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/constraints.py":880 + /* "constraint/constraints.py":881 * # prune the associated variables of values > exactprod * exactprod = self._exactprod * for variable in variables: # <<<<<<<<<<<<<< @@ -22830,9 +22840,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, 880, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __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, 880, __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, 881, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -22840,7 +22850,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, 880, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 881, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22850,7 +22860,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, 880, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 881, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -22861,13 +22871,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __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, 880, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 881, __pyx_L1_error) PyErr_Clear(); } break; @@ -22877,7 +22887,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":881 + /* "constraint/constraints.py":882 * exactprod = self._exactprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -22890,14 +22900,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, 881, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 881, __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, 882, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 882, __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":882 + /* "constraint/constraints.py":883 * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue # <<<<<<<<<<<<<< @@ -22906,7 +22916,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ goto __pyx_L13_continue; - /* "constraint/constraints.py":881 + /* "constraint/constraints.py":882 * exactprod = self._exactprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -22915,35 +22925,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP */ } - /* "constraint/constraints.py":883 + /* "constraint/constraints.py":884 * 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, 883, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":884 + /* "constraint/constraints.py":885 * 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, 884, __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, 885, __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_13 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 885, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -22952,7 +22962,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { 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, 884, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 885, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -22962,7 +22972,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #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, 885, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -22973,13 +22983,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP #endif ++__pyx_t_13; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_14(__pyx_t_3); 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, 884, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 885, __pyx_L1_error) PyErr_Clear(); } break; @@ -22989,19 +22999,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":885 + /* "constraint/constraints.py":886 * 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, 885, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 885, __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, 886, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":886 + /* "constraint/constraints.py":887 * for value in domain[:]: * if value > exactprod: * domain.remove(value) # <<<<<<<<<<<<<< @@ -23015,12 +23025,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":885 + /* "constraint/constraints.py":886 * domain = domains[variable] * for value in domain[:]: * if value > exactprod: # <<<<<<<<<<<<<< @@ -23030,25 +23040,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP goto __pyx_L20; } - /* "constraint/constraints.py":887 + /* "constraint/constraints.py":888 * 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, 887, __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, 888, __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, 887, __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, 888, __pyx_L1_error) __pyx_t_11 = __pyx_t_12; __pyx_L21_bool_binop_done:; if (__pyx_t_11) { - /* "constraint/constraints.py":888 + /* "constraint/constraints.py":889 * domain.remove(value) * elif value == 0 and exactprod != 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -23062,12 +23072,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":887 + /* "constraint/constraints.py":888 * if value > exactprod: * domain.remove(value) * elif value == 0 and exactprod != 0: # <<<<<<<<<<<<<< @@ -23077,7 +23087,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __pyx_L20:; - /* "constraint/constraints.py":884 + /* "constraint/constraints.py":885 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -23087,7 +23097,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":880 + /* "constraint/constraints.py":881 * # prune the associated variables of values > exactprod * exactprod = self._exactprod * for variable in variables: # <<<<<<<<<<<<<< @@ -23098,7 +23108,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":862 + /* "constraint/constraints.py":863 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -23130,7 +23140,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_2preP return __pyx_r; } -/* "constraint/constraints.py":890 +/* "constraint/constraints.py":891 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -23181,53 +23191,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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __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, 891, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -23241,7 +23251,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, 891, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -23252,8 +23262,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, 891, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 891, __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 */ @@ -23274,7 +23284,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":898 +/* "constraint/constraints.py":899 * 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])) # <<<<<<<<<<<<<< @@ -23294,7 +23304,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__ca 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, 898, __pyx_L1_error) + __PYX_ERR(0, 899, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -23302,7 +23312,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__ca __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___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___call___loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__call___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___call___loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -23339,16 +23349,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__ca return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 898, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 898, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 899, __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, 898, __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, 899, __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, 898, __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, 899, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -23356,7 +23366,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__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, 898, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 899, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -23366,7 +23376,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__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, 898, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 899, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -23377,13 +23387,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __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, 898, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 899, __pyx_L1_error) PyErr_Clear(); } break; @@ -23394,8 +23404,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__ca __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, 898, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 898, __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, 899, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -23434,7 +23444,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_19ExactProdConstraint_8__ca return __pyx_r; } -/* "constraint/constraints.py":890 +/* "constraint/constraints.py":891 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -23473,19 +23483,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":891 + /* "constraint/constraints.py":892 * * 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, 891, __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, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exactprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":892 + /* "constraint/constraints.py":893 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * exactprod = self._exactprod * prod = 1 # <<<<<<<<<<<<<< @@ -23495,7 +23505,7 @@ 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":893 + /* "constraint/constraints.py":894 * exactprod = self._exactprod * prod = 1 * missing = False # <<<<<<<<<<<<<< @@ -23504,34 +23514,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ __pyx_v_missing = 0; - /* "constraint/constraints.py":894 + /* "constraint/constraints.py":895 * 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): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_missing_lt1 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":896 + /* "constraint/constraints.py":897 * 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, 896, __pyx_L1_error) + __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, 897, __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, 896, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 897, __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, 896, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 897, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 != __pyx_t_3); if (__pyx_t_4) { - /* "constraint/constraints.py":897 + /* "constraint/constraints.py":898 * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): * for variable in variables: # <<<<<<<<<<<<<< @@ -23543,9 +23553,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __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, 897, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __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, 897, __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, 898, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { @@ -23553,7 +23563,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 897, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 898, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23563,7 +23573,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 897, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 898, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23574,13 +23584,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __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, 897, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 898, __pyx_L1_error) PyErr_Clear(); } break; @@ -23590,28 +23600,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":898 + /* "constraint/constraints.py":899 * 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, 898, __pyx_L1_error) + __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, 899, __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, 898, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __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, 898, __pyx_L1_error) + __pyx_t_8 = __pyx_pf_10constraint_11constraints_19ExactProdConstraint_8__call___genexpr(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __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, 898, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __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, 898, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":897 + /* "constraint/constraints.py":898 * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): * for variable in variables: # <<<<<<<<<<<<<< @@ -23621,7 +23631,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":896 + /* "constraint/constraints.py":897 * missing_lt1 = [] * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< @@ -23630,7 +23640,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":899 + /* "constraint/constraints.py":900 * 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): # <<<<<<<<<<<<<< @@ -23638,7 +23648,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca * prod *= assignments[variable] */ __pyx_t_7 = NULL; - __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, 899, __pyx_L1_error) + __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, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = 1; { @@ -23646,7 +23656,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -23654,9 +23664,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_t_3 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __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, 899, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 900, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -23665,7 +23675,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 899, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 900, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23675,7 +23685,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 899, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 900, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23686,13 +23696,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error) } else { __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, 899, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 900, __pyx_L1_error) PyErr_Clear(); } break; @@ -23705,7 +23715,7 @@ 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, 899, __pyx_L1_error) + __PYX_ERR(0, 900, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -23715,22 +23725,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); @@ -23738,7 +23748,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 899, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 900, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L10_unpacking_done; @@ -23746,7 +23756,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 899, __pyx_L1_error) + __PYX_ERR(0, 900, __pyx_L1_error) __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); @@ -23754,32 +23764,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":900 + /* "constraint/constraints.py":901 * 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_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 900, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 901, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":901 + /* "constraint/constraints.py":902 * 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, 901, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":900 + /* "constraint/constraints.py":901 * 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: # <<<<<<<<<<<<<< @@ -23789,7 +23799,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca goto __pyx_L11; } - /* "constraint/constraints.py":903 + /* "constraint/constraints.py":904 * prod *= assignments[variable] * else: * missing = True # <<<<<<<<<<<<<< @@ -23799,26 +23809,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca /*else*/ { __pyx_v_missing = 1; - /* "constraint/constraints.py":904 + /* "constraint/constraints.py":905 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< * missing_lt1.append(variable) * if isinstance(prod, float): */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 905, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":905 + /* "constraint/constraints.py":906 * missing = True * if contains_lt1: * missing_lt1.append(variable) # <<<<<<<<<<<<<< * if isinstance(prod, float): * prod = round(prod, 10) */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 905, __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, 906, __pyx_L1_error) - /* "constraint/constraints.py":904 + /* "constraint/constraints.py":905 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< @@ -23829,7 +23839,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca } __pyx_L11:; - /* "constraint/constraints.py":899 + /* "constraint/constraints.py":900 * 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): # <<<<<<<<<<<<<< @@ -23839,7 +23849,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":906 + /* "constraint/constraints.py":907 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -23849,7 +23859,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_t_4 = PyFloat_Check(__pyx_v_prod); if (__pyx_t_4) { - /* "constraint/constraints.py":907 + /* "constraint/constraints.py":908 * missing_lt1.append(variable) * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< @@ -23862,13 +23872,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":906 + /* "constraint/constraints.py":907 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -23877,7 +23887,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":908 + /* "constraint/constraints.py":909 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): # <<<<<<<<<<<<<< @@ -23889,8 +23899,8 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca goto __pyx_L17_next_or; } else { } - __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, 908, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 908, __pyx_L1_error) + __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, 909, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_13) { } else { @@ -23898,21 +23908,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca goto __pyx_L16_bool_binop_done; } __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, 908, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 909, __pyx_L1_error) __pyx_t_13 = (__pyx_t_3 == 0); if (__pyx_t_13) { } else { __pyx_t_4 = __pyx_t_13; goto __pyx_L16_bool_binop_done; } - __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, 908, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 908, __pyx_L1_error) + __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, 909, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 909, __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":909 + /* "constraint/constraints.py":910 * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False # <<<<<<<<<<<<<< @@ -23924,7 +23934,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":908 + /* "constraint/constraints.py":909 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): # <<<<<<<<<<<<<< @@ -23933,17 +23943,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":910 + /* "constraint/constraints.py":911 * 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_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 910, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 911, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":911 + /* "constraint/constraints.py":912 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -23955,9 +23965,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_t_3 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 911, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 912, __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, 911, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { @@ -23965,7 +23975,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 911, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 912, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23975,7 +23985,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 911, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 912, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -23986,13 +23996,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 911, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 912, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_5(__pyx_t_6); 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, 911, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 912, __pyx_L1_error) PyErr_Clear(); } break; @@ -24002,60 +24012,60 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":912 + /* "constraint/constraints.py":913 * 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_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 913, __pyx_L1_error) if (__pyx_t_13) { } else { __pyx_t_4 = __pyx_t_13; goto __pyx_L24_bool_binop_done; } - __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 913, __pyx_L1_error) if (!__pyx_t_13) { } else { __pyx_t_4 = __pyx_t_13; goto __pyx_L24_bool_binop_done; } - __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 913, __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":913 + /* "constraint/constraints.py":914 * 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_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 913, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":914 + /* "constraint/constraints.py":915 * 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_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 914, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 915, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -24064,7 +24074,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 914, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 915, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -24074,7 +24084,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__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, 914, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 915, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -24085,13 +24095,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 914, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_14(__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, 914, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 915, __pyx_L1_error) PyErr_Clear(); } break; @@ -24101,22 +24111,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":915 + /* "constraint/constraints.py":916 * domain = domains[variable] * for value in domain[:]: * if prod * value > exactprod: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_8 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_exactprod, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "constraint/constraints.py":916 + /* "constraint/constraints.py":917 * for value in domain[:]: * if prod * value > exactprod: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -24130,12 +24140,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 916, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":915 + /* "constraint/constraints.py":916 * domain = domains[variable] * for value in domain[:]: * if prod * value > exactprod: # <<<<<<<<<<<<<< @@ -24144,7 +24154,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":914 + /* "constraint/constraints.py":915 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -24154,18 +24164,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":917 + /* "constraint/constraints.py":918 * if prod * value > exactprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 918, __pyx_L1_error) __pyx_t_13 = (!__pyx_t_4); if (__pyx_t_13) { - /* "constraint/constraints.py":918 + /* "constraint/constraints.py":919 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -24178,7 +24188,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/constraints.py":917 + /* "constraint/constraints.py":918 * if prod * value > exactprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -24187,7 +24197,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":912 + /* "constraint/constraints.py":913 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< @@ -24196,7 +24206,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":911 + /* "constraint/constraints.py":912 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -24206,7 +24216,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":910 + /* "constraint/constraints.py":911 * if (not missing and prod != exactprod) or (len(missing_lt1) == 0 and prod > exactprod): * return False * if forwardcheck: # <<<<<<<<<<<<<< @@ -24215,7 +24225,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca */ } - /* "constraint/constraints.py":919 + /* "constraint/constraints.py":920 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -24227,7 +24237,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":890 + /* "constraint/constraints.py":891 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -24258,7 +24268,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19ExactProdConstraint_4__ca return __pyx_r; } -/* "constraint/constraints.py":938 +/* "constraint/constraints.py":939 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< @@ -24308,38 +24318,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, 938, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 939, __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, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 939, __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, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 939, __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, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 939, __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, 938, __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, 939, __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, 938, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 939, __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, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 939, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 939, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 938, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 939, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -24347,7 +24357,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, 938, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 939, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24358,7 +24368,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, 938, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 939, __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 */ @@ -24386,25 +24396,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":945 + /* "constraint/constraints.py":946 * 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, 945, __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, 946, __pyx_L1_error) - /* "constraint/constraints.py":946 + /* "constraint/constraints.py":947 * """ * 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, 946, __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, 947, __pyx_L1_error) - /* "constraint/constraints.py":938 + /* "constraint/constraints.py":939 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< @@ -24424,7 +24434,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":948 +/* "constraint/constraints.py":949 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -24474,41 +24484,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, 948, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 949, __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, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 949, __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, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __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, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __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, 948, __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, 949, __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, 948, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 949, __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, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 949, __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, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 949, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 948, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 949, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -24520,7 +24530,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, 948, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 949, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -24575,35 +24585,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":950 + /* "constraint/constraints.py":951 * 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, 950, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":951 + /* "constraint/constraints.py":952 * """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, 951, __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, 952, __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, 951, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __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, 951, __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, 952, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -24612,7 +24622,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, 951, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 952, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -24622,7 +24632,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, 951, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 952, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -24633,13 +24643,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 952, __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, 951, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 952, __pyx_L1_error) PyErr_Clear(); } break; @@ -24649,19 +24659,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":952 + /* "constraint/constraints.py":953 * 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, 952, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 952, __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, 953, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":953 + /* "constraint/constraints.py":954 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -24670,7 +24680,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ goto __pyx_L3_continue; - /* "constraint/constraints.py":952 + /* "constraint/constraints.py":953 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -24679,30 +24689,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":954 + /* "constraint/constraints.py":955 * 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, 954, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":955 + /* "constraint/constraints.py":956 * 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, 955, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 956, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":956 + /* "constraint/constraints.py":957 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -24711,7 +24721,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ goto __pyx_L3_continue; - /* "constraint/constraints.py":955 + /* "constraint/constraints.py":956 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -24720,7 +24730,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":957 + /* "constraint/constraints.py":958 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -24733,7 +24743,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_dom}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_9 = NULL; @@ -24742,21 +24752,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_dom}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 957, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 957, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 958, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 957, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 958, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 957, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":951 + /* "constraint/constraints.py":952 * """Return min and max product of domains of product_vars (excluding `exclude_var` if given).""" * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -24767,7 +24777,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":959 + /* "constraint/constraints.py":960 * bounds.append((min(dom), max(dom))) * * all_bounds = [b for b in bounds] # <<<<<<<<<<<<<< @@ -24775,7 +24785,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, 959, __pyx_L10_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = 0; @@ -24783,17 +24793,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { 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, 959, __pyx_L10_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L10_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L10_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_b, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr19__pyx_v_b))) __PYX_ERR(0, 959, __pyx_L10_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr19__pyx_v_b))) __PYX_ERR(0, 960, __pyx_L10_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_b); __pyx_9genexpr19__pyx_v_b = 0; @@ -24806,7 +24816,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_v_all_bounds = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":960 + /* "constraint/constraints.py":961 * * all_bounds = [b for b in bounds] * if not all_bounds: # <<<<<<<<<<<<<< @@ -24815,14 +24825,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_all_bounds); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 960, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 961, __pyx_L1_error) __pyx_t_6 = (__pyx_temp != 0); } __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":961 + /* "constraint/constraints.py":962 * all_bounds = [b for b in bounds] * if not all_bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -24834,7 +24844,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":960 + /* "constraint/constraints.py":961 * * all_bounds = [b for b in bounds] * if not all_bounds: # <<<<<<<<<<<<<< @@ -24843,7 +24853,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":964 + /* "constraint/constraints.py":965 * * # 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])] # <<<<<<<<<<<<<< @@ -24851,12 +24861,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, 964, __pyx_L18_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 964, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 965, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); { /* enter inner scope */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L23_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_v_all_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -24864,13 +24874,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, 964, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 965, __pyx_L23_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 964, __pyx_L23_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; @@ -24878,7 +24888,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, 964, __pyx_L23_error) + __PYX_ERR(0, 965, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24888,22 +24898,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 964, __pyx_L23_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 964, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 965, __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, 964, __pyx_L23_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 964, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 964, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -24911,7 +24921,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, 964, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 965, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -24919,22 +24929,22 @@ 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, 964, __pyx_L23_error) + __PYX_ERR(0, 965, __pyx_L23_error) __pyx_L27_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 964, __pyx_L23_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_9genexpr21__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr21__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr21__pyx_v_lo) != (0)) __PYX_ERR(0, 964, __pyx_L23_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr21__pyx_v_lo) != (0)) __PYX_ERR(0, 965, __pyx_L23_error); __Pyx_INCREF(__pyx_9genexpr21__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr21__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr21__pyx_v_hi) != (0)) __PYX_ERR(0, 964, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 964, __pyx_L23_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr21__pyx_v_hi) != (0)) __PYX_ERR(0, 965, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 965, __pyx_L23_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -24947,10 +24957,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L18_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L18_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -24959,9 +24969,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_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L18_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __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, 964, __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, 965, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -24970,7 +24980,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, 964, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 965, __pyx_L18_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -24980,7 +24990,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, 964, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 965, __pyx_L18_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -24991,13 +25001,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __pyx_L18_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L18_error) } else { __pyx_t_7 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 964, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 965, __pyx_L18_error) PyErr_Clear(); } break; @@ -25006,7 +25016,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_b, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr20__pyx_v_b))) __PYX_ERR(0, 964, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr20__pyx_v_b))) __PYX_ERR(0, 965, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_b); __pyx_9genexpr20__pyx_v_b = 0; @@ -25019,7 +25029,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":965 + /* "constraint/constraints.py":966 * # 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] # <<<<<<<<<<<<<< @@ -25027,7 +25037,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, 965, __pyx_L34_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -25035,13 +25045,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, 965, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 966, __pyx_L34_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L34_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_p, __pyx_t_7); __pyx_t_7 = 0; @@ -25052,10 +25062,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_9genexpr22__pyx_v_p}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 965, __pyx_L34_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_7); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 965, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 966, __pyx_L34_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25069,7 +25079,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":966 + /* "constraint/constraints.py":967 * 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) # <<<<<<<<<<<<<< @@ -25083,7 +25093,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_products}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = NULL; @@ -25092,22 +25102,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_products}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 966, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 967, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 966, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 967, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/constraints.py":948 + /* "constraint/constraints.py":949 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -25144,7 +25154,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":968 +/* "constraint/constraints.py":969 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -25192,39 +25202,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, 968, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 969, __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, 968, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __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, 968, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __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, 968, __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, 969, __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, 968, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 969, __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, 968, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 969, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 968, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 969, __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, 968, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 969, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25259,7 +25269,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":969 + /* "constraint/constraints.py":970 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -25269,7 +25279,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":970 + /* "constraint/constraints.py":971 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -25281,9 +25291,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, 970, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 971, __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, 970, __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, 971, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -25291,7 +25301,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, 970, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 971, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -25301,7 +25311,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, 970, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 971, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -25312,13 +25322,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 970, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __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, 970, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 971, __pyx_L1_error) PyErr_Clear(); } break; @@ -25328,19 +25338,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":971 + /* "constraint/constraints.py":972 * 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, 971, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":970 + /* "constraint/constraints.py":971 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -25350,7 +25360,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":972 + /* "constraint/constraints.py":973 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -25362,7 +25372,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":968 + /* "constraint/constraints.py":969 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -25384,7 +25394,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":974 +/* "constraint/constraints.py":975 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -25435,50 +25445,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, 974, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 975, __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, 974, __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, 975, __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, 974, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 975, __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, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 975, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 975, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 975, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 975, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 974, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 975, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -25488,7 +25498,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, 974, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 975, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -25499,9 +25509,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, 974, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 974, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 974, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 975, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 975, __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 */ @@ -25553,7 +25563,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":975 + /* "constraint/constraints.py":976 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -25561,9 +25571,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, 975, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __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, 975, __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, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -25583,27 +25593,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 975, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":977 + /* "constraint/constraints.py":978 * 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, 977, __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, 978, __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, 977, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __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":978 + /* "constraint/constraints.py":979 * * target_domain = domains[self.target_var] * target_min = min(target_domain) # <<<<<<<<<<<<<< @@ -25616,13 +25626,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_target_domain}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_target_min = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":979 + /* "constraint/constraints.py":980 * target_domain = domains[self.target_var] * target_min = min(target_domain) * target_max = max(target_domain) # <<<<<<<<<<<<<< @@ -25635,29 +25645,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_target_domain}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_target_max = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":980 + /* "constraint/constraints.py":981 * 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, 980, __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, 981, __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, 980, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __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, 980, __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, 981, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -25666,7 +25676,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, 980, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 981, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -25676,7 +25686,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, 980, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 981, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -25687,13 +25697,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 980, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __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, 980, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 981, __pyx_L1_error) PyErr_Clear(); } break; @@ -25703,7 +25713,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":981 + /* "constraint/constraints.py":982 * target_max = max(target_domain) * for var in self.product_vars: * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -25715,13 +25725,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, 981, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __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, 981, __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, 982, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__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, 981, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -25730,7 +25740,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, 981, __pyx_L1_error) + __PYX_ERR(0, 982, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -25740,22 +25750,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __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, 981, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 982, __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, 981, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 982, __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); @@ -25763,7 +25773,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, 981, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 982, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -25771,7 +25781,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, 981, __pyx_L1_error) + __PYX_ERR(0, 982, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_other_min, __pyx_t_3); @@ -25779,35 +25789,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":982 + /* "constraint/constraints.py":983 * 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, 982, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":983 + /* "constraint/constraints.py":984 * 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, 983, __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, 984, __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, 983, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __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, 983, __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, 984, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -25816,7 +25826,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, 983, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 984, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -25826,7 +25836,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, 983, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 984, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -25837,13 +25847,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __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, 983, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 984, __pyx_L1_error) PyErr_Clear(); } break; @@ -25853,29 +25863,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":984 + /* "constraint/constraints.py":985 * 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, 984, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_min); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __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, 984, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_value, __pyx_v_other_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __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, 984, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 985, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 984, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 985, __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":985 + /* "constraint/constraints.py":986 * for value in domain[:]: * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) # <<<<<<<<<<<<<< @@ -25888,7 +25898,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_candidates}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_4 = NULL; @@ -25897,7 +25907,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_candidates}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_minval, __pyx_t_8); @@ -25905,29 +25915,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_maxval, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":986 + /* "constraint/constraints.py":987 * 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_3 = PyObject_RichCompare(__pyx_v_maxval, __pyx_v_target_min, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_maxval, __pyx_v_target_min, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_13) { } else { __pyx_t_12 = __pyx_t_13; goto __pyx_L10_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_minval, __pyx_v_target_max, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_minval, __pyx_v_target_max, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = __pyx_t_13; __pyx_L10_bool_binop_done:; if (__pyx_t_12) { - /* "constraint/constraints.py":987 + /* "constraint/constraints.py":988 * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: * domain.remove(value) # <<<<<<<<<<<<<< @@ -25941,12 +25951,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_3)) __PYX_ERR(0, 987, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":986 + /* "constraint/constraints.py":987 * candidates = [value * other_min, value * other_max] * minval, maxval = min(candidates), max(candidates) * if maxval < target_min or minval > target_max: # <<<<<<<<<<<<<< @@ -25955,7 +25965,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":983 + /* "constraint/constraints.py":984 * other_min, other_max = self._get_product_bounds(domains, exclude_var=var) * domain = domains[var] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -25965,7 +25975,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":980 + /* "constraint/constraints.py":981 * target_min = min(target_domain) * target_max = max(target_domain) * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -25975,7 +25985,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":974 + /* "constraint/constraints.py":975 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -26011,7 +26021,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":989 +/* "constraint/constraints.py":990 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -26062,53 +26072,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, 989, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 990, __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, 989, __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, 990, __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, 989, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 990, __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, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 990, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 990, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 990, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 989, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 990, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -26122,7 +26132,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, 989, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 990, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -26133,8 +26143,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, 989, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 989, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 990, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 990, __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 */ @@ -26155,7 +26165,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1012 +/* "constraint/constraints.py":1013 * 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) # <<<<<<<<<<<<<< @@ -26175,7 +26185,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_13_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1012, __pyx_L1_error) + __PYX_ERR(0, 1013, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -26186,7 +26196,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __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, 1012, __pyx_L1_error) + __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, 1013, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -26224,29 +26234,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, 1012, __pyx_L1_error) + __PYX_ERR(0, 1013, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1012, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1013, __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, 1012, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1013, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __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, 1012, __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, 1012, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 1013, __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, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -26264,7 +26274,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, 1012, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1013, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -26291,7 +26301,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai } static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstraint_8__call___5generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1013 +/* "constraint/constraints.py":1014 * 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) # <<<<<<<<<<<<<< @@ -26311,7 +26321,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_14_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1013, __pyx_L1_error) + __PYX_ERR(0, 1014, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -26322,7 +26332,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __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, 1013, __pyx_L1_error) + __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, 1014, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -26360,29 +26370,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, 1013, __pyx_L1_error) + __PYX_ERR(0, 1014, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1013, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1014, __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, 1013, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1014, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __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, 1013, __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, 1013, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_assigned_product)) { __Pyx_RaiseClosureNameError("assigned_product"); __PYX_ERR(0, 1014, __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, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -26400,7 +26410,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, 1013, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1014, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -26426,7 +26436,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":989 +/* "constraint/constraints.py":990 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -26474,25 +26484,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_12___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 989, __pyx_L1_error) + __PYX_ERR(0, 990, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":990 + /* "constraint/constraints.py":991 * * 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, 990, __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, 991, __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, 990, __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, 991, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":991 + /* "constraint/constraints.py":992 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: * return True # <<<<<<<<<<<<<< @@ -26504,7 +26514,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":990 + /* "constraint/constraints.py":991 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -26513,22 +26523,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":993 + /* "constraint/constraints.py":994 * 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, 993, __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, 994, __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, 993, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_target_value = __pyx_t_3; __pyx_t_3 = 0; - /* "constraint/constraints.py":994 + /* "constraint/constraints.py":995 * * target_value = assignments[self.target_var] * assigned_product = 1 # <<<<<<<<<<<<<< @@ -26539,35 +26549,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":995 + /* "constraint/constraints.py":996 * 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, 995, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned_vars = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":997 + /* "constraint/constraints.py":998 * 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, 997, __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, 998, __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, 997, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __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, 997, __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, 998, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -26576,7 +26586,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, 997, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -26586,7 +26596,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, 997, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 998, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -26597,13 +26607,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __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, 997, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 998, __pyx_L1_error) PyErr_Clear(); } break; @@ -26613,26 +26623,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":998 + /* "constraint/constraints.py":999 * * 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, 998, __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, 999, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":999 + /* "constraint/constraints.py":1000 * 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, 999, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1000, __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, 999, __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, 1000, __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); @@ -26640,7 +26650,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":998 + /* "constraint/constraints.py":999 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -26650,7 +26660,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai goto __pyx_L6; } - /* "constraint/constraints.py":1001 + /* "constraint/constraints.py":1002 * assigned_product *= assignments[var] * else: * unassigned_vars.append(var) # <<<<<<<<<<<<<< @@ -26658,11 +26668,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, 1001, __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, 1002, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":997 + /* "constraint/constraints.py":998 * unassigned_vars = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -26672,7 +26682,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1003 + /* "constraint/constraints.py":1004 * unassigned_vars.append(var) * * if isinstance(assigned_product, float): # <<<<<<<<<<<<<< @@ -26685,7 +26695,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":1004 + /* "constraint/constraints.py":1005 * * if isinstance(assigned_product, float): * assigned_product = round(assigned_product, 10) # <<<<<<<<<<<<<< @@ -26698,7 +26708,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_assigned_product, __pyx_mstate_global->__pyx_int_10}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __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; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1004, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_assigned_product); @@ -26706,7 +26716,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1003 + /* "constraint/constraints.py":1004 * unassigned_vars.append(var) * * if isinstance(assigned_product, float): # <<<<<<<<<<<<<< @@ -26715,7 +26725,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":1006 + /* "constraint/constraints.py":1007 * assigned_product = round(assigned_product, 10) * * if not unassigned_vars: # <<<<<<<<<<<<<< @@ -26724,14 +26734,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_unassigned_vars); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1006, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1007, __pyx_L1_error) __pyx_t_2 = (__pyx_temp != 0); } __pyx_t_9 = (!__pyx_t_2); if (__pyx_t_9) { - /* "constraint/constraints.py":1007 + /* "constraint/constraints.py":1008 * * if not unassigned_vars: * return assigned_product == target_value # <<<<<<<<<<<<<< @@ -26739,12 +26749,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_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_assigned_product, __pyx_v_target_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1006 + /* "constraint/constraints.py":1007 * assigned_product = round(assigned_product, 10) * * if not unassigned_vars: # <<<<<<<<<<<<<< @@ -26753,7 +26763,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":1010 + /* "constraint/constraints.py":1011 * * # Partial assignment check feasibility * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned_vars] # <<<<<<<<<<<<<< @@ -26761,7 +26771,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, 1010, __pyx_L12_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_unassigned_vars; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; @@ -26769,18 +26779,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai { 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, 1010, __pyx_L12_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1011, __pyx_L12_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L12_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = NULL; - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr23__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1010, __pyx_L12_error) + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr23__pyx_v_v); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = 1; { @@ -26788,11 +26798,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1010, __pyx_L12_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_10 = NULL; - __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr23__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1010, __pyx_L12_error) + __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr23__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = 1; { @@ -26800,18 +26810,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1010, __pyx_L12_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_11); } - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1010, __pyx_L12_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1010, __pyx_L12_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1011, __pyx_L12_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1010, __pyx_L12_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11) != (0)) __PYX_ERR(0, 1011, __pyx_L12_error); __pyx_t_3 = 0; __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1010, __pyx_L12_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1011, __pyx_L12_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -26825,7 +26835,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1011 + /* "constraint/constraints.py":1012 * # 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])] # <<<<<<<<<<<<<< @@ -26833,12 +26843,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, 1011, __pyx_L19_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L19_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, 1011, __pyx_L19_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1012, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ - __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L24_error) + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_11); __pyx_t_4 = 0; @@ -26846,13 +26856,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, 1011, __pyx_L24_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1012, __pyx_L24_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L24_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -26860,7 +26870,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, 1011, __pyx_L24_error) + __PYX_ERR(0, 1012, __pyx_L24_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -26870,22 +26880,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1011, __pyx_L24_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_XGOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1011, __pyx_L24_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1011, __pyx_L24_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1011, __pyx_L24_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_13); #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, 1011, __pyx_L24_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1012, __pyx_L24_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); @@ -26893,7 +26903,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L27_unpacking_failed; __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1011, __pyx_L24_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1012, __pyx_L24_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L28_unpacking_done; @@ -26901,22 +26911,22 @@ 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, 1011, __pyx_L24_error) + __PYX_ERR(0, 1012, __pyx_L24_error) __pyx_L28_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_lo, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1011, __pyx_L24_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_9genexpr25__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr25__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr25__pyx_v_lo) != (0)) __PYX_ERR(0, 1011, __pyx_L24_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr25__pyx_v_lo) != (0)) __PYX_ERR(0, 1012, __pyx_L24_error); __Pyx_INCREF(__pyx_9genexpr25__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr25__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr25__pyx_v_hi) != (0)) __PYX_ERR(0, 1011, __pyx_L24_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1011, __pyx_L24_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr25__pyx_v_hi) != (0)) __PYX_ERR(0, 1012, __pyx_L24_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1012, __pyx_L24_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -26929,10 +26939,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai goto __pyx_L19_error; __pyx_L30_exit_scope:; } /* exit inner scope */ - __pyx_t_11 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1011, __pyx_L19_error) + __pyx_t_11 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1012, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L19_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -26941,9 +26951,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_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1011, __pyx_L19_error) + __pyx_t_4 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1012, __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, 1011, __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, 1012, __pyx_L19_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -26952,7 +26962,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, 1011, __pyx_L19_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1012, __pyx_L19_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -26962,7 +26972,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, 1011, __pyx_L19_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1012, __pyx_L19_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -26973,13 +26983,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L19_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L19_error) } else { __pyx_t_12 = __pyx_t_5(__pyx_t_11); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1011, __pyx_L19_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1012, __pyx_L19_error) PyErr_Clear(); } break; @@ -26995,10 +27005,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr24__pyx_v_p}; __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1011, __pyx_L19_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1011, __pyx_L19_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1012, __pyx_L19_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -27012,7 +27022,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1012 + /* "constraint/constraints.py":1013 * 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) # <<<<<<<<<<<<<< @@ -27020,7 +27030,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * */ __pyx_t_11 = NULL; - __pyx_t_12 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_t_12 = __pyx_pf_10constraint_11constraints_27VariableExactProdConstraint_8__call___genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_candidates); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = 1; { @@ -27028,13 +27038,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_possible_min = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1013 + /* "constraint/constraints.py":1014 * 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) # <<<<<<<<<<<<<< @@ -27042,7 +27052,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai * if target_value < possible_min or target_value > possible_max: */ __pyx_t_12 = NULL; - __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, 1013, __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, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = 1; { @@ -27050,35 +27060,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_possible_max = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1015 + /* "constraint/constraints.py":1016 * 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_v_target_value, __pyx_v_possible_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1015, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_target_value, __pyx_v_possible_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1016, __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_v_target_value, __pyx_v_possible_max, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1015, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_target_value, __pyx_v_possible_max, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1016, __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":1016 + /* "constraint/constraints.py":1017 * * if target_value < possible_min or target_value > possible_max: * return False # <<<<<<<<<<<<<< @@ -27090,7 +27100,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1015 + /* "constraint/constraints.py":1016 * possible_max = max(assigned_product * c for c in candidates) * * if target_value < possible_min or target_value > possible_max: # <<<<<<<<<<<<<< @@ -27099,7 +27109,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai */ } - /* "constraint/constraints.py":1033 + /* "constraint/constraints.py":1034 * # return False * * return True # <<<<<<<<<<<<<< @@ -27111,7 +27121,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":989 + /* "constraint/constraints.py":990 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -27151,10 +27161,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_27VariableExactProdConstrai return __pyx_r; } -/* "constraint/constraints.py":1052 +/* "constraint/constraints.py":1053 * """ # noqa: E501 * - * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, minprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MinProdConstraint. * */ @@ -27200,39 +27210,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, 1052, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1053, __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, 1052, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1053, __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, 1052, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __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, 1052, __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, 1053, __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, 1052, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1053, __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, 1052, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1052, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1053, __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, 1052, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1053, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27261,19 +27271,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1058 + /* "constraint/constraints.py":1059 * 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, 1058, __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, 1059, __pyx_L1_error) - /* "constraint/constraints.py":1052 + /* "constraint/constraints.py":1053 * """ # noqa: E501 * - * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, minprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MinProdConstraint. * */ @@ -27290,7 +27300,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint___init_ return __pyx_r; } -/* "constraint/constraints.py":1060 +/* "constraint/constraints.py":1061 * self._minprod = minprod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -27341,50 +27351,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, 1060, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1061, __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, 1060, __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, 1061, __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, 1060, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1061, __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, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1061, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1061, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1061, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1061, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1060, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1061, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -27394,7 +27404,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, 1060, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1061, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27405,9 +27415,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, 1060, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1060, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1060, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1061, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1061, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1061, __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 */ @@ -27450,7 +27460,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1061 + /* "constraint/constraints.py":1062 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -27458,9 +27468,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, 1061, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __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, 1061, __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, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -27480,24 +27490,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 1061, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1064 + /* "constraint/constraints.py":1065 * * # 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, 1064, __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, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_minprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1065 + /* "constraint/constraints.py":1066 * # prune the associated variables of values > minprod * minprod = self._minprod * for variable in variables: # <<<<<<<<<<<<<< @@ -27509,9 +27519,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, 1065, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __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, 1065, __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, 1066, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -27519,7 +27529,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, 1065, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1066, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -27529,7 +27539,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, 1065, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1066, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -27540,13 +27550,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __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, 1065, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1066, __pyx_L1_error) PyErr_Clear(); } break; @@ -27556,35 +27566,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":1066 + /* "constraint/constraints.py":1067 * 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, 1066, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1067 + /* "constraint/constraints.py":1068 * 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, 1067, __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, 1068, __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, 1067, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __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, 1067, __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, 1068, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -27593,7 +27603,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, 1067, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -27603,7 +27613,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, 1067, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1068, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -27614,13 +27624,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __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, 1067, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1068, __pyx_L1_error) PyErr_Clear(); } break; @@ -27630,27 +27640,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":1068 + /* "constraint/constraints.py":1069 * 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, 1068, __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, 1069, __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, 1068, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1068, __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, 1069, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1069, __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":1069 + /* "constraint/constraints.py":1070 * for value in domain[:]: * if value == 0 and minprod > 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -27664,12 +27674,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((PyObject*)__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, 1069, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1068 + /* "constraint/constraints.py":1069 * domain = domains[variable] * for value in domain[:]: * if value == 0 and minprod > 0: # <<<<<<<<<<<<<< @@ -27678,7 +27688,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro */ } - /* "constraint/constraints.py":1067 + /* "constraint/constraints.py":1068 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -27688,7 +27698,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1065 + /* "constraint/constraints.py":1066 * # prune the associated variables of values > minprod * minprod = self._minprod * for variable in variables: # <<<<<<<<<<<<<< @@ -27698,7 +27708,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1060 + /* "constraint/constraints.py":1061 * self._minprod = minprod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -27726,7 +27736,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_2prePro return __pyx_r; } -/* "constraint/constraints.py":1071 +/* "constraint/constraints.py":1072 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -27777,53 +27787,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, 1071, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1072, __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, 1071, __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, 1072, __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, 1071, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1072, __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, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1072, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1072, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1072, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1071, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1072, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -27837,7 +27847,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, 1071, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1072, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -27848,8 +27858,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, 1071, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1071, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1072, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1072, __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 */ @@ -27887,7 +27897,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1073 + /* "constraint/constraints.py":1074 * 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: # <<<<<<<<<<<<<< @@ -27899,9 +27909,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, 1073, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __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, 1073, __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, 1074, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -27909,7 +27919,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, 1073, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1074, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -27919,7 +27929,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, 1073, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1074, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -27930,13 +27940,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1073, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __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, 1073, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1074, __pyx_L1_error) PyErr_Clear(); } break; @@ -27946,17 +27956,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":1074 + /* "constraint/constraints.py":1075 * # 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, 1074, __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, 1075, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1075 + /* "constraint/constraints.py":1076 * for variable in variables: * if variable not in assignments: * return True # <<<<<<<<<<<<<< @@ -27969,7 +27979,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":1074 + /* "constraint/constraints.py":1075 * # check if each variable is in the assignments * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -27978,7 +27988,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call */ } - /* "constraint/constraints.py":1073 + /* "constraint/constraints.py":1074 * 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: # <<<<<<<<<<<<<< @@ -27988,19 +27998,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1078 + /* "constraint/constraints.py":1079 * * # 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, 1078, __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, 1079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_minprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1079 + /* "constraint/constraints.py":1080 * # with each variable assigned, sum the values * minprod = self._minprod * prod = 1 # <<<<<<<<<<<<<< @@ -28010,7 +28020,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":1080 + /* "constraint/constraints.py":1081 * minprod = self._minprod * prod = 1 * for variable in variables: # <<<<<<<<<<<<<< @@ -28022,9 +28032,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, 1080, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __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, 1080, __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, 1081, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -28032,7 +28042,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, 1080, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1081, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -28042,7 +28052,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, 1080, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1081, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -28053,13 +28063,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1080, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __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, 1080, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1081, __pyx_L1_error) PyErr_Clear(); } break; @@ -28069,22 +28079,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":1081 + /* "constraint/constraints.py":1082 * 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, 1081, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __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, 1081, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __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":1080 + /* "constraint/constraints.py":1081 * minprod = self._minprod * prod = 1 * for variable in variables: # <<<<<<<<<<<<<< @@ -28094,7 +28104,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1082 + /* "constraint/constraints.py":1083 * for variable in variables: * prod *= assignments[variable] * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -28104,7 +28114,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":1083 + /* "constraint/constraints.py":1084 * prod *= assignments[variable] * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< @@ -28117,13 +28127,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __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; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1082 + /* "constraint/constraints.py":1083 * for variable in variables: * prod *= assignments[variable] * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -28132,7 +28142,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call */ } - /* "constraint/constraints.py":1084 + /* "constraint/constraints.py":1085 * if isinstance(prod, float): * prod = round(prod, 10) * return prod >= minprod # <<<<<<<<<<<<<< @@ -28140,12 +28150,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, 1084, __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, 1085, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1071 + /* "constraint/constraints.py":1072 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -28169,7 +28179,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MinProdConstraint_4__call return __pyx_r; } -/* "constraint/constraints.py":1104 +/* "constraint/constraints.py":1105 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -28218,38 +28228,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, 1104, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1105, __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, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1105, __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, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1105, __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, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1105, __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, 1104, __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, 1105, __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, 1104, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1105, __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, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1105, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1105, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1104, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1105, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -28257,7 +28267,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, 1104, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1105, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28268,7 +28278,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, 1104, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 1105, __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 */ @@ -28296,25 +28306,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1105 + /* "constraint/constraints.py":1106 * * 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, 1105, __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, 1106, __pyx_L1_error) - /* "constraint/constraints.py":1106 + /* "constraint/constraints.py":1107 * 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, 1106, __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, 1107, __pyx_L1_error) - /* "constraint/constraints.py":1104 + /* "constraint/constraints.py":1105 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -28334,7 +28344,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1108 +/* "constraint/constraints.py":1109 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -28383,41 +28393,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, 1108, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1109, __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, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1109, __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, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1109, __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, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __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, 1108, __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, 1109, __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, 1108, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 1109, __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, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1109, __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, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1109, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1108, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1109, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -28429,7 +28439,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, 1108, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1109, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -28482,35 +28492,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":1109 + /* "constraint/constraints.py":1110 * * 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, 1109, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1110 + /* "constraint/constraints.py":1111 * 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, 1110, __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, 1111, __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, 1110, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __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, 1110, __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, 1111, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -28519,7 +28529,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, 1110, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1111, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -28529,7 +28539,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, 1110, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1111, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -28540,13 +28550,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __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, 1110, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1111, __pyx_L1_error) PyErr_Clear(); } break; @@ -28556,19 +28566,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1111 + /* "constraint/constraints.py":1112 * 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, 1111, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1111, __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, 1112, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1112 + /* "constraint/constraints.py":1113 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -28577,7 +28587,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1111 + /* "constraint/constraints.py":1112 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -28586,30 +28596,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1113 + /* "constraint/constraints.py":1114 * 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, 1113, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1114 + /* "constraint/constraints.py":1115 * 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, 1114, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1115, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":1115 + /* "constraint/constraints.py":1116 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -28618,7 +28628,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1114 + /* "constraint/constraints.py":1115 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -28627,7 +28637,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1116 + /* "constraint/constraints.py":1117 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -28640,7 +28650,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_dom}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_9 = NULL; @@ -28649,21 +28659,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_dom}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1116, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1116, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1117, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1116, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1117, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1110 + /* "constraint/constraints.py":1111 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -28674,7 +28684,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1118 + /* "constraint/constraints.py":1119 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -28683,14 +28693,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_bounds); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1118, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1119, __pyx_L1_error) __pyx_t_6 = (__pyx_temp != 0); } __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":1119 + /* "constraint/constraints.py":1120 * * if not bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -28702,7 +28712,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":1118 + /* "constraint/constraints.py":1119 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -28711,7 +28721,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1122 + /* "constraint/constraints.py":1123 * * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -28719,12 +28729,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, 1122, __pyx_L11_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1122, __pyx_L11_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); { /* enter inner scope */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L16_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -28732,13 +28742,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, 1122, __pyx_L16_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1123, __pyx_L16_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L16_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; @@ -28746,7 +28756,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, 1122, __pyx_L16_error) + __PYX_ERR(0, 1123, __pyx_L16_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -28756,22 +28766,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1122, __pyx_L16_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L16_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1123, __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, 1122, __pyx_L16_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1122, __pyx_L16_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1122, __pyx_L16_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -28779,7 +28789,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, 1122, __pyx_L16_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1123, __pyx_L16_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L20_unpacking_done; @@ -28787,22 +28797,22 @@ 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, 1122, __pyx_L16_error) + __PYX_ERR(0, 1123, __pyx_L16_error) __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1122, __pyx_L16_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_9genexpr29__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr29__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr29__pyx_v_lo) != (0)) __PYX_ERR(0, 1122, __pyx_L16_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr29__pyx_v_lo) != (0)) __PYX_ERR(0, 1123, __pyx_L16_error); __Pyx_INCREF(__pyx_9genexpr29__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr29__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr29__pyx_v_hi) != (0)) __PYX_ERR(0, 1122, __pyx_L16_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1122, __pyx_L16_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr29__pyx_v_hi) != (0)) __PYX_ERR(0, 1123, __pyx_L16_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1123, __pyx_L16_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28815,10 +28825,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L11_error; __pyx_L22_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L11_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L11_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28827,9 +28837,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_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L11_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __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, 1122, __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, 1123, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -28838,7 +28848,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, 1122, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1123, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -28848,7 +28858,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, 1122, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1123, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -28859,13 +28869,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1122, __pyx_L11_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L11_error) } else { __pyx_t_7 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1122, __pyx_L11_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1123, __pyx_L11_error) PyErr_Clear(); } break; @@ -28874,7 +28884,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_p, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr28__pyx_v_p))) __PYX_ERR(0, 1122, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr28__pyx_v_p))) __PYX_ERR(0, 1123, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_p); __pyx_9genexpr28__pyx_v_p = 0; @@ -28887,7 +28897,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1123 + /* "constraint/constraints.py":1124 * # 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] # <<<<<<<<<<<<<< @@ -28895,7 +28905,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, 1123, __pyx_L27_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -28903,13 +28913,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, 1123, __pyx_L27_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1124, __pyx_L27_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L27_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_p, __pyx_t_7); __pyx_t_7 = 0; @@ -28920,10 +28930,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_9genexpr30__pyx_v_p}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1123, __pyx_L27_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_7); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1123, __pyx_L27_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1124, __pyx_L27_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -28937,7 +28947,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1124 + /* "constraint/constraints.py":1125 * 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) # <<<<<<<<<<<<<< @@ -28951,7 +28961,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_products}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = NULL; @@ -28960,22 +28970,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_products}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1124, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1125, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1124, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1125, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1108 + /* "constraint/constraints.py":1109 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -29010,7 +29020,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1126 +/* "constraint/constraints.py":1127 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -29058,39 +29068,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, 1126, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1127, __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, 1126, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1127, __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, 1126, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1127, __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, 1126, __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, 1127, __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, 1126, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1127, __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, 1126, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1127, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1126, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1127, __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, 1126, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1127, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29125,7 +29135,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":1127 + /* "constraint/constraints.py":1128 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -29135,7 +29145,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":1128 + /* "constraint/constraints.py":1129 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -29147,9 +29157,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, 1128, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __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, 1128, __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, 1129, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -29157,7 +29167,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, 1128, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -29167,7 +29177,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, 1128, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1129, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -29178,13 +29188,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1129, __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, 1128, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1129, __pyx_L1_error) PyErr_Clear(); } break; @@ -29194,19 +29204,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1129 + /* "constraint/constraints.py":1130 * 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, 1129, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1128 + /* "constraint/constraints.py":1129 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -29216,7 +29226,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1130 + /* "constraint/constraints.py":1131 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -29228,7 +29238,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":1126 + /* "constraint/constraints.py":1127 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -29250,7 +29260,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1132 +/* "constraint/constraints.py":1133 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -29301,50 +29311,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, 1132, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1133, __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, 1132, __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, 1133, __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, 1132, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1133, __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, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1133, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1133, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1133, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1133, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1132, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1133, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -29354,7 +29364,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, 1132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1133, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29365,9 +29375,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, 1132, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1132, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1132, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1133, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1133, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1133, __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 */ @@ -29415,7 +29425,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1133 + /* "constraint/constraints.py":1134 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -29423,9 +29433,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, 1133, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __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, 1133, __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, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -29445,27 +29455,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 1133, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1134 + /* "constraint/constraints.py":1135 * 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, 1134, __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, 1135, __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, 1134, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __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":1135 + /* "constraint/constraints.py":1136 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] * t_min = min(target_dom) # <<<<<<<<<<<<<< @@ -29478,29 +29488,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_target_dom}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_t_min = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1137 + /* "constraint/constraints.py":1138 * 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, 1137, __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, 1138, __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, 1137, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __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, 1137, __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, 1138, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -29509,7 +29519,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, 1137, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1138, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -29519,7 +29529,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, 1137, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1138, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -29530,13 +29540,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __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, 1137, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1138, __pyx_L1_error) PyErr_Clear(); } break; @@ -29546,7 +29556,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1138 + /* "constraint/constraints.py":1139 * * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -29558,13 +29568,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __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, 1138, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __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, 1138, __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, 1139, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__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, 1138, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -29573,7 +29583,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, 1138, __pyx_L1_error) + __PYX_ERR(0, 1139, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29583,22 +29593,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1138, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __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, 1138, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __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, 1138, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1139, __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); @@ -29606,7 +29616,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __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, 1138, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1139, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -29614,7 +29624,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, 1138, __pyx_L1_error) + __PYX_ERR(0, 1139, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_min_others, __pyx_t_3); @@ -29622,35 +29632,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_max_others, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1139 + /* "constraint/constraints.py":1140 * 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, 1139, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1140 + /* "constraint/constraints.py":1141 * 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, 1140, __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, 1141, __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, 1140, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __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, 1140, __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, 1141, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -29659,7 +29669,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, 1140, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1141, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -29669,7 +29679,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, 1140, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1141, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -29680,13 +29690,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1141, __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, 1140, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1141, __pyx_L1_error) PyErr_Clear(); } break; @@ -29696,29 +29706,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1141 + /* "constraint/constraints.py":1142 * 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, 1141, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1142, __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, 1141, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __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, 1141, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1142, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1141, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1142, __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":1142 + /* "constraint/constraints.py":1143 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: # <<<<<<<<<<<<<< @@ -29731,16 +29741,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_possible_prods}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1142, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_min, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_min, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1142, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { - /* "constraint/constraints.py":1143 + /* "constraint/constraints.py":1144 * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: * dom.remove(val) # <<<<<<<<<<<<<< @@ -29754,12 +29764,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_val}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_3)) __PYX_ERR(0, 1143, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1142 + /* "constraint/constraints.py":1143 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if max(possible_prods) < t_min: # <<<<<<<<<<<<<< @@ -29768,7 +29778,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1140 + /* "constraint/constraints.py":1141 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< @@ -29778,7 +29788,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1137 + /* "constraint/constraints.py":1138 * t_min = min(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -29788,7 +29798,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1132 + /* "constraint/constraints.py":1133 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -29821,7 +29831,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1145 +/* "constraint/constraints.py":1146 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -29872,53 +29882,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, 1145, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1146, __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, 1145, __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, 1146, __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, 1145, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1146, __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, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1146, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1146, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1146, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1145, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1146, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -29932,7 +29942,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, 1145, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1146, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -29943,8 +29953,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, 1145, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1145, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1146, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1146, __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 */ @@ -29965,7 +29975,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1181 +/* "constraint/constraints.py":1182 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< @@ -29985,7 +29995,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_16_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1181, __pyx_L1_error) + __PYX_ERR(0, 1182, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -29996,7 +30006,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __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___2generator11, ((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_VariableMinProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_25VariableMinProdConstraint_8__call___2generator11, ((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_VariableMinProdConstraint___call, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -30033,29 +30043,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1181, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1181, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1182, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1182, __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, 1181, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1182, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __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, 1181, __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, 1181, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1181, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1182, __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, 1182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { @@ -30095,7 +30105,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1145 +/* "constraint/constraints.py":1146 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -30157,25 +30167,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_15___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1145, __pyx_L1_error) + __PYX_ERR(0, 1146, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":1146 + /* "constraint/constraints.py":1147 * * 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, 1146, __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, 1147, __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, 1146, __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, 1147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":1147 + /* "constraint/constraints.py":1148 * 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 # <<<<<<<<<<<<<< @@ -30187,7 +30197,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1146 + /* "constraint/constraints.py":1147 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -30196,23 +30206,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1149 + /* "constraint/constraints.py":1150 * 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, 1149, __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, 1150, __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, 1149, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __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":1150 + /* "constraint/constraints.py":1151 * * target_value = assignments[self.target_var] * assigned_prod = 1 # <<<<<<<<<<<<<< @@ -30222,35 +30232,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":1151 + /* "constraint/constraints.py":1152 * 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, 1151, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1153 + /* "constraint/constraints.py":1154 * 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, 1153, __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, 1154, __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, 1153, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __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, 1153, __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, 1154, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -30259,7 +30269,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, 1153, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1154, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -30269,7 +30279,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, 1153, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1154, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -30280,13 +30290,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __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, 1153, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1154, __pyx_L1_error) PyErr_Clear(); } break; @@ -30296,32 +30306,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1154 + /* "constraint/constraints.py":1155 * * 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, 1154, __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, 1155, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":1155 + /* "constraint/constraints.py":1156 * 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, 1155, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __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, 1155, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1156, __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":1154 + /* "constraint/constraints.py":1155 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -30331,7 +30341,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L6; } - /* "constraint/constraints.py":1157 + /* "constraint/constraints.py":1158 * assigned_prod *= assignments[var] * else: * unassigned.append(var) # <<<<<<<<<<<<<< @@ -30339,11 +30349,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, 1157, __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, 1158, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":1153 + /* "constraint/constraints.py":1154 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -30353,7 +30363,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1159 + /* "constraint/constraints.py":1160 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -30362,14 +30372,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_unassigned); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1159, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1160, __pyx_L1_error) __pyx_t_2 = (__pyx_temp != 0); } __pyx_t_8 = (!__pyx_t_2); if (__pyx_t_8) { - /* "constraint/constraints.py":1160 + /* "constraint/constraints.py":1161 * * if not unassigned: * return assigned_prod >= target_value # <<<<<<<<<<<<<< @@ -30377,12 +30387,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, 1160, __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, 1161, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1159 + /* "constraint/constraints.py":1160 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -30391,7 +30401,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1163 + /* "constraint/constraints.py":1164 * * # Estimate min possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] # <<<<<<<<<<<<<< @@ -30399,7 +30409,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, 1163, __pyx_L11_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; @@ -30407,18 +30417,18 @@ 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, 1163, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1164, __pyx_L11_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_9genexpr31__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = NULL; - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr31__pyx_v_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L11_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr31__pyx_v_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = 1; { @@ -30426,11 +30436,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_9 = NULL; - __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr31__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1163, __pyx_L11_error) + __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr31__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = 1; { @@ -30438,18 +30448,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1163, __pyx_L11_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); } - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1163, __pyx_L11_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1163, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1164, __pyx_L11_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1163, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1164, __pyx_L11_error); __pyx_t_3 = 0; __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1163, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1164, __pyx_L11_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -30463,7 +30473,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1164 + /* "constraint/constraints.py":1165 * # 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])] # <<<<<<<<<<<<<< @@ -30471,12 +30481,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, 1164, __pyx_L18_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __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, 1164, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1165, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ - __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L23_error) + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -30484,13 +30494,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, 1164, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1165, __pyx_L23_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __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; @@ -30498,7 +30508,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, 1164, __pyx_L23_error) + __PYX_ERR(0, 1165, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -30508,22 +30518,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1164, __pyx_L23_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1164, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1164, __pyx_L23_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1164, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); #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, 1164, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1165, __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); @@ -30531,7 +30541,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_9); 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, 1164, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1165, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -30539,22 +30549,22 @@ 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, 1164, __pyx_L23_error) + __PYX_ERR(0, 1165, __pyx_L23_error) __pyx_L27_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_lo, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L23_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_9genexpr33__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr33__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr33__pyx_v_lo) != (0)) __PYX_ERR(0, 1164, __pyx_L23_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr33__pyx_v_lo) != (0)) __PYX_ERR(0, 1165, __pyx_L23_error); __Pyx_INCREF(__pyx_9genexpr33__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr33__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr33__pyx_v_hi) != (0)) __PYX_ERR(0, 1164, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1164, __pyx_L23_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr33__pyx_v_hi) != (0)) __PYX_ERR(0, 1165, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1165, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -30567,10 +30577,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1164, __pyx_L18_error) + __pyx_t_10 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1165, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L18_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -30579,9 +30589,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_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1164, __pyx_L18_error) + __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1165, __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, 1164, __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, 1165, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -30590,7 +30600,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, 1164, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1165, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -30600,7 +30610,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, 1164, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1165, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -30611,13 +30621,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L18_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L18_error) } else { __pyx_t_12 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1164, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1165, __pyx_L18_error) PyErr_Clear(); } break; @@ -30633,10 +30643,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr32__pyx_v_p}; __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1164, __pyx_L18_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1164, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1165, __pyx_L18_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -30650,7 +30660,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1165 + /* "constraint/constraints.py":1166 * 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] # <<<<<<<<<<<<<< @@ -30658,7 +30668,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, 1165, __pyx_L34_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -30666,19 +30676,19 @@ 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, 1165, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1166, __pyx_L34_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L34_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1166, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_c, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr34__pyx_v_c); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1165, __pyx_L34_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr34__pyx_v_c); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1166, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_12); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1165, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1166, __pyx_L34_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -30692,7 +30702,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_v_possible_prods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1166 + /* "constraint/constraints.py":1167 * 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: # <<<<<<<<<<<<<< @@ -30705,16 +30715,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_possible_prods}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1166, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1167 + /* "constraint/constraints.py":1168 * possible_prods = [assigned_prod * c for c in candidates] * if max(possible_prods) < target_value: * return False # <<<<<<<<<<<<<< @@ -30726,7 +30736,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1166 + /* "constraint/constraints.py":1167 * 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: # <<<<<<<<<<<<<< @@ -30735,17 +30745,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1169 + /* "constraint/constraints.py":1170 * 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, 1169, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1170, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1170 + /* "constraint/constraints.py":1171 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -30758,18 +30768,18 @@ 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, 1170, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1171, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1171 + /* "constraint/constraints.py":1172 * if forwardcheck: * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] # <<<<<<<<<<<<<< @@ -30777,7 +30787,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, 1171, __pyx_L45_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; @@ -30785,21 +30795,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { 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, 1171, __pyx_L45_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L45_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1171, __pyx_L45_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr35__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1171, __pyx_L45_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1171, __pyx_L45_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr35__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L45_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1172, __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_9genexpr35__pyx_v_v))) __PYX_ERR(0, 1171, __pyx_L45_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr35__pyx_v_v))) __PYX_ERR(0, 1172, __pyx_L45_error) } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -30813,7 +30823,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_other_unassigned, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1172 + /* "constraint/constraints.py":1173 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -30822,13 +30832,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_other_unassigned); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1173, __pyx_L1_error) __pyx_t_8 = (__pyx_temp != 0); } if (__pyx_t_8) { - /* "constraint/constraints.py":1173 + /* "constraint/constraints.py":1174 * 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] # <<<<<<<<<<<<<< @@ -30836,7 +30846,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, 1173, __pyx_L54_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __pyx_v_other_unassigned; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; @@ -30844,18 +30854,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { 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, 1173, __pyx_L54_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L54_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = NULL; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr36__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1173, __pyx_L54_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr36__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = 1; { @@ -30863,11 +30873,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_3 = NULL; - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr36__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1173, __pyx_L54_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr36__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = 1; { @@ -30875,18 +30885,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1173, __pyx_L54_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1173, __pyx_L54_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1173, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1174, __pyx_L54_error); __Pyx_GIVEREF(__pyx_t_13); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1173, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1174, __pyx_L54_error); __pyx_t_6 = 0; __pyx_t_13 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1173, __pyx_L54_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1174, __pyx_L54_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -30900,7 +30910,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_bounds, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1174 + /* "constraint/constraints.py":1175 * 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])] # <<<<<<<<<<<<<< @@ -30908,12 +30918,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, 1174, __pyx_L61_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1174, __pyx_L61_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_12); { /* enter inner scope */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L66_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_13); __pyx_t_16 = 0; @@ -30921,13 +30931,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L66_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1175, __pyx_L66_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_13, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L66_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __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; @@ -30935,7 +30945,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, 1174, __pyx_L66_error) + __PYX_ERR(0, 1175, __pyx_L66_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -30945,22 +30955,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_INCREF(__pyx_t_14); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L66_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1174, __pyx_L66_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_14); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L66_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1174, __pyx_L66_error) + __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_14); #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, 1174, __pyx_L66_error) + __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1175, __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); @@ -30968,7 +30978,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_14 = __pyx_t_15(__pyx_t_17); if (unlikely(!__pyx_t_14)) goto __pyx_L69_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < (0)) __PYX_ERR(0, 1174, __pyx_L66_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < (0)) __PYX_ERR(0, 1175, __pyx_L66_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L70_unpacking_done; @@ -30976,22 +30986,22 @@ 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, 1174, __pyx_L66_error) + __PYX_ERR(0, 1175, __pyx_L66_error) __pyx_L70_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr38__pyx_v_lo, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr38__pyx_v_hi, __pyx_t_14); __pyx_t_14 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L66_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_9genexpr38__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr38__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr38__pyx_v_lo) != (0)) __PYX_ERR(0, 1174, __pyx_L66_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr38__pyx_v_lo) != (0)) __PYX_ERR(0, 1175, __pyx_L66_error); __Pyx_INCREF(__pyx_9genexpr38__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr38__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr38__pyx_v_hi) != (0)) __PYX_ERR(0, 1174, __pyx_L66_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1174, __pyx_L66_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr38__pyx_v_hi) != (0)) __PYX_ERR(0, 1175, __pyx_L66_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1175, __pyx_L66_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -31004,10 +31014,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L61_error; __pyx_L72_exit_scope:; } /* exit inner scope */ - __pyx_t_13 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1174, __pyx_L61_error) + __pyx_t_13 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L61_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -31016,9 +31026,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1174, __pyx_L61_error) + __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L61_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L61_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -31027,7 +31037,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1175, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -31037,7 +31047,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1174, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1175, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -31048,13 +31058,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L61_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L61_error) } else { __pyx_t_9 = __pyx_t_5(__pyx_t_13); 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, 1174, __pyx_L61_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1175, __pyx_L61_error) PyErr_Clear(); } break; @@ -31070,10 +31080,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_9genexpr37__pyx_v_p}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L61_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_9); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1174, __pyx_L61_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1175, __pyx_L61_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -31087,7 +31097,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1172 + /* "constraint/constraints.py":1173 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -31097,7 +31107,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint goto __pyx_L51; } - /* "constraint/constraints.py":1176 + /* "constraint/constraints.py":1177 * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] * else: * other_products = [1] # <<<<<<<<<<<<<< @@ -31105,45 +31115,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, 1176, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __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, 1176, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1177, __pyx_L1_error); __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L51:; - /* "constraint/constraints.py":1178 + /* "constraint/constraints.py":1179 * 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, 1178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1179 + /* "constraint/constraints.py":1180 * * 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, 1179, __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, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_13 = __pyx_t_1; __Pyx_INCREF(__pyx_t_13); __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -31152,7 +31162,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1179, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1180, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -31162,7 +31172,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1179, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1180, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -31173,13 +31183,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_5(__pyx_t_13); 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, 1179, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1180, __pyx_L1_error) PyErr_Clear(); } break; @@ -31189,7 +31199,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1180 + /* "constraint/constraints.py":1181 * domain = domains[var] * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] # <<<<<<<<<<<<<< @@ -31197,7 +31207,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, 1180, __pyx_L79_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_v_other_products; __Pyx_INCREF(__pyx_t_9); __pyx_t_18 = 0; @@ -31205,22 +31215,22 @@ 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, 1180, __pyx_L79_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1181, __pyx_L79_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_18; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1180, __pyx_L79_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1181, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_9genexpr39__pyx_v_o, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1180, __pyx_L79_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1181, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_12, __pyx_9genexpr39__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1180, __pyx_L79_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_12, __pyx_9genexpr39__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1181, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1180, __pyx_L79_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1181, __pyx_L79_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -31234,23 +31244,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_XDECREF_SET(__pyx_v_prods, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1181 + /* "constraint/constraints.py":1182 * 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, 1181, __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, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_9 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __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, 1181, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1182 + /* "constraint/constraints.py":1183 * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): * domain.hideValue(val) # <<<<<<<<<<<<<< @@ -31264,12 +31274,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_val}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1181 + /* "constraint/constraints.py":1182 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p < target_value for p in prods): # <<<<<<<<<<<<<< @@ -31278,7 +31288,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1179 + /* "constraint/constraints.py":1180 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< @@ -31288,18 +31298,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "constraint/constraints.py":1183 + /* "constraint/constraints.py":1184 * 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, 1183, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1184, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_8); if (__pyx_t_2) { - /* "constraint/constraints.py":1184 + /* "constraint/constraints.py":1185 * domain.hideValue(val) * if not domain: * return False # <<<<<<<<<<<<<< @@ -31312,7 +31322,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1183 + /* "constraint/constraints.py":1184 * if all(p < target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< @@ -31321,7 +31331,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1170 + /* "constraint/constraints.py":1171 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -31331,7 +31341,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":1169 + /* "constraint/constraints.py":1170 * return False * * if forwardcheck: # <<<<<<<<<<<<<< @@ -31340,7 +31350,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint */ } - /* "constraint/constraints.py":1186 + /* "constraint/constraints.py":1187 * return False * * return True # <<<<<<<<<<<<<< @@ -31352,7 +31362,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1145 + /* "constraint/constraints.py":1146 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -31404,10 +31414,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMinProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1205 +/* "constraint/constraints.py":1206 * """ * - * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, maxprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MaxProdConstraint. * */ @@ -31453,39 +31463,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, 1205, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1206, __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, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1206, __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, 1206, __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, 1205, __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, 1206, __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, 1205, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1206, __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, 1205, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1206, __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, 1206, __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, 1205, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1206, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31515,31 +31525,31 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1211 + /* "constraint/constraints.py":1212 * 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, 1211, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_maxprod_2, __pyx_v_maxprod) < (0)) __PYX_ERR(0, 1212, __pyx_L1_error) - /* "constraint/constraints.py":1212 + /* "constraint/constraints.py":1213 * """ * self._maxprod = maxprod * 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, 1212, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __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, 1212, __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, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1205 + /* "constraint/constraints.py":1206 * """ * - * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, maxprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MaxProdConstraint. * */ @@ -31557,7 +31567,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint___init_ return __pyx_r; } -/* "constraint/constraints.py":1214 +/* "constraint/constraints.py":1215 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -31608,50 +31618,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, 1214, __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, 1214, __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, 1214, __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, 1214, __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, 1214, __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, 1214, __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, "preProcess", 0) < (0)) __PYX_ERR(0, 1214, __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, 1215, __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, 1214, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1215, __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, 1214, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __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, 1214, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __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, 1214, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1215, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1214, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1215, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1214, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1215, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -31661,7 +31671,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, 1214, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1215, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -31672,9 +31682,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, 1214, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1214, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1214, __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_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1215, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1215, __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 */ @@ -31695,7 +31705,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_2generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1221 +/* "constraint/constraints.py":1222 * variable_with_lt1 = None * for variable in variables: * contains_lt1 = any(value < 1 for value in domains[variable]) # <<<<<<<<<<<<<< @@ -31715,7 +31725,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_10prePr if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_17_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1221, __pyx_L1_error) + __PYX_ERR(0, 1222, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -31723,7 +31733,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_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_MaxProdConstraint_preProcess_loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_17MaxProdConstraint_10preProcess_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_MaxProdConstraint_preProcess_loc, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -31760,16 +31770,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1221, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1221, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1222, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1222, __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, 1221, __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, 1222, __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, 1221, __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, 1222, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -31777,7 +31787,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, 1221, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1222, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -31787,7 +31797,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, 1221, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1222, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -31798,13 +31808,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __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, 1221, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1222, __pyx_L1_error) PyErr_Clear(); } break; @@ -31815,8 +31825,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, 1221, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1221, __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, 1222, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -31855,7 +31865,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_10prePr return __pyx_r; } -/* "constraint/constraints.py":1214 +/* "constraint/constraints.py":1215 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -31892,7 +31902,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1215 + /* "constraint/constraints.py":1216 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -31900,9 +31910,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, 1215, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1216, __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, 1215, __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, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -31922,24 +31932,24 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 1215, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1218 + /* "constraint/constraints.py":1219 * * # 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, 1218, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1219, __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, 1218, __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, 1219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1219 + /* "constraint/constraints.py":1220 * # check if there are any values less than 1 in the associated variables * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None # <<<<<<<<<<<<<< @@ -31949,7 +31959,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_INCREF(Py_None); __pyx_v_variable_with_lt1 = Py_None; - /* "constraint/constraints.py":1220 + /* "constraint/constraints.py":1221 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -31961,9 +31971,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, 1220, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1221, __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, 1220, __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, 1221, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -31971,7 +31981,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, 1220, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1221, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -31981,7 +31991,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, 1220, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1221, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -31992,13 +32002,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1220, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __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, 1220, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1221, __pyx_L1_error) PyErr_Clear(); } break; @@ -32008,37 +32018,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":1221 + /* "constraint/constraints.py":1222 * 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, 1221, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __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, 1221, __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, 1222, __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, 1221, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __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":1222 + /* "constraint/constraints.py":1223 * 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, 1222, __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, 1223, __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, 1222, __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, 1223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1220 + /* "constraint/constraints.py":1221 * self._variable_contains_lt1: list[bool] = list() * variable_with_lt1 = None * for variable in variables: # <<<<<<<<<<<<<< @@ -32048,7 +32058,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1223 + /* "constraint/constraints.py":1224 * 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): # <<<<<<<<<<<<<< @@ -32056,7 +32066,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro * if variable_with_lt1 is not None: */ __pyx_t_4 = NULL; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variable_contains_lt1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; { @@ -32064,7 +32074,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -32072,9 +32082,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, 1223, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __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, 1223, __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, 1224, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -32083,7 +32093,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, 1223, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -32093,7 +32103,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, 1223, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -32104,13 +32114,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __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, 1223, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1224, __pyx_L1_error) PyErr_Clear(); } break; @@ -32123,7 +32133,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, 1223, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -32133,22 +32143,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #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, 1223, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __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); @@ -32156,7 +32166,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1223, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 1224, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -32164,7 +32174,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, 1223, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); @@ -32172,7 +32182,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1224 + /* "constraint/constraints.py":1225 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -32182,7 +32192,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":1225 + /* "constraint/constraints.py":1226 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -32192,7 +32202,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":1227 + /* "constraint/constraints.py":1228 * if variable_with_lt1 is not None: * # if more than one associated variables contain less than 1, we can't prune * return # <<<<<<<<<<<<<< @@ -32204,7 +32214,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1225 + /* "constraint/constraints.py":1226 * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: * if variable_with_lt1 is not None: # <<<<<<<<<<<<<< @@ -32213,7 +32223,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1228 + /* "constraint/constraints.py":1229 * # if more than one associated variables contain less than 1, we can't prune * return * variable_with_lt1 = variable # <<<<<<<<<<<<<< @@ -32223,7 +32233,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":1224 + /* "constraint/constraints.py":1225 * self._variable_contains_lt1.append(contains_lt1) * for variable, contains_lt1 in zip(variables, self._variable_contains_lt1): * if contains_lt1 is True: # <<<<<<<<<<<<<< @@ -32232,7 +32242,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1223 + /* "constraint/constraints.py":1224 * 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): # <<<<<<<<<<<<<< @@ -32242,19 +32252,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1231 + /* "constraint/constraints.py":1232 * * # 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, 1231, __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, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_maxprod = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/constraints.py":1232 + /* "constraint/constraints.py":1233 * # prune the associated variables of values > maxprod * maxprod = self._maxprod * for variable in variables: # <<<<<<<<<<<<<< @@ -32266,9 +32276,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, 1232, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __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, 1232, __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, 1233, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -32276,7 +32286,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, 1232, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1233, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -32286,7 +32296,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, 1232, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1233, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -32297,13 +32307,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __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, 1232, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1233, __pyx_L1_error) PyErr_Clear(); } break; @@ -32313,7 +32323,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":1233 + /* "constraint/constraints.py":1234 * maxprod = self._maxprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -32326,14 +32336,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, 1233, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1233, __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, 1234, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1234, __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":1234 + /* "constraint/constraints.py":1235 * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: * continue # <<<<<<<<<<<<<< @@ -32342,7 +32352,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ goto __pyx_L13_continue; - /* "constraint/constraints.py":1233 + /* "constraint/constraints.py":1234 * maxprod = self._maxprod * for variable in variables: * if variable_with_lt1 is not None and variable_with_lt1 != variable: # <<<<<<<<<<<<<< @@ -32351,35 +32361,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro */ } - /* "constraint/constraints.py":1235 + /* "constraint/constraints.py":1236 * 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, 1235, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1236 + /* "constraint/constraints.py":1237 * 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, 1236, __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, 1237, __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_13 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1236, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1237, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -32388,7 +32398,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { 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, 1236, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1237, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -32398,7 +32408,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1236, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1237, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } @@ -32409,13 +32419,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro #endif ++__pyx_t_13; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1236, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_14(__pyx_t_3); 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, 1236, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1237, __pyx_L1_error) PyErr_Clear(); } break; @@ -32425,19 +32435,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":1237 + /* "constraint/constraints.py":1238 * 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, 1237, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1237, __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, 1238, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { - /* "constraint/constraints.py":1238 + /* "constraint/constraints.py":1239 * for value in domain[:]: * if value > maxprod: * domain.remove(value) # <<<<<<<<<<<<<< @@ -32451,12 +32461,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1238, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1237 + /* "constraint/constraints.py":1238 * domain = domains[variable] * for value in domain[:]: * if value > maxprod: # <<<<<<<<<<<<<< @@ -32466,27 +32476,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro goto __pyx_L20; } - /* "constraint/constraints.py":1239 + /* "constraint/constraints.py":1240 * 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, 1239, __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, 1240, __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, 1239, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1239, __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, 1240, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1240, __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":1240 + /* "constraint/constraints.py":1241 * domain.remove(value) * elif value == 0 and maxprod < 0: * domain.remove(value) # <<<<<<<<<<<<<< @@ -32500,12 +32510,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_value}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1239 + /* "constraint/constraints.py":1240 * if value > maxprod: * domain.remove(value) * elif value == 0 and maxprod < 0: # <<<<<<<<<<<<<< @@ -32515,7 +32525,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __pyx_L20:; - /* "constraint/constraints.py":1236 + /* "constraint/constraints.py":1237 * continue * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -32525,7 +32535,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1232 + /* "constraint/constraints.py":1233 * # prune the associated variables of values > maxprod * maxprod = self._maxprod * for variable in variables: # <<<<<<<<<<<<<< @@ -32536,7 +32546,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1214 + /* "constraint/constraints.py":1215 * self._variable_contains_lt1: list[bool] = list() * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -32568,7 +32578,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_2prePro return __pyx_r; } -/* "constraint/constraints.py":1242 +/* "constraint/constraints.py":1243 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -32619,53 +32629,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, 1242, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1243, __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, 1242, __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, 1243, __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, 1242, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1243, __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, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1243, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1243, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1243, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1242, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1243, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -32679,7 +32689,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, 1242, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1243, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32690,8 +32700,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, 1242, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1242, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1243, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1243, __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 */ @@ -32712,7 +32722,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call___2generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1250 +/* "constraint/constraints.py":1251 * 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])) # <<<<<<<<<<<<<< @@ -32732,7 +32742,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_18_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1250, __pyx_L1_error) + __PYX_ERR(0, 1251, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -32740,7 +32750,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call __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___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___call___local, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_17MaxProdConstraint_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_MaxProdConstraint___call___local, __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; @@ -32777,16 +32787,16 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1250, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1250, __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) } 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, 1250, __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, 1251, __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, 1250, __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, 1251, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -32794,7 +32804,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__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, 1250, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -32804,7 +32814,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__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, 1250, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -32815,13 +32825,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __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, 1250, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1251, __pyx_L1_error) PyErr_Clear(); } break; @@ -32832,8 +32842,8 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call __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, 1250, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1250, __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, 1251, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); @@ -32872,7 +32882,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_17MaxProdConstraint_8__call return __pyx_r; } -/* "constraint/constraints.py":1242 +/* "constraint/constraints.py":1243 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -32911,19 +32921,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1243 + /* "constraint/constraints.py":1244 * * 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, 1243, __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, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_maxprod = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1244 + /* "constraint/constraints.py":1245 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * maxprod = self._maxprod * prod = 1 # <<<<<<<<<<<<<< @@ -32933,7 +32943,7 @@ 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":1245 + /* "constraint/constraints.py":1246 * maxprod = self._maxprod * prod = 1 * missing = False # <<<<<<<<<<<<<< @@ -32942,34 +32952,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ __pyx_v_missing = 0; - /* "constraint/constraints.py":1246 + /* "constraint/constraints.py":1247 * 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): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_missing_lt1 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1248 + /* "constraint/constraints.py":1249 * 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, 1248, __pyx_L1_error) + __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, 1249, __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, 1248, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1249, __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, 1248, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1249, __pyx_L1_error) __pyx_t_4 = (__pyx_t_2 != __pyx_t_3); if (__pyx_t_4) { - /* "constraint/constraints.py":1249 + /* "constraint/constraints.py":1250 * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): * for variable in variables: # <<<<<<<<<<<<<< @@ -32981,9 +32991,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __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, 1249, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __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, 1249, __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, 1250, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { @@ -32991,7 +33001,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_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, 1249, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1250, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33001,7 +33011,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_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, 1249, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1250, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33012,13 +33022,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1249, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __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, 1249, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1250, __pyx_L1_error) PyErr_Clear(); } break; @@ -33028,28 +33038,28 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1250 + /* "constraint/constraints.py":1251 * 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, 1250, __pyx_L1_error) + __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, 1251, __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, 1250, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __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, 1250, __pyx_L1_error) + __pyx_t_8 = __pyx_pf_10constraint_11constraints_17MaxProdConstraint_8__call___genexpr(NULL, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __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, 1250, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __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, 1250, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1249 + /* "constraint/constraints.py":1250 * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): * for variable in variables: # <<<<<<<<<<<<<< @@ -33059,7 +33069,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1248 + /* "constraint/constraints.py":1249 * missing_lt1 = [] * # find out which variables contain values less than 1 if not preprocessed * if len(self._variable_contains_lt1) != len(variables): # <<<<<<<<<<<<<< @@ -33068,7 +33078,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1251 + /* "constraint/constraints.py":1252 * 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): # <<<<<<<<<<<<<< @@ -33076,7 +33086,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call * prod *= assignments[variable] */ __pyx_t_7 = NULL; - __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, 1251, __pyx_L1_error) + __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, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = 1; { @@ -33084,7 +33094,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __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_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { @@ -33092,9 +33102,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_t_3 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __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, 1251, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -33103,7 +33113,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call { 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, 1251, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1252, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33113,7 +33123,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call { 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, 1251, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1252, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33124,13 +33134,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error) } else { __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, 1251, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1252, __pyx_L1_error) PyErr_Clear(); } break; @@ -33143,7 +33153,7 @@ 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, 1251, __pyx_L1_error) + __PYX_ERR(0, 1252, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33153,22 +33163,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); @@ -33176,7 +33186,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < (0)) __PYX_ERR(0, 1252, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L10_unpacking_done; @@ -33184,7 +33194,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1251, __pyx_L1_error) + __PYX_ERR(0, 1252, __pyx_L1_error) __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_7); @@ -33192,32 +33202,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_contains_lt1, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1252 + /* "constraint/constraints.py":1253 * 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_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1253, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":1253 + /* "constraint/constraints.py":1254 * 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, 1253, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1252 + /* "constraint/constraints.py":1253 * 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: # <<<<<<<<<<<<<< @@ -33227,7 +33237,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call goto __pyx_L11; } - /* "constraint/constraints.py":1255 + /* "constraint/constraints.py":1256 * prod *= assignments[variable] * else: * missing = True # <<<<<<<<<<<<<< @@ -33237,26 +33247,26 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call /*else*/ { __pyx_v_missing = 1; - /* "constraint/constraints.py":1256 + /* "constraint/constraints.py":1257 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< * missing_lt1.append(variable) * if isinstance(prod, float): */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_contains_lt1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1257, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":1257 + /* "constraint/constraints.py":1258 * missing = True * if contains_lt1: * missing_lt1.append(variable) # <<<<<<<<<<<<<< * if isinstance(prod, float): * prod = round(prod, 10) */ - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_missing_lt1, __pyx_v_variable); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1257, __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, 1258, __pyx_L1_error) - /* "constraint/constraints.py":1256 + /* "constraint/constraints.py":1257 * else: * missing = True * if contains_lt1: # <<<<<<<<<<<<<< @@ -33267,7 +33277,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } __pyx_L11:; - /* "constraint/constraints.py":1251 + /* "constraint/constraints.py":1252 * 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): # <<<<<<<<<<<<<< @@ -33277,7 +33287,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1258 + /* "constraint/constraints.py":1259 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -33287,7 +33297,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_t_4 = PyFloat_Check(__pyx_v_prod); if (__pyx_t_4) { - /* "constraint/constraints.py":1259 + /* "constraint/constraints.py":1260 * missing_lt1.append(variable) * if isinstance(prod, float): * prod = round(prod, 10) # <<<<<<<<<<<<<< @@ -33300,13 +33310,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_prod, __pyx_mstate_global->__pyx_int_10}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_round, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1258 + /* "constraint/constraints.py":1259 * if contains_lt1: * missing_lt1.append(variable) * if isinstance(prod, float): # <<<<<<<<<<<<<< @@ -33315,7 +33325,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1260 + /* "constraint/constraints.py":1261 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: # <<<<<<<<<<<<<< @@ -33327,7 +33337,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } else { goto __pyx_L17_next_and; } - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1261, __pyx_L1_error) __pyx_t_13 = (__pyx_t_3 == 0); if (__pyx_t_13) { } else { @@ -33335,14 +33345,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call goto __pyx_L16_bool_binop_done; } __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, 1260, __pyx_L1_error) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1260, __pyx_L1_error) + __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, 1261, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1261, __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":1261 + /* "constraint/constraints.py":1262 * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False # <<<<<<<<<<<<<< @@ -33354,7 +33364,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1260 + /* "constraint/constraints.py":1261 * if isinstance(prod, float): * prod = round(prod, 10) * if (not missing or len(missing_lt1) == 0) and prod > maxprod: # <<<<<<<<<<<<<< @@ -33363,17 +33373,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1262 + /* "constraint/constraints.py":1263 * 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_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1263, __pyx_L1_error) if (__pyx_t_4) { - /* "constraint/constraints.py":1263 + /* "constraint/constraints.py":1264 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -33385,9 +33395,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_t_3 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __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, 1263, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_5)) { @@ -33395,7 +33405,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call { 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, 1263, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33405,7 +33415,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call { 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, 1263, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -33416,13 +33426,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1264, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_5(__pyx_t_6); 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, 1263, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1264, __pyx_L1_error) PyErr_Clear(); } break; @@ -33432,60 +33442,60 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1264 + /* "constraint/constraints.py":1265 * 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_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyDict_ContainsTF(__pyx_v_variable, __pyx_v_assignments, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1265, __pyx_L1_error) if (__pyx_t_13) { } else { __pyx_t_4 = __pyx_t_13; goto __pyx_L23_bool_binop_done; } - __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_v_missing_lt1, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1265, __pyx_L1_error) if (!__pyx_t_13) { } else { __pyx_t_4 = __pyx_t_13; goto __pyx_L23_bool_binop_done; } - __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_v_missing_lt1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1265, __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":1265 + /* "constraint/constraints.py":1266 * 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_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1266 + /* "constraint/constraints.py":1267 * 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_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_domain, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1267, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; for (;;) { @@ -33494,7 +33504,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_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, 1266, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1267, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -33504,7 +33514,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_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, 1266, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1267, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -33515,13 +33525,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1266, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_14(__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, 1266, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1267, __pyx_L1_error) PyErr_Clear(); } break; @@ -33531,22 +33541,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":1267 + /* "constraint/constraints.py":1268 * domain = domains[variable] * for value in domain[:]: * if prod * value > maxprod: # <<<<<<<<<<<<<< * domain.hideValue(value) * if not domain: */ - __pyx_t_8 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_v_prod, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_8, __pyx_v_maxprod, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "constraint/constraints.py":1268 + /* "constraint/constraints.py":1269 * for value in domain[:]: * if prod * value > maxprod: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -33560,12 +33570,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_value}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1268, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1267 + /* "constraint/constraints.py":1268 * domain = domains[variable] * for value in domain[:]: * if prod * value > maxprod: # <<<<<<<<<<<<<< @@ -33574,7 +33584,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1266 + /* "constraint/constraints.py":1267 * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -33584,18 +33594,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1269 + /* "constraint/constraints.py":1270 * if prod * value > maxprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< * return False * return True */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1269, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1270, __pyx_L1_error) __pyx_t_13 = (!__pyx_t_4); if (__pyx_t_13) { - /* "constraint/constraints.py":1270 + /* "constraint/constraints.py":1271 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -33608,7 +33618,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1269 + /* "constraint/constraints.py":1270 * if prod * value > maxprod: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -33617,7 +33627,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1264 + /* "constraint/constraints.py":1265 * if forwardcheck: * for variable in variables: * if variable not in assignments and (variable not in missing_lt1 or len(missing_lt1) == 1): # <<<<<<<<<<<<<< @@ -33626,7 +33636,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1263 + /* "constraint/constraints.py":1264 * return False * if forwardcheck: * for variable in variables: # <<<<<<<<<<<<<< @@ -33636,7 +33646,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1262 + /* "constraint/constraints.py":1263 * if (not missing or len(missing_lt1) == 0) and prod > maxprod: * return False * if forwardcheck: # <<<<<<<<<<<<<< @@ -33645,7 +33655,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call */ } - /* "constraint/constraints.py":1271 + /* "constraint/constraints.py":1272 * if not domain: * return False * return True # <<<<<<<<<<<<<< @@ -33657,7 +33667,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1242 + /* "constraint/constraints.py":1243 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -33688,7 +33698,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_17MaxProdConstraint_4__call return __pyx_r; } -/* "constraint/constraints.py":1291 +/* "constraint/constraints.py":1292 * """ # noqa: E501 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -33737,38 +33747,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, 1291, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1292, __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, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1292, __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, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1292, __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, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1292, __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, 1291, __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, 1292, __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, 1291, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 1292, __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, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1292, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1292, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1291, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1292, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_target_var = ((PyObject*)values[1]); @@ -33776,7 +33786,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, 1291, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1292, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -33787,7 +33797,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, 1291, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target_var), (&PyUnicode_Type), 0, "target_var", 2))) __PYX_ERR(0, 1292, __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 */ @@ -33815,25 +33825,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1292 + /* "constraint/constraints.py":1293 * * 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, 1292, __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, 1293, __pyx_L1_error) - /* "constraint/constraints.py":1293 + /* "constraint/constraints.py":1294 * 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, 1293, __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, 1294, __pyx_L1_error) - /* "constraint/constraints.py":1291 + /* "constraint/constraints.py":1292 * """ # noqa: E501 * * def __init__(self, target_var: str, product_vars: Sequence[str]): # noqa: D107 # <<<<<<<<<<<<<< @@ -33853,7 +33863,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1295 +/* "constraint/constraints.py":1296 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -33902,41 +33912,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, 1295, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1296, __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, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1296, __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, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1296, __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, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1296, __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, 1295, __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, 1296, __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, 1295, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, i); __PYX_ERR(0, 1296, __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, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1296, __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, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1296, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1296, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -33948,7 +33958,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, 1295, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_get_product_bounds", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1296, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34001,35 +34011,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_product_bounds", 0); - /* "constraint/constraints.py":1296 + /* "constraint/constraints.py":1297 * * 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, 1296, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1297 + /* "constraint/constraints.py":1298 * 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, 1297, __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, 1298, __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, 1297, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1298, __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, 1297, __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, 1298, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -34038,7 +34048,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, 1297, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1298, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -34048,7 +34058,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, 1297, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1298, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -34059,13 +34069,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __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, 1297, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1298, __pyx_L1_error) PyErr_Clear(); } break; @@ -34075,19 +34085,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1298 + /* "constraint/constraints.py":1299 * 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, 1298, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1298, __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, 1299, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1299 + /* "constraint/constraints.py":1300 * for var in self.product_vars: * if var == exclude_var: * continue # <<<<<<<<<<<<<< @@ -34096,7 +34106,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1298 + /* "constraint/constraints.py":1299 * bounds = [] * for var in self.product_vars: * if var == exclude_var: # <<<<<<<<<<<<<< @@ -34105,30 +34115,30 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1300 + /* "constraint/constraints.py":1301 * 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, 1300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_domain_dict, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1301 + /* "constraint/constraints.py":1302 * 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, 1301, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_dom); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1302, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { - /* "constraint/constraints.py":1302 + /* "constraint/constraints.py":1303 * dom = domain_dict[var] * if not dom: * continue # <<<<<<<<<<<<<< @@ -34137,7 +34147,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ goto __pyx_L3_continue; - /* "constraint/constraints.py":1301 + /* "constraint/constraints.py":1302 * continue * dom = domain_dict[var] * if not dom: # <<<<<<<<<<<<<< @@ -34146,7 +34156,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1303 + /* "constraint/constraints.py":1304 * if not dom: * continue * bounds.append((min(dom), max(dom))) # <<<<<<<<<<<<<< @@ -34159,7 +34169,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_dom}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_9 = NULL; @@ -34168,21 +34178,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_dom}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1303, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 1304, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_bounds, __pyx_t_9); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1297 + /* "constraint/constraints.py":1298 * def _get_product_bounds(self, domain_dict, exclude_var=None): * bounds = [] * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -34193,7 +34203,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1305 + /* "constraint/constraints.py":1306 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -34202,14 +34212,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_bounds); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1305, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1306, __pyx_L1_error) __pyx_t_6 = (__pyx_temp != 0); } __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { - /* "constraint/constraints.py":1306 + /* "constraint/constraints.py":1307 * * if not bounds: * return 1, 1 # <<<<<<<<<<<<<< @@ -34221,7 +34231,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; - /* "constraint/constraints.py":1305 + /* "constraint/constraints.py":1306 * bounds.append((min(dom), max(dom))) * * if not bounds: # <<<<<<<<<<<<<< @@ -34230,7 +34240,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1309 + /* "constraint/constraints.py":1310 * * # Try all corner combinations * candidates = [p for p in product(*[(lo, hi) for lo, hi in bounds])] # <<<<<<<<<<<<<< @@ -34238,12 +34248,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, 1309, __pyx_L11_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1309, __pyx_L11_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1310, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); { /* enter inner scope */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1309, __pyx_L16_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -34251,13 +34261,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, 1309, __pyx_L16_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L16_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1309, __pyx_L16_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; @@ -34265,7 +34275,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, 1309, __pyx_L16_error) + __PYX_ERR(0, 1310, __pyx_L16_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -34275,22 +34285,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1309, __pyx_L16_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1309, __pyx_L16_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1310, __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, 1309, __pyx_L16_error) + __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1309, __pyx_L16_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; - __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1309, __pyx_L16_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); @@ -34298,7 +34308,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, 1309, __pyx_L16_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1310, __pyx_L16_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L20_unpacking_done; @@ -34306,22 +34316,22 @@ 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, 1309, __pyx_L16_error) + __PYX_ERR(0, 1310, __pyx_L16_error) __pyx_L20_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_lo, __pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1309, __pyx_L16_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_9genexpr44__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr44__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr44__pyx_v_lo) != (0)) __PYX_ERR(0, 1309, __pyx_L16_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_9genexpr44__pyx_v_lo) != (0)) __PYX_ERR(0, 1310, __pyx_L16_error); __Pyx_INCREF(__pyx_9genexpr44__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr44__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr44__pyx_v_hi) != (0)) __PYX_ERR(0, 1309, __pyx_L16_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1309, __pyx_L16_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_9genexpr44__pyx_v_hi) != (0)) __PYX_ERR(0, 1310, __pyx_L16_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1310, __pyx_L16_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34334,10 +34344,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L11_error; __pyx_L22_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L11_error) + __pyx_t_1 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1309, __pyx_L11_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34346,9 +34356,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_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L11_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __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, 1309, __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, 1310, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -34357,7 +34367,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, 1309, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -34367,7 +34377,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, 1309, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1310, __pyx_L11_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } @@ -34378,13 +34388,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_3; } - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1309, __pyx_L11_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L11_error) } else { __pyx_t_7 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1309, __pyx_L11_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1310, __pyx_L11_error) PyErr_Clear(); } break; @@ -34393,7 +34403,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_p, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr43__pyx_v_p))) __PYX_ERR(0, 1309, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr43__pyx_v_p))) __PYX_ERR(0, 1310, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_p); __pyx_9genexpr43__pyx_v_p = 0; @@ -34406,7 +34416,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_v_candidates = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1310 + /* "constraint/constraints.py":1311 * # 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] # <<<<<<<<<<<<<< @@ -34414,7 +34424,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, 1310, __pyx_L27_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; @@ -34422,13 +34432,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, 1310, __pyx_L27_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1311, __pyx_L27_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L27_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1311, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_9genexpr45__pyx_v_p, __pyx_t_7); __pyx_t_7 = 0; @@ -34439,10 +34449,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_9genexpr45__pyx_v_p}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L27_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1311, __pyx_L27_error) __Pyx_GOTREF(__pyx_t_7); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1310, __pyx_L27_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 1311, __pyx_L27_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34456,7 +34466,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_v_products = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1311 + /* "constraint/constraints.py":1312 * 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) # <<<<<<<<<<<<<< @@ -34470,7 +34480,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_products}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = NULL; @@ -34479,22 +34489,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_products}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1311, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1311, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1312, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1311, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1312, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1295 + /* "constraint/constraints.py":1296 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< @@ -34529,7 +34539,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1313 +/* "constraint/constraints.py":1314 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -34577,39 +34587,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, 1313, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1314, __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, 1313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1314, __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, 1313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1314, __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, 1313, __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, 1314, __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, 1313, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, i); __PYX_ERR(0, 1314, __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, 1313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1314, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1314, __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, 1313, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_safe_product", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1314, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34644,7 +34654,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_safe_product", 0); - /* "constraint/constraints.py":1314 + /* "constraint/constraints.py":1315 * * def _safe_product(self, values): * prod = 1 # <<<<<<<<<<<<<< @@ -34654,7 +34664,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":1315 + /* "constraint/constraints.py":1316 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -34666,9 +34676,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, 1315, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __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, 1315, __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, 1316, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -34676,7 +34686,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, 1315, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1316, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -34686,7 +34696,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, 1315, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1316, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -34697,13 +34707,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1316, __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, 1315, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1316, __pyx_L1_error) PyErr_Clear(); } break; @@ -34713,19 +34723,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1316 + /* "constraint/constraints.py":1317 * 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, 1316, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_prod, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_prod, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1315 + /* "constraint/constraints.py":1316 * def _safe_product(self, values): * prod = 1 * for v in values: # <<<<<<<<<<<<<< @@ -34735,7 +34745,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1317 + /* "constraint/constraints.py":1318 * for v in values: * prod *= v * return prod # <<<<<<<<<<<<<< @@ -34747,7 +34757,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = __pyx_v_prod; goto __pyx_L0; - /* "constraint/constraints.py":1313 + /* "constraint/constraints.py":1314 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< @@ -34769,7 +34779,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1319 +/* "constraint/constraints.py":1320 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -34820,50 +34830,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, 1319, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1320, __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, 1319, __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, 1320, __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, 1319, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1320, __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, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1320, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1320, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1320, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1320, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1320, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -34873,7 +34883,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, 1319, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1320, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34884,9 +34894,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, 1319, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1319, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1319, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1320, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1320, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1320, __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 */ @@ -34934,7 +34944,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1320 + /* "constraint/constraints.py":1321 * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -34942,9 +34952,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, 1320, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1321, __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, 1320, __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, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; @@ -34964,27 +34974,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__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, 1320, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1321 + /* "constraint/constraints.py":1322 * 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, 1321, __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, 1322, __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, 1321, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __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":1322 + /* "constraint/constraints.py":1323 * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * target_dom = domains[self.target_var] * t_max = max(target_dom) # <<<<<<<<<<<<<< @@ -34997,29 +35007,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_target_dom}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __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; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_t_max = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/constraints.py":1324 + /* "constraint/constraints.py":1325 * 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, 1324, __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, 1325, __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, 1324, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __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, 1324, __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, 1325, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -35028,7 +35038,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, 1324, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1325, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -35038,7 +35048,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, 1324, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1325, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -35049,13 +35059,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1324, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __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, 1324, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1325, __pyx_L1_error) PyErr_Clear(); } break; @@ -35065,7 +35075,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1325 + /* "constraint/constraints.py":1326 * * for var in self.product_vars: * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) # <<<<<<<<<<<<<< @@ -35077,13 +35087,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __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, 1325, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __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, 1325, __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, 1326, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__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, 1325, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -35092,7 +35102,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, 1325, __pyx_L1_error) + __PYX_ERR(0, 1326, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -35102,22 +35112,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __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, 1325, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __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, 1325, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1326, __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); @@ -35125,7 +35135,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __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, 1325, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 1326, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -35133,7 +35143,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, 1325, __pyx_L1_error) + __PYX_ERR(0, 1326, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_min_others, __pyx_t_3); @@ -35141,35 +35151,35 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_max_others, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1326 + /* "constraint/constraints.py":1327 * 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, 1326, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_dom, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1327 + /* "constraint/constraints.py":1328 * 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, 1327, __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, 1328, __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, 1327, __pyx_L1_error) + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __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, 1327, __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, 1328, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -35178,7 +35188,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, 1327, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1328, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -35188,7 +35198,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, 1327, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1328, __pyx_L1_error) #endif if (__pyx_t_10 >= __pyx_temp) break; } @@ -35199,13 +35209,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_10; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1327, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __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, 1327, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1328, __pyx_L1_error) PyErr_Clear(); } break; @@ -35215,29 +35225,29 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1328 + /* "constraint/constraints.py":1329 * 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, 1328, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_v_val, __pyx_v_min_others); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __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, 1328, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_val, __pyx_v_max_others); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1329, __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, 1328, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 1329, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1328, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1329, __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":1329 + /* "constraint/constraints.py":1330 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: # <<<<<<<<<<<<<< @@ -35250,16 +35260,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_possible_prods}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __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; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1329, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_max, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_t_max, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { - /* "constraint/constraints.py":1330 + /* "constraint/constraints.py":1331 * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: * dom.remove(val) # <<<<<<<<<<<<<< @@ -35273,12 +35283,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_val}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_3)) __PYX_ERR(0, 1330, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1329 + /* "constraint/constraints.py":1330 * for val in dom[:]: * possible_prods = [val * min_others, val * max_others] * if min(possible_prods) > t_max: # <<<<<<<<<<<<<< @@ -35287,7 +35297,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1327 + /* "constraint/constraints.py":1328 * min_others, max_others = self._get_product_bounds(domains, exclude_var=var) * dom = domains[var] * for val in dom[:]: # <<<<<<<<<<<<<< @@ -35297,7 +35307,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1324 + /* "constraint/constraints.py":1325 * t_max = max(target_dom) * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -35307,7 +35317,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1319 + /* "constraint/constraints.py":1320 * return prod * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -35340,7 +35350,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1332 +/* "constraint/constraints.py":1333 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -35391,53 +35401,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, 1332, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __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, 1332, __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, 1333, __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, 1332, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1333, __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, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1333, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1333, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1333, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1332, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1333, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -35451,7 +35461,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, 1332, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1333, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -35462,8 +35472,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, 1332, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1332, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1333, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1333, __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 */ @@ -35484,7 +35494,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint_8__call___2generator14(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1368 +/* "constraint/constraints.py":1369 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< @@ -35504,7 +35514,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint 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, 1368, __pyx_L1_error) + __PYX_ERR(0, 1369, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -35515,7 +35525,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __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, 1368, __pyx_L1_error) + __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, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -35552,29 +35562,29 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1368, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1368, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1369, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1369, __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, 1368, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1369, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __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, 1368, __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, 1368, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1368, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_target_value)) { __Pyx_RaiseClosureNameError("target_value"); __PYX_ERR(0, 1369, __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, 1369, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (!__pyx_t_4); if (__pyx_t_5) { @@ -35614,7 +35624,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1332 +/* "constraint/constraints.py":1333 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -35676,25 +35686,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_19___call__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1332, __pyx_L1_error) + __PYX_ERR(0, 1333, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/constraints.py":1333 + /* "constraint/constraints.py":1334 * * 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, 1333, __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, 1334, __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, 1333, __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, 1334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/constraints.py":1334 + /* "constraint/constraints.py":1335 * 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 # <<<<<<<<<<<<<< @@ -35706,7 +35716,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1333 + /* "constraint/constraints.py":1334 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * if self.target_var not in assignments: # <<<<<<<<<<<<<< @@ -35715,23 +35725,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1336 + /* "constraint/constraints.py":1337 * 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, 1336, __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, 1337, __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, 1336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __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":1337 + /* "constraint/constraints.py":1338 * * target_value = assignments[self.target_var] * assigned_prod = 1 # <<<<<<<<<<<<<< @@ -35741,35 +35751,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":1338 + /* "constraint/constraints.py":1339 * 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, 1338, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_unassigned = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1340 + /* "constraint/constraints.py":1341 * 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, 1340, __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, 1341, __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, 1340, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __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, 1340, __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, 1341, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -35778,7 +35788,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, 1340, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1341, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -35788,7 +35798,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, 1340, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1341, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -35799,13 +35809,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1341, __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, 1340, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1341, __pyx_L1_error) PyErr_Clear(); } break; @@ -35815,32 +35825,32 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/constraints.py":1341 + /* "constraint/constraints.py":1342 * * 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, 1341, __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, 1342, __pyx_L1_error) if (__pyx_t_2) { - /* "constraint/constraints.py":1342 + /* "constraint/constraints.py":1343 * 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, 1342, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1343, __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, 1342, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_assigned_prod, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __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":1341 + /* "constraint/constraints.py":1342 * * for var in self.product_vars: * if var in assignments: # <<<<<<<<<<<<<< @@ -35850,7 +35860,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L6; } - /* "constraint/constraints.py":1344 + /* "constraint/constraints.py":1345 * assigned_prod *= assignments[var] * else: * unassigned.append(var) # <<<<<<<<<<<<<< @@ -35858,11 +35868,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, 1344, __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, 1345, __pyx_L1_error) } __pyx_L6:; - /* "constraint/constraints.py":1340 + /* "constraint/constraints.py":1341 * unassigned = [] * * for var in self.product_vars: # <<<<<<<<<<<<<< @@ -35872,7 +35882,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1346 + /* "constraint/constraints.py":1347 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -35881,14 +35891,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_unassigned); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1346, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_t_2 = (__pyx_temp != 0); } __pyx_t_8 = (!__pyx_t_2); if (__pyx_t_8) { - /* "constraint/constraints.py":1347 + /* "constraint/constraints.py":1348 * * if not unassigned: * return assigned_prod <= target_value # <<<<<<<<<<<<<< @@ -35896,12 +35906,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, 1347, __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, 1348, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1346 + /* "constraint/constraints.py":1347 * unassigned.append(var) * * if not unassigned: # <<<<<<<<<<<<<< @@ -35910,7 +35920,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1350 + /* "constraint/constraints.py":1351 * * # Estimate max possible value of full product * domain_bounds = [(min(domains[v]), max(domains[v])) for v in unassigned] # <<<<<<<<<<<<<< @@ -35918,7 +35928,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, 1350, __pyx_L11_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0; @@ -35926,18 +35936,18 @@ 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, 1350, __pyx_L11_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1351, __pyx_L11_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_9genexpr46__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = NULL; - __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1350, __pyx_L11_error) + __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = 1; { @@ -35945,11 +35955,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L11_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_9 = NULL; - __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1350, __pyx_L11_error) + __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr46__pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = 1; { @@ -35957,18 +35967,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1350, __pyx_L11_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_10); } - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1350, __pyx_L11_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1350, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1351, __pyx_L11_error); __Pyx_GIVEREF(__pyx_t_10); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1350, __pyx_L11_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 1351, __pyx_L11_error); __pyx_t_3 = 0; __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1350, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1351, __pyx_L11_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -35982,7 +35992,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_v_domain_bounds = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1351 + /* "constraint/constraints.py":1352 * # 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])] # <<<<<<<<<<<<<< @@ -35990,12 +36000,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, 1351, __pyx_L18_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __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, 1351, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1352, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ - __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L23_error) + __pyx_t_12 = PyList_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = __pyx_v_domain_bounds; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -36003,13 +36013,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, 1351, __pyx_L23_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1352, __pyx_L23_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L23_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __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; @@ -36017,7 +36027,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, 1351, __pyx_L23_error) + __PYX_ERR(0, 1352, __pyx_L23_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -36027,22 +36037,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_13); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1351, __pyx_L23_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_13 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1351, __pyx_L23_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_XGOTREF(__pyx_t_13); } #else - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1351, __pyx_L23_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1351, __pyx_L23_error) + __pyx_t_13 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_13); #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, 1351, __pyx_L23_error) + __pyx_t_14 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1352, __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); @@ -36050,7 +36060,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_9); 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, 1351, __pyx_L23_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 1352, __pyx_L23_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L27_unpacking_done; @@ -36058,22 +36068,22 @@ 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, 1351, __pyx_L23_error) + __PYX_ERR(0, 1352, __pyx_L23_error) __pyx_L27_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_lo, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_hi, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L23_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_9genexpr48__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr48__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr48__pyx_v_lo) != (0)) __PYX_ERR(0, 1351, __pyx_L23_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_9genexpr48__pyx_v_lo) != (0)) __PYX_ERR(0, 1352, __pyx_L23_error); __Pyx_INCREF(__pyx_9genexpr48__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr48__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr48__pyx_v_hi) != (0)) __PYX_ERR(0, 1351, __pyx_L23_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1351, __pyx_L23_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_9genexpr48__pyx_v_hi) != (0)) __PYX_ERR(0, 1352, __pyx_L23_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_12, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1352, __pyx_L23_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -36086,10 +36096,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L18_error; __pyx_L29_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1351, __pyx_L18_error) + __pyx_t_10 = PySequence_Tuple(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1352, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L18_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -36098,9 +36108,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_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1351, __pyx_L18_error) + __pyx_t_4 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1352, __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, 1351, __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, 1352, __pyx_L18_error) } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; for (;;) { @@ -36109,7 +36119,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, 1351, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1352, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -36119,7 +36129,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, 1351, __pyx_L18_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1352, __pyx_L18_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -36130,13 +36140,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L18_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L18_error) } else { __pyx_t_12 = __pyx_t_5(__pyx_t_10); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1351, __pyx_L18_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1352, __pyx_L18_error) PyErr_Clear(); } break; @@ -36152,10 +36162,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_9genexpr47__pyx_v_p}; __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1351, __pyx_L18_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1351, __pyx_L18_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1352, __pyx_L18_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -36169,7 +36179,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_v_candidates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1352 + /* "constraint/constraints.py":1353 * 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] # <<<<<<<<<<<<<< @@ -36177,7 +36187,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, 1352, __pyx_L34_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __pyx_v_candidates; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; @@ -36185,19 +36195,19 @@ 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, 1352, __pyx_L34_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1353, __pyx_L34_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L34_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1353, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_9genexpr49__pyx_v_c, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr49__pyx_v_c); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1352, __pyx_L34_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_9genexpr49__pyx_v_c); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1353, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_12); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1352, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 1353, __pyx_L34_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -36211,7 +36221,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_v_possible_prods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1353 + /* "constraint/constraints.py":1354 * 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: # <<<<<<<<<<<<<< @@ -36224,16 +36234,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_possible_prods}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_cur_scope->__pyx_v_target_value, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1354 + /* "constraint/constraints.py":1355 * possible_prods = [assigned_prod * c for c in candidates] * if min(possible_prods) > target_value: * return False # <<<<<<<<<<<<<< @@ -36245,7 +36255,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1353 + /* "constraint/constraints.py":1354 * 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: # <<<<<<<<<<<<<< @@ -36254,17 +36264,17 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1356 + /* "constraint/constraints.py":1357 * 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, 1356, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1357, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1357 + /* "constraint/constraints.py":1358 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -36277,18 +36287,18 @@ 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, 1357, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1358, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1358 + /* "constraint/constraints.py":1359 * if forwardcheck: * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] # <<<<<<<<<<<<<< @@ -36296,7 +36306,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, 1358, __pyx_L45_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __pyx_v_unassigned; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; @@ -36304,21 +36314,21 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { 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, 1358, __pyx_L45_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1359, __pyx_L45_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L45_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L45_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr50__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr50__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L45_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1358, __pyx_L45_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_9genexpr50__pyx_v_v, __pyx_v_var, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L45_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1359, __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_9genexpr50__pyx_v_v))) __PYX_ERR(0, 1358, __pyx_L45_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr50__pyx_v_v))) __PYX_ERR(0, 1359, __pyx_L45_error) } } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -36332,7 +36342,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_other_unassigned, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1359 + /* "constraint/constraints.py":1360 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -36341,13 +36351,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_v_other_unassigned); - if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1359, __pyx_L1_error) + if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 1360, __pyx_L1_error) __pyx_t_8 = (__pyx_temp != 0); } if (__pyx_t_8) { - /* "constraint/constraints.py":1360 + /* "constraint/constraints.py":1361 * 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] # <<<<<<<<<<<<<< @@ -36355,7 +36365,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, 1360, __pyx_L54_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __pyx_v_other_unassigned; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; @@ -36363,18 +36373,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { 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, 1360, __pyx_L54_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L54_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr51__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = NULL; - __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr51__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1360, __pyx_L54_error) + __pyx_t_13 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr51__pyx_v_v); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_11 = 1; { @@ -36382,11 +36392,11 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_min, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L54_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_3 = NULL; - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr51__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L54_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_9genexpr51__pyx_v_v); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = 1; { @@ -36394,18 +36404,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_max, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1360, __pyx_L54_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_13); } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L54_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1360, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 1361, __pyx_L54_error); __Pyx_GIVEREF(__pyx_t_13); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1360, __pyx_L54_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_13) != (0)) __PYX_ERR(0, 1361, __pyx_L54_error); __pyx_t_6 = 0; __pyx_t_13 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1360, __pyx_L54_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1361, __pyx_L54_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; @@ -36419,7 +36429,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_bounds, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1361 + /* "constraint/constraints.py":1362 * 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])] # <<<<<<<<<<<<<< @@ -36427,12 +36437,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, 1361, __pyx_L61_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1361, __pyx_L61_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_product); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_12); { /* enter inner scope */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L66_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = __pyx_v_bounds; __Pyx_INCREF(__pyx_t_13); __pyx_t_16 = 0; @@ -36440,13 +36450,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L66_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1362, __pyx_L66_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_13, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L66_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __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; @@ -36454,7 +36464,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, 1361, __pyx_L66_error) + __PYX_ERR(0, 1362, __pyx_L66_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -36464,22 +36474,22 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_INCREF(__pyx_t_14); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L66_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1361, __pyx_L66_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_XGOTREF(__pyx_t_14); } #else - __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L66_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1361, __pyx_L66_error) + __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_14); #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, 1361, __pyx_L66_error) + __pyx_t_17 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1362, __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); @@ -36487,7 +36497,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_14 = __pyx_t_15(__pyx_t_17); if (unlikely(!__pyx_t_14)) goto __pyx_L69_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < (0)) __PYX_ERR(0, 1361, __pyx_L66_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_17), 2) < (0)) __PYX_ERR(0, 1362, __pyx_L66_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L70_unpacking_done; @@ -36495,22 +36505,22 @@ 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, 1361, __pyx_L66_error) + __PYX_ERR(0, 1362, __pyx_L66_error) __pyx_L70_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr53__pyx_v_lo, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr53__pyx_v_hi, __pyx_t_14); __pyx_t_14 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L66_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_9genexpr53__pyx_v_lo); __Pyx_GIVEREF(__pyx_9genexpr53__pyx_v_lo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr53__pyx_v_lo) != (0)) __PYX_ERR(0, 1361, __pyx_L66_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_9genexpr53__pyx_v_lo) != (0)) __PYX_ERR(0, 1362, __pyx_L66_error); __Pyx_INCREF(__pyx_9genexpr53__pyx_v_hi); __Pyx_GIVEREF(__pyx_9genexpr53__pyx_v_hi); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr53__pyx_v_hi) != (0)) __PYX_ERR(0, 1361, __pyx_L66_error); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1361, __pyx_L66_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_9genexpr53__pyx_v_hi) != (0)) __PYX_ERR(0, 1362, __pyx_L66_error); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1362, __pyx_L66_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -36523,10 +36533,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L61_error; __pyx_L72_exit_scope:; } /* exit inner scope */ - __pyx_t_13 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1361, __pyx_L61_error) + __pyx_t_13 = PySequence_Tuple(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L61_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -36535,9 +36545,9 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1361, __pyx_L61_error) + __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L61_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L61_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -36546,7 +36556,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1362, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -36556,7 +36566,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1361, __pyx_L61_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1362, __pyx_L61_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -36567,13 +36577,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L61_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1362, __pyx_L61_error) } else { __pyx_t_9 = __pyx_t_5(__pyx_t_13); 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, 1361, __pyx_L61_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1362, __pyx_L61_error) PyErr_Clear(); } break; @@ -36589,10 +36599,10 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_9genexpr52__pyx_v_p}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_safe_product, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1361, __pyx_L61_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_GOTREF(__pyx_t_9); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1361, __pyx_L61_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1362, __pyx_L61_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -36606,7 +36616,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1359 + /* "constraint/constraints.py":1360 * for var in unassigned: * other_unassigned = [v for v in unassigned if v != var] * if other_unassigned: # <<<<<<<<<<<<<< @@ -36616,7 +36626,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint goto __pyx_L51; } - /* "constraint/constraints.py":1363 + /* "constraint/constraints.py":1364 * other_products = [self._safe_product(p) for p in product(*[(lo, hi) for lo, hi in bounds])] * else: * other_products = [1] # <<<<<<<<<<<<<< @@ -36624,45 +36634,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, 1363, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __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, 1363, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 1364, __pyx_L1_error); __Pyx_XDECREF_SET(__pyx_v_other_products, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L51:; - /* "constraint/constraints.py":1365 + /* "constraint/constraints.py":1366 * 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, 1365, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1366 + /* "constraint/constraints.py":1367 * * 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, 1366, __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, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_13 = __pyx_t_1; __Pyx_INCREF(__pyx_t_13); __pyx_t_16 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1367, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -36671,7 +36681,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1367, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -36681,7 +36691,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1367, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } @@ -36692,13 +36702,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint #endif ++__pyx_t_16; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_5(__pyx_t_13); 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, 1366, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1367, __pyx_L1_error) PyErr_Clear(); } break; @@ -36708,7 +36718,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1367 + /* "constraint/constraints.py":1368 * domain = domains[var] * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] # <<<<<<<<<<<<<< @@ -36716,7 +36726,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, 1367, __pyx_L79_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __pyx_v_other_products; __Pyx_INCREF(__pyx_t_9); __pyx_t_18 = 0; @@ -36724,22 +36734,22 @@ 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, 1367, __pyx_L79_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1368, __pyx_L79_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_12 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_18; - if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1367, __pyx_L79_error) + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1368, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_9genexpr54__pyx_v_o, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1367, __pyx_L79_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_v_assigned_prod, __pyx_v_val); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1368, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = PyNumber_Multiply(__pyx_t_12, __pyx_9genexpr54__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1367, __pyx_L79_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_t_12, __pyx_9genexpr54__pyx_v_o); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1367, __pyx_L79_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1368, __pyx_L79_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -36753,23 +36763,23 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_XDECREF_SET(__pyx_v_prods, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/constraints.py":1368 + /* "constraint/constraints.py":1369 * 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, 1368, __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, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_9 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __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, 1368, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_8) { - /* "constraint/constraints.py":1369 + /* "constraint/constraints.py":1370 * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): * domain.hideValue(val) # <<<<<<<<<<<<<< @@ -36783,12 +36793,12 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_val}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__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_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1369, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "constraint/constraints.py":1368 + /* "constraint/constraints.py":1369 * for val in domain[:]: * prods = [assigned_prod * val * o for o in other_products] * if all(p > target_value for p in prods): # <<<<<<<<<<<<<< @@ -36797,7 +36807,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1366 + /* "constraint/constraints.py":1367 * * domain = domains[var] * for val in domain[:]: # <<<<<<<<<<<<<< @@ -36807,18 +36817,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "constraint/constraints.py":1370 + /* "constraint/constraints.py":1371 * 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, 1370, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_8); if (__pyx_t_2) { - /* "constraint/constraints.py":1371 + /* "constraint/constraints.py":1372 * domain.hideValue(val) * if not domain: * return False # <<<<<<<<<<<<<< @@ -36831,7 +36841,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1370 + /* "constraint/constraints.py":1371 * if all(p > target_value for p in prods): * domain.hideValue(val) * if not domain: # <<<<<<<<<<<<<< @@ -36840,7 +36850,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1357 + /* "constraint/constraints.py":1358 * * if forwardcheck: * for var in unassigned: # <<<<<<<<<<<<<< @@ -36850,7 +36860,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "constraint/constraints.py":1356 + /* "constraint/constraints.py":1357 * return False * * if forwardcheck: # <<<<<<<<<<<<<< @@ -36859,7 +36869,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint */ } - /* "constraint/constraints.py":1373 + /* "constraint/constraints.py":1374 * return False * * return True # <<<<<<<<<<<<<< @@ -36871,7 +36881,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1332 + /* "constraint/constraints.py":1333 * dom.remove(val) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -36923,7 +36933,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_25VariableMaxProdConstraint return __pyx_r; } -/* "constraint/constraints.py":1387 +/* "constraint/constraints.py":1388 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -36972,39 +36982,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, 1387, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1388, __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, 1387, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1388, __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, 1387, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1388, __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, 1387, __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, 1388, __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, 1387, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1388, __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, 1387, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1388, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1387, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1388, __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, 1387, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1388, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37033,16 +37043,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint___init__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1393 + /* "constraint/constraints.py":1394 * 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, 1393, __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, 1394, __pyx_L1_error) - /* "constraint/constraints.py":1387 + /* "constraint/constraints.py":1388 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -37062,7 +37072,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint___init__( return __pyx_r; } -/* "constraint/constraints.py":1395 +/* "constraint/constraints.py":1396 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -37113,53 +37123,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, 1395, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1396, __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, 1395, __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, 1396, __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, 1395, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1396, __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, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1396, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1396, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1396, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1396, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -37173,7 +37183,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, 1395, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1396, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37205,7 +37215,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1397 + /* "constraint/constraints.py":1398 * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 * # preProcess() will remove it. * raise RuntimeError("Can't happen") # <<<<<<<<<<<<<< @@ -37218,14 +37228,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Can_t_happen}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __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, 1397, __pyx_L1_error) + __PYX_ERR(0, 1398, __pyx_L1_error) - /* "constraint/constraints.py":1395 + /* "constraint/constraints.py":1396 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -37244,7 +37254,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_2__call__ return __pyx_r; } -/* "constraint/constraints.py":1399 +/* "constraint/constraints.py":1400 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -37295,50 +37305,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, 1399, __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 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1400, __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, 1399, __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, 1399, __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, 1399, __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, 1399, __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, "preProcess", 0) < (0)) __PYX_ERR(0, 1399, __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, 1400, __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, 1399, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1400, __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, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1400, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1400, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1400, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1400, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1400, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -37348,7 +37358,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, 1399, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1400, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37359,9 +37369,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, 1399, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1399, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1400, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1400, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1400, __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 */ @@ -37404,19 +37414,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1400 + /* "constraint/constraints.py":1401 * * 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, 1400, __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, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1401 + /* "constraint/constraints.py":1402 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -37428,9 +37438,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, 1401, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __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, 1401, __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, 1402, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -37438,7 +37448,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, 1401, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1402, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37448,7 +37458,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, 1401, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1402, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -37459,13 +37469,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1402, __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, 1401, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1402, __pyx_L1_error) PyErr_Clear(); } break; @@ -37475,35 +37485,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":1402 + /* "constraint/constraints.py":1403 * 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, 1402, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1403 + /* "constraint/constraints.py":1404 * 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, 1403, __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, 1404, __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, 1403, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1404, __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, 1403, __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, 1404, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -37512,7 +37522,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, 1403, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1404, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -37522,7 +37532,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, 1403, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1404, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -37533,13 +37543,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __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, 1403, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1404, __pyx_L1_error) PyErr_Clear(); } break; @@ -37549,17 +37559,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":1404 + /* "constraint/constraints.py":1405 * 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, 1404, __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, 1405, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1405 + /* "constraint/constraints.py":1406 * for value in domain[:]: * if value not in set: * domain.remove(value) # <<<<<<<<<<<<<< @@ -37573,12 +37583,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((PyObject*)__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, 1405, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1404 + /* "constraint/constraints.py":1405 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< @@ -37587,7 +37597,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce */ } - /* "constraint/constraints.py":1403 + /* "constraint/constraints.py":1404 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -37597,25 +37607,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1406 + /* "constraint/constraints.py":1407 * 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, 1406, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1407, __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, 1406, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1407, __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, 1406, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1407, __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, 1406, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1407, __pyx_L1_error); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; @@ -37623,12 +37633,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, 1406, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1401 + /* "constraint/constraints.py":1402 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -37638,27 +37648,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1407 + /* "constraint/constraints.py":1408 * 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, 1407, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __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, 1407, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1408, __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, 1407, __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, 1407, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1408, __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, 1408, __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":1399 + /* "constraint/constraints.py":1400 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -37687,7 +37697,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_15InSetConstraint_4preProce return __pyx_r; } -/* "constraint/constraints.py":1421 +/* "constraint/constraints.py":1422 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -37736,39 +37746,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, 1421, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1422, __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, 1421, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1422, __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, 1421, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1422, __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, 1421, __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, 1422, __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, 1421, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 1422, __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, 1421, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1422, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1421, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1422, __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, 1421, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1422, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37797,16 +37807,16 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint___init int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1427 + /* "constraint/constraints.py":1428 * 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, 1427, __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, 1428, __pyx_L1_error) - /* "constraint/constraints.py":1421 + /* "constraint/constraints.py":1422 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< @@ -37826,7 +37836,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint___init return __pyx_r; } -/* "constraint/constraints.py":1429 +/* "constraint/constraints.py":1430 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -37877,53 +37887,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, 1429, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1430, __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, 1429, __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, 1430, __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, 1429, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1430, __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, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1430, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1430, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1430, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1429, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1430, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -37937,7 +37947,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, 1429, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1430, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37969,7 +37979,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1431 + /* "constraint/constraints.py":1432 * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 * # preProcess() will remove it. * raise RuntimeError("Can't happen") # <<<<<<<<<<<<<< @@ -37982,14 +37992,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Can_t_happen}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __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, 1431, __pyx_L1_error) + __PYX_ERR(0, 1432, __pyx_L1_error) - /* "constraint/constraints.py":1429 + /* "constraint/constraints.py":1430 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -38008,7 +38018,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_2__cal return __pyx_r; } -/* "constraint/constraints.py":1433 +/* "constraint/constraints.py":1434 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -38059,50 +38069,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, 1433, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1434, __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, 1433, __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, 1434, __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, 1433, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, i); __PYX_ERR(0, 1434, __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, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1434, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1434, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1434, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1434, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1433, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1434, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -38112,7 +38122,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, 1433, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("preProcess", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 1434, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38123,9 +38133,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, 1433, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1433, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1433, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1434, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 1434, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vconstraints), (&PyDict_Type), 0, "vconstraints", 2))) __PYX_ERR(0, 1434, __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 */ @@ -38168,19 +38178,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("preProcess", 0); - /* "constraint/constraints.py":1434 + /* "constraint/constraints.py":1435 * * 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, 1434, __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, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1435 + /* "constraint/constraints.py":1436 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -38192,9 +38202,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, 1435, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __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, 1435, __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, 1436, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -38202,7 +38212,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, 1435, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1436, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38212,7 +38222,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, 1435, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1436, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38223,13 +38233,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1436, __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, 1435, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1436, __pyx_L1_error) PyErr_Clear(); } break; @@ -38239,35 +38249,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":1436 + /* "constraint/constraints.py":1437 * 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, 1436, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1437 + /* "constraint/constraints.py":1438 * 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, 1437, __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, 1438, __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, 1437, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1438, __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, 1437, __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, 1438, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -38276,7 +38286,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, 1437, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1438, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -38286,7 +38296,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, 1437, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1438, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } @@ -38297,13 +38307,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr #endif ++__pyx_t_6; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1437, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __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, 1437, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1438, __pyx_L1_error) PyErr_Clear(); } break; @@ -38313,17 +38323,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":1438 + /* "constraint/constraints.py":1439 * 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, 1438, __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, 1439, __pyx_L1_error) if (__pyx_t_8) { - /* "constraint/constraints.py":1439 + /* "constraint/constraints.py":1440 * for value in domain[:]: * if value in set: * domain.remove(value) # <<<<<<<<<<<<<< @@ -38337,12 +38347,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((PyObject*)__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, 1439, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1438 + /* "constraint/constraints.py":1439 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< @@ -38351,7 +38361,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr */ } - /* "constraint/constraints.py":1437 + /* "constraint/constraints.py":1438 * for variable in variables: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -38361,25 +38371,25 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1440 + /* "constraint/constraints.py":1441 * 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, 1440, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1441, __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, 1440, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1441, __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, 1440, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1441, __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, 1440, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1441, __pyx_L1_error); __pyx_t_10 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; @@ -38387,12 +38397,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, 1440, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1435 + /* "constraint/constraints.py":1436 * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 * set = self._set * for variable in variables: # <<<<<<<<<<<<<< @@ -38402,27 +38412,27 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1441 + /* "constraint/constraints.py":1442 * 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, 1441, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __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, 1441, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 1442, __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, 1441, __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, 1441, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 1442, __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, 1442, __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":1433 + /* "constraint/constraints.py":1434 * raise RuntimeError("Can't happen") * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< @@ -38451,7 +38461,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_18NotInSetConstraint_4prePr return __pyx_r; } -/* "constraint/constraints.py":1455 +/* "constraint/constraints.py":1456 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -38502,50 +38512,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, 1455, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1456, __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, 1455, __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, 1456, __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, 1455, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1456, __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, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1456, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1455, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1456, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -38559,7 +38569,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, 1455, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1456, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38588,34 +38598,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint___ini int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1465 + /* "constraint/constraints.py":1466 * 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, 1465, __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, 1466, __pyx_L1_error) - /* "constraint/constraints.py":1466 + /* "constraint/constraints.py":1467 * """ * 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, 1466, __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, 1467, __pyx_L1_error) - /* "constraint/constraints.py":1467 + /* "constraint/constraints.py":1468 * 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, 1467, __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, 1468, __pyx_L1_error) - /* "constraint/constraints.py":1455 + /* "constraint/constraints.py":1456 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -38635,7 +38645,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint___ini return __pyx_r; } -/* "constraint/constraints.py":1469 +/* "constraint/constraints.py":1470 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -38686,53 +38696,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, 1469, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1470, __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, 1469, __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, 1470, __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, 1469, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1470, __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, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1470, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1470, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1470, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1469, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1470, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -38746,7 +38756,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, 1469, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1470, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -38757,8 +38767,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, 1469, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1469, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1470, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1470, __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 */ @@ -38803,19 +38813,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1470 + /* "constraint/constraints.py":1471 * * 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, 1470, __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, 1471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1471 + /* "constraint/constraints.py":1472 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set * missing = 0 # <<<<<<<<<<<<<< @@ -38825,7 +38835,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":1472 + /* "constraint/constraints.py":1473 * set = self._set * missing = 0 * found = 0 # <<<<<<<<<<<<<< @@ -38835,7 +38845,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":1473 + /* "constraint/constraints.py":1474 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -38847,9 +38857,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, 1473, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __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, 1473, __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, 1474, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -38857,7 +38867,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, 1473, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1474, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38867,7 +38877,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, 1473, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1474, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -38878,13 +38888,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1473, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __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, 1473, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1474, __pyx_L1_error) PyErr_Clear(); } break; @@ -38894,36 +38904,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":1474 + /* "constraint/constraints.py":1475 * 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, 1474, __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, 1475, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1475 + /* "constraint/constraints.py":1476 * 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, 1475, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __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, 1475, __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, 1476, __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, 1475, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1476, __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, 1475, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1476, __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":1474 + /* "constraint/constraints.py":1475 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -38933,7 +38943,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L5; } - /* "constraint/constraints.py":1477 + /* "constraint/constraints.py":1478 * found += assignments[variable] in set * else: * missing += 1 # <<<<<<<<<<<<<< @@ -38941,14 +38951,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, 1477, __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, 1478, __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":1473 + /* "constraint/constraints.py":1474 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -38958,53 +38968,53 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1478 + /* "constraint/constraints.py":1479 * 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, 1478, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1479, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1479 + /* "constraint/constraints.py":1480 * 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, 1479, __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, 1480, __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, 1479, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1480 + /* "constraint/constraints.py":1481 * 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, 1480, __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, 1481, __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, 1480, __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, 1481, __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, 1480, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1481, __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, 1480, __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, 1481, __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, 1480, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1481, __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":1481 + /* "constraint/constraints.py":1482 * if self._exact: * if not (found <= self._n <= missing + found): * return False # <<<<<<<<<<<<<< @@ -39016,7 +39026,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1480 + /* "constraint/constraints.py":1481 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< @@ -39025,7 +39035,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1479 + /* "constraint/constraints.py":1480 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< @@ -39035,7 +39045,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L8; } - /* "constraint/constraints.py":1483 + /* "constraint/constraints.py":1484 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -39043,18 +39053,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, 1483, __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, 1484, __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, 1483, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __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, 1483, __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, 1484, __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, 1483, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":1484 + /* "constraint/constraints.py":1485 * else: * if self._n > missing + found: * return False # <<<<<<<<<<<<<< @@ -39066,7 +39076,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1483 + /* "constraint/constraints.py":1484 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -39077,33 +39087,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __pyx_L8:; - /* "constraint/constraints.py":1485 + /* "constraint/constraints.py":1486 * 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, 1485, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1486, __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, 1485, __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, 1486, __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, 1485, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __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, 1485, __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, 1486, __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, 1485, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1486, __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":1488 + /* "constraint/constraints.py":1489 * # All unassigned variables must be assigned to * # values in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -39115,9 +39125,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, 1488, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1489, __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, 1488, __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, 1489, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -39125,7 +39135,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, 1488, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1489, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -39135,7 +39145,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, 1488, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1489, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -39146,13 +39156,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __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, 1488, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1489, __pyx_L1_error) PyErr_Clear(); } break; @@ -39162,45 +39172,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":1489 + /* "constraint/constraints.py":1490 * # 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, 1489, __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, 1490, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1490 + /* "constraint/constraints.py":1491 * 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, 1490, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1491 + /* "constraint/constraints.py":1492 * 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, 1491, __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, 1492, __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, 1491, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1492, __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, 1491, __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, 1492, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -39209,7 +39219,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, 1491, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1492, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -39219,7 +39229,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, 1491, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1492, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -39230,13 +39240,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __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, 1491, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1492, __pyx_L1_error) PyErr_Clear(); } break; @@ -39246,17 +39256,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":1492 + /* "constraint/constraints.py":1493 * 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, 1492, __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, 1493, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1493 + /* "constraint/constraints.py":1494 * for value in domain[:]: * if value not in set: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -39270,12 +39280,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((PyObject*)__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, 1493, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1492 + /* "constraint/constraints.py":1493 * domain = domains[variable] * for value in domain[:]: * if value not in set: # <<<<<<<<<<<<<< @@ -39284,7 +39294,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1491 + /* "constraint/constraints.py":1492 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -39294,18 +39304,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1494 + /* "constraint/constraints.py":1495 * 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, 1494, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1495, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_7); if (__pyx_t_5) { - /* "constraint/constraints.py":1495 + /* "constraint/constraints.py":1496 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -39318,7 +39328,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":1494 + /* "constraint/constraints.py":1495 * if value not in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -39327,7 +39337,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1489 + /* "constraint/constraints.py":1490 * # values in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -39336,7 +39346,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1488 + /* "constraint/constraints.py":1489 * # All unassigned variables must be assigned to * # values in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -39346,7 +39356,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1485 + /* "constraint/constraints.py":1486 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< @@ -39355,7 +39365,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1478 + /* "constraint/constraints.py":1479 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< @@ -39365,7 +39375,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L7; } - /* "constraint/constraints.py":1497 + /* "constraint/constraints.py":1498 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -39373,28 +39383,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, 1497, __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, 1498, __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, 1497, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1498 + /* "constraint/constraints.py":1499 * 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, 1498, __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, 1499, __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, 1498, __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, 1499, __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, 1498, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1499 + /* "constraint/constraints.py":1500 * if self._exact: * if found != self._n: * return False # <<<<<<<<<<<<<< @@ -39406,7 +39416,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1498 + /* "constraint/constraints.py":1499 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< @@ -39415,7 +39425,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca */ } - /* "constraint/constraints.py":1497 + /* "constraint/constraints.py":1498 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -39425,7 +39435,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca goto __pyx_L23; } - /* "constraint/constraints.py":1501 + /* "constraint/constraints.py":1502 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -39433,15 +39443,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, 1501, __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, 1502, __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, 1501, __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, 1502, __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, 1501, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1502 + /* "constraint/constraints.py":1503 * else: * if found < self._n: * return False # <<<<<<<<<<<<<< @@ -39453,7 +39463,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1501 + /* "constraint/constraints.py":1502 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -39466,7 +39476,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca } __pyx_L7:; - /* "constraint/constraints.py":1503 + /* "constraint/constraints.py":1504 * if found < self._n: * return False * return True # <<<<<<<<<<<<<< @@ -39478,7 +39488,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1469 + /* "constraint/constraints.py":1470 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -39506,7 +39516,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_19SomeInSetConstraint_2__ca return __pyx_r; } -/* "constraint/constraints.py":1517 +/* "constraint/constraints.py":1518 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -39557,50 +39567,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, 1517, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1518, __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, 1517, __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, 1518, __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, 1517, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, i); __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1518, __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, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1518, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1517, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1518, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -39614,7 +39624,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, 1517, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1518, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39643,34 +39653,34 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/constraints.py":1527 + /* "constraint/constraints.py":1528 * 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, 1527, __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, 1528, __pyx_L1_error) - /* "constraint/constraints.py":1528 + /* "constraint/constraints.py":1529 * """ * 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, 1528, __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, 1529, __pyx_L1_error) - /* "constraint/constraints.py":1529 + /* "constraint/constraints.py":1530 * 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, 1529, __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, 1530, __pyx_L1_error) - /* "constraint/constraints.py":1517 + /* "constraint/constraints.py":1518 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< @@ -39690,7 +39700,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint___ return __pyx_r; } -/* "constraint/constraints.py":1531 +/* "constraint/constraints.py":1532 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -39741,53 +39751,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, 1531, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1532, __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, 1531, __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, 1532, __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, 1531, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, i); __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1532, __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, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1532, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1532, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1532, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1531, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1532, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -39801,7 +39811,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, 1531, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 1532, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39812,8 +39822,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, 1531, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1531, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 1532, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_assignments), (&PyDict_Type), 0, "assignments", 2))) __PYX_ERR(0, 1532, __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 */ @@ -39858,19 +39868,19 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "constraint/constraints.py":1532 + /* "constraint/constraints.py":1533 * * 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, 1532, __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, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_set = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/constraints.py":1533 + /* "constraint/constraints.py":1534 * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 * set = self._set * missing = 0 # <<<<<<<<<<<<<< @@ -39880,7 +39890,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":1534 + /* "constraint/constraints.py":1535 * set = self._set * missing = 0 * found = 0 # <<<<<<<<<<<<<< @@ -39890,7 +39900,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":1535 + /* "constraint/constraints.py":1536 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -39902,9 +39912,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, 1535, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __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, 1535, __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, 1536, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -39912,7 +39922,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, 1535, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1536, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -39922,7 +39932,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, 1535, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1536, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -39933,13 +39943,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __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, 1535, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1536, __pyx_L1_error) PyErr_Clear(); } break; @@ -39949,36 +39959,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":1536 + /* "constraint/constraints.py":1537 * 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, 1536, __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, 1537, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1537 + /* "constraint/constraints.py":1538 * 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, 1537, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_assignments, __pyx_v_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1538, __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, 1537, __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, 1538, __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, 1537, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1538, __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, 1537, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_found, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1538, __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":1536 + /* "constraint/constraints.py":1537 * found = 0 * for variable in variables: * if variable in assignments: # <<<<<<<<<<<<<< @@ -39988,7 +39998,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L5; } - /* "constraint/constraints.py":1539 + /* "constraint/constraints.py":1540 * found += assignments[variable] not in set * else: * missing += 1 # <<<<<<<<<<<<<< @@ -39996,14 +40006,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, 1539, __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, 1540, __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":1535 + /* "constraint/constraints.py":1536 * missing = 0 * found = 0 * for variable in variables: # <<<<<<<<<<<<<< @@ -40013,53 +40023,53 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1540 + /* "constraint/constraints.py":1541 * 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, 1540, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_missing); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1541, __pyx_L1_error) if (__pyx_t_5) { - /* "constraint/constraints.py":1541 + /* "constraint/constraints.py":1542 * 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, 1541, __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, 1542, __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, 1541, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1542 + /* "constraint/constraints.py":1543 * 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, 1542, __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, 1543, __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, 1542, __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, 1543, __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, 1542, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1543, __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, 1542, __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, 1543, __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, 1542, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1543, __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":1543 + /* "constraint/constraints.py":1544 * if self._exact: * if not (found <= self._n <= missing + found): * return False # <<<<<<<<<<<<<< @@ -40071,7 +40081,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1542 + /* "constraint/constraints.py":1543 * if missing: * if self._exact: * if not (found <= self._n <= missing + found): # <<<<<<<<<<<<<< @@ -40080,7 +40090,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1541 + /* "constraint/constraints.py":1542 * missing += 1 * if missing: * if self._exact: # <<<<<<<<<<<<<< @@ -40090,7 +40100,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L8; } - /* "constraint/constraints.py":1545 + /* "constraint/constraints.py":1546 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -40098,18 +40108,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, 1545, __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, 1546, __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, 1545, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_missing, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __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, 1545, __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, 1546, __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, 1545, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { - /* "constraint/constraints.py":1546 + /* "constraint/constraints.py":1547 * else: * if self._n > missing + found: * return False # <<<<<<<<<<<<<< @@ -40121,7 +40131,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1545 + /* "constraint/constraints.py":1546 * return False * else: * if self._n > missing + found: # <<<<<<<<<<<<<< @@ -40132,33 +40142,33 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __pyx_L8:; - /* "constraint/constraints.py":1547 + /* "constraint/constraints.py":1548 * 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, 1547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_forwardcheck); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1548, __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, 1547, __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, 1548, __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, 1547, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_found); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __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, 1547, __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, 1548, __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, 1547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1548, __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":1550 + /* "constraint/constraints.py":1551 * # All unassigned variables must be assigned to * # values not in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -40170,9 +40180,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, 1550, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __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, 1550, __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, 1551, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -40180,7 +40190,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, 1550, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1551, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -40190,7 +40200,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, 1550, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1551, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -40201,13 +40211,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1551, __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, 1550, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1551, __pyx_L1_error) PyErr_Clear(); } break; @@ -40217,45 +40227,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":1551 + /* "constraint/constraints.py":1552 * # 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, 1551, __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, 1552, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1552 + /* "constraint/constraints.py":1553 * 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, 1552, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_domains, __pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1553 + /* "constraint/constraints.py":1554 * 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, 1553, __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, 1554, __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, 1553, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1554, __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, 1553, __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, 1554, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -40264,7 +40274,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, 1553, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1554, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -40274,7 +40284,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, 1553, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1554, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } @@ -40285,13 +40295,13 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ #endif ++__pyx_t_8; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __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, 1553, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1554, __pyx_L1_error) PyErr_Clear(); } break; @@ -40301,17 +40311,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":1554 + /* "constraint/constraints.py":1555 * 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, 1554, __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, 1555, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/constraints.py":1555 + /* "constraint/constraints.py":1556 * for value in domain[:]: * if value in set: * domain.hideValue(value) # <<<<<<<<<<<<<< @@ -40325,12 +40335,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((PyObject*)__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, 1555, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/constraints.py":1554 + /* "constraint/constraints.py":1555 * domain = domains[variable] * for value in domain[:]: * if value in set: # <<<<<<<<<<<<<< @@ -40339,7 +40349,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1553 + /* "constraint/constraints.py":1554 * if variable not in assignments: * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< @@ -40349,18 +40359,18 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1556 + /* "constraint/constraints.py":1557 * 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, 1556, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1557, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_7); if (__pyx_t_5) { - /* "constraint/constraints.py":1557 + /* "constraint/constraints.py":1558 * domain.hideValue(value) * if not domain: * return False # <<<<<<<<<<<<<< @@ -40373,7 +40383,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1556 + /* "constraint/constraints.py":1557 * if value in set: * domain.hideValue(value) * if not domain: # <<<<<<<<<<<<<< @@ -40382,7 +40392,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1551 + /* "constraint/constraints.py":1552 * # values not in the set. * for variable in variables: * if variable not in assignments: # <<<<<<<<<<<<<< @@ -40391,7 +40401,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1550 + /* "constraint/constraints.py":1551 * # All unassigned variables must be assigned to * # values not in the set. * for variable in variables: # <<<<<<<<<<<<<< @@ -40401,7 +40411,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1547 + /* "constraint/constraints.py":1548 * if self._n > missing + found: * return False * if forwardcheck and self._n - found == missing: # <<<<<<<<<<<<<< @@ -40410,7 +40420,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1540 + /* "constraint/constraints.py":1541 * else: * missing += 1 * if missing: # <<<<<<<<<<<<<< @@ -40420,7 +40430,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L7; } - /* "constraint/constraints.py":1559 + /* "constraint/constraints.py":1560 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -40428,28 +40438,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, 1559, __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, 1560, __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, 1559, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1560, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1560 + /* "constraint/constraints.py":1561 * 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, 1560, __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, 1561, __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, 1560, __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, 1561, __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, 1560, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1561 + /* "constraint/constraints.py":1562 * if self._exact: * if found != self._n: * return False # <<<<<<<<<<<<<< @@ -40461,7 +40471,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1560 + /* "constraint/constraints.py":1561 * else: * if self._exact: * if found != self._n: # <<<<<<<<<<<<<< @@ -40470,7 +40480,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ */ } - /* "constraint/constraints.py":1559 + /* "constraint/constraints.py":1560 * return False * else: * if self._exact: # <<<<<<<<<<<<<< @@ -40480,7 +40490,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ goto __pyx_L23; } - /* "constraint/constraints.py":1563 + /* "constraint/constraints.py":1564 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -40488,15 +40498,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, 1563, __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, 1564, __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, 1563, __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, 1564, __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, 1563, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "constraint/constraints.py":1564 + /* "constraint/constraints.py":1565 * else: * if found < self._n: * return False # <<<<<<<<<<<<<< @@ -40508,7 +40518,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_False; goto __pyx_L0; - /* "constraint/constraints.py":1563 + /* "constraint/constraints.py":1564 * return False * else: * if found < self._n: # <<<<<<<<<<<<<< @@ -40521,7 +40531,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ } __pyx_L7:; - /* "constraint/constraints.py":1565 + /* "constraint/constraints.py":1566 * if found < self._n: * return False * return True # <<<<<<<<<<<<<< @@ -40533,7 +40543,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ __pyx_r = Py_True; goto __pyx_L0; - /* "constraint/constraints.py":1531 + /* "constraint/constraints.py":1532 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< @@ -40561,7 +40571,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_22SomeNotInSetConstraint_2_ return __pyx_r; } -/* "constraint/constraints.py":1570 +/* "constraint/constraints.py":1571 * # Utility functions * * def sum_other_vars(variables: Sequence, variable, values: dict): # <<<<<<<<<<<<<< @@ -40611,38 +40621,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_variables,&__pyx_mstate_global->__pyx_n_u_variable,&__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, 1570, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 1571, __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, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1571, __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, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1571, __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, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1571, __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, "sum_other_vars", 0) < (0)) __PYX_ERR(0, 1570, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "sum_other_vars", 0) < (0)) __PYX_ERR(0, 1571, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sum_other_vars", 1, 3, 3, i); __PYX_ERR(0, 1570, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("sum_other_vars", 1, 3, 3, i); __PYX_ERR(0, 1571, __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, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1571, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1571, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1570, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1571, __pyx_L3_error) } __pyx_v_variables = values[0]; __pyx_v_variable = values[1]; @@ -40650,7 +40660,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("sum_other_vars", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1570, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("sum_other_vars", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1571, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -40661,7 +40671,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyDict_Type), 0, "values", 2))) __PYX_ERR(0, 1570, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyDict_Type), 0, "values", 2))) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_11constraints_sum_other_vars(__pyx_self, __pyx_v_variables, __pyx_v_variable, __pyx_v_values); /* function exit code */ @@ -40682,7 +40692,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/constraints.py":1572 +/* "constraint/constraints.py":1573 * def sum_other_vars(variables: Sequence, variable, values: dict): * """Calculate the sum of the given values of all other variables.""" * return sum(values[v] for v in variables if v != variable) # <<<<<<<<<<<<<< @@ -40700,7 +40710,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_14sum_other_vars_genexpr(Py if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_22_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1572, __pyx_L1_error) + __PYX_ERR(0, 1573, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -40711,7 +40721,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_14sum_other_vars_genexpr(Py __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_14sum_other_vars_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_sum_other_vars_locals_genexpr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_11constraints_14sum_other_vars_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_sum_other_vars_locals_genexpr, __pyx_mstate_global->__pyx_n_u_constraint_constraints); if (unlikely(!gen)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -40751,17 +40761,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator __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, 1572, __pyx_L1_error) + __PYX_ERR(0, 1573, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1572, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 1573, __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, 1572, __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, 1573, __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, 1572, __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, 1573, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -40769,7 +40779,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator { 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, 1572, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1573, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -40779,7 +40789,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator { 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, 1572, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1573, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -40790,13 +40800,13 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __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, 1572, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1573, __pyx_L1_error) PyErr_Clear(); } break; @@ -40807,17 +40817,17 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable)) { __Pyx_RaiseClosureNameError("variable"); __PYX_ERR(0, 1572, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1572, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable)) { __Pyx_RaiseClosureNameError("variable"); __PYX_ERR(0, 1573, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_values)) { __Pyx_RaiseClosureNameError("values"); __PYX_ERR(0, 1572, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_values)) { __Pyx_RaiseClosureNameError("values"); __PYX_ERR(0, 1573, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_values == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1572, __pyx_L1_error) + __PYX_ERR(0, 1573, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_values, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_values, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; @@ -40837,7 +40847,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1572, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1573, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -40864,7 +40874,7 @@ static PyObject *__pyx_gb_10constraint_11constraints_14sum_other_vars_2generator return __pyx_r; } -/* "constraint/constraints.py":1570 +/* "constraint/constraints.py":1571 * # Utility functions * * def sum_other_vars(variables: Sequence, variable, values: dict): # <<<<<<<<<<<<<< @@ -40889,7 +40899,7 @@ static PyObject *__pyx_pf_10constraint_11constraints_sum_other_vars(CYTHON_UNUSE if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1570, __pyx_L1_error) + __PYX_ERR(0, 1571, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -40900,14 +40910,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_sum_other_vars(CYTHON_UNUSE __Pyx_INCREF(__pyx_cur_scope->__pyx_v_values); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_values); - /* "constraint/constraints.py":1572 + /* "constraint/constraints.py":1573 * def sum_other_vars(variables: Sequence, variable, values: dict): * """Calculate the sum of the given values of all other variables.""" * return sum(values[v] for v in variables if v != variable) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = NULL; - __pyx_t_3 = __pyx_pf_10constraint_11constraints_14sum_other_vars_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_3 = __pyx_pf_10constraint_11constraints_14sum_other_vars_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; { @@ -40915,14 +40925,14 @@ static PyObject *__pyx_pf_10constraint_11constraints_sum_other_vars(CYTHON_UNUSE __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __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, 1572, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/constraints.py":1570 + /* "constraint/constraints.py":1571 * # Utility functions * * def sum_other_vars(variables: Sequence, variable, values: dict): # <<<<<<<<<<<<<< @@ -45026,15 +45036,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 64, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 65, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults = &__pyx_type_10constraint_11constraints___pyx_defaults; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_defaults); @@ -45045,15 +45055,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__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr)) __PYX_ERR(0, 432, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr)) __PYX_ERR(0, 433, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 433, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct__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__genexpr) < (0)) __PYX_ERR(0, 432, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 433, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct__genexpr); @@ -45064,15 +45074,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_1_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_1_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess)) __PYX_ERR(0, 435, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_1_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_1_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess)) __PYX_ERR(0, 436, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_1_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess = &__pyx_type_10constraint_11constraints___pyx_scope_struct_1_preProcess; #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_1_preProcess) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_1_preProcess); @@ -45083,15 +45093,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_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 449, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 450, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 450, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_2_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_2_genexpr) < (0)) __PYX_ERR(0, 449, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 450, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_2_genexpr); @@ -45102,15 +45112,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_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 450, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 451, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 451, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_3_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_3_genexpr) < (0)) __PYX_ERR(0, 450, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 451, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_3_genexpr); @@ -45121,15 +45131,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_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 614, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 615, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 615, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_4_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_4_genexpr) < (0)) __PYX_ERR(0, 614, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 615, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_4_genexpr); @@ -45140,15 +45150,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_5_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_5_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess)) __PYX_ERR(0, 617, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_5_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess) < (0)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_5_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess)) __PYX_ERR(0, 618, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_5_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess) < (0)) __PYX_ERR(0, 618, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess = &__pyx_type_10constraint_11constraints___pyx_scope_struct_5_preProcess; #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_5_preProcess) < (0)) __PYX_ERR(0, 617, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess) < (0)) __PYX_ERR(0, 618, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_5_preProcess); @@ -45159,15 +45169,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_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 625, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 626, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 626, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_6_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_6_genexpr) < (0)) __PYX_ERR(0, 625, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 626, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_6_genexpr); @@ -45178,15 +45188,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_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 793, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 794, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 794, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_7_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_7_genexpr) < (0)) __PYX_ERR(0, 793, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 794, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_7_genexpr); @@ -45197,15 +45207,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_8_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_8_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess)) __PYX_ERR(0, 796, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_8_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_8_preProcess_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess)) __PYX_ERR(0, 797, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_8_preProcess_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess = &__pyx_type_10constraint_11constraints___pyx_scope_struct_8_preProcess; #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_8_preProcess) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_8_preProcess); @@ -45216,15 +45226,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_9_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_9_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr)) __PYX_ERR(0, 804, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_9_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_9_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr)) __PYX_ERR(0, 805, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_9_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_9_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_9_genexpr) < (0)) __PYX_ERR(0, 804, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 805, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_9_genexpr); @@ -45235,15 +45245,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_10_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr)) __PYX_ERR(0, 869, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr)) __PYX_ERR(0, 870, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_10_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 870, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_10_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_10_genexpr) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 870, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_10_genexpr); @@ -45254,15 +45264,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, 898, __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, 898, __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, 899, __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, 899, __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, 898, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr) < (0)) __PYX_ERR(0, 899, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_11_genexpr); @@ -45273,15 +45283,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_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, 989, __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, 989, __pyx_L1_error) + __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, 990, __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, 990, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_12___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_12___call__) < (0)) __PYX_ERR(0, 989, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__) < (0)) __PYX_ERR(0, 990, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_12___call__); @@ -45292,15 +45302,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_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, 1012, __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, 1012, __pyx_L1_error) + __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, 1013, __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, 1013, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_13_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_13_genexpr) < (0)) __PYX_ERR(0, 1012, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr) < (0)) __PYX_ERR(0, 1013, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_13_genexpr); @@ -45311,15 +45321,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_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, 1013, __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, 1013, __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, 1014, __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, 1014, __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, 1013, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr) < (0)) __PYX_ERR(0, 1014, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_14_genexpr); @@ -45330,15 +45340,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___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_15___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__)) __PYX_ERR(0, 1145, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_15___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__) < (0)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__ = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_15___call___spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__)) __PYX_ERR(0, 1146, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_15___call___spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__) < (0)) __PYX_ERR(0, 1146, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_15___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_15___call__) < (0)) __PYX_ERR(0, 1145, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__) < (0)) __PYX_ERR(0, 1146, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_15___call__); @@ -45349,15 +45359,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_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, 1181, __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, 1181, __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, 1182, __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, 1182, __pyx_L1_error) #else __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_genexpr) < (0)) __PYX_ERR(0, 1181, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr) < (0)) __PYX_ERR(0, 1182, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_16_genexpr); @@ -45368,15 +45378,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_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, 1221, __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, 1221, __pyx_L1_error) + __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, 1222, __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, 1222, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr = &__pyx_type_10constraint_11constraints___pyx_scope_struct_17_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_17_genexpr) < (0)) __PYX_ERR(0, 1221, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr) < (0)) __PYX_ERR(0, 1222, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_17_genexpr); @@ -45387,15 +45397,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_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, 1250, __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, 1250, __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, 1251, __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, 1251, __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, 1250, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr) < (0)) __PYX_ERR(0, 1251, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_18_genexpr); @@ -45406,15 +45416,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_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, 1332, __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, 1332, __pyx_L1_error) + __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, 1333, __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, 1333, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__ = &__pyx_type_10constraint_11constraints___pyx_scope_struct_19___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_19___call__) < (0)) __PYX_ERR(0, 1332, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__) < (0)) __PYX_ERR(0, 1333, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_19___call__); @@ -45425,15 +45435,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_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, 1368, __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, 1368, __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, 1369, __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, 1369, __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, 1368, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr) < (0)) __PYX_ERR(0, 1369, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_20_genexpr); @@ -45444,15 +45454,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_21_sum_other_vars = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars)) __PYX_ERR(0, 1570, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars)) __PYX_ERR(0, 1571, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars_spec, __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars = &__pyx_type_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars; #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_sum_other_vars) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_21_sum_other_vars); @@ -45463,15 +45473,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_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, 1572, __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, 1572, __pyx_L1_error) + __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, 1573, __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, 1573, __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, 1572, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr) < (0)) __PYX_ERR(0, 1573, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_11constraints___pyx_scope_struct_22_genexpr); @@ -45790,19 +45800,19 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); /* "constraint/constraints.py":3 * """Module containing the code for constraint definitions.""" * - * from constraint.domain import Unassigned # <<<<<<<<<<<<<< - * from typing import Callable, Union, Optional - * from collections.abc import Sequence + * from collections.abc import Callable, Sequence # <<<<<<<<<<<<<< + * from itertools import product + * */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Unassigned}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_domain, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Unassigned}; - __pyx_t_3 = 0; { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Sequence}; + for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 3, __pyx_L1_error) @@ -45813,20 +45823,20 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); /* "constraint/constraints.py":4 * + * from collections.abc import Callable, Sequence + * from itertools import product # <<<<<<<<<<<<<< + * * from constraint.domain import Unassigned - * from typing import Callable, Union, Optional # <<<<<<<<<<<<<< - * from collections.abc import Sequence - * from itertools import product */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Union,__pyx_mstate_global->__pyx_n_u_Optional}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Union,__pyx_mstate_global->__pyx_n_u_Optional}; - for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product}; + __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 4, __pyx_L1_error) @@ -45835,45 +45845,21 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":5 - * from constraint.domain import Unassigned - * from typing import Callable, Union, Optional - * from collections.abc import Sequence # <<<<<<<<<<<<<< + /* "constraint/constraints.py":6 * from itertools import product * -*/ - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) - } - __pyx_t_2 = __pyx_t_1; - __Pyx_GOTREF(__pyx_t_2); - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence}; - __pyx_t_3 = 0; { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "constraint/constraints.py":6 - * from typing import Callable, Union, Optional - * from collections.abc import Sequence - * from itertools import product # <<<<<<<<<<<<<< + * from constraint.domain import Unassigned # <<<<<<<<<<<<<< + * * - * class Constraint: */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Unassigned}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_domain, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_product}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Unassigned}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -45883,29 +45869,29 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":8 - * from itertools import product + /* "constraint/constraints.py":9 + * * * class Constraint: # <<<<<<<<<<<<<< * """Abstract base class for constraints.""" * */ - __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_mstate_global->__pyx_n_u_Constraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Abstract_base_class_for_constrai); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_mstate_global->__pyx_n_u_Constraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Abstract_base_class_for_constrai); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "constraint/constraints.py":11 + /* "constraint/constraints.py":12 * """Abstract base class for constraints.""" * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # <<<<<<<<<<<<<< * """Perform the constraint checking. * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __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, 11, __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, 11, __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, 11, __pyx_L1_error) - __pyx_t_5 = __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[16])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 11, __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, 12, __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, 12, __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, 12, __pyx_L1_error) + __pyx_t_5 = __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[16])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -45913,51 +45899,51 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 11, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":36 + /* "constraint/constraints.py":37 * return True * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # <<<<<<<<<<<<<< * """Preprocess variable domains. * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 37, __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, 36, __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, 36, __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, 36, __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, 36, __pyx_L1_error) - __pyx_t_4 = __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[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 36, __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, 37, __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, 37, __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, 37, __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, 37, __pyx_L1_error) + __pyx_t_4 = __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[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":64 + /* "constraint/constraints.py":65 * vconstraints[variable].remove((self, variables)) * * def forwardCheck(self, variables: Sequence, domains: dict, assignments: dict, _unassigned=Unassigned): # <<<<<<<<<<<<<< * """Helper method for generic forward checking. * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __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, 64, __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, 64, __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, 64, __pyx_L1_error) - __pyx_t_5 = __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[18])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 64, __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, 65, __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, 65, __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, 65, __pyx_L1_error) + __pyx_t_5 = __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[18])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 64, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 64, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 65, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_5)->arg0 = __pyx_t_6; __Pyx_GIVEREF(__pyx_t_6); @@ -45965,65 +45951,65 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_10constraint_11constraints_2__defaults__); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_forwardCheck, __pyx_t_5) < (0)) __PYX_ERR(0, 64, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_forwardCheck, __pyx_t_5) < (0)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":8 - * from itertools import product + /* "constraint/constraints.py":9 + * * * class Constraint: # <<<<<<<<<<<<<< * """Abstract base class for constraints.""" * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_t_5) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Constraint, __pyx_t_5) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":105 + /* "constraint/constraints.py":106 * * * class FunctionConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint which wraps a function defining the constraint logic. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __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, 105, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __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, 105, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __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, 105, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __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_FunctionConstraint, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_which_wraps_a_functio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_which_wraps_a_functio); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 106, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":133 + /* "constraint/constraints.py":134 * """ * * def __init__(self, func: Callable, assigned: bool = True): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 133, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assigned, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 133, __pyx_L1_error) - __pyx_t_8 = __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[19])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_Callable) < (0)) __PYX_ERR(0, 134, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_assigned, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_8 = __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[19])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); @@ -46032,36 +46018,36 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 133, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/constraints.py":145 + /* "constraint/constraints.py":146 * self._assigned = assigned * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) - __pyx_t_5 = __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[20])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_5 = __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[20])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 145, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 146, __pyx_L1_error) - /* "constraint/constraints.py":151 + /* "constraint/constraints.py":152 * assignments: dict, * forwardcheck=False, * _unassigned=Unassigned, # <<<<<<<<<<<<<< * ): * # # initial code: 0.94621 seconds, Cythonized: 0.92805 seconds */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_5)->arg0 = __pyx_t_7; __Pyx_GIVEREF(__pyx_t_7); @@ -46069,67 +46055,67 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_10constraint_11constraints_4__defaults__); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":105 + /* "constraint/constraints.py":106 * * * class FunctionConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint which wraps a function defining the constraint logic. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 105, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_FunctionConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 106, __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":198 + /* "constraint/constraints.py":199 * return self._func(*parms) * * class CompilableFunctionConstraint(Constraint): # <<<<<<<<<<<<<< * """Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.""" * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __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, 198, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __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, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __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, 198, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 199, __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_CompilableFunctionConstraint, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Wrapper_function_for_picklable_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Wrapper_function_for_picklable_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __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, 198, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 199, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":201 + /* "constraint/constraints.py":202 * """Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.""" * * def __init__(self, func: str, assigned: bool = True): # noqa: D102, D107 # <<<<<<<<<<<<<< * self._func = func * self._assigned = assigned */ - __pyx_t_4 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_8 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 201, __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, 201, __pyx_L1_error) - __pyx_t_7 = __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[21])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 201, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_func, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 202, __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, 202, __pyx_L1_error) + __pyx_t_7 = __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[21])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -46138,99 +46124,99 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 201, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":205 + /* "constraint/constraints.py":206 * self._assigned = assigned * * def __call__(self, variables, domains, assignments, forwardcheck=False, _unassigned=Unassigned): # noqa: D102 # <<<<<<<<<<<<<< * raise NotImplementedError("CompilableFunctionConstraint can not be called directly") * */ - __pyx_t_7 = __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[22])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_7 = __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[22])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 205, __pyx_L1_error) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_7, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_7)->arg0 = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_7, __pyx_pf_10constraint_11constraints_6__defaults__); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 205, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":198 + /* "constraint/constraints.py":199 * return self._func(*parms) * * class CompilableFunctionConstraint(Constraint): # <<<<<<<<<<<<<< * """Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.""" * */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 198, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":209 + /* "constraint/constraints.py":210 * * * class AllDifferentConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of all given variables are different. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __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, 209, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __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, 209, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __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, 209, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 209, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 210, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":220 + /* "constraint/constraints.py":221 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __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, 220, __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, 220, __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, 220, __pyx_L1_error) - __pyx_t_4 = __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[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __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, 221, __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, 221, __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, 221, __pyx_L1_error) + __pyx_t_4 = __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[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 220, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 221, __pyx_L1_error) - /* "constraint/constraints.py":226 + /* "constraint/constraints.py":227 * assignments: dict, * forwardcheck=False, * _unassigned=Unassigned, # <<<<<<<<<<<<<< * ): * seen = {} */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_4)->arg0 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); @@ -46238,77 +46224,77 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_10constraint_11constraints_8__defaults__); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 220, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":209 + /* "constraint/constraints.py":210 * * * class AllDifferentConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of all given variables are different. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 209, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":247 + /* "constraint/constraints.py":248 * * * class AllEqualConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of all given variables are equal. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __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, 247, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __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, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __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, 247, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 248, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":258 + /* "constraint/constraints.py":259 * """ * * def __call__( # noqa: D102 # <<<<<<<<<<<<<< * self, * variables: Sequence, */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __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, 258, __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, 258, __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, 258, __pyx_L1_error) - __pyx_t_6 = __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[24])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __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, 259, __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, 259, __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, 259, __pyx_L1_error) + __pyx_t_6 = __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[24])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 258, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_6, __pyx_mstate_global->__pyx_ptype_10constraint_11constraints___pyx_defaults)) __PYX_ERR(0, 259, __pyx_L1_error) - /* "constraint/constraints.py":264 + /* "constraint/constraints.py":265 * assignments: dict, * forwardcheck=False, * _unassigned=Unassigned, # <<<<<<<<<<<<<< * ): * singlevalue = _unassigned */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Unassigned); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_6)->arg0 = __pyx_t_8; __Pyx_GIVEREF(__pyx_t_8); @@ -46316,62 +46302,62 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_6, __pyx_pf_10constraint_11constraints_10__defaults__); __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, 258, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < (0)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":247 + /* "constraint/constraints.py":248 * * * class AllEqualConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of all given variables are equal. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 248, __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_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":285 + /* "constraint/constraints.py":286 * * * class ExactSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum exactly to a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __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, 285, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __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_ExactSumConstraint, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_7) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 285, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 286, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":301 + /* "constraint/constraints.py":302 * """ * - * def __init__(self, exactsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, exactsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_exactsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 301, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < (0)) __PYX_ERR(0, 301, __pyx_L1_error) - __pyx_t_5 = __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[25])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_exactsum, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 302, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_5 = __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[25])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -46379,45 +46365,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 301, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":316 + /* "constraint/constraints.py":317 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __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, 316, __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, 316, __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, 316, __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, 316, __pyx_L1_error) - __pyx_t_7 = __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[26])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 316, __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, 317, __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, 317, __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, 317, __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, 317, __pyx_L1_error) + __pyx_t_7 = __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[26])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 316, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_7) < (0)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":339 + /* "constraint/constraints.py":340 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * exactsum = self._exactsum */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) - __pyx_t_5 = __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[27])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = __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[27])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -46425,63 +46411,63 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":285 + /* "constraint/constraints.py":286 * * * class ExactSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum exactly to a given amount. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 285, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 286, __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":398 + /* "constraint/constraints.py":399 * return sum == exactsum * * class VariableExactSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum 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, 398, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __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, 398, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __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, 398, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __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, 398, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __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_VariableExactSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 399, __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, 398, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 399, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":416 + /* "constraint/constraints.py":417 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __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, 416, __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, 416, __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, 416, __pyx_L1_error) - __pyx_t_7 = __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[28])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __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, 417, __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, 417, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_7 = __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[28])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -46489,45 +46475,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":435 + /* "constraint/constraints.py":436 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) - __pyx_t_4 = __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[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) + __pyx_t_4 = __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[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":457 + /* "constraint/constraints.py":458 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __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, 457, __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, 457, __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, 457, __pyx_L1_error) - __pyx_t_7 = __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[30])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 457, __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, 458, __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, 458, __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, 458, __pyx_L1_error) + __pyx_t_7 = __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[30])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -46535,62 +46521,62 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 457, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":398 + /* "constraint/constraints.py":399 * return sum == exactsum * * class VariableExactSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum of variables equals the value of another variable. * */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 398, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":509 + /* "constraint/constraints.py":510 * * * class MinSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum at least to a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __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, 509, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 510, __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, 509, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __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, 509, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 509, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 510, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":525 + /* "constraint/constraints.py":526 * """ * - * def __init__(self, minsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, minsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_minsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 525, __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, 525, __pyx_L1_error) - __pyx_t_4 = __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[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_minsum, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 526, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_t_4 = __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[31])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); @@ -46598,45 +46584,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 525, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":538 + /* "constraint/constraints.py":539 * self._var_max = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __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, 538, __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, 538, __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, 538, __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, 538, __pyx_L1_error) - __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint_preProcess, 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_6)) __PYX_ERR(0, 538, __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, 539, __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, 539, __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, 539, __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, 539, __pyx_L1_error) + __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_3preProcess, 0, __pyx_mstate_global->__pyx_n_u_MinSumConstraint_preProcess, 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_6)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 538, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":554 + /* "constraint/constraints.py":555 * self._var_max = { variable: max(domains[variable]) * multiplier if len(domains[variable]) > 0 else 0 for variable, multiplier in zip(variables, multipliers) } # noqa: E501 * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * minsum = self._minsum */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __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, 554, __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, 554, __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, 554, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_5__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_4)) __PYX_ERR(0, 554, __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, 555, __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, 555, __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, 555, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_16MinSumConstraint_5__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_4)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); @@ -46644,63 +46630,63 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 554, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":509 + /* "constraint/constraints.py":510 * * * class MinSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum at least to a given amount. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 509, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinSumConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":581 + /* "constraint/constraints.py":582 * return sum >= minsum or missing * * class VariableMinSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum of variables sum at least to 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, 581, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __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, 581, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 582, __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, 581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __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, 581, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 582, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":598 + /* "constraint/constraints.py":599 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __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, 598, __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, 598, __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, 598, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 598, __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, 599, __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, 599, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); @@ -46708,45 +46694,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); __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, 598, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":617 + /* "constraint/constraints.py":618 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __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, 617, __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, 617, __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, 617, __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, 617, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 617, __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, 618, __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, 618, __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, 618, __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, 618, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __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, 617, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < (0)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":630 + /* "constraint/constraints.py":631 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 631, __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, 630, __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, 630, __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, 630, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 630, __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, 631, __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, 631, __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, 631, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); @@ -46754,62 +46740,62 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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, 630, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < (0)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":581 + /* "constraint/constraints.py":582 * return sum >= minsum or missing * * class VariableMinSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum of variables sum at least to the value of another variable. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 581, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 582, __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_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":658 + /* "constraint/constraints.py":659 * * * class MaxSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum up to a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __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, 658, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __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_MaxSumConstraint, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_7) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 658, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 659, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":674 + /* "constraint/constraints.py":675 * """ * - * def __init__(self, maxsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, maxsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maxsum, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 674, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < (0)) __PYX_ERR(0, 674, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 674, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_maxsum, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 675, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 675, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -46817,45 +46803,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 674, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":688 + /* "constraint/constraints.py":689 * self._var_is_negative = {} * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * multipliers = self._multipliers if self._multipliers else [1] * len(variables) */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __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, 688, __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, 688, __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, 688, __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, 688, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 688, __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, 689, __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, 689, __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, 689, __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, 689, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 688, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_7) < (0)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":706 + /* "constraint/constraints.py":707 * self._var_is_negative = { variable: self._var_min[variable] < 0 for variable in variables } * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * maxsum = self._maxsum */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 706, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 706, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 706, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 706, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -46863,63 +46849,63 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 706, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":658 + /* "constraint/constraints.py":659 * * * class MaxSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables sum up to a given amount. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 658, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 659, __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":760 + /* "constraint/constraints.py":761 * * * class VariableMaxSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum of variables sum at most to 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, 760, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __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, 760, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __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, 760, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __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, 760, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __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_VariableMaxSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_the_su_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __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, 760, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 761, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":777 + /* "constraint/constraints.py":778 * """ # noqa: E501 * - * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 778, __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, 777, __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, 777, __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, 777, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 777, __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, 778, __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, 778, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_multipliers, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -46927,45 +46913,45 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 777, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":796 + /* "constraint/constraints.py":797 * assert multipliers[-1] == 1, "Last multiplier must be 1, as it is the target variable." * * def preProcess(self, variables: Sequence, domains: dict, constraints: list[tuple], vconstraints: dict): # noqa: D102 # <<<<<<<<<<<<<< * Constraint.preProcess(self, variables, domains, constraints, vconstraints) * */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 796, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 796, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 797, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":809 + /* "constraint/constraints.py":810 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * multipliers = self._multipliers * */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 810, __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, 809, __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, 809, __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, 809, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 809, __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, 810, __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, 810, __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, 810, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -46973,106 +46959,106 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 809, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":760 + /* "constraint/constraints.py":761 * * * class VariableMaxSumConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the sum of variables sum at most to the value of another variable. * */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 760, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 761, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":837 + /* "constraint/constraints.py":838 * * * class ExactProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product of exactly a given amount. * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __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, 837, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __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, 837, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __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, 837, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_kp_u_Constraint_enforcing_that_values_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 837, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 838, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":853 + /* "constraint/constraints.py":854 * """ * - * def __init__(self, exactprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, exactprod: int | float): # <<<<<<<<<<<<<< * """Instantiate an ExactProdConstraint. * */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_exactprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 853, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_exactprod, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 853, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":862 + /* "constraint/constraints.py":863 * 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_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __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, 862, __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, 862, __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, 862, __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, 862, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 862, __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, 863, __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, 863, __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, 863, __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, 863, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 862, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":890 + /* "constraint/constraints.py":891 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * exactprod = self._exactprod * prod = 1 */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __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, 890, __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, 890, __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, 890, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 890, __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, 891, __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, 891, __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, 891, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); @@ -47080,138 +47066,138 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 890, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":837 + /* "constraint/constraints.py":838 * * * class ExactProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product of exactly a given amount. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 837, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":921 + /* "constraint/constraints.py":922 * 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, 921, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __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, 921, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 922, __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, 921, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 922, __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, 921, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 922, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":938 + /* "constraint/constraints.py":939 * """ * * def __init__(self, target_var: str, product_vars: Sequence[str]): # <<<<<<<<<<<<<< * """Instantiate a VariableExactProdConstraint. * */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 939, __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, 938, __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, 938, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 938, __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, 939, __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, 939, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __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, 938, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 939, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":948 + /* "constraint/constraints.py":949 * 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_6 = __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_6)) __PYX_ERR(0, 948, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_6) < (0)) __PYX_ERR(0, 948, __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, 949, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":968 + /* "constraint/constraints.py":969 * 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_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_6)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < (0)) __PYX_ERR(0, 968, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < (0)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":974 + /* "constraint/constraints.py":975 * 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_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 975, __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, 974, __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, 974, __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, 974, __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, 974, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 974, __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, 975, __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, 975, __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, 975, __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, 975, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __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, 974, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < (0)) __PYX_ERR(0, 975, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":989 + /* "constraint/constraints.py":990 * 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_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 990, __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, 989, __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, 989, __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, 989, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 989, __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, 990, __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, 990, __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, 990, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); @@ -47219,106 +47205,106 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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, 989, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < (0)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":921 + /* "constraint/constraints.py":922 * return True * * class VariableExactProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables equals the value of another variable. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 921, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 921, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 922, __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_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1036 + /* "constraint/constraints.py":1037 * * * 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, 1036, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __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, 1036, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1037, __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_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_6)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __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_6)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_7) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 1036, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 1037, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1052 + /* "constraint/constraints.py":1053 * """ # noqa: E501 * - * def __init__(self, minprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, minprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MinProdConstraint. * */ - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_minprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 1052, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_minprod, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 1052, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1060 + /* "constraint/constraints.py":1061 * 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_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __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, 1060, __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, 1060, __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, 1060, __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, 1060, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1060, __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, 1061, __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, 1061, __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, 1061, __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, 1061, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_7) < (0)) __PYX_ERR(0, 1061, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1071 + /* "constraint/constraints.py":1072 * 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_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1071, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1071, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1071, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1072, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1072, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_assignments, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); @@ -47326,138 +47312,138 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 1071, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_5) < (0)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1036 + /* "constraint/constraints.py":1037 * * * class MinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at least a given amount. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 1036, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MinProdConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 1037, __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":1087 + /* "constraint/constraints.py":1088 * * * 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, 1087, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1088, __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, 1087, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1088, __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, 1087, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1088, __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, 1087, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1088, __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_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_5)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __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_5)) __PYX_ERR(0, 1088, __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, 1087, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1088, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1104 + /* "constraint/constraints.py":1105 * """ * * 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, 1104, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1105, __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, 1104, __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, 1104, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1104, __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, 1105, __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, 1105, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 1104, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 1105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1108 + /* "constraint/constraints.py":1109 * self.product_vars = product_vars * * def _get_product_bounds(self, domain_dict, exclude_var=None): # <<<<<<<<<<<<<< * bounds = [] * for var in self.product_vars: */ - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1108, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[2]); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_7) < (0)) __PYX_ERR(0, 1108, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_7) < (0)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1126 + /* "constraint/constraints.py":1127 * return min(products), max(products) * * def _safe_product(self, values): # <<<<<<<<<<<<<< * prod = 1 * for v in values: */ - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1126, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_7) < (0)) __PYX_ERR(0, 1126, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_7) < (0)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1132 + /* "constraint/constraints.py":1133 * 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_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1132, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 1132, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_4) < (0)) __PYX_ERR(0, 1133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1145 + /* "constraint/constraints.py":1146 * 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, 1145, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __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, 1145, __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, 1145, __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, 1145, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1145, __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, 1146, __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, 1146, __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, 1146, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); @@ -47465,106 +47451,106 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __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_7) < (0)) __PYX_ERR(0, 1145, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 1146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1087 + /* "constraint/constraints.py":1088 * * * class VariableMinProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at least the value of another variable. * */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 1087, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 1088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":1189 + /* "constraint/constraints.py":1190 * * * 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, 1189, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __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, 1189, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1190, __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, 1189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __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, 1189, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __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_7)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __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_7)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1189, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1190, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1205 + /* "constraint/constraints.py":1206 * """ * - * def __init__(self, maxprod: Union[int, float]): # <<<<<<<<<<<<<< + * def __init__(self, maxprod: int | float): # <<<<<<<<<<<<<< * """Instantiate a MaxProdConstraint. * */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maxprod, __pyx_mstate_global->__pyx_kp_u_Union_int_float) < (0)) __PYX_ERR(0, 1205, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1205, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_maxprod, __pyx_mstate_global->__pyx_kp_u_int_float) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 1205, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1214 + /* "constraint/constraints.py":1215 * 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_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(4); 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, 1214, __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, 1214, __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, 1214, __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, 1214, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 1214, __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_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 1215, __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, 1215, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_6) < (0)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1242 + /* "constraint/constraints.py":1243 * domain.remove(value) * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * maxprod = self._maxprod * prod = 1 */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1242, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1243, __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, 1242, __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, 1242, __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, 1242, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1242, __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, 1243, __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, 1243, __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, 1243, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); @@ -47572,138 +47558,138 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1242, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1189 + /* "constraint/constraints.py":1190 * * * class MaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables create a product up to at most a given amount. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 1189, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1274 + /* "constraint/constraints.py":1275 * * * 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, 1274, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __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, 1274, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1275, __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, 1274, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 1275, __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, 1274, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1275, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1291 + /* "constraint/constraints.py":1292 * """ # 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_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __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, 1291, __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, 1291, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 1291, __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, 1292, __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, 1292, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __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, 1291, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1295 + /* "constraint/constraints.py":1296 * 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_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_6)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_product_bounds, __pyx_t_6) < (0)) __PYX_ERR(0, 1295, __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, 1296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1313 + /* "constraint/constraints.py":1314 * 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_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_6)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < (0)) __PYX_ERR(0, 1313, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_safe_product, __pyx_t_6) < (0)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1319 + /* "constraint/constraints.py":1320 * 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, 1319, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __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, 1319, __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, 1319, __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, 1319, __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, 1319, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 1319, __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, 1320, __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, 1320, __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, 1320, __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, 1320, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __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, 1319, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < (0)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1332 + /* "constraint/constraints.py":1333 * 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, 1332, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __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, 1332, __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, 1332, __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, 1332, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 1332, __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, 1333, __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, 1333, __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, 1333, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); @@ -47711,269 +47697,269 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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, 1332, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < (0)) __PYX_ERR(0, 1333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1274 + /* "constraint/constraints.py":1275 * * * class VariableMaxProdConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that the product of variables is at most the value of another variable. * */ - __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 1274, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 1275, __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_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1376 + /* "constraint/constraints.py":1377 * * * 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, 1376, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_7 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __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, 1376, __pyx_L1_error) + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1377, __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_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_6)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __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_6)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2 != __pyx_t_7) { - if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 1376, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_7) < 0))) __PYX_ERR(0, 1377, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1387 + /* "constraint/constraints.py":1388 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1387, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 1387, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_7) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1395 + /* "constraint/constraints.py":1396 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * # preProcess() will remove it. * raise RuntimeError("Can't happen") */ - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1395, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1]); - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_7) < (0)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1399 + /* "constraint/constraints.py":1400 * 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_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1399, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) - __pyx_t_5 = __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_5)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_domains, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_vconstraints, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_5) < (0)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1376 + /* "constraint/constraints.py":1377 * * * class InSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are present in the given set. * */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 1376, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_InSetConstraint, __pyx_t_5) < (0)) __PYX_ERR(0, 1377, __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":1410 + /* "constraint/constraints.py":1411 * * * 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, 1410, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __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, 1410, __pyx_L1_error) + __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __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, 1410, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __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, 1410, __pyx_L1_error) + __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __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_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_5)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __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_5)) __PYX_ERR(0, 1411, __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, 1410, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 1411, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1421 + /* "constraint/constraints.py":1422 * """ * * def __init__(self, set): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 1421, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1429 + /* "constraint/constraints.py":1430 * self._set = set * * def __call__(self, variables, domains, assignments, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * # preProcess() will remove it. * raise RuntimeError("Can't happen") */ - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[1]); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1429, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1433 + /* "constraint/constraints.py":1434 * 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_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __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, 1433, __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, 1433, __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, 1433, __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, 1433, __pyx_L1_error) - __pyx_t_7 = __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_7)) __PYX_ERR(0, 1433, __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, 1434, __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, 1434, __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, 1434, __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, 1434, __pyx_L1_error) + __pyx_t_7 = __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_7)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_7) < (0)) __PYX_ERR(0, 1433, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_preProcess, __pyx_t_7) < (0)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/constraints.py":1410 + /* "constraint/constraints.py":1411 * * * class NotInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that values of given variables are not present in the given set. * */ - __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 1410, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NotInSetConstraint, __pyx_t_7) < (0)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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":1444 + /* "constraint/constraints.py":1445 * * * 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, 1444, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __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, 1444, __pyx_L1_error) + __pyx_t_6 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1445, __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, 1444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __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, 1444, __pyx_L1_error) + __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __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_7)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __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_7)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_2 != __pyx_t_6) { - if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1444, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_6) < 0))) __PYX_ERR(0, 1445, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1455 + /* "constraint/constraints.py":1456 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_6 = __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_6)) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 1455, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_6) < (0)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1469 + /* "constraint/constraints.py":1470 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * missing = 0 */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1469, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1470, __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, 1469, __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, 1469, __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, 1469, __pyx_L1_error) - __pyx_t_4 = __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_4)) __PYX_ERR(0, 1469, __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, 1470, __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, 1470, __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, 1470, __pyx_L1_error) + __pyx_t_4 = __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_4)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); @@ -47981,79 +47967,79 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1469, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_4) < (0)) __PYX_ERR(0, 1470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/constraints.py":1444 + /* "constraint/constraints.py":1445 * * * class SomeInSetConstraint(Constraint): # <<<<<<<<<<<<<< * """Constraint enforcing that at least some of the values of given variables must be present in a given set. * */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 1444, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeInSetConstraint, __pyx_t_4) < (0)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1506 + /* "constraint/constraints.py":1507 * * * 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, 1506, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __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, 1506, __pyx_L1_error) + __pyx_t_5 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1507, __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, 1506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __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_4)) __PYX_ERR(0, 1507, __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, 1506, __pyx_L1_error) + if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 1507, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1517 + /* "constraint/constraints.py":1518 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_5 = __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_5)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_5 = __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_5)) __PYX_ERR(0, 1518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_5); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 1517, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_5) < (0)) __PYX_ERR(0, 1518, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/constraints.py":1531 + /* "constraint/constraints.py":1532 * self._exact = exact * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # noqa: D102 # <<<<<<<<<<<<<< * set = self._set * missing = 0 */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1532, __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, 1531, __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, 1531, __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, 1531, __pyx_L1_error) - __pyx_t_6 = __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_6)) __PYX_ERR(0, 1531, __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, 1532, __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, 1532, __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, 1532, __pyx_L1_error) + __pyx_t_6 = __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_6)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); @@ -48061,52 +48047,52 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); __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, 1531, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_call, __pyx_t_6) < (0)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/constraints.py":1506 + /* "constraint/constraints.py":1507 * * * 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_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 1506, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_SomeNotInSetConstraint, __pyx_t_6) < (0)) __PYX_ERR(0, 1507, __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_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/constraints.py":1570 + /* "constraint/constraints.py":1571 * # Utility functions * * def sum_other_vars(variables: Sequence, variable, values: dict): # <<<<<<<<<<<<<< * """Calculate the sum of the given values of all other variables.""" * return sum(values[v] for v in variables if v != variable) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_values, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_1sum_other_vars, 0, __pyx_mstate_global->__pyx_n_u_sum_other_vars, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variables, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_values, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_11constraints_1sum_other_vars, 0, __pyx_mstate_global->__pyx_n_u_sum_other_vars, NULL, __pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_7); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sum_other_vars, __pyx_t_7) < (0)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sum_other_vars, __pyx_t_7) < (0)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "constraint/constraints.py":1 * """Module containing the code for constraint definitions.""" # <<<<<<<<<<<<<< * - * from constraint.domain import Unassigned + * from collections.abc import Callable, Sequence */ __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -48154,11 +48140,11 @@ __Pyx_RefNannySetupContext("PyInit_constraints", 0); static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 324, __pyx_L1_error) - __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_min); if (!__pyx_builtin_min) __PYX_ERR(0, 320, __pyx_L1_error) - __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 321, __pyx_L1_error) - __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 358, __pyx_L1_error) - __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_min); if (!__pyx_builtin_min) __PYX_ERR(0, 321, __pyx_L1_error) + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_round); if (!__pyx_builtin_round) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 450, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; @@ -48182,74 +48168,78 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "constraint/constraints.py":58 + /* "constraint/constraints.py":59 * variable = variables[0] * domain = domains[variable] * for value in domain[:]: # <<<<<<<<<<<<<< * if not self(variables, domains, {variable: value}): * domain.remove(value) */ - __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - /* "constraint/constraints.py":961 + /* "constraint/constraints.py":962 * 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, 961, __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, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - /* "constraint/constraints.py":11 + /* "constraint/constraints.py":12 * """Abstract base class for constraints.""" * * def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwardcheck=False): # <<<<<<<<<<<<<< * """Perform the constraint checking. * */ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 11, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); - /* "constraint/constraints.py":301 + /* "constraint/constraints.py":302 * """ * - * def __init__(self, exactsum: Union[int, float], multipliers: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def __init__(self, exactsum: int | float, multipliers: Sequence | None = None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); - /* "constraint/constraints.py":1455 + /* "constraint/constraints.py":1456 * """ * * def __init__(self, set, n=1, exact=False): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, ((PyObject*)__pyx_mstate_global->__pyx_int_1), ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<4; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -48259,16 +48249,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_slice; for (Py_ssize_t i=0; i<1; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -48285,39 +48279,39 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { - const struct { const unsigned int length: 10; } index[] = {{1},{36},{12},{55},{413},{420},{849},{854},{889},{909},{1003},{915},{357},{349},{349},{659},{676},{672},{707},{751},{725},{342},{945},{56},{28},{55},{179},{18},{13},{17},{107},{1},{8},{25},{7},{6},{2},{9},{11},{22},{31},{18},{27},{8},{28},{37},{37},{10},{19},{23},{21},{19},{28},{45},{28},{30},{47},{18},{27},{27},{29},{18},{27},{27},{15},{24},{24},{26},{17},{26},{43},{26},{28},{45},{16},{25},{25},{27},{17},{26},{26},{28},{16},{25},{25},{27},{18},{27},{27},{29},{8},{20},{8},{19},{28},{28},{22},{31},{31},{10},{5},{27},{53},{36},{36},{47},{41},{38},{26},{35},{52},{35},{54},{37},{25},{51},{34},{34},{45},{39},{36},{24},{33},{50},{33},{52},{35},{25},{51},{34},{34},{45},{39},{36},{24},{33},{50},{33},{52},{35},{10},{6},{8},{9},{13},{16},{11},{18},{1},{4},{6},{1},{8},{10},{17},{18},{5},{15},{22},{17},{11},{12},{4},{7},{3},{6},{13},{11},{7},{5},{6},{9},{10},{8},{9},{11},{12},{12},{5},{4},{5},{8},{7},{3},{19},{2},{9},{5},{8},{13},{5},{9},{2},{1},{8},{3},{10},{15},{7},{8},{6},{7},{6},{13},{3},{10},{15},{7},{8},{6},{7},{6},{7},{11},{16},{10},{15},{10},{11},{12},{1},{2},{8},{4},{1},{9},{9},{14},{16},{14},{14},{10},{10},{1},{5},{3},{12},{12},{14},{10},{11},{4},{5},{7},{12},{8},{12},{6},{5},{13},{4},{4},{4},{3},{4},{12},{10},{11},{3},{3},{14},{31},{9},{8},{5},{5},{10},{13},{10},{10},{12},{10},{8},{8},{5},{6},{11},{10},{15},{18},{1},{3},{5},{6},{3},{16},{8},{8},{8},{22},{17},{9},{12},{1},{3},{34},{42},{17},{49},{246},{395},{297},{95},{287},{347},{184},{535},{249},{249},{195},{445},{20},{25},{23},{109},{216},{216},{138},{92},{220},{464},{262},{296},{114},{167},{91},{91},{19},{14},{151},{2},{2},{142},{11},{160},{24},{146},{30},{14},{22},{22},{2},{2},{2},{2},{23},{25},{2},{86},{148},{161}}; - #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (4927 bytes) */ -const char* const cstring = "(\265/\375`\221a\255\231\000:\222@\037;\360\0327\314\300l\000\2222\3101B\243\303\032RX\370 \23707\205\025\365,\332f\215V\034\257C)RR\000\000 \000\000@\t\000b\327e\002\n\010\003\000i]\003\000\240\232\010\330\001\331\001\351\001CKIK\332T\365P\250\203\222\322\034\364\271\351\235\346\232Z/\267\253\252\356\034<\265V\311\341JE\376p\310\333\326A\2526E\207>\337nM\r\245Y]\212\316\366C\363C\252\254nMT\267\031M\365\251\256O-\225\214\276\225\"\344\251>\231m\006\372\200Cu\363\260\271\335(\331\242\344\316\254F\323 \332\246C\340\016\216\212t\241Q\221#D\020\004,\\I\256Xe\362\205\364\221*;l5{\273\335@|\344H\376\330&\352\264\246\246\212\376\364I\376\310`f\247\310'\023}\232*m\304\274\002K\034.\223\272\315\2325\21198\304\331r%%\271\341\n\3149\0235\rn&Mw\252f\365\357\207\236\244fs\232\346\262,m9\\.\227#\346\334\n\314\331p9\235N\247[KJJl%\246o\244$\227\303\001\207A9\340p\347Jb^\201eiR\252(\217m\2436\233\315f+m\344\010\316\266d\326\314Zk\232\354\252\346\235\346\241P\267\346\360\304\265k\317\252.\341p\276\332\0079\002R\222#\265\\\373HJ\032\246kP\253\235\210 \037\033\250[\364F\3748u\313\256\033d\251Lju\220\212\023\364\261\204#G\312$rdI\303\247A\216hd\215\244\017\242\363\3147\220\217\037\322\205\004\256///+:\r\0023\221\206D@\270\265zgRE\365\326lp\017\201(\253j)\324i\353a\232\245H\375[I\r\\7\331\356\254S\262\315O-\351\244\242\246\252\251\322\326\324,z\222\247NS\275\252\244\232MrE[S\035\326\350\324\227S4\010\\eT\035\014\346'\262\255\251Y\346\266[\025UW\223d\327\037\271wNMR\357\354#[3\263\355\366\355n\001\275\306)`G\236\337\371\212N\223\020j\301\016\0004\266b0\373\332\374\3566\227\235\037\241\370;.\"\372D?\177\306\3702\316\024_E\037\034\003\027\275\003\357\214\227y\227\277\361\323\345\271\017\0061\2578P\234\201\207o~\247|\3669\257;\257;q\036\337\340\001|\342\000\200`K\330e:\207\354\313^\224\216\277\353C\236\241\020\273\374\007\304\312Q\330s\237\342\031\260\243\353\025z\235\316\001\213\263\233s[\255\006\005\235ks\244q\n\203\270\344\025]\327i\335\312\21508\226\256L!\246u\024~\245\245\323J0\210""\263\221\300xc\362M4\276\306+\306ybE\236WG\373\264\327\347\271NZ9\255\204\327\221\006\257`|\014\200\357\352\244\213\357h\355\270\205\302W0\210\205\256\216\326\302\001\200\303\226\020\266\275\270\214\237\361\372A\264\212\370\324\242S=\251\251\225}j{A6\267-\333\3524\353\375K\265\336\254\226Z\201\232\335k0\270\0067\220\315\301\340\036n`V{\352\336\252\356\255l\232\235\264\252\346V\357\215\002w\217\270\246\273e{[E\211\364\211>\241O=\263\247\317aj\022u\257\327\333@s=M\364,\333\264\267[\340z\232\246/\337L\235\246\253\251\367\232\232Qf\366i\263\267u\233O\364T\315t]}\276\255U\264\035\256\354j\336V\324T\251v\336\255\252\201\275S\325\277\274\367\251\016W_\257wj\325\t\335;\253C?\r\324\022uOo\206H\365\303\006\211Z}\331k\332r\333[\233Q\246~\2229\331<\325\312\364zi\232\315^\357\2664l\223\332\215\246\347FM'Uo\364\244\n\336Ht\017\346\246\2569%\315\235F\231h\220e\213\226\332\274\246?r$I\r8\336\3467\346\275\231u\223\023\300\216H\025|\302\205\271g\020\320\337F\037\230\017\004\317p@&>\313s\365\035\3411\366\272^\250\356A\30648\000N\3628\\oy\206'\3528\334B\330\013:U\t'\310x\225\347\270^\336\240\317p,\243\203\021G\345\263\257\216\252\003\365\216\207\217\213\225\\\273\020\035<\346E$F*\276Jmv,\253X\270\214\216/\275\000B\326b0\210w\\\346\352A|\305B\370\002\035y\357\356\r\361!\034q\3661^\245o\220q\356\375\336\321?*\215\t\004p\320\273\342E\310X\350!\374A'-\":MB'\214p\340U\307\230\217\032\340\022QE\262#\357\2309\306\354\270{5\336!\276\363\313\342\333\\gr\007v'\016\326/\007\026\317<\347\340\312\270CW\027r\035w\226]\016W\346F\300\n\216\031\022\255\033\021\3225,b\232G\017\350&\274B\002\242\037p\211Y\314\353\273^\364\344\364\235\316\177\026\375\240\037\364\363w\212E0\316;\364-\335\206\253\014\001\375!\343\314\310\026e\212X\271\267\225u\032\376\342\006\356\214\220Cp\0277\331\361\237\033\357\022\270\004L\200S\305D|\314\233\335\003\342\347\360`\221\027\305\213\314\376\216+\274\264w{\031?\"\373\255\3261\273\020\0061\315u\230qg\r\274b&\203\342\030\0221/\303\017\260\320\213{\035^!\217\363L|v\302m\334\031""\314\325#\370\004\354\230\217N\277\377k\372MJ_\311\350\033\t}\241\237\3573\306\030\213d\260\013\276\361z\307,\246\031\207\212\263\"\r\\\3026o\371\n\274&\236\346Q6\007\342\027\263\030\026\323\212\033\006\2027`+\337\341\317\036\323\313\276\001+pa\nq\331Y\236\321\360\263\206\017\210\361\211]\227\365\027\227\326c\001\017G\223\346\356W\357\236;CY\254\231y_\021>\010\007^\3131\222\\\027`\241\031s\340M\223\351Xn6^\024I^\230\276\321\221p\206\370\005\217\363`^\247u7\247f\266e\321kd,\363#\027&\265\313:)w\370\353\225y\177\236\303\247\261\253\354s\262{\243\260\265\313:&!}$\336\217*\316\274\262\227\275\341\371x\003\316\004\027\347\246\300\216I\256\314e]\232\227\255\207Y|`\020C<\304\016\261x&;\356\262v~\327cW\331[\216O\021\3238\306<\010\306\001\000\307V\217\3513\355\374\035\225\257\342\361=^\277\3444\236\036]0\3037J\371)55\27758\n\357\335x\227`\020oT\217\271\000\342}\245\"\016\\\302,\265\257\353WnD,H\"V\024\202W0\370\304\221\321\337\361\025c\212!p\014>\010\351\001\001H\001GG\001==\001<<\0019\0019\256+\000\200-+\341\027\002?0\352G\371\276o\312\230\2159#S\003K\025\023\277(\337\004\325\315\321j\367\337O\237\350\347$\301\270\002\037\302\003v\002F\223\"\255\030C\362u^\204\342\357\202\370E\227\210w\360\013\026\276\005VR\235\210\343\034w\037\375\3441B\236=\333k\021\177\346U\360\276\316A\333\264\232P\320\277*\2420\017v\001\371B}a\347\226\256@\254\013\335\304^\323\347\364W\216W<\024sE\231\362\013\371\201\206\377\3600;v\300\260\204>\373\251^\203\375\356\3041\024\024\376\002\257\270\000S\375Db\357\211w\360\265>\301]\271\023t\037\237\242\3209\330\361\"\367\301\245\020[)\034\000xl\375\364\3279?\007\345\243p|\016\032\357a\330\312\357\311\306\337\270m\t\235\312\356\320i\261\317\n\335\016\327A\363\334\231\033s\371 \007\227\214\237H=\304\0178\035\327\246\2560\366\226\0162\tFj\276\032\035p\201\203\027],\rk1\376I\223xG\315\222\262\253\344A\300\261ma'N\210rB\261\257\264\212k\3574\367\020\363n\203-]\245\341\024\006\260\256q\332\206\200\272Ui\261A\375}\277\031\213\217\305h?(ls\023P\262'\353\372\020g\274\206\312\006\2647\367\246R\t(\210\263B\275,k\024\001Zu@.\252\031pXD\241\372N\300\016n\361\275\365\201\217P\260\316@E=\257\216\221\212.\013/\207\253\203qG\226\021\033\255\013\n\307\034\234\036\240B\207\235\263\0252`}.\363\"\304\034\223\233\245\320\212W\037\016\306\034C\271\364\016\222l\177\352V\261O\267\200D\034\341\341!\201\266\242\000\201\315\241\035&\366\265\326\226u&u\201T9\336Qw\257m\3542\340\004G\005\021\233\264\202\342\"\360\217\013\210\323\312[%\241\035^\373\256\260\003v\371=_\364\0102\013\302\203\343\r\371\010\253m\340F+\014\325K\340\260\003\372\205\006}q\354N\310zf\2636\207\326\201\332P\014\3448$/\234\305=DM\357\025O0\213\260\346\316P\202\345$\276\026\311n\247G\3020h\376j!\006\264]2\205k*\320\343\247\201e\375\n^\210 \205\235\201;\257\357\253N\005\220\346n\037|19<=G\327\177!\207Uw@\307\2609\351I\360\343\334t\310\222C\255\371\301\374\254\201\035\n[S\022\232\2506\2647lI?J\232\365\025\207\266\206w\363\377\2512\363\331\n\214\311\022\266\3420C\302\305\004a\036\210\253\376:\245\353\311\257\377\374\254\306]@\236\205\255\025\021<3\205.\rL\230\320&$\240\000\213\365\037\352u\022\364-\217\225\247\201\343\357\375lj\023\017\331\207PD_;\301\tX\327\263\033\024o\022\232\017\206S\024q\312Y!\265\334$?\211\2451\351\332\243\376\343e\001\231\265<\341P\372\177\251\373g\014C\327\231\244X\243Q\326\206\025<\3270\200C\334\035\245\207\360\377/\264\223b(\301\326{)=\270iG3[~C\362\262\016\213R\311z\016L\365\007d\022/\202\2602\273g\026\331\302'\327X\362\246\334\343=\373\201z\300p\204\245\346X\021 \372\360\014\317\272\335\372X\234\004\370M\241\243\215m\n\332\215\265{{\266\300\202\223.\370\244kv\260\020""\034\271\330\270\212?\254\314\031\0232\310\231zx\364\333\252\247\305;\235#taX\354o\377\352\017\336\343\312\373\031]\014\367(eTn\266$'7\211\306/\020v-H\002\213:\341x\250\217\234k\330\301\340\273'\207\2234\005\021\001\276k\225\021T\3032\231\206\265\367\007\312t\315g\372\305\345W\032\357y\010\232\001T\215\216\255\300\030\250\304\0354!\031\344\232+\241f\213MV\207\320^\310\326\314\273\007,\014[\207\332qz)\261\301\033T\275\366Y\0037\347\222\342ULX#\341\020\001\005\031\276\013<\206\344\304\207\266\364\250\256#3\314%\275Cb\267\324vp\212\301\025\374\224\244\264\t\261*Y\327\361\360x\221c\273\207O\306|\221\n\003\2613$i\224\016\247\375\262B>\332\251e\346^\223\210\277pXO(\234\214|Wj\303\013\251\225\t\033\014\257\rc\301)\307\330%\334;`\353\257\235\036q1\204\247\"\250R\247E_o\025\266x\272\014\026\270\324\031\277x`\027\377\201\303=S\221\221u\202\000\014\314\375\316^#\222+\257\301XC\275\373\323\311\003\241$\304\230z\223\240\262\272Z'b%\215\371\r\253d\032\032L|@\031\321R\245\317\007\215\371\204\220\257\207\207\253\250\272\215\253\n9>g\352BV\325\341\376?0\374IG\252\266\215\310p\243VA\036P\341\014\277E\220\000B\213\342\0007\031\360\034\033,\025~\035\256\216\303\311a\025\226\241T0C\312\261\033O\332\273\377\024\r\2606\204\356\032~xOtl\r\274\356O8\302\032\017Ou\310\230t\233 \317\240q\327a\022IZ\365\244m\204\236\255\202L\023\227\307\215\363}\357\014YN\221^\344]%\014\223\303\031;-\034\354#\013\2547\204e\330\203\361\020\321\031t\032;\030\353F^\261\247\337`\343\233=\276a\376_\226\256H\0232e\273\275\r\032\370\235\314\206\304\233\024\337\276*K\037\371\324,\006*\252\034H\241pv\246\237\255\363\200\260\311\244\030\024\007\310\335\347\010'z?\246\306\250~\022\032\204is\r\245\013!\312\\O\235\311\264\023\0062\202\266H\262e\030\231@\371\0215\203\3749\177\370\372\207.,\274L\026\2712\010t\363e\026\223\251\232E$\304vL/\3611\2019\316t\360\250$\330\021cY\315\016\341\004\3361\025\304<\374L\270!\271\250w{\361y\331\202O\346\205)H_\363/\373]\311O\335\001\032\010\324\243u\222\377\276\303\252`\317\013\277\r\270""\365y\026\010\253n\254\373\323I\264\375\201q\302!YX\250\223\247\203Q'\261\235\023<\203\215\267\214U\224*km\016A4\223\024\241+.\250\255\"C\341\024\333`\027q\005\260\026\357\377\321b\261:z\\\241%\311\342e\366u\230jCp>\007\301F\177>A\262[\220TQE\202\251\344\202b\340\033u\030\321\251q\036\345.lp\241\030[t.\306/\335\230\352\246\266\312q\367\270\2435\321}5\373\206#A85\361\240K\362\234l\333\263\236d\361\240i\303=\223\337h\221&p\275\331F\372\001\277Pxt,\312\034\355\200w.\000\244\261\231um\324Wh\241\266\303\000P\010,E_\341\324=?m\307>\320\233?P\220\013\227f\324\332O}\264\"\247\3227\243\266=\327\261Em2?\204\307\014\240\r\245\241}\\\346%\324\272}J[\250\033\221.k\243\245/B\310\"\270\232\277\215\261\266\233\203A\226KHp\034\254[Z\332e\3463\277t\304\031\364B\300\327\221\r%\300\316\307\351\256\220b\271^\204\006\027\324C\374\364nfOw\207\337\233M)~\325\013R\202\352\020\254\270\273-\202b6\037\216q\340\210\035 \270#(i\017\354\347,#\333X4\337\344T\353\002\031[r\n\025X\215\365\0146*zm \313\230\034\225.\246\205d\202xj0\346\330G\244;C\233\222nhR~L4\346\0342\220\217n\036p\221\360A\262\241\375t\324\275\246Q\2478/DWg\371\214\006\270\313\343YD\000\264\263\251\241\016b\006\270\232\217\244q\302\214n\215l\245\365O?k\200\020\310\214:\227B\224\330Bf\005\371#\250\342\246\344X\352\362\265\242u\260\304\n?\254\275O[2\224\"\311\022F5\334Pa,\215v\243\211\020\"\352\366&\216\324.\250|\310u\355vo\240\264\236x0A)\332\276*Jp\246u\202\340(fE\324;WN\360ca3\254\270h\326m\217W\262WB\013#\337\242\037\245E\227\\\207\374\236+\362\004G=\021[\236\"\272t\251\265\304\236U\013\242\010\232Cu`\343\273c\344\215\314\030oY\303}\223\"\335z\034\206u\237\003\\;\301\354\332\230\3154\335PHW\263W\216\321\364l| `86\371V\330\014H\005\310\337\215\t\013woRr&\252g\227\202\332\326\026\351\317%\016\341,\371\350\263\350\"\237|:e\231\021\251/\026T]\347\321_t:\224\022\0131_\323\022\217\034K\\\202\341}7#\017F7K\260\375c\242\213\300\331\330L\203\230X\204%\237\203\021\372vkAb5\202B\250\236\340\331F\025E\3540\202f\374\333M\303\016\321\235\347)""\\\2369\306\247\240\005w\371\363R\273\207U\000]\370 \354\""; - PyObject *data = __Pyx_DecompressString(cstring, 4927, 3); + const struct { const unsigned int length: 10; } index[] = {{1},{36},{12},{55},{413},{420},{849},{854},{889},{909},{1003},{915},{357},{349},{349},{659},{676},{672},{707},{751},{725},{342},{945},{56},{28},{55},{179},{15},{13},{107},{1},{8},{25},{7},{6},{2},{11},{9},{11},{22},{31},{18},{27},{8},{28},{37},{37},{10},{19},{23},{21},{19},{28},{45},{28},{30},{47},{18},{27},{27},{29},{18},{27},{27},{15},{24},{24},{26},{17},{26},{43},{26},{28},{45},{16},{25},{25},{27},{17},{26},{26},{28},{16},{25},{25},{27},{18},{27},{27},{29},{20},{8},{19},{28},{28},{22},{31},{31},{10},{27},{53},{36},{36},{47},{41},{38},{26},{35},{52},{35},{54},{37},{25},{51},{34},{34},{45},{39},{36},{24},{33},{50},{33},{52},{35},{25},{51},{34},{34},{45},{39},{36},{24},{33},{50},{33},{52},{35},{10},{6},{8},{9},{13},{16},{11},{18},{1},{4},{6},{1},{8},{10},{17},{18},{5},{15},{22},{17},{11},{12},{4},{7},{3},{6},{13},{11},{7},{5},{6},{9},{10},{8},{9},{11},{12},{12},{5},{4},{5},{8},{7},{3},{19},{2},{9},{5},{8},{13},{5},{9},{2},{1},{8},{3},{10},{15},{7},{8},{6},{7},{6},{13},{3},{10},{15},{7},{8},{6},{7},{6},{7},{11},{16},{10},{15},{10},{11},{12},{1},{2},{8},{4},{1},{9},{9},{14},{16},{14},{14},{10},{10},{1},{5},{3},{12},{12},{14},{10},{11},{4},{5},{7},{12},{8},{12},{6},{5},{13},{4},{4},{4},{3},{4},{12},{10},{11},{3},{3},{14},{31},{9},{8},{5},{5},{10},{13},{10},{10},{12},{10},{8},{8},{5},{11},{10},{15},{18},{1},{3},{5},{6},{3},{16},{8},{8},{8},{22},{17},{9},{12},{1},{3},{17},{246},{395},{297},{95},{287},{355},{184},{535},{249},{249},{195},{445},{20},{25},{23},{109},{216},{216},{138},{92},{220},{464},{262},{296},{114},{167},{91},{91},{19},{14},{151},{2},{2},{142},{11},{160},{24},{146},{30},{14},{22},{33},{41},{22},{2},{2},{2},{2},{23},{25},{2},{86},{48},{148},{161}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (4914 bytes) */ +const char* const cstring = "(\265/\375`zaE\231\000\252\221 \037;\360X7\314\300\304\210\233\032\344\235x@\300\n)$e\220O\230\233\312\2520Rv\263~\255\0375>'O\264\256\213\325UF\035\245i`-(\223\032\\\252k#Im%\312\327\001\325\001\324\001\352\001IG{ey\310*r\237\353\036\nw\357\266\271\252ij\246v\331u\345:\210\356\275\222CV\212\374\335\2207\276\203R\256\232\016}>\356\236\333i\267%)%6\237\031\037rm\267{\246\333\325\251\272\321\225mr\245v\373V\206\220\350\332t\272\032\350\003\016W\276\323j\227\247\244\233\222\\\267;U\203\251\253\016\201:8)\322\205&E\212\020?\022\254p%\271B\245\311\027\322G\256\355\320\335\355\355v\373\360\221\"\332\203\237)\023\253\236k\372\333(\371#\203\272\215\"\233\316\264)\212\250Y`\211\303ir\273z\267'Q\007\2078[\216\204$7d\201Zk\342\236\301\311\250\252n\335\355\376\375R\224\334\255VU]\226\245-\207\313\345rD\235c\2019\033.WRRR\302\222\220\220\330HN\237\010I.\207\003\016{9\340\220\347J\242f\201eiR\256\351\216\215\2476\233\315f+m\244\010\316\226t\326\316\232{\236-\273j\256\352\241p\273\347\020\305\271,\017\273&\341p\276\232\007)\362Q\222\"5]\3638:\032\252l\317\335L\304\217\017\017\016\334nz#z\240\333mY\376\221T\036\271\273\267\336\364<\222p\244HyD\212$e\3702H\221\014\235q\344!\204\242\372\366\341\341C\272\220@\366\345\345ee\253A\240&\316\220\t\t7wsM\256\351\346\273\r\362!0m\327\r\2252\361=T5\024\271\177,\271\201,']\256\267J\272\272\311%\231\326\364\\\267\224\352\236\273MQ\022\335\252\272\331\225\\\365I\262\251{\256C\232\255\372\264\232\006\201\354n\335\301\240n\"\335\332\252w7\356\256\351\312\236d\313\376H\316\265z\222\233k\037\351\236\272u\271Ow\013\0340\352c|\3515^\006\357\3135\227\276\355\030\r_g\300\001\260.\241\3632\377\362\322<\314\327\372\304\353\310\203u0\205\247\265z\204\020\353\205\000\220\221\005\223\333\330\006sos\321\301\"\023\237\317CB_\310\347\313\030\007\2142\305\201\242O\216\221\207b\202X\006\226\301-\370\326\321\227\367:\034\314\274\"AQF\036\306:\216\2025\234\203\267\347y\246\316\353\032=\240K \000\024d\t\375\316o\310\2760F\341\370:?\354\030\256\271\005{<\254\034\205^""\373\250\216\361:\266b!\234\3437^\263~s\257\213\325\340\232\205o\311[\203\345:8\322\372\304\301\\v\212\203Y\350K<\315S\275\020\007\307\362\225\271f\232G\351UX%X\n\007\2636\026\030mL\276I\306\317\030\370\274\227\t+\207\2450p\244\311+\027\377\002\340\007\323)b\223\233F\231PQl\333\344\232\301V\273n\353nUo\376S7_\367\346\355\206b\201\273\345l0\310\0069\260\325\301 \037r\240^\315\225\363u\233l\253j\246\275\256\332\335\234\247@n\022Y\225\273\255\311\327Th\243iS\332d\236\346F\207\352I\334\246ir\340\311\242&Z\272\252\311] \213\236\247O\337\316\255\252\354\2719\253\236O\247\366\355\323\344\333\325h\212\256\247\312\262>\037\337k\352\016\331\226=olz\256R\\sw\335@\023]\367Os\216\256C\326g\232\350^\231R\316\365\032\364\333?.q\363\2302D)\037\323l\203\304\275\276pVm\271q\276\317\247s7\355\320VG\271;\3234\315[\322V\203C\367\310\345\251\212rV\375\235L\353\346)*\025\274\215l\023\346\266\262Z%O\256>\235i\260m\207\002ol\363\336\331\013k\301\275XK\326O\240\034`\0352~\200\250\343\272k3\363g/x\035\215(\272D\353}\275h\357\347sc\017\314\377\221g7\037\022\277\345\265\274\216\360\010\213[\261\223\357 g\232\034 \037\3018\234w;\006,\344oz\205\320\033x\251RV\330\301k\307i\r\300\007^\246[\031c\306\033\225\337\306%R\376\307s8|\334L/\373~\0378:\014\016\211\020\241\370*\265\331\261\324\236\245\357r\340\022\026H\320X\014\007\263\256\313Z\276\327W*\342\230\370'\214\305S\276Vq\344\305\272\030\004\006\331\2305\034\003\253x\rr\326\3467\213~QiT(\220{\361\n\034B\316B\370\001F\360d\005\204\247E\224\010!b}\352\010\203\237\010z\304\323\220\354\310;\352~1;\352\342\2148\250s\035\263\300n\316+\275\004:\024'\357x\303\252\353\236\213\275\273w\330\362\302\236\363\316\364\273\361\312^\210\227\201\016F\204\373B\200\370\214\212\231\326\341\003\274I\247\210x\360\010=b6\363\274\316\01751}&\364\243C\277\367{>_\2478$\337\304C\270\305\327t\225\240\237\037d\234\031\333\342\256h\225\213]\231\237\351\003\375\340\225\021\366\207\336\352&\272\376{g\235B\217x\tt)X\010\014\203O\337\361\360qf\236\034\022\243\300!\263\257\353\256""\230\026sx\007\213\310\276\213u\324\357\303\301L{c2\357\254\241S\314dN\375\"b\346i\331A\006\212qq,\006\202q\260R\327\365\212\331I\257yg\257\226\207\350\022\257\243>2\375\376o\351/!}$\242O\004\364\201|\276\317\030c\034\222\311-\371\306\363\034\263\231f\014*\316\2123r)\327\304e,\020\233\3004\030\205\367\237n1\233_3\255\310\345\037YC\246\202\003\016\307\223\366\362xs\257=CY\244\221\211\007 |\017\261^\323Bx\244\224\201\260\205\247\345\274\000\013\315\210C\3734\231\307?\264\235\267z\265\321\2428\022\303x\ro\004\353;7A\335\202\327y2\317\273rbY0y\007\243\345\311\027\207f\226U\341k$L\367\242\367\005\245\273:)u\372@\274\333\200UX\225\206q\364k\343\312\322]\035\217\214\276\021\357?\025ebY\334\332\354x\304\001\250\302\213{S^\307\243\227\354m\337\231\227,\207\331\214p0?8\3141\330<\223\035uW:X\347\347V\351\335\215?\001\3138\302\340\217\013\004\200\215,S\351+\351|\035\225\257\322\361;\006~\331i]=\266d\206O\224\362Shj0\317\350(\274X#Nz=\304O>\306\342\207\367\221\2127r)\263\324~\211\257z!`\275\010X\021H^\271\350\022ED_\307W\214)\202\3100\031\001\204t\375\000\243\200\242\242\000\036\236\200\235\235\000\234\000\234V\025\000@\026\225\360\013\201\037\370\364\237|\337\027e\324\306\234Q\251\201eJ\251[\224\261\302\372\342`\271\374\363\246/\364q\216d\234\001\014\322\003t\002F\223\"\255\0303\362K\340\220\211\257\353u\013\0371\353\344\001Y\030\033PAy\241~s\324yx\264\307\010\273\206[_\203\3702\261\013\366\371\r\032\247\325\200z\277\252\230\312<\331\345\343\003\371\005\335[\276\0020\017d\003\213O\030\307\017\344:\205C1W\334\225\037\010&h\370\016\016\263#\307\313J\010k8\312\327^\377\302\365\027x\305\005Y\352\027\002\213O\340\030\\\363\022\275\245}\201\367\365\250\211\034\004]\037z\035Z\256\231\312\205\000\320\221\365\333\177\343|\034\224\217\262\3617\\\337\305\203\265\200\000\300\220\245\343\023\215\257q\313\0222\305<\r\366[\341\313\021\205!\250\363\330Z$\224J\r\215\210$I\222\326\023a\0204(\226\313G\265]\327>\203\363\332$\024\206\2014\2040\010B1\010\2070\005\004\021B\210\300\020\242\210\010""\211\314\314\330\001K\212n:}8\3736\270\240)D\3162\202\255\327\370N!\355]oS\013\332\215(O\315\337\217\256:PPTg\314\325\300TL|\250\231k\3074\020*\346\217k\006\302\002\242\252,R\222eBV\254\245r\333\241\323h\326hp,\333\342\262(\362\372q\254\322\021\036\371\302\302=\"z!k\203\310:i\354\346\0033\237\220\t\232\315\264\022+\314\313\335\222\233\000a\233q\215\203.\354\032l;:\211\266C\020\260\331\274\242\352p\332\334\276\342g\0242\212A\302\210HF\346\325\335A\221\301\347\307/u\035%hv\264\251\204\221QiM\014%G\0001(\200\335\277N\351\311\362\246\241Q3B\005\355\256#\n)\326Lj\251\037\020f\025\226\260c\341\244:\343hny\242p s$\367\201J\215\205\337=Dp\237}[\314\213RO\214\022Dm\211^\tR\321\352\315[B\325\017\343'\305\301\272\344\266~\320\030~\342\332\235<(\177\003\325*\215|\224\001N\365x\032\220\025?\272\221J\"\225a\014:7\rgl@\025_\350\200\357\300C\356\334\214\263\236\031X\346k_\321\276\317_\215\306\321uP\212\242&'\034\362T_gL\030bo\000Y\242\302S{{\340\254\024\004P#f\340\232P@?\3443zG:\377f \236#\026\326m\221\216\315\202,\235\336\3176\335c\0027f!\022\013I\3761\032.Qb\237JL\025K\212\300D\003\244\311\037\320<\346\351F\333\351\214\237\272\\|\034u\206B\340\r$pE]X\374\325\303>\211p91/\323\201n\356\3311\264\016J\240TU^\235\271\361V'\354\374\367:\010R~9\231\214\336\205~D\231\007N_g\223\034\214\313\224Z8\005\003!\017v\304\302\202\327\026B\226\271\2511+\221\222\270B;eed\354q\n\207O\302\252\260$\222\302\024]\271\200+\314\007\374!\211\366F\314e\365\346\025\220\245\256\237|c\206\322\033i\275%\002\024}\001(\036\313\361\375\240\333\246\023@%\217\262\371\355\302\361.*7\250\305\275GJ%\211\030\257d\356\205\322h\025Hg\357\365\353\352\004\371\220\037\332|8\234\004S\006\200;\003\212\304\323\335\354\001\013\206\251\257\2075\267BN\354\177\252\237\347\222\336c}\245iSI\374\365\340\030\262\0058\350\335fQ.\205\221\273\223\367\273\345\343C\004\200v\321\034\021Pc\255f\243muon|\336\0144\334\356\333i\320G\221\252<\037\366\2370S\320S\353\307\334$\300\346ny\237%,\311\205\306\341\272\032\305\325h\325\003\361y*\027\262""\246,3\324\312\310\032|\362\245\314\246\r~`^\343#lf\250:P\002X\367\267\363\033\203\216j\232\224\353\305jtY\360\337\362\003\re\0045\306\036\266\244\226\326Wu\037L\355]\310\343E\225\303l\207`;\352\252\343K\024\240\016\001\241\237\277\031\260\032\230\240w\314\221Y\361\263\273\264C\231\322\315^\203wC\351\013vd\375<\331#\3749\016\317\322\017l\215\241\370\232\263\206\266\300\311\253\253\350UT\277\260T@Q\032\2002\2471\201O+S\351\004w\344xB\323\241\004\\\006J\265\363I~\222fS\316\362u\207\206s\363\302.*W\240\252Z\331\005Z\030\007\350\0228\241\333\310\257\227\261\367\\\034\206\352\255\372\334(\026\225L\301\220\007\247\225\237\250V\363\335\334\245 gIC\0014\302\233\\\006\360\222\375\373h\203\005\302\252\373@\272\n\323\206\007\240\273Hve\033t\247^\360P\316\331)k\225\350\355Hc\004\211\366\347\266k\n\010*\271a\010\271\230\351\201X\316B*j!\301\352\267o\375\372\t!\3035I\244\013\020\354\3104\021\222GS\025\262\337\254\274\223\2111V\034\261.)]Rs\342\311\372\276\331\006\007\003pp|\240\"S?H\210\224\364D\000\304\202\362\217I\224\033\336\004\240\320h\366#\317|zff-\311\203tCF\304j\033\330\247\265wu\024\350\354P\321\302M[Tr\255\267>o~\350P0P\205\025)\331J\220\222h\260\230\n\201\326\203\211\232d!,s\213\210\240\234\204\002-\231\355\004\226p\007\217?\266\211qsW\326\302\265[\350\366\223\025l\362\252\r\001\273\261f8\310\213\3435>\000\332b*\232o\223\200Kqt\360\007e\214u;w\204\234\253\231\244\177\345H\177\026\271\226KQ1\350D\260\203\222\226\211\352E{\235P\251G$y\257\202i\211\337t\266\023\230&0\254\300\265,\302\324\215\336\260\305\233'\304Uu]\323\305\004\024\227sV\246\215I\212\360\252@\005\234e|\325 {\304\030I\005Y\302\301\264QE\217Y\232\266a\226q M\352\322\2105z\274\236\205\275\236\252b\344\263\030\036\006Vi\024\225\312\302\236\035(\355\177\365\340B\014\207k\016\245X\246ZZ\300\n8f\330\206'\357\240\245N\304\377\025\352H\261\337\250\375\236\224*\267i'l-\275\375y\221\267Jf\027\035/\004\374\rd4z\221\201g\014lA7\256\212\361DI\372^w\317B\307\270\017U[\254Q\240\\\270U(\2526\362 \200\272$Rhq^1\371\024\357""\266\236*\"a\251\233s\024>\207}\005\014\\\233\247\"\2156&k\242\014\002\246\211\376o{\231\371\206\n\010\017*\030\256\3407]\210\307\356Ge\031\300\234J\003)\037\205\223\275ag\276\300*\027G\033\306\344\340\361Nw\370\336O\356\tlbx\016'\307\311R\200\364`\232\241\312\224\220\2622M\213\334\273Sd]\346o\312\342\204+\n\357M8\037\000U\233\256/\017\030\260\305\213\235\033\215\3065Tb\222\255\265\234\207\365zC[\314\360\034\244\021Zg_\307$2W\207\0316\326\352\263\007\264\370\347\341\274{\266\242\0065\004\366\201\241{fH_\342LQ\352\267\347\304\246\325[.9Htb_s\234B8\2061\344\343\365C\234q\252\232\177\227\234s`\345\344{\037[\244\r \355\370A\257G5e\237\301 \007vR\231\304wg\221\025VWF:\023\317\364B\004\177\301\243\232\354\022V\027\002<>\026\002\355\207\356\241s2vM[x\033\206OM\252\252\327\242\237\263>\337=\273\030\027x\225\234?=0\240\377_\325=\270\354\330\326\214\300\335\231\003F\275\227\227QF!\243\361\261\253\253\323\303\232*\305\225\235K\244X]y\033c!m~=\"\231 \005\323((\215h\245\251#\236\342>\355\243\343\311\241\346\207\326y\213N\324\205\365\021z[\375\227\350\355\315\036uS9\220\267J\207\322\020C\371\211\023n~P\266\375\214;\207=2\017muu\323\357\222\265G\312V\220l\344\310\2750\266i$\237/\316\221\341\214\324e~\217\203\331\334\321\270L\275\303\032Id\277\302\031\231\271\231\216\350\302\3263\242\017Y<\003\255\357A\223\345\221\215i\371\270Q\242\2343\016LQcfJ<\251 \326\337DX3\234^\271f;W\344\t\344z0\267!E4/\250\326\022zV-\206\"h\n\325\205\215:\034\2316\276\313\250\327ZqL\212\177\352\352`N]g\270\3423\263S\243A\323\341\006C\274J\254\262FSn\303\003\221\324q\356M\327\266 \306#\3032f\016\350a\223\310\221*\034\222\024\030[\272\310P\227'\004e\231\307>>\216\274i\351Tb\036\221zYP\364\234B{\257L\177\002\254&\233\316N\030I\004q\326\017\013]sr\360u\026\274\341\377,\007\273\263\211\2314_\261\010K>\007#\322[m""\301\303\332\221Zp\372\223\037\037\325+b\316\010\233\327\367M\207\277\305q\236a\374\375s\214\237\202\326{k\037\2727s\247:ua\367\260\213"; + PyObject *data = __Pyx_DecompressString(cstring, 4914, 3); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (5064 bytes) */ -const char* const cstring = "BZh91AY&SY\314\207\314\300\000\016\252\377\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\376@@@@@@@@@@@@@\000@\000`\030\236\356\371\362\366\305\035\035d\266\353\254\346\301\355\256\332t\300\326O5:[\335^\270\356/'s@\245\003#\320{oG\243\253gG\274\352\230>\025%\001F\373\226\303\004\222\022\215S2\206&\362D\323\324i\351\2504l\322\237\204\362\021'\250\3756\215M\032\230I\344\311\352\230\365\036\240M=@\302i\246Ljz\200\022D\324\301\t\r\023\"zM=A\241\352h\03224\032\000\006\200\003A\240\000\320\000\000z\207\250\000I\002)\25154=O)\2235\033S \3654\310\017S\322i\265=CL\233j2CC@\320\320\320\000\000\323L\236\243\321\221=A&\222D\232\204z\247\352\237\252m\242\232dh\320\323\324yM\r\244~\250h\000\003@\000\033P\000\000h2\000\000\021I\002T\366\022\237\351\246\212M\265<\230\244\366\205=&\203A\204d\000h\000\000\000\000\320\000\006\206\2314\004J\010\020M\0314\032\252\177\224zS\364\211\275I\251\266J~\232\241\247\244\001\240\017P\000\006\324\000\000\320\r4\000\361O\370\023]\314\030\355\231\202bL\246\303<\347\027\217'\233\t\273\270\311\352\311\020\276\021\000\272,\035`\205\260\007\\]\204-\221mD\214\r\2642\021T\022\225CJG\230\036xz\001\354\205R0\n\245J\257h,\026\013\005\202\367E\356\264O\225\371\371\325\r\254\010\252&)\210\030\206&\321\371\214\300\321\305\300\301\273\334\tc,\262G!\263a\311\014\203\347Ma\006H\311\030\242,A\001\025$X@R)\026\n\240\240\002\221`\214\210+!\271\260s\300\nC\2010\334\363\275\200\037,\177\224C\334\0038I\"S\343~\375\245\006)Z#\205\207\241\324\220\014\240Do\273\002\033\360\241\200+L\002[ha\033\010`,\202\301\025\204b\022,P\223\240\211\020P\355\231\202\232\220\316\200\325\003N\245(g\215\300\271(\021_\022\020X\300dC\0269\210h@\204D$VD\211\006A\271\221\203t\002\317I%\354\231/P\206a\250\255v\332\233\013\024\261s\003`\357\375\200fj\340\316\t\244\27403\014%\260\227|\345\016\"l\030&\200\333\027\024\354=/;\264y\334\315\035\241\000\220\241B\204X\300\n\021J<\332\307Z\032\335|\330b\3555\234\344\210\201#\030\022B\020&\302\327\326\312,c\255\324g\2707\\\370\035\023@""\334k\031\013!\024v\276\350\250\212\030!`\032P\263\r&\236B\254\322\241`uk\224\032\205)\240\350\246\305B\315\341/\214HW-e\3546\311\272gp\2711\022\221\325p\251b\314\217\256%u\225\006\243\221\2555\256\370\215\265\246d\343\220\351r5\240K;\365\363a\200\030\206\004\327\307\022\257\253\226\224\301Qr\351\240E\004\316\202h`AN\247\204\002a\002\017\261\000)\005@\373\024(\202'\211-\004R\204\001\373(\007\324o\357t\371os\220\005P$\271$\367\331q\254P\315~\003\212|\331\t\302\325\241-\004\235\350``\224\352\354\277\035\372\254\225_\017+b\242\tAlq\225y\274t\222\232\337\262\016d?\340\260\232\236\265Xl\324j\255\"9\312\007\375\332\272\026 \312A(m\253\014:%\233s\202\216*\273,\303J\245\313\252\360\303A2m\347\260\333\0040\005\032\243\212L1\211\250<\355\27762r\272\034\230\241`\206\350\304\323\257X\020\301\004\327\245B\256Ki\322g \322pni\216A\275\370\036\327\243\350\276K\344Z\241\242zOI\364\335,\006\355\325\330HF\020\204.JE\035\203\272\317#m\027\033\ra\234jY\276\306\231\306\207\223\342\220\016\330\357F\007\373\220I\005\217\372\210\034@L\335\333\372\223\230\r\215\221\2715\261\300\242V'Mg58\345\304\264\205\316Sk\350W\262\025)\2406\216P\\\313^?\226\026\346\035f\016\257.=R\010\304:\231\0024\022!D\220\241k(\321l\220)\002\260X\210#\002\222\014\226,H1\214ke\n\024\201m%)\324Br\035\000\372`\003\325&d\0000,*\272\254l\026\177/\020\030\312\302\273\252\251\273R\252D\"\232\301\220\356\240\027\211\216\001V\006\222\034\010\240T\000\201\274\217\222\255\"\257^\256_U\000\337\026\000\t\354\211\"\311%\031$\241\346'u{\305X?c|31\271\204\222](\250\212\242\"\315&\306\031\201\322\314V\346\030Q\225A\210+\026A\202b\322\304Lj\216\220\322\246,b\212k(\364\235\361\351\017#\303\3448\013\023\222\274k\215\252#\\\305\254\342\224S\030\024\230+\305\302*i\225\210\207P\022\356\373\317k\275\003\230e\001\232g\235\346p.\010s\326A%\203vk\000\234\334\322C\234\036\301P\"\001Q\350\240!H\266\200\210\363\272][n\200\221\200i1\231\006\322Mfv{\0347\t\220@\204\030HF@\nB\227\363\235\337ySC\364\303\234\362;\372\020\0174$\021\004I\205\031\t\010@G""\337\265m\247\006\261\331\346\302\333\0179\327\017ryx\250\242\211\332\372\267\213\302\260\204\276\272\004\013\356\223\335\222d\000\355U\250%\371\307\237\311\266\303\243\217H\034~#\367-\365\313\306\004 \310\260db,\"1Q\210\305\"\212\253\024\214dTT\224JM\241Y\013\020\264\342R]\354]\007\020\352\347\246G\005.\330Y<\023\316\n\246\013\016\351\250\210\333.\0168\211\036\2102lhA7\022m8\032\332\350\315\tN\004s*\024\340\227\003x\245\353N\376u\212\252DF\000\252\304Qc\026$\"\222H\205\n\tMq\006\330\030\206i\373ff\2440\r\035\014\343!$\222\004&\244\262\032\016\211\241\237\304l\017\341\320]!\240\232(h\246\201\333\241MOB9b\230\226\326\373\310\331[6~\364\372\360\231#v\351\231\201\362|\010\372\261\346\355(\346&F@~\257\241\363\017|\007\337\r\027,]\177'M\235\302]\307\333\027a\305\000\352\324m\362\261\347\025\003p\260T\r\342\240l\337\253T\356\360\364\322\236\346<\363\240\\\224\252\006\361*\326\326\2523\243m\334j\252N\3000\304\274A\277\010\"e\336\362]I\004(\252\026l`~\373\340g\246\337\210\372[m\335_\251\361\240R`\373\304$\217\277\225J\260$@\n\033\024\227YsY\231\213e\252\241\226\346f.KURr%\217\372\267V\266\325[\276\373\355\266m\230\266Z\253\340\370\036\210\016\010\360\023\207\254\337\273k\354\031\246`ff\246a\305\314\351~\r\036\223\260\341M\363\362c\354Z\224\215\313\320\264$\274\353P\3477!\263\205\346e3\231\3152\310\250\342\322H5di4\236\362\026w\3170v\315\235\235\231\235\252b\261\025\2612\347\232\201\353\206\342\025\202\306\252\342\3109\350[@\346\0132hY\212\267\232\022\3347\352\366\016&\341\366C\230\3479\357;\320\316\215Z\315\215\251\244]\231\241\323\014\231\260e\0049\0143Cn\032\026\215\234C\020\255/w\2235\336\367\006\227\307\364vy\310\300\016\020\207\211\324\351\255[ZU\266\333m\266\333m\266\332\266\333m\266\365M\317\003\232C\301\260\016\300\034\356u\366\232\333C\220\354l(L0X\252\202YQ@\326C0C\201T\235K\253\233\213\"\344\330\344<\355\347\314\361\272{\362\007R\000t<\274\331\230<\333\026\226\333Km\266\333m\266\333m\266\333m\274\307,9g/\247<\376Sn}\244\364<0\337\207\360\357\274l\254\213\254\315""\367[r\006^ 2\314\274\354\22363(y\246j\222bI\206\221\342Y\246\010\224\021&\201\345\014\3210\002\241\232\322#T\326 Z\334\001)\204\300\264\264\263\242\005\300\244\346b\322\032B\213\277\311\202'\t\356_3c\034\354 \300O\0161\020\030\244I\030\212\202(\305\214\220P\"\005\tA\001\033\335\222\256\326\\\273\031\214a\360\340\311_\\\253\342\035\334\007\036\010\210UAO\210\267\333\347\216\334*\033\027\244&\005\351 \006\244\223\230\363\364YW\267\233\271\340\033\303\355{b\271C\312\010v\265\222H\022I!\005UUb*\252\252\336\265\356\020\237\003n\327\223\266\246\320\207'&\335\rkf\223\2733Y\260}\034gT\243\324IR\261(f\360\032\226\313\003%\205m\t#^^kz\221\014\3220\275\352L\234\346\323\234\314\034\231\206O\205\242T\231\251H\206\260T$\366\203\025\030H\347V\262\030\2467\244\257F\035I\242\322\217s\177I\216\377P\222\333\0203\000.\351\207'MX\204\010\010D,\266$\210\341\364+\226%C$\020\373\254\203\2450&\010*H? h|\273\216J9}\232[\006\202\375\252\217\256\010d\344;T;\361\316\3058Pm\253Y\230|\315\303\330\256\3406\001E\212\014\024\200\004+\000\266\376\233@\346\357gl\014\363h\204\301\262\335B\0204d\241\256\365\355\215\007u\320U\270\2579\327\2549\233\302\362\001\326\230S\311h\265\016\251\307%\322b\t,Z\306\201AP2&\244\341v`\261c\006\2735\344i3\017\020@g\000$\346cn\375\357\010\341\004\213~\312\020BL&\320(\220\210\350\333\014\260~\367+l\013\023\033\220\305\376\005\243j\253\244k\267\014\316\312\216\t\205\211W;\206\204L\3273\355\210S\271\320U\211\343,q\033\304\352\2513wRR9\235n{\263\271\023Yn\t\222I\226\201\201\330\241L\201\320\241!jF\207 \344>l0$Uw\234A\351@\"!Z\000\222\215(ZI]/\230\210SMO\030e\214\360\037V\352\335\347\320\027\252)\247\016\035Whj\252\240 RN\340iB\333Y<\001\266q\003~kg4\257Q\tN\221\334P\255\237j\006<\250\005U\312\000\230\204\020 `\211\335\312ZLoxW||\202\370\324\014\034ss\322\367>Z\034,*\352\032\304\230f\375hv#r\373\251\2468e\200(\222\321\000\330:\340\007\333\343\257F\265\361W\270B\365\014\303\226\372]\372\316^\316\303`\274x\205\271\241[\024\204\276\341w\033`\224J@\0039k\364l\016(\226\311\303.""\210\023h\204@)\022@\220\335z\327'\013M\367\350\3504\245\246z\325\372\343\206\233F\243\215\366#\240N\033\002\0359\033\201\2248A\304\237\n\201|C\307\253\334:\256\372\336\223\215N\017\235N\036\215\210\354\001\216\304s\233\010\200D\240Bm\035\372\2051\r\312{{6\001\264z=\203\221\234T=Eh\241\333lf\230\300\033cX\212\344\241\233V\256\226\311TOP\3154\355JQJj\331P5z\221{\337\023\262\234\246\334\r\273\304;5\355$\016:\nj]\030ED\3748 4\223m\006\206z\205\320\210'\317\274\3043)\206)\266\371\ne\334\253\273o]\236\"\237\r\371{C\261;C\270\261o\207\2347\034\002\014\202\022!'\214\357\r\023\177\207\220\007!\010\002\316\372\r\207\023\032\210\013y\3219\312\216z\365\236\261\210\272\343\335\377B\354\353\312\350\030}\260m\334\267\270\r\320\t\327\266\036J\342\314\311\016\220p\303\231\000\007KY\322\260\316-\260\266\311QL\242\210I6H\300m[5\202Y_tB\013Be\016x\326\344-\262|\332\305\273\360\343Pt%\253J\322\203YNq6\344T\272\264\202\024E\310\202\227\230\340\360\306\243a\324\000C)EU\"%\002\"\003\304\224\002\024V\001\202\025\2138'\211:\016\311\014\346\345AD\352\240\264P\036\254\201k\247l\364 \025\305x\025\003\335\014-\241\345\014\342\251pK\305E\204D\221\022\001\346\330y\274\001\033\032\205Z:\354\355x\276\204$\213\273\331\246]|\366\245\251C\227\r|\313\250jI\326\323\257o\010\345K%\010!y\300v\341\257a\330\356\252?EC\t\273XZ(\201\323L\255Z\326\247E\306\213y\211\0143\371\214\365\356\370\334h\236`\361;\373\341\363\301y\t/,!S\n\273\260\2610M\206 &T\311\001(.!M@\3363\020\273\024\322)KIH2f\303\225m=\323\216\214\"\305^\244xt\026$$\n \003\353\367\253\200\205\013J$hl8VT\024\247\234\324\222\201U\272\304\371\\T \036J\001\004F\n\004E\266\263\317C\031$\211\033eK\212\262\324x\361\337\323\305>\235\372\252j\3157\221\220\356\206\277\nH.\333Q)\1779_\005]\352\264@0Lq\227\245\260\026\350xI\t\n\311-\22501J\233A\024\235\035\306\275\265\342\366\351\252\0268H\304\305\250\360\001VY\343\232\252\000\365*\341|K\3555(I$6\261M\251j""\327\261$\205!%\257\177O\265\314\252\246\302\376\001E9\366\371\360\251\321\273Vx\343\215\213\026\331\324u\017.I\310;|\327>\257xg\270\207\205:\3437(|P;&\003/FI\200aC\236\304\260\321Hf\320\200(\306,$\017\010\020\240\211\005\010\340H\261.\201\302\310\005J\213$$$\307\032\344)/\252\024Z\356\201\211\271\320u\351\263\255\270\361\314\263\016\271$\227\251P\001\341\337jR\272\004LA\324\341\237\014\240\303\010\256\341$\222\224\013\027\300g=p\r{,\363j\210\000\341\n\321\221\231\306\235\3329\343\343\310\003\210\234\200\344\247+\026\r\201\303\347Z\036\312\206\340*\304\017f\275\207\302C\216(q\204H\023\024\0055\304K\212\247x%\365q:\202\350\314`@+\341\274\372\007o6\202\035|\322g\365(\356\227Y\207\252\252\023\242\300_\301\007\233Nn\300\334\035\356\254\3467n\362:\037\020\300\000\366\300\016\325_\241\262\217\322U\240\021BQ \260\220\220\223v\035,\236^{[\223\357\337\200\363\256\343r\233\311\024#z\271\244X2\302\374\000\321\nE\034=B\000\213\341s\212o\277\324\007\230\204X\014\207\366\210\304\021PR\002*1|\260\363d_\326\037\231\"\303\344\301\024\201\341\t\"\320@\300\236\364H\237q\240\327'9\321\354{\002D\020?#\010\037\304\223P\302\236\264\202D\004\n\177\302 \025\204\235\341\377\277\241\177k\217\243\367\032\303\004%\027\315\023\317\037o\237*f\301\331a\037\341\244\265\364\322\206\n=\000\344\362aKrS\007 hd\335.:\3767#\344\240\377\234\247;F\335\222,\0142b+E\233?T\247\010\302%!l\031\366\342b!2N\361N\036\361N\031\020\007i\\F\002b\324\301\r2\"Q\213\230\230\252!\352p\234\021\036\tA\243p\206\255\265\351`\351\313\341\031\027&\212p9""\347\257V,b \304I\343%\305\224.m\274M08L\301\033\\\035\252\246r

#\274\313\276%'\023\030y\364|\031j\177\342\356H\247\n\022\031\220\371\230\000"; - PyObject *data = __Pyx_DecompressString(cstring, 5064, 2); + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (5043 bytes) */ +const char* const cstring = "BZh91AY&SY\207{HT\000\016\252\377\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\376@@@@@@@@@@@@@\000@\000`\030\177|_E\037@\035\366\017D\210>\330\223\345\237'\\\205\364\353nr\235\336\365-\200\003J\000z=w,z8\200O\252\272\336\335\rP\001\246\300S\341$D\220\223\311=M\246\"d\321\341G\240\231=1\201\031I\265=\246\236\223%?E<\232dm$\362\236\247\244\323M\250zCCi\2122\000d\324&R~\224\375SI\345\017H\r\000\000\310\006\206\200\000\000\000\014A\220\003@\032\000\000\022\232\004D\244hz\206#M\r\000\320\003@\320\003M\244\320h\000\000\000\000\000\320\000h\004\232I\025<\224\321\203)\352\217\324jh=G\250\036\246\206i4\310\000\000\000\000i\352\000\323@\r\003@\000\004T\002\022\223\304\324f\220\362\231\251\3511\250\364\232h\332\236\240\3654\320\000\375Q\241\352\r\014\206\324\000=@h\014\233Q\372$z\201\022\204\004\3114\302&\232\014\204\033ST\3311\251\036L\246 z\207\250\323@\032\000\006\215\000=@\007\251\247\250\323\324\365>\200O[\035\275\034\252\302\245\032W}\254y\275\232?Z'\257\352\264~z\"\032\204\200\3740\016\260I\376\300\310;\210\356\217bd\322\035\202\010\224\240Mi(JF\300{A\355\206\310\\\245\002\345\265\317\304\027\205\341x^\030`\230`\340\237\353\377o\325\014\246\001\005Q,\226\002\301c(w\213\300\301\263R\366\347\302\tc\034qG\021\263a\305\014C\350M\002\014\221\222H\242,A\001\025$X@R)\026\n\240\300\002A\221!\026\004\221K\313\203\202\001A0\032\227\236\243\324\001\363\307\371\204<\340e\t$J}\247\3544\240\305+Do\260\377O\337\240\r \210\352\346!\335\0246\207:m\023\227 \336<\010\240\262\013\004V\021\210H\261BNr$AC\270d\nlC*\003T\014\372T\241\226\027\001q(\021_1\010,`2!\203\034\2043 B\"\022+\"D\203 \334b^\334\200Y\344Iu\223\025\351\020\3106\025\245v\315K\024\250\361\001A\312\365\341\021/\002l\"P\370\200\210 gv\031\340\215\310h&\243\004\314\033`\340=G\266\363\273G\235\310\315\324 \022\024(P\213\030\001B)Gn\203\242\032:m\277\007i\241\316H\210\0221\201$!\002jZ\355\031E\214tv\031n\r\327\036\343\232f\033\216sA\320L)3\363\216\t\201r7\006\364u\r\346\377u\306\365\300\310\035\232J\rB\224""\314sSUB\315\320\227a\022\025\307B\353\r\261nL\256\013\211\200\224\216\313\202\245\2132?\203\022\272\025\006\243\211\242h\211\302\332&D\350\304s\270\215h\022\316<4\346\303\0001\014\t\247E\037O\325K\241y\206\207h\212\t\343A;X \247\337\370\200N C\344\200\024\202\240|\224\242\010\236bZ\010\245\010\003\376\310\007\310|\337/\033}\312\353\364\220\013\320WT\266H:\230\0262\237\334\210\327\241!\210_u\211e\216J\"\002\004\325$\307+\357#Y\222\2073/ @s\305\211\331t\272z\362I\250\333\273a\310\207\336,&\307\251V\032\3546V\221\034\245\003\376\355\\\313\020e \2246\325\205\374%\233s\202\216\n\272\331\206uK\213\225y_\230\306|\264\310\234K@\014&%\006\260\206\303\230\245\371|\327\303J\030\355\241x\305\204v\014\255\227 \214!])r\257{\246\374p\362\235\204<\247\261\344\356\364\235\337\211\353{~w\330_`\265C]\211\356\036\341\355;,\006\352jHF\020\204,J1\035\007\220\316\356\332.6\032\3038T\263}\2153\205\017i\332 \036\300\235\204`\177\311\004\220X\377\270\201\320\002d\356\341\322\234\300j\331\034\313\336<\260\\\213\360\347\241\315\355\231\213\2743=\351\303k\236H\341\206\320\351=\340\314\307L>\310[\230t/vwtt\310#\020\351d\010\320H\205\022B\201k(\321l\220)\002\260X\210#\002\222\014\226,H1\214ke\n\024\201m%)\310\204\340s\204\373`\003\363\225h\0000X\252\372\234\036\002\333\363\370\201\320uo\r\372*\247\223\025T\221\024\362\003A\365\320\rJ\236\201V\r\344o\"\201P\002\007\022=\312\264\212\275[<\037Y\000\343\026\000\t\343\022E\222J2IC\314N\352\375\222\254\036\366\370fcs\t$\272QQ\025DE\232M\2143\003\312f+s\014(\312\240\304\025\213 \3011ib&5GHiS\0261E5\224|\243\277;'\217\342p:B\304\341^5\306\325\021\256b\326qJ)\214\nL\025\342\341\0254\312\220\203\250\004]\337\245\255\324\003D\347\001\323:\307G\010\027\\;\313\230F`t\013 '74\220\347\007\250T\010\200Tw\320\020\244[@D\234\035.\255\267@H\3004\230\314\203i&\263=\037\242\351n\023!\000D\210\243\024\002\245\333\325\036\332\234O\242\035S\327\035\236\264\000\364\354\021F\306BR\014\004\037?\243\227\271\333'k\334\262r\263\335\316\333Vw\ts\207\252.\247B\001\346\330m\363\330\363\n\201\270X*\007\001P5\341\263d\360\366}:S\327\303\236o\027\025*\201\300J\265\265\252\235\225\372(\342\252\246t\002\021/\020o\302\010\231w\304\230i \206\212rZZ\363\370\236\323,\366\374\007\261\266\336\032\373\377i\002\222\367\320BH\3738\324\253\0020\000\241\261Iu\2275\231\230\266Z\252\031nfb\344\265U'\004\261\377V\352\325U\265\337}\366\3336\314[-U\360\271\271@\345\203\304N?P\341\273k\3432L\200\310\311L\203\241\310\344\373y\274\216\243\2158O\216>;R\221\270\272\205\241%\323\274\241\316nC^7L\212e2\231\343\211\211A\336T7T\336o>\342:\347\256\241I\254\244\244\222\223\023c\260r\330i\367N`\375\300\354G \310\334\372\225\017\272\217HP\271\324\275\035G\034\357E\274/\331\3368\233\207x:\307`\354^\303\316\316}Z\315\215\251\244]\231\241\323\246.\314^\036\203\3303=\257\305\r,\211\2010%\231\224\346\236\31559\201\343\311\261h\026 \033\302\036\233\223\311\255[ZU\266\333m\266\333m\266\332\266\333m\266\367\306\3477ZC\242\3009\300\360\234\347\332km\016C\233bdD,\252\202SQ@\255\204\202\034\n\246v\227l\033-\214\rY9\033\316\277\314\352x\004\016H\001\314\3655\231\203\325\330\264\266\332[m\266\333mI$\222I$\222\262(E\r/\306U\0042\320&\366.\025G\341w(\033Y\317\215`9\216\230\r\243k}\260\336\305P\363IT\223\022L)\036%)\222bI\205b\225\264\226\270\000\3004w\t\264\346,>\307\021o\013\300\342q7\374\240b\027\237W\207hv\205\333>\361\266X-\216\247""\213\240|lA\200\374,a\000b\221$b*\010\243\0262A@R@\250\203\354d\223\243\243\207\206r\207\337\351\363u9\344\223\341\036\341\017\025\025UAO\207%>\n\3732\225)\002\342\236\3605\n{\302\001e^\177-U{\333z\336\001\327\017\345\352I'\202\236\261 x\323\025PUQ\025UW\267J*\252\252\347\177}y\t\357\366\337\310\333ShC\207\r\273\2348qr\325x\264\0255H\306*@\223\031=\317f\3404lW\001Y\204\254<\222-;\236\335g\275\231\302\265\327%\227v\256\354\247,\255\303\326\223\030\263s\211\225\240d!\364\223cMH\350\335t\210\026\336\302\322\302\320\"\312\023\276S\371w;3\026\347!\\\361\003\206\000\272f\376\367\337VD\010\021\020\341\312Q\021\337\372\234\364\342\250b\202\036\376!\300J\220\252\n\220\200\354\206\366a\236\243n\264gF\"\365\344>\024\00478\216\325\017\036\031X\247\032\r\266hd\036\026\340\361Wp\032\201E\212\014\024\200\004+\000\267\016V\201\315\342g~\006^.\330\233y\235\210D\016\014\334\314X\257\321\321>\301\016\314;\370\302\375\225\331\260\237\227\335\205\347\237\232\265>?\245\247\236\374\313^\351\3301V;H\024\205\nb\016e\t\013R4:\303\254|\227\336H\252\360:\001\344\200DB\001X\000J4\241i%s\273!\020\246{\036\210c\204\355\037N\352\334\374w\006\230\027\337\277\177\227e\316\030`\004\024\243\352\207\221\016\\\232>\200\354\254\014:\350\007\206\312\345\000LB\010\0200D\337w\\\270\306\373\341[\343\334\027aP/p\311\313;\256>z\034l*\354\032\304\227\344\374P\352F\342\355\324\317\013\361\274\024Ih\200j:@\017\245\206\231\265\257\231_\010\205\325\014\203\257\205.~'\036\315ME\350\350\013sB\266)\tv\341w\033`\224J@\003)k\267\352\035\010\226\305\277\035\360&\321\010\200R$\201!\272\352\327\026\373N\027o\336gKL\264W\373g}:\317)\311\374Q\321\023\266`!\273\023\214\031\341\302\r\t\346\250""\035\220\207\027;L\316\243\254\362:*q}E8\237OTuT\216\250\3455\"\001\022\201\t\264xl\024\3007)\353k\250\033G\177\214\3532\212\207\244\255\024=9\370\252m\016 \357\304W:\214\264\264\262e\226\204\3542\224\333)J\246\226Z\201\213U\027\304\371\216\252u\315\267\233x\010ui\264z3\024\330\271\260\202\230E\001)&\264\032\025\315\021\3727\227\206\005-zkv\202\226\360*\363k\323g\220\247\246\356\377\250;\223\250<\005\213zy\303q\304\"\001'\226xC4\341\331\347\000\357\210@\026xh6\034\014* -\323|\347*9i\241\365\006\"\351\037\007\314.\275\354n@\277\300\033w-\327\000\334\200N\366\330yz*\200`\204Q\002\010\222\372\t\225\007g\273\245\207\204\347\217\213\034T\325\361]jcT\306c\034e}\312\0358\224\321\314u4J(x\003\343\260\001\344\306\3741\264\240\372\376\000\317\244\310p1me[$`6\255\232\301,\257p\204W(o\215\256-\266\177\366\242\331\364\341Ps%\253J\322\203Y\215w\211\315\221R\365i\004( \332as\312\372\215\207\000\002\030J+$\030B\203\010\003\300\224\002\024V\001\202\025\2130\207\221\357\035\361+\317\315\001D\357PZ(\017{\020Z\347\327=\244\002\270/\022\240{\001}\263;\241\224S\332\200\005\340\227\305E\204D\221\022\001\346\332y\274\240\215\215\005Z:\331\346z]\210I\027wj\225\313\327\247\2443V\353\274&`\2703\\*\345-\261\222y\t\201\002\rl\032U^\247S\272\250\371\324/\233\264\013E\0209S\033V\265\251\276\341\242\3350![\356\305\227\317k\024\356C\212hh\021\344\003\244\257,$\322\003N\000T\234\211\324L\rjkF\006\240\\B\232\201\274f!v)\244R\226\222\220\313&\305\312\315<\274b22I\315\t\327\352\232\024P\212\000:\272\222\250\205\026\250\220\341\271\247\0076\301T\330l\221\200\252\354e\273\357\013\220\017\262\200A\021\202\201\021m\241\345\241\204\222D\215\261\245\302\254\265\036\\\267\361\344\237\201wEM\231'\0022\035p\323\307I\005\333j%.\362\225\361\252\360U\242\001za\204\272\226\274[\200\361\311\010\232\022S\227\263\014A\272\t\305\341\334Z\351\265:\351\277\310ho\030\330lXy\000\306:\354\325\305\000\367\025o\273\002\355\246\305\t$\206\326)\265-Z\365$\220\244$\265\327~g\233\231UMK\273\002\212s\355\362\337S~\355\231a\206""\026,[^\223\244z\372\323\254;\376\325\307\303\342\014\267\020\355\247z3r\207\301\003\252^.\326+\270oN\266\211a\242\220\315\241\000Q\214XH\035\220B\202$\024\031\270\2620\332\001\313\250\001\206\022*(\275+\300\220u\224(\265\331\003\023c\234\360i\263\255\270rfYS\240U\246t\200\005-Jt\326\271\240\227\210z\327k\3400!\004\306\212\264\250\327:\320\216; \0334\263\2678\200\r\360\255\031\031\224i\340\315\313\016\240\016\"u\001\324\247U\213\006\201\277\350Z\036%\016`*\304\017\025zOI\016X!\350\021 \234 _\272Jy\024\372\342j\257\007\2646\rM\250\007?\036\007i\325\315\230\207O4\231{\364wK\226_\356\325Bo\260\027x\320y\263\346\352\r\301o\013\263)ss\326o|\201p\001\352\000\035\365^\335h\372\025h\004P\224H,$$$\335\177&O?\257ku\236\315\334G\235w\033\224\357\330j=o\346\225\2748\206\036P\364\206\245\351y\350\370\212\201\234''\003\311\315\254Fr\225\204\364C\\\201\340\300\363BF\331\003\033\263\214q\205Td6\210*\252\272\334,'R\226\031=\363/XH\326^E\001BT\213<\362\244\241\350\007\244\343\030P-XD\307\2730$\300\261\222L\251\374\372k\214\375z\247\345,\322\204l\214\276\240\201\331\003Q\226\2330h\"\306\223\272ZL\314\177\034\340q\354\032\025\3338\276\321\007Q7% B\221\242\017\034\345Ux\003@\007cl\202\255]9\\\010;\251\267a\237\375\003\275d\314<,\305\330\361\370\210\204\244$%\224$R\227E\320\362\212av#8`m\261\323\231\245C\302T\033\272;[\237\230*\200R9_\270\330\212\006\035\335\327\325\231\216\014$\272\263\351\204\275Ww\025\307\037\214\240\274V\222\272j\222\304Uc\374\252\345\270\245s\265\236\340\337\351)\330d\214\330Q\013,3\335`\225\263;\ri\272\307 \255\323\265\331\216""\307gM\343\263m\340[\215[\257\237m\263\276n\377}?<\203;=8\003?\206\374\275\301\035\034\233\301v3\374\235O\330\243\251k\321nWXzp\307\306Not\217\261\007\333\310i\326r\334\337\336\207\357W*\207e\233.\257\211\035\330\257\231\233\270\272\276\226\210\255Q\353,\235\005\306Q+\372\217\320\2518\263\222Hk\274fL?^\247\222\231\325D\254\236\211\334w\340\"\240Cp\233\242g\250\350tmC\237\317G\356,\303\347\3314\025\245\356Rt\007\354GP\260\221\261\2515\206&\306\232h\370\014L\275\215\301\024\260\3646\025\370\372\363\017G}\363\227\006\204!\323\373\306\221\2753\2040\301\036\037\203!\0333\324\246=C6(\317o\324\346\3368b!\216}1Md\027=\211\246\031 \214\323\374\240\306\304j/\214\353\006\373\004c\317T>\311'\262\311\004\303\032\237m\300|\232\243\022<\376\352\017-\225\247Y\330\263\366\312\363\251\261\244\366\251G:\237\212\302s\363X\212\346\301\025`\221\301\344K\323q\352\212\237P\246\301\366=\313@\300@<\360\334&\277\006\256\002\266\2163\311\004\300\204P\0022=\340`\"\306\003""\2220)M=\277\377\334;{s\226\000b\231\277\230\030\217u\214(\3712Fs\337\321|\002\020\001?\275\231e8\037\365h\205\332\314\344\2514\303\3041\024\311\342\0274\246\005@%q\344\204\334I:\235\316\3604\3627\002\313\301_M\352\237\310\200\277\307\325\017\350$\307\370\376\235\305\031tri\221\311\345\231t\214Y\2566\226\000\331\345Wi\030]\002\241\317P+\311\014\315/\277a\361\333\034\266\346\r\221\374l\"\366\221|\250C\010\004\317h\372\244G\343G\225\3011\362M\017\240\017CX\252\261\370\262'I#\2032i\337\357\240\210\021\240\201\251A\373\325\374\255Pv3\236\340pW&\215\327\325X\202\323Z\361d\202\343\227\370<8\340e\353\267Z\326\275\276H\004\277%\212D\232_&4\367\030\223\347\340\212\273\266\372\\\251\325X\rP\353Ip\346\3608\251\006\323\002\202\321\005bY\247\331\370\334\032\023\373h\352\206\263\037|M\214\3418\213L\326\242\313\000\335j\314\367\257d\006Z\334]0\3524\263\221e\255'k\004X\215\265\304\3124j\275Q]\351\250\271\247\236\204\306!\023R\365C\265]\233\245\321B\210-D\327\020\3304<\032\020\232\373-\227\233\020l\ng\233:\014\340\366#M\274\265\232\252a\322<\322\002\227V\342k\254\3735>\233\321\266\026\\\323\200\t\223\306\224\266\251\243\006\336bD\207\3374R\267A=\366\r\317f\3606\3307\016\324\2007\277\031n\35616\260\034\322\266\260\030\252mRu\376\221\310\363\315\r\3707\017\207S\344\031\263\301\277`V\252\307\200\305\007\206\026]\006*\326c\032.\326\237\302Y\367\326\001lA\337\2534\234}\211\3254\023'GU\213/\212Z\014\331\033A'\213Z\317\321\320l9\007B\207\210^d\210D3\371t\234k9\235\243W\230\352\374V\023kr\266\377\231\254\375\2105y\326z\334\232m\326kZLi\3411:Ze\373\033{\333\201\366\n`\277\244\325\214zR-f\330\213\336b\262\225\340[\371[\273_i\331\365[\221\264C\201\333\256\260\235\320\201\260[\254\261\375\322\311v\240\003Q\333.i5\243\201\314\346\031-D\335<\331R\324-\316\"\273\237\307\332\365[\221\264SQ\333\255\260\235\320\211\250\355\327 \272\032\337\310\377\016\020\257\372\375H\265at \337\352\036\200\211\332s\n\342}\216\3466\323\261D\306\027\313\260\031\310?\323\014\027\215f2I\rv\254\312\230\030de\2118\344""\"\034\2641\301B\001b:\213\217\260\010\210\215\340\177g\300D\351\330\307X2\303A\232\222L2$\370\343|t4VKU|\246\254\305\324\033\317\244\340^?\306C\203\213$y\177\034\217\342H<\023\303KJ\233\252]u&\350\0178Okr\344ub\204\\\311\005)\217\030-\322\200\0046Rm0\033\261d>\316D \2415'\013z;\246\265a'\314\364\"\344\242_u\221\241>7\353\364Zb-\021g^c\001\022\020f6\252J\021Ip\021\203\341\244*\000\027\226\007\276s\311\014\360\224\020\003\327\r\370\033!?N\346\260\205\010\247\022 \273\364*<\022\212\364;\334\310 \271\301\365\023\2061)\206\2475a\301\2524\374\255\202\202\226\031T\"\255\201\322\356p\323\006\361\006W\000eL$7\024H\265\231fViL\241a\007\240;\twh\261\231\010h\026\233@e\251\225\"j-\316\324\313\245#@i\232N\301R`$\260\000QDB\364FB\373qv\225\261\234\366\2247\002\035\355\031\304\306\325\026iO\372\312Z?\351\313fi6\305e3\331l\006 \200\221\021\026\032m\230Pm\343\216\\\315\342\"\320\301\300b&BF\364Q\202TU\350\270o\025\317H\0043d\2150\226Ie>1,\252D\235/\343 Y\347\230\344\nd\352q\016\224\007\377\221\213\266\014Zqf\205\006^!\257\223\214V\310\346Y\220\013J\250Fk\375S\223;\301am-i\260\034\2174\363H\254V\252A\243\252\265h\243\033g\351-\243\217\0002\332,\350n\226(S\004|\003`\317\257\261\231u\255\302b\022\222U\213`R{\254V\222>\301\006d\017\rc\350\306\211h0\206\256\3413\232\003\271\243\202j+#F\303\354:\214\316\365\004\277f\356\340>\231\234\315\306\337\211\254\332w^=\037P\274\205\334\366\340\241\201_\266\036\013\271r\277Cu\234\021Cp\337z\"\366\264\237A\036)\251G=tN=w\273\340\251\364\035\333\nn\255\na\265\317\243zf\225\247E\227\266\364\251\350j^Z\007\241o\\\035\277\246^{X\372\251D\227\373\217m\315n}\021oH\236\262cH\360W\372G\205\317\222G\232\225\000\201\323\242\277\334\177J\364T\000\300\037\302,\340\3448\261\305\013A\201.;'\244\307rN\351\2518\317\213\353\022-\345*\000\3506`32%\367\224\035\347\305\274\024R/\336PH\377\354\026\254\034R\207&\2449)\267\375\323\241\201\223b\257xA\014\213\253RXb\344\240L\313\353\n\255\344\013\363\305#\305p\271\177X\010\013q\321'\367\310C\362\274rDyS\270W\210\026\373""\212\363\245\276\322\274\372\374\265\372\372M\031\360\344\324S3r\250\326\302\255~\003\310^\211\223\275\n[p\021\212\266\307\017\r8\267r\235S=\206\254\002\024\254\250\366H\247\345\220\034\2568O\211\223\222K\362\324\250\023\356JCRh\277\210;)\272`J\257\177\251\276|\253\276\375S\375\363?\352\177V\324\225\325\n\231HW\234'\305Q\251\007Pp\272\205?\304\353\320p\203\236\211\037\344\200\374R\031T\002\312\313\302p\201\306]\303\345\261s\342_@\245\013\021A.\272A\235*\375'\232D\341\026\346\221\3430P\356\037\024<\345\376\021\201\256h\004o\361\352\320\214<'s\212G!\304:@\251\235n\325}E\276\241\\)\204Q\263\027\324\221KRLv\311W`s\027\312jS<\014\212\353\034\023\217\001WB(\253*3t]-k\272*\254\0004\340\3455\261G\034\021\321\340\266\346\205~\261O\274\017\242|,\363J\020\344\366\2658WdK\356\322+\365\0050\345\025\341}\271\312{\202\316\220pK\374C\372\227\234W\036\025\336\024\237\250\317\027\325E\224\242\372&\256\306W\325\3255d\307\033)$\205\313\3561q@\032\001\004\306N\213\327\244^\351\022\210\330S>3.]F\255*\273G\005\0360\037;\217\31042\252\242[1!\360(\314p\216\n\304\230\206\204\tPM\215\177\372\024\267\360X\314I=vt\236\330\312\013sB\243\034\006Mp\272A\016\207\305\240H\213_\311\266\023\nS\010\300>\007\306}\344F\\\324\355\335\306q\270\205\020\341\234a\232G\204\017R\020\010\345\345;\n\255\231\001\0078XzP9\026\3044XXN9V\360\343&\233\322Q4\020CE\316\210\217\244\327\260\335\231\363\"/\005\240\031\220\227\n\275\005O\231\272$\375\245\364(.\263\220+f\2434Q\227;\020\312\236\200\003\354\214\242\260%5\272\340P\272\254zr\032\216\353G\340\331\334\205\027\352\357\377.q\352\213\305\212C\327\245\006\2658\276\025\027\252\n\340\024\214\360\253\346\021O\212\247A\341\336\243;\2558k*\202\024\022\005\275&\376$\306$7\250\344C\345\036\350899\211\342\362b@|\013\034\320N\323*\321}\322<\270\262Kx\272\303\201\340\032\356\200\364O\250\3576B4\360\270\016:?\217\240\364\375\257\203o\231\025\365\275-\\d\307\204C@tp\204/B\200\272\317\204\353\216\300%\270\205\260\356\010\010\023\210#\330\225\371\353\247B{k2\235\010\0142fP\270(\344\320qi1.\253\272<\322\240\356\177\021u\014dW\355|p=\t\373\341\306vi\341\271\356qW\373M\301\336\335R\243\376m\373\364\014\347\202z\341\272Bo\037\3074\360\031\nOK\003\253\003h\217u\335\023\352\304\r\365\306\202\272\300\250\314\312\366\245C\003\016\022\354}\306\364\245\354@\0341\324w\014\013o \306\017\243\360\007H\200\246[\244_|\014\022?\205\222\320\323!\\\264.F\245\237$\032\217\317\036\361\2444)\017\312\327\025W\303f\250WW\340p]\2018{\263\360K1\214\201\354/\252\203`i\312\\\035\3470\215\202\235U\347\244\264\016\251T\316:\324\374J\344\347\204\034\363\":\266\212{\0303T\222\216\rk\351E\325\025\251'\220\345G\344\227\252\177\256\030,B\000aC\341u\022H\031\224\r\237\206p4\n\036gA\216\201@\252\375\007G\227\036\366\357\033]\017I\354\326)]\230\307\"\354\227\240 \340\353\017\013~\214\320\214\204yL\374Ez\251N\377V\010\027\022\305/\352\342KtL\223`1\036-e\305\000\014\222i\2274!Ee\2072Ol\024\220\203$[\035\235\224X\260\0107\252\022-\346:""\341p=/\254\251\036\022\357\211qi\nR\352P\307TVj\241\251U\350iJ\206\037\211\257%\342\221>A\276\375\0316A'uT\311\025\372\n!\314\204WI\372\\\213B\215\245g\301\027\367I!S\243C`\355\306\333K\020hSO]\221g\325_\357\025=\305k\245\303\020\366\207\214p\026\231\331+^\306\222\215|\224x\334@a\251\324WZP_\353\231\225\272\306\251\034\337\371Lb\013[\013B\232\314<\206\231\244!\252\263\342\007r\246\374]t\027\233\037\033\324\367\016(\315\tR\3401\324\330vD\333\264\031\301\017\245`\211.\255\223L1\252F\001\321\217\352\307\224\232\312\251\271\317\333\207\016}\351Y\350\205\333B\357S\274=\355}\206\267g\275\357\360\366\256\367}\2575\325{\007\212\025\272^HH\347\225\201\202\253p\271x\257\030\005N>Q\337\276\333\265<\367C<'\305s\244\357v\341e\321e)\217c\244\370\363\315\371\276k.\350\201\3157\320\325\266\312\371\355Tp\367\332R1'\335\271r+\307\324\241?j\277\343\030\226\255\010L8<\026!:p\231\032\306\3211*|\221f\325\311;\005\177\341Q\361O5\374\302\312\241\237%\220\357I\037\225\021\302j'\226v0\213_V.(a\255,pC\034\207\000\205\223'1(\265w\371z\322\322\362\354\030\305\230\315\210q\352\002\033\364\227\270\323\203]\202\036\022C\035\201\276\251\336|\013r\005\240\352q\217F\310\315BO\005\366H\212\036\321\257\366]R/\335Ro=Q\237|P?D\266'\016\r\234\023\303\345\246\232!D\022$\304(\273\247e\027\204\023\025\214\034\306aG\027&P\247\252\302'U:\243\\\006Q\247:q\033Nh\022\206\362\222\237\310\264\307T:\323k|\346R/\211S\245\220\034\372'T\031r\227]\203\345\341\221r\377@\331=\274}\027\243\262\220\236[8\266\356\013$\326a\205!\350tjlZ\302\250\270\342\254\362\014\223E4#\307\326M!\000v\354\300\242\36118\213\343\220\375\365*S\030=\270\205\247\240\002\017A9Ye\010B\n\320\271\342G5\374^}\277T!\211\017\211|\376\tm;\320\034\037\n\315\210\241Q\320uET\244u\001\302\"@\357\013\226#\313NL\007\\\030\232$\345\tyE\231S\364@\237\274{\350\023\237\240u7\024'\375\246\022$j\367\r\331\243U\031\315\005\311\353\250\2765\216\"\363\376\t\031U]\302\"R_$\375Mx7\026\177Mx\177B\026\232t\rE\003\274\n\t\357D\332\252\224\352o(\230\272,\260#I\212\277LMJ""\325R\351\031L\200\266\335:g\021\227\007\232p\027 \242\353\243\244\036\215\353\344U\227\371\21181\210\216!\241\001G\3510g.\320+\205\013a1\214\357\270\316\212\257po\204\370H\363\343OE\027v\277\207\024D\177\363U\033\220`\350\202\364\273\362k\361,\244G\356\032TcK\210\305+\325\372\016\004\235\302W\360\314\234\354!\245L\016\264\311\341Q=\013%R\211\274\003\341\361aP5\260\032\265\357W\214\324]\202\331a\031/\207\\\030\344\242\317\243\215\222\206K\213{\007I)\233\224\036\264R\255\376\316\010\226\241V\217@\362\036%\357\035F\365w>}\240\277}\205\007ER]\364\203\256\037\207\250\223\003\215c\024bX\234\340\001\274b\232\037\000\234*{\306i\330\300\301U\336_\004\377\013\037\367$B"; - PyObject *data = __Pyx_DecompressString(cstring, 5082, 1); + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (5074 bytes) */ +const char* const cstring = "x\332\345\034K{\322\332\326\326zl\217\034--}\370\016\265\332V[\216@}\325{<\037\266z\264>\256X\337=\312\r\220\266\034!@\022l{\324\357;\303\0163\3140\303\0143d\310\220a\206\014\371\t\375\tw\255\235\020\002$@\037Z\274\327O\223\235\375X{\275\367Z+D_(\312\013\034\035\023\250(\3153T,I\363<\265\222\346\250X\232\305\201\004+\360\276y\232\235\020\2505:\223a\330\371t*\223H\322\321$s?\307\306\204D\032z*3\251\030\315Rl\032`\001$:\231d\342T<\30111!\271i\231\304\260\000?\226`W)a\215\026(\370\233dh^\240\370t\212\241\322+\320\313P\237\350d\216\341\361i5\361\211a\341\231K\340\236<\225\312\361\004~\206cx\006\240%X\2126&\361\214\340\373\371g\n\376\334\333\240S\231$3G\036\360\317\235;w`E\032 \244\250\337\250gzkr\312n\334G\307\343\257*\333M.\217\321c\323\324Xt\354\3754\265\354\237\246\002\357\035\027UI\234\\\002R\036\262K\214`\351[\366\277\237\252]\313\2479\201\211O\032\267\r_B`R\374\344\324\024\341\377\006RV\201\276\312\010K\351d\016\271\215\023L(\313\313\223\023\364\3044\345\237\232\246&'\242\244\205\210\326\367\006,\275\001\353\334\367\004\324\376\n\307P\200\216\027\320\323\264p02r\224\206Mo\240\265\214P$\200D<\007F\0142\251J\203\311\346\350$_\025\031\216\322 \2355\2063g};y\300%\2663\241T\200\00021\001\266\264\216M\304\200\031\313\2049\300\227\357cI\330\2125\261\251\312\270\223<-\343\357\367Y\321g\002\323\324Ls\306VV\032\254\303\025\376\037F\0143U>\317\330\013b\306N\0223\366\242\260\200\230\331\213A%\370\252C\310*u\373L\266c0\276\035\260\274\032@\007\330i/\007\276\363\213\201\035\025\373[k0\311\354:G{\357!:\337Wsw\375&\305Ys\361\330f0\235In\342\261]y\241E\247\322\271\216q\0256\351V\360\340\375\304>\236\233\300\211\253\355\276\304\260a\306\325\357\223m\332\347\230\016\231\345\036U\322\2324v\244N6$\006\301N}\277\372\335\222\255f\334\201p\346\273dJ\016\351\221}(\275G\035\315e:W;\353\003\345`\247\376B\343@\264\263\236;\337G;k\323\205v\264v\367\372\031\343\030Z`@9-/\246*\307|\275\306\342\036\235s\316\327\275\246\010\374O\035\364\225W={\341\310\267TV\373Ce\306\236U5\311\252\303{\263\375Ta\303\337V\"\203\216U\343\306\327\340\201\377\203\330\240\365[\314\246,\362\177\247\332\215\323/\002\234~\007`\337\357\337\377\210\302Y\335II\265s\265\275\341\315r\340\377 \326\330\231\2667\260h\306\177\200>\334\337\332\207\357W*\207e\233\016\257\211\035\330\257\231\033\270\272\276\226\210\255Q\353\034\235\001\306Q+\306\217\320\2518\263\222`u^3\226\037\257S\311\364j\"V\313D\376;p\021\320!\270M\322\323Tt\252\272\241\317\347#w\216\021r\034KE\251;\024\335\006\373\021\024ldnj\217\241\205\261\026\032>\003S\3470\230\002\226\316Q\201\257?\377p\3247~i@\0302\265o\034\331;C\010\023\234\3611\031\2621Mm:3d\203\362\376Fm\356\215#6\342\330\027\323Dv\321\023h\232\001\3028\335\017\352L\254\364\302\270a\260\2171\366L\345\222B\"\223L0\234\371\331\006\314\247y*!\340\257\376\320R\005\232\203=\253\257<\237\230K\252\237z\260\271T\024\236\033\307R\264\000\256\000\213\014\026_\312\306\251+~B\231\016\333\3674\r\001\003\361\300\363\233\302\032\270\n\330:\316$\023\000\023B\t\310\364\200\203\211\230\000H\302$\226zv\357\331\314\354\315Y\002\210c\376bb\002\3261\242\344\313\030\335}Gs\t@""\004\374\364f\206\341}\324\303\025j3\235\243X\206\211c(\222\301/h,\013\200J\342\310\t\271\0234\313\246\005\032\371\033\201\345\340\257&\214Od\300\337\343\352\373t\222g|KL6\307\2601\206\372B=M\263L\345q\0310}\377\232\303\357p\270\252\347CR3\211\330G\362Q\016!\006\274\240\345\363\035\235\366\n3c\344\373\035@\025\206\260,c\363\025O\222Ff\244Y\337\357\240t\021\300\227\251B\373\325\372]Pf3\236\340qW\206\305\353j\014W\177\241V\222i\240\220\327;\343\311\004/,\0139\360\273\357\355_f\331\367\372\"\021\374\204(\022i|\207\320\330cN\236\207+\356\332\354+\245fcU@\315'\301Q#\340\244*L\033\010f\027Hh\235\346\342\363kL\354\243\245\033\216|p11\206\347m\022X\233.\023t\2631\337\277\222ih\361w\300\226Yf#\303\331O\326\t\260\033k\212\225e\324~\243\232\212QcO-\t\365C\026\244j\207\252\2736J\243\211\020\233\210\256.\236\251{4!4\366\333.\267 \330\020\3056t\230\300\235G\032xk7U\307\244q\244\t.\315\304W_\356\253\177\266\242m/\270\206\001\013&\365\231lCG\025\274\315\210\001\277a\244f\203Z\354\353\236\255\340\035\260\257\037\250\002o|!\334\330cn`;\244oa3T\335$\022y\266\271\001\377\026\340,\212\231\006\236\022b\340\272\001\177#\344g\310<\266\020\341T\002d\307\256\302#\241\310\270\303\215\014\222\033\\?\321 \264\024#\320\272\260`\025\013\177+\240\240e\005\225`uP\372\035n\372 \336\340\n\240\314\211\344\206\002\2514Yf\225\306d\031v\000\272\223p\207\026\227\216\200fq\tT\226j\321\241\332\342-\275<\033\001JY:\005K\201\221\300\002D\021\t1\032\t\375g\330\025\306\362\372S\316\214q\364g\020\033_]\244?\031+\253\375\244/\223\241\271\024\237Ig2i\200\000FFXh\266aB\245\215;\362\326\210\020\332\260\230\211\220\021c\224 U\021:\356[\3013\022\301\244X'\214cR\351O\014\207*Q\343\313xH\325y&\271\002\311y\234\007\345\301\177\344\242/\203V\234Y\241\201W\310\353$\243\227\254\005\016\344\202\022\252\322Z\373\324\340NpX_K\032\034/ \315\002\022\253\027e\320\250\252-\332\354\306YF\313\354#\200\3146\007\272\233!\312\024\001\337\000\330\013k\\z\335\"\036\273\026\301\241\372X\251\026}\002\320\004\272\216+t\343D4\025S\313\360\031\r\201\334Q5\365\225\021\263au\032f\347zBX\263v\360\237,nf\343\357DF;tN;7\227\367\226{\216m\005\267V\305\260\3263\246\215]\323\256=(\376T\244K\275\307\266f\267\276H7do\3115(\372\313\275#\342g\331+\317\312\331R\357i\311_\352=%y\313\275\256\255?\304Y1[r\235\330\022\304\240H\227\372\307\345GJV\355*\367\237\227\326eZ\316\226\001\320\034\000\037\236T\272J\256\363RN\016i\027o\250\244\177v\013V\016j\203\343\362\274\234\335\376\351P\337I\251[\272 \205\245U9,3JP\241\225u\225Vs\371\205\302\221B\270\324;$\206\305\270\344S\272\224AeA=\242\276\316\337\315G\013=\205\205bOqA{\366J{\365\272\004x\362\332\251i%Tm\341V\277\001\344\031\231WfT.\357&\024m\217\035\352\353\337\312\266O\365\250\324EP\260\243\332+\237VBJ\270\334\177J\232\220\335\262\267J\235xG\036\224C\373E\334I\311\rS\272\22512%\214\370\006\267h\355\304y\211\223\335\006\312\307\266\374%W\277x\024\020\354\277 \373\345\273r""\\\271\250|\316_\310?\317\363\005o\251\037f\225R\0045\010r\373Z\230/pEO\361\245\366\034\230\362\222\360\276T\341=AgP\274%\375!\377K\311\251\017\363\257\013\217\265gK\332\022JQ{\035\327\342\253\332\352\032\262\343\265\034\222\303%\317\250\324'\017\003\002\243\247\245kr\267|\tD\354-\235\031\223/\243V\225<#\242\000\230\217\236Gd\352\031\205\352\370\030\030E\010<\n3\372GDbL\203\3428\250\246\316?c\212G|$e\345.':Ol\345\304y\261^\016\003\0268\235 \207\303RP\242\245\257d\333q\225\311\007`\237\003\343>r#.\031\366\356\3408\242#\030\225\216\200\247\371\250\270\311\236e`\372\337\322\000\302\031\321\335VV7\324Y \211\220\207x\217z\345\021b\227\243\350\337\317Pr\2372\254dK\324\025eN]\312\377\004\316\350X\321\217\256\350\255\3666\242E\300\003\320%\352\202|K\271\253\320\245\361\313\312e5\244\206\313g&\344\277\301\342\321D\262\026 \372\274\025\365\256Z\235\213\033!\006g\300K\351\\\203\313\234\264$w\355\206\305;\343n\225{zG\233\234vb2\362wP\n\331\341]\352\325\335\\\357\361-\232\234\232\306\205\230\0229I\r\274\177\006\317~X\361+\217\200qD}\347%\342\034o\003-\310R\177\3313\001D\335\"\254\2636A\370D\212\332\351i\242\r\243W\024\177\211\210\334-]D\2070,2\222\037\274\227[?\261\002\332\320E\371\271\274\t^\177V\345""\264[\017\213\003\305\252j|\225\026\344^\245\007\016\230.T\222E\211\005K\313\252\307\362~\334dS>\212\206b\252\312\031\351\241\374\n\266;s^\022\344\0004\003\312r\276;\357-Q\227\344\277\324.\325m\025r\331j\234\026\352\262\007B\331cp\204\355Q\024\266\245\306\020\034J\227\323NN\301\261\375\020<\234'\377\\\373\375\337E^{\276Tv\031\272T\247\026\307\267\342bE\001\372\305\256\222\325\201\023\317xR:\r\n\367\016\335j\271\277\252\"H!Q\320k\322ORL\366\200J> \006ENP\242\270\202\024\220\336\000\007\364S\265Bt\217\274\000.\355\022\236\362p0\270\207\332 \375\023\352\273\203\020M<\256\203\316/ (c\377\353\340cf%co\033W\3316\341\020\030\035\034\341K\020\250\3563\341\206#p\213\0361l8\002\302\004\342\010ve\376\306\351\320\332\232,'\003\203\214\031\020/\212Yt\\z\254\313in\257<`\370_D\035\003\332U'\037\\K\302~\270\261]Zx\266s\334\325~S\260w\267T\257\177\333>#\323\271\240]\270\256\322\333\307\017\365\375\262\365\024\205\347\322\\g\360\324\322\007\320\036k\272\307\265\361\033\332\215Em\221\321\230\225\355K\207\372\\$\350\373\214iL\311\2058b\310\357\032\022_C\254\037F\341\367\221@\315\260H\277\364\010$~\n%a\244E\270h]\212\312?\3114\036\237]\322IyB\031P\256\253\356\272\315P\257\256\300\341\272\002\361\366f\376\227B\030\003\332_4\027\301\022p3]\3079L\247`g\255\177B^\207\224*k\037r~%\362\353\207\\\363\":\266\262g\0103U\222\226\r\351iF\305\025i'\220\345G\224\027\232\177\276\020,@\000\341@\341u\022P\231\224\r\235\206\2604\n\036gQ\211\201@*\375\007G\227\021\376\357\033]\017H\234\327.]\230\317\"\354\027\240 \340\353\017\213~\214\320\314\304yT\372E~\241M\375\226\017\347\023\205/\332\322\013tL\023`1^=u\305\000\014\222j\267<.G\025\227\272@l\024\220\203d[\033\231\2209\260\010\017\252\022-e\333\341p-/\354\251\036\224\356Jqy\022R\353P\333T\226\253\241\251]\350iI\212\037J\257d\342\221>A\336\375\0316A'uT\315\346{\362!\314\210WI\032]\215B\315\245g\301\027\367\310!K\243M`\255\306[K\020h\323N]Qf\265_\357\026\274\205k\305\303\020\376\207\314p\026\231\331-]\306\322\215r\224x\334@~\271\330S\\\324^\031\031\226""\266\306k\274\320\376Lb\013[\213\"Kf\036\303\214\322\024\325Y\351\0039S\376.x\n\215\217u\352{\033\224\346\004)\364\230j\3548\242o\332\210\340\207b\260H\027\327I\306\030\325\242\200\350G\355cJKe\265\354\347\355C\207\276t-v\303m\261\373\t\336\236t?\305\333\323\356\267x{\333\375\256\333\236\352\275\003\325\\\024d\250\227\341\260\350\313\273\363\227\013w\013Q\340\344c\355\315\333]\313s?\304sR:G\372\346\362/\nn[y\034#E\240o\316\367]s\301\010l\276\201\256\266T\316o\247\202\273\327\226\2625\351\316\226\2329\2466\375Q\353\035G\261|E`\302\341\261\004\321\201\333\3220\217\216\021\361\213<\253M\334\316\373\363\017\013\177j\341\347v\016\375,\201|W\376\250\016\023V\367c\211\007\263\370\367\352\0055\254\227\005nHc\020\240\360\312\004\006\245\316.\337HZ\232\236\035#\030\263\2311NM`\203\376\022w\272\277K\320\203R\250-\3207\265\233o@\256\000T;\356\325\t\271\231\357*\303\036I\311+\371\265\236K\332\245[\332\255\307\332\343\017\332\207\310\366\370\241\276sR\270\324P;\204H\202\204\030%\317\224\342\206p\242\214\221\303\030\354\350\306\004\352TE\370\244Zg\226\315 \352\324\306\347\340\204&a\250 \373\211L\273,%4\243\326g-\371\2228U\016)\241\177B\345AO\311=P\032\032.\365\366\225>> problem.addConstraint(SomeInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n Constraint enforcing that at least some of the values of given variables must not be present in a given set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(SomeNotInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n Constraint enforcing that the product of variables equals the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 2])\n >>> problem.addConstraint(VariableExactProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 1)], [('a', 1), ('b', 2), ('c', 2)], [('a', 2), ('b', 1), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 2])\n >>> problem.addVariable('c', [-2, 1])\n >>> problem.addConstraint(VariableExactProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', -1), ('c', 1)], [('a', -1), ('b', 2), ('c', -2)], [('a', 2), ('b', -1), ('c', -2)]]\n Constraint enforcing that the product of variables is at least the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.ad""dVariables([\"a\", \"b\", \"c\"], [-1, 2])\n >>> problem.addConstraint(VariableMinProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', -1), ('c', -1)], [('a', 2), ('b', 2), ('c', -1)], [('a', 2), ('b', 2), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addVariable('c', [2, 5])\n >>> problem.addConstraint(VariableMinProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2), ('c', 2)], [('a', -2), ('b', -1), ('c', 2)], [('a', -1), ('b', -2), ('c', 2)]]\n Constraint enforcing that the product of variables is at most the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [-1, 2])\n >>> problem.addConstraint(VariableMaxProdConstraint('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', -1)], [('a', -1), ('b', 2), ('c', 2)], [('a', 2), ('b', -1), ('c', -1)], [('a', 2), ('b', -1), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addVariable('c', [-2, -3])\n >>> problem.addConstraint(VariableMaxProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1), ('c', -2)], [('a', 1), ('b', -2), ('c', -2)]]\n 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 >>> problem = Problem()\n >>> problem.addVariable('a', [-1,0,1])\n >>> problem.addVariable('b', [-1,0,1])\n >>> problem.addVariable('c', [0, 2])\n >>> problem.addConstraint(VariableExactSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', 1), ('c', 0)], [('a', 0), ('b', 0), ('c', 0)], [('a', 1), ('b', -1), ('c', 0)], [('a', 1), ('b', 1), ('c', 2)]]\n Constraint enforcing that the sum of variables sum at least to the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 4])\n >>> problem.addConstraint(VariableMinSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 1)], [('a', 1), ('b', 4), ('c', 1)], [('a', 1), ('b', 4), ('c', 4)], [('a', 4), ('b', 1), ('c', 1)], [('a', 4), ('b', 1), ('c', 4)], [('a', 4), ('b', 4), ('c', 1)], [('a', 4), ('b', 4), ('c', 4)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addVariable('c', [-2, 2])\n >>> problem.addConstraint(VariableMinSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', 1), ('c', -2)], [('a', 1), ('b', -3), ('c', -2)], [('a', 1), ('b', 1), ('c', -2)], [('a', 1), ('b', 1), ('c', 2)]]\n Constraint enforcing that the sum of variables sum at most to the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 3, 4])\n >>> problem.addConstraint(VariableMaxSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 3)], [('a', 1), ('b', ""1), ('c', 4)], [('a', 1), ('b', 3), ('c', 4)], [('a', 3), ('b', 1), ('c', 4)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, 1])\n >>> problem.addVariable('c', [-3, -1])\n >>> problem.addConstraint(VariableMaxSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2), ('c', -3)], [('a', -2), ('b', -2), ('c', -1)], [('a', -2), ('b', 1), ('c', -1)], [('a', 1), ('b', -2), ('c', -1)]]\n 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 Constraint enforcing that values of given variables are not present in the given set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(NotInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 2), ('b', 2)]]\n Constraint enforcing that values of all given variables are equal.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(AllEqualConstraint())\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 2), ('b', 2)]]\n Constraint enforcing that values of given variables sum exactly to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(ExactSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> pr""oblem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-1, 0, 1])\n >>> problem.addConstraint(ExactSumConstraint(0))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', 1)], [('a', 0), ('b', 0)], [('a', 1), ('b', -1)]]\n Constraint enforcing that values of given variables sum at least to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MinSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addConstraint(MinSumConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', 1)], [('a', 1), ('b', -3)], [('a', 1), ('b', 1)]]\n Constraint enforcing that values of given variables sum up to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MaxSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addConstraint(MaxSumConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', -3)], [('a', -3), ('b', 1)], [('a', 1), ('b', -3)]]\n Constraint enforcing that values of given variables create a product of exactly a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(ExactProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in probl""em.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1, 2])\n >>> problem.addConstraint(ExactProdConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1)], [('a', -1), ('b', 2)], [('a', 1), ('b', -2)], [('a', 2), ('b', -1)]]\n Constraint enforcing that values of given variables create a product up to at least a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MinProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addConstraint(MinProdConstraint(1))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2)], [('a', -2), ('b', -1)], [('a', -1), ('b', -2)], [('a', -1), ('b', -1)], [('a', 1), ('b', 1)]]\n Constraint enforcing that values of given variables create a product up to at most a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MaxProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addConstraint(MaxProdConstraint(-1))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1)], [('a', -1), ('b', 1)], [('a', 1), ('b', -2)], [('a', 1), ('b', -1)]]\n Constraint enforcing that values of given variables are present in the g""iven set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(InSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)]]\n 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 >>> problem = Problem()\n >>> problem.addVariables([1, 2], [\"a\", \"b\"])\n >>> def func(x, y):\n ... return x != y\n >>> problem.addConstraint(FunctionConstraint(func), [1, 2])\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[(1, 'a'), (2, 'b')], [(1, 'b'), (2, 'a')]]\n Last multiplier must be 1, as it is the target variable.Multipliers must be numbers.Multipliers must match sum variables and +1 for target.Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Optional[Sequence]Sequence[str]Union[int, float]Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.?add_noteconstraint/constraints.pydisableenablegcisenabledlist[tuple]AllDifferentConstraintAllDifferentConstraint.__call__AllEqualConstraintAllEqualConstraint.__call__CallableCompilableFunctionConstraintCompilableFunctionConstraint.__call__CompilableFunct""ionConstraint.__init__ConstraintConstraint.__call__Constraint.forwardCheckConstraint.preProcessExactProdConstraintExactProdConstraint.__call__ExactProdConstraint.__call__..genexprExactProdConstraint.__init__ExactProdConstraint.preProcessExactProdConstraint.preProcess..genexprExactSumConstraintExactSumConstraint.__call__ExactSumConstraint.__init__ExactSumConstraint.preProcessFunctionConstraintFunctionConstraint.__call__FunctionConstraint.__init__InSetConstraintInSetConstraint.__call__InSetConstraint.__init__InSetConstraint.preProcessMaxProdConstraintMaxProdConstraint.__call__MaxProdConstraint.__call__..genexprMaxProdConstraint.__init__MaxProdConstraint.preProcessMaxProdConstraint.preProcess..genexprMaxSumConstraintMaxSumConstraint.__call__MaxSumConstraint.__init__MaxSumConstraint.preProcessMinProdConstraintMinProdConstraint.__call__MinProdConstraint.__init__MinProdConstraint.preProcessMinSumConstraintMinSumConstraint.__call__MinSumConstraint.__init__MinSumConstraint.preProcessNotInSetConstraintNotInSetConstraint.__call__NotInSetConstraint.__init__NotInSetConstraint.preProcessOptional__Pyx_PyDict_NextRefSequenceSomeInSetConstraintSomeInSetConstraint.__call__SomeInSetConstraint.__init__SomeNotInSetConstraintSomeNotInSetConstraint.__call__SomeNotInSetConstraint.__init__UnassignedUnionVariableExactProdConstraintVariableExactProdConstraint.__call__..genexprVariableExactProdConstraint.__call__VariableExactProdConstraint.__init__VariableExactProdConstraint._get_product_boundsVariableExactProdConstraint._safe_productVariableExactProdConstraint.preProcessVariableExactSumConstraintVariableExactSumConstraint.__call__VariableExactSumConstraint.__init__..genexprVariableExactSumConstraint.__init__VariableExactSumConstraint.preProcess..genexprVariableExactSumConstraint.preProcessVariableMaxProdConstraintVariableMaxProdConstraint.__call__..genexprVariableMaxProdConstraint.__call__VariableMaxProdConstraint.__init__Variab""leMaxProdConstraint._get_product_boundsVariableMaxProdConstraint._safe_productVariableMaxProdConstraint.preProcessVariableMaxSumConstraintVariableMaxSumConstraint.__call__VariableMaxSumConstraint.__init__..genexprVariableMaxSumConstraint.__init__VariableMaxSumConstraint.preProcess..genexprVariableMaxSumConstraint.preProcessVariableMinProdConstraintVariableMinProdConstraint.__call__..genexprVariableMinProdConstraint.__call__VariableMinProdConstraint.__init__VariableMinProdConstraint._get_product_boundsVariableMinProdConstraint._safe_productVariableMinProdConstraint.preProcessVariableMinSumConstraintVariableMinSumConstraint.__call__VariableMinSumConstraint.__init__..genexprVariableMinSumConstraint.__init__VariableMinSumConstraint.preProcess..genexprVariableMinSumConstraint.preProcessall_boundsappendassigned_assignedassigned_prodassigned_productassignmentsasyncio.coroutinesbboolboundsc__call__candidates__class_getitem__cline_in_tracebackclosecollections.abcconstraint.constraintsconstraint.domainconstraintscontains_lt1dict__doc__domdomaindomain_boundsdomain_dictdomainsexact_exactexactprod_exactprodexactsum_exactsumexclude_varforwardCheckforwardcheckfoundfunc_func__func__genexprget_get_product_boundshihideValueindex__init___is_coroutineitemsitertoolslom__main__maxmax_othersmax_sum_missingmaxprod_maxprodmaxsum_maxsummaxval__metaclass__minmin_othersmin_sum_missingminprod_minprodminsum_minsumminvalmissingmissing_lt1missing_negative__module____mro_entries__multipliermultipliers_multipliersn_n__name__nextoother_maxother_minother_productsother_unassignedother_vars_maxother_vars_minothers_maxothers_minpparmspoppossible_maxpossible_minpossible_prodspreProcess__prepare__prodprodsproductproduct_varsproducts__qualname__removeround_safe_productseenselfsendset_set__set_name__setdefaultsinglevaluestrsumsum_other_varssum_other_vars..genexprsum_valuesum_varst_maxt_mintarget_domtarget_domaintarget_maxtarget_mintarget_valuetarget_vartemp_sum""__test__throwtyping_unassignedunassignedunassigned_varsunassignedvariablevvalvaluevaluesvar_var_is_negative_var_max_var_minvariable_variable_contains_lt1variable_with_lt1variablesvconstraintsxzip\320\004\037\320\0372\260-\270q\360\022\000\t\r\210K\220q\330\010\014\320\014\034\230A\330\010\014\210L\230\001\320\004\037\320\0372\260-\270q\360\022\000\t\r\210K\220q\330\010\014\320\014\034\230A\330\010\014\210L\230\001\330\010\014\320\014 \240\001\320\000\036\320\036:\270!\340\004\013\2103\210g\220Q\320\004!\320!4\260M\300\021\360\022\000\t\r\210M\230\021\330\010\014\320\014\034\230A\330\010\014\210L\230\001\330\010\014\210L\230\001\330\010\014\320\014 \240\001\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\033\2301\330\010\032\230!\340\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020$\240K\250q\260\001\340\020\037\230w\240a\240q\340\010\013\210:\220Q\320\026(\250\001\330\014\037\230u\240A\320%7\260q\340\010\013\2104\210q\330\014\023\320\023$\240C\240q\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\027\220s\320\032,\250A\330\010\027\220s\320\032,\250A\340\010\013\210=\230\002\230-\240s\250-\260r\270\021\330\014\023\2201\360\"\000\t\020\210q\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\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\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\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\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\340\010\013\2104\210|\2307\240!\330\014\023\2201\340\010\027\220{\240!\2404\240q\330\010\024\220A\330\010\022\220!\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\023\2204\220s\230!\330\024!\240\033\250A\250U\260\"\260A\340\024\036\230a\340\014\020\220\007\220t\2301\330\020\023\2204\220s\230!\330\024!\240\033\250A\250Q\340\024!\240\023\240A\240W\250A\250Q\330\024\036\230a\340\010\013\210:\220Q\220k\240\021\330\014\030\230\005\230Q\230k\250\021\340\010\013\2101\340\014\017\210z\230\022\2301\330\020\027\220q\330\014\017\210q\330\020\024\220G\2304\230q\330\024\027\220t\2307\240!\330\030!\240\027\250\001\250\021\330\030\033\2301\330\034 \240\t\250\026\250q\330 +\250:\260S\270\006\270b\300\013\3101\310D\320PY\320Y_\320_`\320`a\330 #\2409\250B\250a\330$*\250*\260A\260Q\340\034 \240\t\250\026\250q\330 +\250:\260R\260q\330 #\2409\250B\250a\330$*\250*\260A\260Q\330\030\033\2304\230q\330\034#\2401\330\014\023\2201\340\014\023\220:\230S\240\001\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\340\010\013\2104\210|\2307\240!\330\014\023\2201\340\010\027\220{\240!\2404\240q\330\010\024\220A\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\023\2204\220s\230!\330\024!\240\033""\250A\250U\260\"\260A\340\024!\240\023\240A\240W\250A\250U\260\"\260A\340\014\020\220\007\220t\2301\330\020\023\2204\220s\230!\330\024!\240\033\250A\250Q\340\024!\240\023\240A\240W\250A\250Q\340\010\013\210:\220Q\220k\240\021\330\014\030\230\005\230Q\230k\250\021\340\010\017\210z\230\023\230A\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\330\010\023\2204\220q\330\010\016\210a\330\010\032\230!\330\010\032\230!\330\010\022\220!\330\010\033\2301\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\340\024'\240t\2509\260A\260Q\330\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240y\260\003\2604\260r\3209I\310\022\3101\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\340\024'\240t\2509\260A\260Q\330\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240y\260\003\2604\260r\3209I\310\022\3101\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\013\2101\330\014\023\2204\220r\320\031)\250\023\250I\260T\270\024\270R\320?O\310s\320RS\340\014\023\2204\220s\230!\320\004\"\320\"5\3205H\310\006\310a\330\010\016\210d\220!\330""\010\022\220!\330\010\020\220\001\330\010\014\210L\230\001\330\014\017\210y\230\003\2301\330\020\031\230\033\240A\240Z\250s\260!\340\020\033\2301\330\010\013\2101\330\014\017\210t\2201\330\020\023\2205\230\006\230c\240\024\240W\250H\260B\260a\330\024\033\2301\340\020\023\2204\220t\2302\230X\240R\240q\330\024\033\2301\330\014\017\210}\230D\240\004\240D\250\002\250&\260\003\2601\360\006\000\021\025\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\230v\240W\250A\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\340\014\017\210t\2201\330\020\023\2206\230\023\230D\240\001\330\024\033\2301\340\020\023\2206\230\022\2304\230q\330\024\033\2301\330\010\017\210q\320\004\"\320\"5\3205H\310\006\310a\330\010\016\210d\220!\330\010\022\220!\330\010\020\220\001\330\010\014\210L\230\001\330\014\017\210y\230\003\2301\330\020\031\230\033\240A\240Z\250w\260a\340\020\033\2301\330\010\013\2101\330\014\017\210t\2201\330\020\023\2205\230\006\230c\240\024\240W\250H\260B\260a\330\024\033\2301\340\020\023\2204\220t\2302\230X\240R\240q\330\024\033\2301\330\014\017\210}\230D\240\004\240D\250\002\250&\260\003\2601\360\006\000\021\025\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\230v\240S\250\001\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\340\014\017\210t\2201\330\020\023\2206\230\023\230D\240\001\330\024\033\2301\340\020\023\2206\230\022\2304\230q\330\024\033\2301\330\010\017\210q\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\022\220!\330\010\032\230!\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\340\014\020\220\014\230A\330\020\023\2209\230C\230q\330\024\033\230;\240a\240q\340\024'\240t\2509\260A\260Q\330\024\036\230a\340\010\013\210:\220Q""\220e\2301\330\014\022\220%\220q\230\005\230Q\330\010\013\2104\210r\320\021!\240\022\2401\330\014\023\2201\330\010\017\210t\2203\220g\230S\240\001\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\032\230!\330\010\022\220!\330\010\033\2301\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240q\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240q\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\320\004\"\320\"5\3205H\310\006\310a\360.\000\t\020\210q\320\004#\320#6\260a\360\016\000\t\r\210N\230!\330\010\014\320\014\034\230A\320\004#\320#6\260a\330\010\014\210N\230!\330\010\014\320\014\034\230A\320\004$\320$7\3207J\320Je\320ef\360&\000\t\014\2103\210a\210{\230#\230Q\330\014\027\220y\240\001\240\021\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2204\220t\2301\230K\240z\260\032\2701\330\024\032\230'\240\021\240!\330\014\027\220w""\230b\240\006\240a\330\014\030\230\001\230\031\240'\250\022\2506\260\021\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!\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\023\220$\220a\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\240H\250B\250a\330\024\032\230'\240\021\240!\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\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\360\006\000\t\023\220$\220a\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220""\t\230\026\230q\330\020\023\2206\230\023\230B\230d\240(\250\"\250A\330\024\032\230'\240\021\240!\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\026\220d\230!\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\031\230\027\240\001\240\021\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\340\014\020\220\007\220t\2301\330\020\031\230\027\240\001\240\021\330\020\035\230S\240\004\240A\330\020\035\230S\240\004\240A\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\023\2204\220q\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601\330\014\025\220W\230A\230Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360""\000\000Y\002Z\002\330\010\014\320\014 \240\002\240*\250D\260\t\270\021\270*\300B\300b\310\004\310L\320XY\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601\330\014\025\220W\230A\230Q\330\014\031\230\036\240q\250\013\260:\270T\300\021\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\013\2602\260T\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\021\220\024\220Q\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601\330\014\025\220W\230A\230Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\330\010\014\320\014 \240\002\240*\250D\260\t\270\021\270*\300B\300b\310\004\310L\320XY\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\026\220d\230!\340\010\013\2104\210q\330\014\020\220\007\220t\2301\330\020\031\230\027\240\001\240\021\330\020\035\230S\240\004\240A\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q""\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\030\230\007\230q\240\004\240A\330\010\025\220S\230\001\230\021\330\010\025\220S\230\001\230\021\330\010\014\210G\2204\220q\330\014\027\220|\2404\320';\2701\270I\300\\\320QR\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\035\230Q\230f\240B\240k\260\026\260r\270\021\330\020\030\230\t\240\023\240A\240]\260#\260Q\260a\330\020\023\2207\230\"\230K\240s\250'\260\022\2601\330\024\032\230'\240\021\240!\320\004$\320$7\3207J\320Je\320ef\330\010\016\210d\220!\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\027\240\001\330\024\032\230'\240\021\240!\330\014\030\230\001\230\031\240'\250\022\2506\260\021\330\010\023\2207\230\"\230F\240!\320\004$\320$7\3207J\320Je\320ef\330\010\016\210d\220!\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\023\230A\330\024\032\230'\240\021\240!\330\014\030\230\001\230\031\240'\250\022\2506\260\021\330\010\023\2207\230\"\230F\240!\320\0048\3208X\320XY\330\010\016\320\016!\240\021\240!\320\0048\270\001\340\010\016\210l\230!\2301\320\004&\320&9\3209L\320L^\320^_\360$\000\t\036\230Q\330\010\014\210L\230\001\330\014\017\210y\230\007\230q\330\020\023\320\023&\240c\250\021\330\024)\250\021\340\024\025\340\014\017\320\017\"\240'\250\021\360\006\000\021\032\230\027\240\001\240\021\330\020\023\2201\330\024\030\230\t\240\026\240q\330\030#\2401\320$:\270!\330\030\033\2304\230t\2401\240K\250y\270\001\330\034\"\240*\250A\250Q\330\024\030\230\013\2401\240A\330\020\023\2204\220q\330\024\033\2301\330\010\017\210q\240A\250A\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\360>\000\t\025\220A\330\010\022\220!\330\010\014\210E\220\021\330\014\017\210r\220\023\220A\330\020\025\220W\230A\230[\250\001\250\021\340\020\025\220W\230A\230Q\330\020\033\2301\360\006\000\t\014\2108\2202\220Q\330""\014\024\220D\230\013\2403\240d\250&\260\002\260(\270!\330\020\024\220M\240\023\240H\250C\250r\260\023\260D\270\r\300Q\300k\320QZ\320Z[\340\010\017\210t\2206\230\022\2301\200A\360\014\000\t\r\210H\220A\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\340\010\026\220a\330\010\014\210L\230\001\330\014\024\220K\230t\2401\240J\250a\330\014\017\210|\2303\230a\330\020\036\230a\330\021\027\220w\230l\250$\250f\260C\260q\330\020\027\220q\330\010\013\210=\230\004\230L\250\007\250q\330\014\020\220\014\230A\330\020\023\2209\230G\2401\330\024\035\230W\240A\240Q\330\024\027\220|\2407\250!\330\030\037\230q\330\024\030\230\t\240\026\240q\330\030\033\2306\240\023\240A\330\034\"\240*\250A\250Q\330\010\017\210q\200A\330\010\017\210q\330\010\014\210E\220\021\330\014\024\220A\330\010\017\210q\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\340\010\017\210q\330\010\014\210L\230\001\330\014\024\220K\230t\2401\240J\250a\330\014\017\210v\220W\230A\330\020\023\2206\230\023\230A\330\024\033\2301\330\020\024\220A\220Y\230a\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\2401\330\024\035\230W\240A\240Q\330\024\030\230\t\240\021\330\030\033\2306\240\023\240A\330\034\"\240*\250A\250Q\330\034\037\230t\2401\330 '\240q\330\010\017\210q\320\004\034\230E\240\021\360\024\000\t\r\210H\220A\330\010\014\210F\220!\330\010\014\210J\220a\320\004 \240\001\360\014\000\t\r\210L\230\001\320\004 \240\001\360\014\000\t\r\210L\230\001\330\010\014\320\0146\260a\320\004\"\240!\360\014\000\t\r\210N\230!\330\010\014\320\0146\260a\240Q\270Q\230Q\220Q\320\004\035\230U\240*\250A\330\010\014\210I\220Q\330\010\014\210M\230\021\320\004\035\230Z\240z\260\021\360\022\000\t\r\210I\220Q\330\010\014\210M\230\021\240\021\320\004#\240?\260/\300\035\310a\360\024\000\t\r\210N\230!\330\010\014\210L\230\001\330\010\014\320\014\034\230A\340\010\013\2101\330\014\023\2203\220a\220}\240C\240s\250!\250:\260R\260s\270!\330\014!\320!J\310!\330\014\023\220;\230b\240\003\2403\240c\250\021\320\004/""\250q\330\010\021\220\021\330\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020\021\330\014\022\220+\230Q\230a\330\014\017\210t\2201\330\020\021\330\014\022\220'\230\022\2303\230a\230v\240S\250\001\250\021\340\010\013\2104\210q\330\014\023\2203\220a\360\006\000\t\026\220Q\220b\230\004\230E\240\027\250\002\250\"\250D\260\004\260D\270\004\270F\300!\330\010\023\2201\220D\230\016\240a\240s\250$\250e\2601\330\010\017\210s\220!\220;\230c\240\021\240!\320\004/\250q\340\010\021\220\021\330\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020\021\330\014\022\220+\230Q\230a\330\014\017\210t\2201\330\020\021\330\014\022\220'\230\022\2303\230a\230v\240S\250\001\250\021\340\010\025\220Q\220b\230\004\230E\240\021\330\010\013\2104\210q\330\014\023\2203\220a\360\006\000\t\026\220Q\220b\230\004\230E\240\027\250\002\250\"\250D\260\004\260D\270\004\270F\300!\330\010\023\2201\220D\230\016\240a\240s\250$\250e\2601\330\010\017\210s\220!\220;\230c\240\021\240!"; + #else /* compression: none (25210 bytes) */ +const char* const bytes = ".Abstract base class for constraints.Can't happenCompilableFunctionConstraint can not be called directlyConstraint enforcing that at least some of the values of given variables must be present in a given set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(SomeInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n Constraint enforcing that at least some of the values of given variables must not be present in a given set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(SomeNotInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n Constraint enforcing that the product of variables equals the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 2])\n >>> problem.addConstraint(VariableExactProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 1)], [('a', 1), ('b', 2), ('c', 2)], [('a', 2), ('b', 1), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 2])\n >>> problem.addVariable('c', [-2, 1])\n >>> problem.addConstraint(VariableExactProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', -1), ('c', 1)], [('a', -1), ('b', 2), ('c', -2)], [('a', 2), ('b', -1), ('c', -2)]]\n Constraint enforcing that the product of variables is at least the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.ad""dVariables([\"a\", \"b\", \"c\"], [-1, 2])\n >>> problem.addConstraint(VariableMinProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', -1), ('c', -1)], [('a', 2), ('b', 2), ('c', -1)], [('a', 2), ('b', 2), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addVariable('c', [2, 5])\n >>> problem.addConstraint(VariableMinProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2), ('c', 2)], [('a', -2), ('b', -1), ('c', 2)], [('a', -1), ('b', -2), ('c', 2)]]\n Constraint enforcing that the product of variables is at most the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [-1, 2])\n >>> problem.addConstraint(VariableMaxProdConstraint('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', -1)], [('a', -1), ('b', 2), ('c', 2)], [('a', 2), ('b', -1), ('c', -1)], [('a', 2), ('b', -1), ('c', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addVariable('c', [-2, -3])\n >>> problem.addConstraint(VariableMaxProdConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1), ('c', -2)], [('a', 1), ('b', -2), ('c', -2)]]\n 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 >>> problem = Problem()\n >>> problem.addVariable('a', [-1,0,1])\n >>> problem.addVariable('b', [-1,0,1])\n >>> problem.addVariable('c', [0, 2])\n >>> problem.addConstraint(VariableExactSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', 1), ('c', 0)], [('a', 0), ('b', 0), ('c', 0)], [('a', 1), ('b', -1), ('c', 0)], [('a', 1), ('b', 1), ('c', 2)]]\n Constraint enforcing that the sum of variables sum at least to the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 4])\n >>> problem.addConstraint(VariableMinSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 1)], [('a', 1), ('b', 4), ('c', 1)], [('a', 1), ('b', 4), ('c', 4)], [('a', 4), ('b', 1), ('c', 1)], [('a', 4), ('b', 1), ('c', 4)], [('a', 4), ('b', 4), ('c', 1)], [('a', 4), ('b', 4), ('c', 4)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addVariable('c', [-2, 2])\n >>> problem.addConstraint(VariableMinSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', 1), ('c', -2)], [('a', 1), ('b', -3), ('c', -2)], [('a', 1), ('b', 1), ('c', -2)], [('a', 1), ('b', 1), ('c', 2)]]\n Constraint enforcing that the sum of variables sum at most to the value of another variable.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\", \"c\"], [1, 3, 4])\n >>> problem.addConstraint(VariableMaxSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1), ('c', 3)], [('a', 1), ('b', ""1), ('c', 4)], [('a', 1), ('b', 3), ('c', 4)], [('a', 3), ('b', 1), ('c', 4)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, 1])\n >>> problem.addVariable('c', [-3, -1])\n >>> problem.addConstraint(VariableMaxSumConstraint('c', ['a', 'b']))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2), ('c', -3)], [('a', -2), ('b', -2), ('c', -1)], [('a', -2), ('b', 1), ('c', -1)], [('a', 1), ('b', -2), ('c', -1)]]\n 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 Constraint enforcing that values of given variables are not present in the given set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(NotInSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 2), ('b', 2)]]\n Constraint enforcing that values of all given variables are equal.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(AllEqualConstraint())\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 2), ('b', 2)]]\n Constraint enforcing that values of given variables sum exactly to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(ExactSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> pr""oblem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-1, 0, 1])\n >>> problem.addConstraint(ExactSumConstraint(0))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -1), ('b', 1)], [('a', 0), ('b', 0)], [('a', 1), ('b', -1)]]\n Constraint enforcing that values of given variables sum at least to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MinSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addConstraint(MinSumConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', 1)], [('a', 1), ('b', -3)], [('a', 1), ('b', 1)]]\n Constraint enforcing that values of given variables sum up to a given amount.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MaxSumConstraint(3))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-3, 1])\n >>> problem.addConstraint(MaxSumConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -3), ('b', -3)], [('a', -3), ('b', 1)], [('a', 1), ('b', -3)]]\n Constraint enforcing that values of given variables create a product of exactly a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(ExactProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in probl""em.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1, 2])\n >>> problem.addConstraint(ExactProdConstraint(-2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1)], [('a', -1), ('b', 2)], [('a', 1), ('b', -2)], [('a', 2), ('b', -1)]]\n Constraint enforcing that values of given variables create a product up to at least a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MinProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 2)], [('a', 2), ('b', 1)], [('a', 2), ('b', 2)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addConstraint(MinProdConstraint(1))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', -2)], [('a', -2), ('b', -1)], [('a', -1), ('b', -2)], [('a', -1), ('b', -1)], [('a', 1), ('b', 1)]]\n Constraint enforcing that values of given variables create a product up to at most a given amount.\n \n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(MaxProdConstraint(2))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)], [('a', 1), ('b', 2)], [('a', 2), ('b', 1)]]\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [-2, -1, 1])\n >>> problem.addConstraint(MaxProdConstraint(-1))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', -2), ('b', 1)], [('a', -1), ('b', 1)], [('a', 1), ('b', -2)], [('a', 1), ('b', -1)]]\n Constraint enforcing that values of given variables are present in the g""iven set.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2])\n >>> problem.addConstraint(InSetConstraint([1]))\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[('a', 1), ('b', 1)]]\n 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 >>> problem = Problem()\n >>> problem.addVariables([1, 2], [\"a\", \"b\"])\n >>> def func(x, y):\n ... return x != y\n >>> problem.addConstraint(FunctionConstraint(func), [1, 2])\n >>> sorted(sorted(x.items()) for x in problem.getSolutions())\n [[(1, 'a'), (2, 'b')], [(1, 'b'), (2, 'a')]]\n Last multiplier must be 1, as it is the target variable.Multipliers must be numbers.Multipliers must match sum variables and +1 for target.Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Sequence | NoneSequence[str]Wrapper function for picklable string constraints that must be compiled into a FunctionConstraint later on.?add_noteconstraint/constraints.pydisableenablegcint | floatisenabledlist[tuple]AllDifferentConstraintAllDifferentConstraint.__call__AllEqualConstraintAllEqualConstraint.__call__CallableCompilableFunctionConstraintCompilableFunctionConstraint.__call__CompilableFunctionConstr""aint.__init__ConstraintConstraint.__call__Constraint.forwardCheckConstraint.preProcessExactProdConstraintExactProdConstraint.__call__ExactProdConstraint.__call__..genexprExactProdConstraint.__init__ExactProdConstraint.preProcessExactProdConstraint.preProcess..genexprExactSumConstraintExactSumConstraint.__call__ExactSumConstraint.__init__ExactSumConstraint.preProcessFunctionConstraintFunctionConstraint.__call__FunctionConstraint.__init__InSetConstraintInSetConstraint.__call__InSetConstraint.__init__InSetConstraint.preProcessMaxProdConstraintMaxProdConstraint.__call__MaxProdConstraint.__call__..genexprMaxProdConstraint.__init__MaxProdConstraint.preProcessMaxProdConstraint.preProcess..genexprMaxSumConstraintMaxSumConstraint.__call__MaxSumConstraint.__init__MaxSumConstraint.preProcessMinProdConstraintMinProdConstraint.__call__MinProdConstraint.__init__MinProdConstraint.preProcessMinSumConstraintMinSumConstraint.__call__MinSumConstraint.__init__MinSumConstraint.preProcessNotInSetConstraintNotInSetConstraint.__call__NotInSetConstraint.__init__NotInSetConstraint.preProcess__Pyx_PyDict_NextRefSequenceSomeInSetConstraintSomeInSetConstraint.__call__SomeInSetConstraint.__init__SomeNotInSetConstraintSomeNotInSetConstraint.__call__SomeNotInSetConstraint.__init__UnassignedVariableExactProdConstraintVariableExactProdConstraint.__call__..genexprVariableExactProdConstraint.__call__VariableExactProdConstraint.__init__VariableExactProdConstraint._get_product_boundsVariableExactProdConstraint._safe_productVariableExactProdConstraint.preProcessVariableExactSumConstraintVariableExactSumConstraint.__call__VariableExactSumConstraint.__init__..genexprVariableExactSumConstraint.__init__VariableExactSumConstraint.preProcess..genexprVariableExactSumConstraint.preProcessVariableMaxProdConstraintVariableMaxProdConstraint.__call__..genexprVariableMaxProdConstraint.__call__VariableMaxProdConstraint.__init__VariableMaxProdConstraint._g""et_product_boundsVariableMaxProdConstraint._safe_productVariableMaxProdConstraint.preProcessVariableMaxSumConstraintVariableMaxSumConstraint.__call__VariableMaxSumConstraint.__init__..genexprVariableMaxSumConstraint.__init__VariableMaxSumConstraint.preProcess..genexprVariableMaxSumConstraint.preProcessVariableMinProdConstraintVariableMinProdConstraint.__call__..genexprVariableMinProdConstraint.__call__VariableMinProdConstraint.__init__VariableMinProdConstraint._get_product_boundsVariableMinProdConstraint._safe_productVariableMinProdConstraint.preProcessVariableMinSumConstraintVariableMinSumConstraint.__call__VariableMinSumConstraint.__init__..genexprVariableMinSumConstraint.__init__VariableMinSumConstraint.preProcess..genexprVariableMinSumConstraint.preProcessall_boundsappendassigned_assignedassigned_prodassigned_productassignmentsasyncio.coroutinesbboolboundsc__call__candidates__class_getitem__cline_in_tracebackclosecollections.abcconstraint.constraintsconstraint.domainconstraintscontains_lt1dict__doc__domdomaindomain_boundsdomain_dictdomainsexact_exactexactprod_exactprodexactsum_exactsumexclude_varforwardCheckforwardcheckfoundfunc_func__func__genexprget_get_product_boundshihideValueindex__init___is_coroutineitemsitertoolslom__main__maxmax_othersmax_sum_missingmaxprod_maxprodmaxsum_maxsummaxval__metaclass__minmin_othersmin_sum_missingminprod_minprodminsum_minsumminvalmissingmissing_lt1missing_negative__module____mro_entries__multipliermultipliers_multipliersn_n__name__nextoother_maxother_minother_productsother_unassignedother_vars_maxother_vars_minothers_maxothers_minpparmspoppossible_maxpossible_minpossible_prodspreProcess__prepare__prodprodsproductproduct_varsproducts__qualname__removeround_safe_productseenselfsendset_set__set_name__setdefaultsinglevaluestrsumsum_other_varssum_other_vars..genexprsum_valuesum_varst_maxt_mintarget_domtarget_domaintarget_maxtarget_mintarget_valuetarget_vartemp_sum__test__throw_unassign""edunassignedunassigned_varsunassignedvariablevvalvaluevaluesvar_var_is_negative_var_max_var_minvariable_variable_contains_lt1variable_with_lt1variablesvconstraintsxzip\320\000\036\320\036:\270!\340\004\013\2103\210g\220Q\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\033\2301\330\010\032\230!\340\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020$\240K\250q\260\001\340\020\037\230w\240a\240q\340\010\013\210:\220Q\320\026(\250\001\330\014\037\230u\240A\320%7\260q\340\010\013\2104\210q\330\014\023\320\023$\240C\240q\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\027\220s\320\032,\250A\330\010\027\220s\320\032,\250A\340\010\013\210=\230\002\230-\240s\250-\260r\270\021\330\014\023\2201\360\"\000\t\020\210q\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\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\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\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\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\340\010\013\2104\210|\2307\240!\330\014\023\2201\340\010\027\220{\240!\2404\240q\330\010\024\220A\330\010\022\220!\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\023\2204\220s\230!\330\024!\240\033\250A\250U\260\"\260A\340\024\036\230a\340\014\020\220\007\220t\2301\330\020\023\2204\220s\230!\330\024!\240\033\250A\250Q\340\024!\240\023\240A\240W\250A\250Q\330\024\036\230a\340\010\013\210:\220Q\220k\240\021\330\014\030\230\005\230Q\230k\250\021\340\010\013\2101\340\014\017\210z\230\022\2301\330\020\027\220q\330\014\017\210q\330\020\024\220G\2304\230q\330\024\027\220t\2307\240!\330\030!\240\027\250\001\250\021\330\030\033\2301\330\034 \240\t\250\026\250q\330 +\250:\260S\270\006\270b\300\013\3101\310D\320PY\320Y_\320_`\320`a\330 #\2409\250B\250a\330$*\250*\260A\260Q\340\034'\240z\260\022\2603\260a\260q\330\034 \240\t\250\026\250q\330 #\2409\250B\250f\260B\260a\330$*\250*\260A\260Q\330\030\033\2304\230q\330\034#\2401\330\014\023\2201\340\014\023\220:\230S\240\001\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\340\010\013\2104\210|\2307\240!\330\014\023\2201\340\010\027\220{\240!\2404\240q\330\010\024\220A\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\023\2204\220s\230!\330\024!\240\033\250A\250U\260\"\260A\340\024!\240\023\240A\240W\250A\250U\260\"\260A\340\014\020\220\007\220t\2301\330\020\023\2204\220s\230!\330\024!\240\033\250A\250Q\340\024!\240\023\240A\240W\250A\250Q\340\010\013\210:\220Q\220k\240\021\330\014\030\230\005\230Q\230k\250\021\340\010\017\210z\230\023\230A\320\004\"\320\"5\3205H\310\006\310a\330\010\026\220d\230!\330\010\023\2204\220q\330\010\016\210a\330\010\032\230!\330\010""\032\230!\330\010\022\220!\330\010\033\2301\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\340\024'\240t\2509\260A\260Q\330\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240y\260\003\2604\260r\3209I\310\022\3101\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\340\024'\240t\2509\260A\260Q\330\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240y\260\003\2604\260r\3209I\310\022\3101\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\013\2101\330\014\023\2204\220r\320\031)\250\023\250I\260T\270\024\270R\320?O\310s\320RS\340\014\023\2204\220s\230!\320\004\"\320\"5\3205H\310\006\310a\330\010\016\210d\220!\330\010\022\220!\330\010\020\220\001\330\010\014\210L\230\001\330\014\017\210y\230\003\2301\330\020\031\230\033\240A\240Z\250s\260!\340\020\033\2301\330\010\013\2101\330\014\017\210t\2201\330\020\023\2205\230\006\230c\240\024\240W\250H\260B\260a\330\024\033\2301\340\020\023\2204\220t\2302\230X\240R\240q\330\024\033\2301\330\014\017\210}\230D\240\004\240D\250\002\250&\260\003\2601\360\006\000\021\025\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\230v\240W\250A\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\340\014\017\210t\2201\330\020\023\2206\230\023\230D\240\001\330\024\033\2301\340\020\023\2206\230\022\2304\230q\330\024\033\2301\330\010\017\210q\320\004\"\320\"5\3205H\310\006\310a\330\010\016\210d\220!\330\010\022\220!\330\010\020\220\001\330\010\014\210L\230\001\330\014\017\210y\230\003\2301\330\020\031\230\033\240A\240Z\250w\260a\340\020\033\2301\330\010\013\2101\330\014\017\210t\2201\330\020\023\2205\230\006\230c\240\024\240W\250H\260B\260a\330\024\033\2301\340\020\023\2204\220t\2302\230X\240R\240q\330\024\033\2301\330\014\017\210}\230D\240\004\240D\250\002\250&\260\003\2601\360\006\000\021\025\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\230v\240S\250\001\330 &\240j\260\001\260\021\330\030\033\2304\230q\330\034#\2401\340\014\017\210t\2201\330\020\023\2206\230\023\230D\240\001\330\024\033\2301\340\020\023\2206\230\022\2304\230q\330\024\033\2301\330\010\017\210q\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\022\220!\330\010\032\230!\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\340\014\020\220\014\230A\330\020\023\2209\230C\230q\330\024\033\230;\240a\240q\340\024'\240t\2509\260A\260Q\330\024\036\230a\340\010\013\210:\220Q\220e\2301\330\014\022\220%\220q\230\005\230Q\330\010\013\2104\210r\320\021!\240\022\2401\330\014\023\2201\330\010\017\210t\2203\220g\230S\240\001\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\032\230!\330\010\022\220!\330\010\033\2301\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240q\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\340\024'\240t\2509\260A\260Q\330\024\036\230a\330\024\027\220t\320\033,\250A\250Q\330\030+\2501\330\014\017\210z\230\021\230%\230q\330\020\026\220e\2301\230E\240\021\330\014\017\210t\2202\320\025%\240R\240q\330\020\027\220q\330\014\017\210}\230D\240\010\250\004\250D\260\001\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\320\004\"\320\"5\3205H\310\006\310a\360.\000\t\020\210q\320\004#\320#6\260a\360\016\000\t\r\210N\230!\330\010\014\320\014\034\230A\320\004#\320#6\260a\330\010\014\210N\230!\330\010\014\320\014\034\230A\320\004$\320$7\3207J\320Je\320ef\360&\000\t\014\2103\210a\210{\230#\230Q\330\014\027\220y\240\001\240\021\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2204\220t\2301\230K\240z\260\032\2701\330\024\032\230'\240\021\240!\330\014\027\220w\230b\240\006\240a\330\014\030\230\001\230\031\240'\250\022\2506\260\021\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!\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\023\220$\220a\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\240H\250B\250a\330\024\032\230'\240\021\240!\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\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\360\006\000\t\023\220$\220a\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\023\230B\230d\240(\250\"\250A\330\024\032\230'\240\021\240!\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\026\220d\230!\340\010\013\2101\330\014\020\220\005\220^\2403\240a\240t\250;\260a\330\020\031\230\027\240\001\240\021\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g""\240Q\240a\340\014\020\220\007\220t\2301\330\020\031\230\027\240\001\240\021\330\020\035\230S\240\004\240A\330\020\035\230S\240\004\240A\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\023\2204\220q\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601\330\014\025\220W\230A\230Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\330\010\014\320\014 \240\002\240*\250D\260\t\270\021\270*\300B\300b\310\004\310L\320XY\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601""\330\014\025\220W\230A\230Q\330\014\031\230\036\240q\250\013\260:\270T\300\021\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\013\2602\260T\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\330\010\026\220d\320\032+\2504\320/B\300!\3005\310\003\3101\310A\330\010\021\220\024\220Q\330\010\014\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270[\310\004\310J\320Vd\320dg\320gh\320hs\320st\360\006\000\t\r\210J\220n\240C\240q\250\013\2601\330\014\025\220W\230A\230Q\330\014\035\230^\2501\250K\260z\300\024\300Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\022\230;\240b\250\017\260r\270\021\330\024\032\230'\240\021\240!\360\006\000\t\r\210L\230\002\230*\240C\240q\250\007\250q\260\013\2702\270^\3103\310a\310w\320VW\320Wb\320bd\320dk\320km\320mq\320q{\360\000\000|\001J\002\360\000\000J\002M\002\360\000\000M\002N\002\360\000\000N\002Y\002\360\000\000Y\002Z\002\330\010\014\320\014 \240\002\240*\250D\260\t\270\021\270*\300B\300b\310\004\310L\320XY\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\026\220d\230!\340\010\013\2104\210q\330\014\020\220\007\220t\2301\330\020\031\230\027\240\001\240\021\330\020\035\230S\240\004\240A\330\020\024\220I\230V\2401\330\024\027\220v\230R\230{\250\"\250C\250q\260\007\260q\270\004\270A\330\030\036\230g\240Q\240a\320\004$\320$7\3207J\320Je\320ef\330\010\022\220+\230Q\230f\240K\250y\270\r\300Q\340\010\030\230\007\230q\240\004\240A\330\010\025\220S\230\001\230\021\330\010\025\220S\230\001\230\021\330\010\014\210G\2204\220q\330\014\027\220|\2404\320';\2701\270I\300\\\320QR\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\035\230Q\230f\240B\240k\260\026""\260r\270\021\330\020\030\230\t\240\023\240A\240]\260#\260Q\260a\330\020\023\2207\230\"\230K\240s\250'\260\022\2601\330\024\032\230'\240\021\240!\320\004$\320$7\3207J\320Je\320ef\330\010\016\210d\220!\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\027\240\001\330\024\032\230'\240\021\240!\330\014\030\230\001\230\031\240'\250\022\2506\260\021\330\010\023\2207\230\"\230F\240!\320\004$\320$7\3207J\320Je\320ef\330\010\016\210d\220!\330\010\014\210L\230\001\330\014\025\220W\230A\230Q\330\014\020\220\t\230\026\230q\330\020\023\2206\230\023\230A\330\024\032\230'\240\021\240!\330\014\030\230\001\230\031\240'\250\022\2506\260\021\330\010\023\2207\230\"\230F\240!\320\0048\3208X\320XY\330\010\016\320\016!\240\021\240!\320\0048\270\001\340\010\016\210l\230!\2301\320\004&\320&9\3209L\320L^\320^_\360$\000\t\036\230Q\330\010\014\210L\230\001\330\014\017\210y\230\007\230q\330\020\023\320\023&\240c\250\021\330\024)\250\021\340\024\025\340\014\017\320\017\"\240'\250\021\360\006\000\021\032\230\027\240\001\240\021\330\020\023\2201\330\024\030\230\t\240\026\240q\330\030#\2401\320$:\270!\330\030\033\2304\230t\2401\240K\250y\270\001\330\034\"\240*\250A\250Q\330\024\030\230\013\2401\240A\330\020\023\2204\220q\330\024\033\2301\330\010\017\210q\240A\250A\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\360>\000\t\025\220A\330\010\022\220!\330\010\014\210E\220\021\330\014\017\210r\220\023\220A\330\020\025\220W\230A\230[\250\001\250\021\340\020\025\220W\230A\230Q\330\020\033\2301\360\006\000\t\014\2108\2202\220Q\330\014\024\220D\230\013\2403\240d\250&\260\002\260(\270!\330\020\024\220M\240\023\240H\250C\250r\260\023\260D\270\r\300Q\300k\320QZ\320Z[\340\010\017\210t\2206\230\022\2301\200A\360\014\000\t\r\210H\220A\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\340\010\026\220a\330\010\014\210L\230\001\330\014\024\220K\230t\2401\240J\250a\330\014\017\210|\2303\230a\330\020\036\230a\330\021\027\220w\230l\250$""\250f\260C\260q\330\020\027\220q\330\010\013\210=\230\004\230L\250\007\250q\330\014\020\220\014\230A\330\020\023\2209\230G\2401\330\024\035\230W\240A\240Q\330\024\027\220|\2407\250!\330\030\037\230q\330\024\030\230\t\240\026\240q\330\030\033\2306\240\023\240A\330\034\"\240*\250A\250Q\330\010\017\210q\200A\330\010\017\210q\330\010\014\210E\220\021\330\014\024\220A\330\010\017\210q\200A\340\023\024\330\021\022\330\025\026\330\010\t\330\024\025\340\010\017\210q\330\010\014\210L\230\001\330\014\024\220K\230t\2401\240J\250a\330\014\017\210v\220W\230A\330\020\023\2206\230\023\230A\330\024\033\2301\330\020\024\220A\220Y\230a\330\010\013\2101\330\014\020\220\014\230A\330\020\023\2209\230G\2401\330\024\035\230W\240A\240Q\330\024\030\230\t\240\021\330\030\033\2306\240\023\240A\330\034\"\240*\250A\250Q\330\034\037\230t\2401\330 '\240q\330\010\017\210q\320\004\034\230E\240\021\360\024\000\t\r\210H\220A\330\010\014\210F\220!\330\010\014\210J\220a\320\004 \240\001\360\014\000\t\r\210L\230\001\320\004 \240\001\360\014\000\t\r\210L\230\001\330\010\014\320\0146\260a\320\004\037\230}\250M\270\021\360\022\000\t\r\210K\220q\330\010\014\320\014\034\230A\330\010\014\210L\230\001\320\004\037\230}\250M\270\021\360\022\000\t\r\210K\220q\330\010\014\320\014\034\230A\330\010\014\210L\230\001\330\010\014\320\014 \240\001\320\004\"\240!\360\014\000\t\r\210N\230!\330\010\014\320\0146\260a\240Q\270Q\230Q\220Q\320\004\035\230U\240*\250A\330\010\014\210I\220Q\330\010\014\210M\230\021\320\004\035\230Z\240z\260\021\360\022\000\t\r\210I\220Q\330\010\014\210M\230\021\240\021\320\004#\240?\260/\300\035\310a\360\024\000\t\r\210N\230!\330\010\014\210L\230\001\330\010\014\320\014\034\230A\340\010\013\2101\330\014\023\2203\220a\220}\240C\240s\250!\250:\260R\260s\270!\330\014!\320!J\310!\330\014\023\220;\230b\240\003\2403\240c\250\021\320\004!\240\035\250m\2701\360\022\000\t\r\210M\230\021\330\010\014\320\014\034\230A\330\010\014\210L\230\001\330\010\014\210L\230\001\330\010\014\320\014 \240\001\320\004/""\250q\330\010\021\220\021\330\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020\021\330\014\022\220+\230Q\230a\330\014\017\210t\2201\330\020\021\330\014\022\220'\230\022\2303\230a\230v\240S\250\001\250\021\340\010\013\2104\210q\330\014\023\2203\220a\360\006\000\t\026\220Q\220b\230\004\230E\240\027\250\002\250\"\250D\260\004\260D\270\004\270F\300!\330\010\023\2201\220D\230\016\240a\240s\250$\250e\2601\330\010\017\210s\220!\220;\230c\240\021\240!\320\004/\250q\340\010\021\220\021\330\010\014\210G\2204\220q\330\014\017\210t\2203\220a\330\020\021\330\014\022\220+\230Q\230a\330\014\017\210t\2201\330\020\021\330\014\022\220'\230\022\2303\230a\230v\240S\250\001\250\021\340\010\025\220Q\220b\230\004\230E\240\021\330\010\013\2104\210q\330\014\023\2203\220a\360\006\000\t\026\220Q\220b\230\004\230E\240\027\250\002\250\"\250D\260\004\260D\270\004\270F\300!\330\010\023\2201\220D\230\016\240a\240s\250$\250e\2601\330\010\017\210s\220!\220;\230c\240\021\240!"; PyObject *data = NULL; CYTHON_UNUSED_VAR(__Pyx_DecompressString); #endif PyObject **stringtab = __pyx_mstate->__pyx_string_tab; Py_ssize_t pos = 0; - for (int i = 0; i < 295; i++) { + for (int i = 0; i < 292; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); if (likely(string) && i >= 39) PyUnicode_InternInPlace(&string); @@ -48328,7 +48322,7 @@ const char* const bytes = ".Abstract base class for constraints.Can't happenComp stringtab[i] = string; pos += bytes_length; } - for (int i = 295; i < 351; i++) { + for (int i = 292; i < 348; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; @@ -48339,25 +48333,29 @@ const char* const bytes = ".Abstract base class for constraints.Can't happenComp } } Py_XDECREF(data); - for (Py_ssize_t i = 0; i < 351; i++) { + for (Py_ssize_t i = 0; i < 348; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { - PyObject **table = stringtab + 295; + PyObject **table = stringtab + 292; for (Py_ssize_t i=0; i<56; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -48376,16 +48374,20 @@ const char* const bytes = ".Abstract base class for constraints.Can't happenComp { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<3; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -48419,392 +48421,392 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 432}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 433}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_m}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 449}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 450}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 450}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 451}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 614}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 615}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_m}; __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 625}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 626}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 793}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 794}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_m}; __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 804}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 805}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 869}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 870}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; __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_mstate->__pyx_kp_b_iso88591_Q, 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), 898}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 899}; 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_mstate->__pyx_kp_b_iso88591_Q_2, 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), 1012}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1013}; 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_mstate->__pyx_kp_b_iso88591_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), 1013}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1014}; 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_mstate->__pyx_kp_b_iso88591_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), 1181}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1182}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p}; __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_mstate->__pyx_kp_b_iso88591_Q_3, 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), 1221}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1222}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_value}; __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_mstate->__pyx_kp_b_iso88591_Q, 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), 1250}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1251}; 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_mstate->__pyx_kp_b_iso88591_Q_2, 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), 1368}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1369}; 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_mstate->__pyx_kp_b_iso88591_Q_3, 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), 1572}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 1573}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __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_mstate->__pyx_kp_b_iso88591_Q_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 12}; 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[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_55H_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 36}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 37}; 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[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_77JJeef_3a_Q_y_WAQ_q_4t1Kz_1_wb, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 65}; 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[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_forwardCheck, __pyx_mstate->__pyx_kp_b_iso88591_99LL___Q_L_y_q_c_1_q_1_4t1Ky_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 133}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 134}; 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[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Zz_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 145}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 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_parms, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_x}; __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_call, __pyx_mstate->__pyx_kp_b_iso88591_A_A_E_r_A_WA_WAQ_1_82Q_D_3d_M_HC, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 201}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 202}; 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[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_U_A_IQ_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 205}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 206}; 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[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_88XXY, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 220}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 221}; 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[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_A_q_L_Kt1Ja_vWA_6_A_1_AYa_1_A_9G, 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), 258}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 259}; 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[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_A_a_L_Kt1Ja_3a_a_wl_fCq_q_L_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 301}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 302}; 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[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_4M_M_A_L_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) 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_init, __pyx_mstate->__pyx_kp_b_iso88591_m1_M_A_L_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 22, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 316}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 22, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 317}; 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_other_vars_min, __pyx_mstate->__pyx_n_u_other_vars_max, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable}; __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_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_4q_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 339}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 340}; 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_min_sum_missing, __pyx_mstate->__pyx_n_u_max_sum_missing, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_negative, __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[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_55H_a_d_4q_a_1_1_1Kq_9Cq_az_1_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 416}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 417}; 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[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_a_N_L_A_1_3a_Cs_Rs_J_b_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 435}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 436}; 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[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_1_3at_a_IV1_vR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 457}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 458}; 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[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_55H_a_d_4_7_1_4q_A_1_3at_a_4s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 525}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 526}; 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[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_2_q_Kq_A_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) 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_init, __pyx_mstate->__pyx_kp_b_iso88591_M_Kq_A_L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 538}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 539}; 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_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_others_max, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier}; __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_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_L_Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 554}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 555}; 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_minsum, __pyx_mstate->__pyx_n_u_sum, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_max_sum_missing, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier}; __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_mstate->__pyx_kp_b_iso88591_55H_a_d_Q_a_1_1Kq_9Cq_az_1_t9AQ, 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), 598}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 599}; 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[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 617}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 618}; 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[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 630}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 631}; 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[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 674}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 675}; 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[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_2_q_Kq_A_L_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) 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_mstate->__pyx_kp_b_iso88591_M_Kq_A_L_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 688}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 689}; 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_maxsum, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_other_vars_min, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_multiplier, __pyx_mstate->__pyx_n_u_variable}; __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_mstate->__pyx_kp_b_iso88591_77JJeef_QfKy_Q_d_4_B_5_1A_Q_L_C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 706}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 707}; 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_min_sum_missing, __pyx_mstate->__pyx_n_u_missing, __pyx_mstate->__pyx_n_u_missing_negative, __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[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_55H_a_d_Q_a_1_1_1Kq_9Cq_az_1_t9, 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), 777}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 778}; 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[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 796}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 797}; 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[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 809}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 810}; 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[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 853}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 854}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exactprod}; __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_mstate->__pyx_kp_b_iso88591_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), 862}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 863}; 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[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 890}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 891}; 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_mstate->__pyx_kp_b_iso88591_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), 938}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 939}; 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[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 948}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 949}; 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[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_mstate->__pyx_kp_b_iso88591_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), 968}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 969}; 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[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_mstate->__pyx_kp_b_iso88591_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), 974}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 975}; 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[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 989}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 20, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 990}; 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_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_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_mstate->__pyx_kp_b_iso88591_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), 1052}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1053}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_minprod}; __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_mstate->__pyx_kp_b_iso88591_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), 1060}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1061}; 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[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 1071}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1072}; 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[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 1104}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1105}; 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[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 1108}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1109}; 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[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_mstate->__pyx_kp_b_iso88591_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), 1126}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1127}; 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[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_mstate->__pyx_kp_b_iso88591_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), 1132}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1133}; 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[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 1145}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1146}; 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[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 1205}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1206}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_maxprod}; __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_mstate->__pyx_kp_b_iso88591_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), 1214}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1215}; 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[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1242}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1243}; 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_mstate->__pyx_kp_b_iso88591_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), 1291}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1292}; 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[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 1295}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1296}; 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[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_get_product_bounds, __pyx_mstate->__pyx_kp_b_iso88591_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), 1313}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1314}; 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[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_safe_product, __pyx_mstate->__pyx_kp_b_iso88591_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), 1319}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1320}; 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[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 1332}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 31, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1333}; 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[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 1387}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1388}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set}; __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_mstate->__pyx_kp_b_iso88591_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), 1395}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1396}; 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[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 1399}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1400}; 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[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 1421}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1422}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_set}; __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_mstate->__pyx_kp_b_iso88591_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), 1429}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1430}; 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[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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), 1433}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1434}; 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[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_preProcess, __pyx_mstate->__pyx_kp_b_iso88591_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), 1455}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1456}; 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_mstate->__pyx_kp_b_iso88591_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), 1469}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1470}; 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_mstate->__pyx_kp_b_iso88591_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), 1517}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1518}; 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[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_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), 1531}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1532}; 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[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_call, __pyx_mstate->__pyx_kp_b_iso88591_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; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1570}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1571}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_variables, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_values, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_constraints_py, __pyx_mstate->__pyx_n_u_sum_other_vars, __pyx_mstate->__pyx_kp_b_iso88591_3gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; } @@ -49057,11 +49059,11 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { + Py_INCREF(src[i]); if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } - Py_INCREF(src[i]); } return res; } @@ -50938,7 +50940,7 @@ static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyOb } /* dict_iter */ -#if CYTHON_COMPILING_IN_PYPY +#if CYTHON_AVOID_BORROWED_REFS #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, @@ -50946,7 +50948,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; @@ -50975,7 +50977,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif @@ -51341,6 +51343,7 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { } PyException_SetCause(new_exc, val); // steals ref to val PyErr_SetObject(PyExc_RuntimeError, new_exc); + Py_DECREF(new_exc); } /* PyLongCompare */ @@ -51514,8 +51517,8 @@ static CYTHON_INLINE int __Pyx_PyLong_BoolNeObjC(PyObject *op1, PyObject *op2, l #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; - if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; args[n] = value; return 0; } @@ -52770,6 +52773,48 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { __Pyx_END_CRITICAL_SECTION(); return result; } +static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) { + CYTHON_UNUSED_VAR(args); + if (unlikely(!self)) { + PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument"); + } + Py_XINCREF(self); + return self; +} +static PyMethodDef __Pyx_CyFunction_annotate_method = { + "__annotate__", + (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl, + METH_VARARGS, + "Placeholder __annotate__ function to allow 'functools.wraps' to work " + "on Cython functions." +}; +static PyObject * +__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *annotations = __Pyx_CyFunction_get_annotations((__pyx_CyFunctionObject *) op_in, NULL); + if (unlikely(!annotations)) return NULL; + PyObject *method = PyCFunction_New( + &__Pyx_CyFunction_annotate_method, + annotations); + Py_DECREF(annotations); + return method; +} +static int +__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted"); + return -1; + } + if (value == Py_None) { + return 0; + } + PyObject *annotations = PyObject_CallObject(value, NULL); + if (!annotations) return -1; + int result = __Pyx_CyFunction_set_annotations((__pyx_CyFunctionObject *) op_in, annotations, NULL); + Py_DECREF(annotations); + return result; +} static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; @@ -52782,7 +52827,6 @@ __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { - Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } @@ -52885,6 +52929,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, @@ -53023,8 +53068,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API -#if PY_VERSION_HEX < 0x030900B1 +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { @@ -53032,7 +53076,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } -#endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); @@ -53084,11 +53127,10 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); -#endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_annotations); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; @@ -55552,7 +55594,8 @@ static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; - ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + size_t nargs = 1U + (val != NULL) + (tb != NULL); + ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } @@ -55749,14 +55792,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } -static PyObject * -__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) -{ #if !CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) { PyObject *frame; - #if PY_VERSION_HEX >= 0x030d0000 - Py_BEGIN_CRITICAL_SECTION(self); - #endif frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { @@ -55781,9 +55820,17 @@ __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) } } Py_INCREF(frame); - #if PY_VERSION_HEX >= 0x030d0000 - Py_END_CRITICAL_SECTION(); - #endif + return frame; +} +#endif +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self); + frame = __Pyx__Coroutine_get_frame_locked(self); + __Pyx_END_CRITICAL_SECTION(); return frame; #else CYTHON_UNUSED_VAR(self); @@ -55844,35 +55891,23 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; gen->is_running = 1; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); assert(gen->is_running); gen->is_running = 0; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); } static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { diff --git a/constraint/constraints.py b/constraint/constraints.py index 08839f1..f392237 100644 --- a/constraint/constraints.py +++ b/constraint/constraints.py @@ -1,10 +1,11 @@ """Module containing the code for constraint definitions.""" -from constraint.domain import Unassigned -from typing import Callable, Union, Optional -from collections.abc import Sequence +from collections.abc import Callable, Sequence from itertools import product +from constraint.domain import Unassigned + + class Constraint: """Abstract base class for constraints.""" @@ -298,7 +299,7 @@ class ExactSumConstraint(Constraint): [[('a', -1), ('b', 1)], [('a', 0), ('b', 0)], [('a', 1), ('b', -1)]] """ - def __init__(self, exactsum: Union[int, float], multipliers: Optional[Sequence] = None): + def __init__(self, exactsum: int | float, multipliers: Sequence | None = None): """Initialization method. Args: @@ -413,7 +414,7 @@ class VariableExactSumConstraint(Constraint): [[('a', -1), ('b', 1), ('c', 0)], [('a', 0), ('b', 0), ('c', 0)], [('a', 1), ('b', -1), ('c', 0)], [('a', 1), ('b', 1), ('c', 2)]] """ # noqa: E501 - def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): + def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): """Initialization method. Args: @@ -495,9 +496,9 @@ def __call__(self, variables: Sequence, domains: dict, assignments: dict, forwar if temp_sum > target_value: domain.hideValue(value) else: + temp_sum = sum_value - min(domain) # sum_value already includes min for unassigned vars for value in domain[:]: - temp_sum = sum_value + value - if temp_sum > target_value: + if temp_sum + value > target_value: domain.hideValue(value) if not domain: return False @@ -522,7 +523,7 @@ class MinSumConstraint(Constraint): [[('a', -3), ('b', 1)], [('a', 1), ('b', -3)], [('a', 1), ('b', 1)]] """ - def __init__(self, minsum: Union[int, float], multipliers: Optional[Sequence] = None): + def __init__(self, minsum: int | float, multipliers: Sequence | None = None): """Initialization method. Args: @@ -595,7 +596,7 @@ class VariableMinSumConstraint(Constraint): [[('a', -3), ('b', 1), ('c', -2)], [('a', 1), ('b', -3), ('c', -2)], [('a', 1), ('b', 1), ('c', -2)], [('a', 1), ('b', 1), ('c', 2)]] """ # noqa: E501 - def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): + def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): """Initialization method. Args: @@ -671,7 +672,7 @@ class MaxSumConstraint(Constraint): [[('a', -3), ('b', -3)], [('a', -3), ('b', 1)], [('a', 1), ('b', -3)]] """ - def __init__(self, maxsum: Union[int, float], multipliers: Optional[Sequence] = None): + def __init__(self, maxsum: int | float, multipliers: Sequence | None = None): """Initialization method. Args: @@ -774,7 +775,7 @@ class VariableMaxSumConstraint(Constraint): [[('a', -2), ('b', -2), ('c', -3)], [('a', -2), ('b', -2), ('c', -1)], [('a', -2), ('b', 1), ('c', -1)], [('a', 1), ('b', -2), ('c', -1)]] """ # noqa: E501 - def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Optional[Sequence] = None): + def __init__(self, target_var: str, sum_vars: Sequence[str], multipliers: Sequence | None = None): """Initialization method. Args: @@ -850,7 +851,7 @@ class ExactProdConstraint(Constraint): [[('a', -2), ('b', 1)], [('a', -1), ('b', 2)], [('a', 1), ('b', -2)], [('a', 2), ('b', -1)]] """ - def __init__(self, exactprod: Union[int, float]): + def __init__(self, exactprod: int | float): """Instantiate an ExactProdConstraint. Args: @@ -1049,7 +1050,7 @@ class MinProdConstraint(Constraint): [[('a', -2), ('b', -2)], [('a', -2), ('b', -1)], [('a', -1), ('b', -2)], [('a', -1), ('b', -1)], [('a', 1), ('b', 1)]] """ # noqa: E501 - def __init__(self, minprod: Union[int, float]): + def __init__(self, minprod: int | float): """Instantiate a MinProdConstraint. Args: @@ -1202,7 +1203,7 @@ class MaxProdConstraint(Constraint): [[('a', -2), ('b', 1)], [('a', -1), ('b', 1)], [('a', 1), ('b', -2)], [('a', 1), ('b', -1)]] """ - def __init__(self, maxprod: Union[int, float]): + def __init__(self, maxprod: int | float): """Instantiate a MaxProdConstraint. Args: diff --git a/constraint/domain.c b/constraint/domain.c index 5000b2f..e0c4feb 100644 --- a/constraint/domain.c +++ b/constraint/domain.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.2.4 */ +/* Generated by Cython 3.2.6 */ /* BEGIN: Cython Metadata { @@ -37,8 +37,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_2_4" -#define CYTHON_HEX_VERSION 0x030204F0 +#define __PYX_ABI_VERSION "3_2_6" +#define CYTHON_HEX_VERSION 0x030206F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include @@ -2676,7 +2676,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,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, 30, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 30, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -2814,7 +2814,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 39, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 39, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -2951,7 +2951,7 @@ 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, 59, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 59, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -3128,7 +3128,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 69, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 69, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -3303,7 +3303,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 75, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 75, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -3447,7 +3447,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 82, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 82, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -3669,7 +3669,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,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, 92, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 92, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -4429,16 +4429,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_slice; for (Py_ssize_t i=0; i<1; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -4518,16 +4522,20 @@ const char* const bytes = "?Class used to control possible values for variables. { PyObject **table = stringtab + 53; for (Py_ssize_t i=0; i<8; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -4691,11 +4699,11 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { + Py_INCREF(src[i]); if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } - Py_INCREF(src[i]); } return res; } @@ -6895,6 +6903,48 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { __Pyx_END_CRITICAL_SECTION(); return result; } +static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) { + CYTHON_UNUSED_VAR(args); + if (unlikely(!self)) { + PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument"); + } + Py_XINCREF(self); + return self; +} +static PyMethodDef __Pyx_CyFunction_annotate_method = { + "__annotate__", + (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl, + METH_VARARGS, + "Placeholder __annotate__ function to allow 'functools.wraps' to work " + "on Cython functions." +}; +static PyObject * +__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *annotations = __Pyx_CyFunction_get_annotations((__pyx_CyFunctionObject *) op_in, NULL); + if (unlikely(!annotations)) return NULL; + PyObject *method = PyCFunction_New( + &__Pyx_CyFunction_annotate_method, + annotations); + Py_DECREF(annotations); + return method; +} +static int +__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted"); + return -1; + } + if (value == Py_None) { + return 0; + } + PyObject *annotations = PyObject_CallObject(value, NULL); + if (!annotations) return -1; + int result = __Pyx_CyFunction_set_annotations((__pyx_CyFunctionObject *) op_in, annotations, NULL); + Py_DECREF(annotations); + return result; +} static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; @@ -6907,7 +6957,6 @@ __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { - Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } @@ -7010,6 +7059,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, @@ -7148,8 +7198,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API -#if PY_VERSION_HEX < 0x030900B1 +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { @@ -7157,7 +7206,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } -#endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); @@ -7209,11 +7257,10 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); -#endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_annotations); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; @@ -8347,8 +8394,8 @@ __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; - if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; args[n] = value; return 0; } diff --git a/constraint/parser.c b/constraint/parser.c index 8aec4a4..1d2075d 100644 --- a/constraint/parser.c +++ b/constraint/parser.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.2.4 */ +/* Generated by Cython 3.2.6 */ /* BEGIN: Cython Metadata { @@ -37,8 +37,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_2_4" -#define CYTHON_HEX_VERSION 0x030204F0 +#define __PYX_ABI_VERSION "3_2_6" +#define CYTHON_HEX_VERSION 0x030206F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include @@ -1544,7 +1544,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_14_genexpr; /* "constraint/parser.py":32 * * - * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: # <<<<<<<<<<<<<< + * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: # <<<<<<<<<<<<<< * """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 * # rewrite the restrictions so variables are singled out */ @@ -1560,9 +1560,9 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct__parse_restrictions { /* "constraint/parser.py":81 * return split_restrictions * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ # <<<<<<<<<<<<<< - * Union[ - * MinSumConstraint, + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 # <<<<<<<<<<<<<< + * """Converts a restriction to a built-in numeric constraint if possible.""" + * # first check if all parameters have only numbers as values */ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_1_to_numeric_constraint { PyObject_HEAD @@ -1573,7 +1573,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_1_to_numeric_constraint }; -/* "constraint/parser.py":99 +/* "constraint/parser.py":84 * """Converts a restriction to a built-in numeric constraint if possible.""" * # first check if all parameters have only numbers as values * if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): # <<<<<<<<<<<<<< @@ -1595,7 +1595,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_3_genexpr { }; -/* "constraint/parser.py":110 +/* "constraint/parser.py":95 * * # split the string on the comparison and remove leading and trailing whitespace * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< @@ -1612,7 +1612,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_4_genexpr { }; -/* "constraint/parser.py":155 +/* "constraint/parser.py":140 * * # we have a potentially rewritten restriction, split again * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< @@ -1629,7 +1629,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_5_genexpr { }; -/* "constraint/parser.py":175 +/* "constraint/parser.py":160 * if len(variables) == 0: * return None * if any(var.strip() not in tune_params for var in variables): # <<<<<<<<<<<<<< @@ -1644,7 +1644,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_6_genexpr { }; -/* "constraint/parser.py":184 +/* "constraint/parser.py":169 * * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) # <<<<<<<<<<<<<< @@ -1659,7 +1659,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_7_genexpr { }; -/* "constraint/parser.py":185 +/* "constraint/parser.py":170 * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) * variable_operators_right = list(s.strip() for s in list(right) if s in variable_supported_operators) # <<<<<<<<<<<<<< @@ -1674,7 +1674,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_8_genexpr { }; -/* "constraint/parser.py":190 +/* "constraint/parser.py":175 * if ( * len(variable_unique_operators) <= 1 * and all(s.strip() in params for s in variables) # <<<<<<<<<<<<<< @@ -1689,7 +1689,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_9_genexpr { }; -/* "constraint/parser.py":282 +/* "constraint/parser.py":267 * # check which operator is applied on the variables * operator = operators_found[0] * if not all(o == operator for o in operators_found): # <<<<<<<<<<<<<< @@ -1704,7 +1704,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_10_genexpr { }; -/* "constraint/parser.py":289 +/* "constraint/parser.py":274 * splitted = variables.split(operator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -1719,12 +1719,12 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_11_genexpr { }; -/* "constraint/parser.py":313 +/* "constraint/parser.py":298 * return None * * def to_equality_constraint( # <<<<<<<<<<<<<< * restriction: str, params: list[str] - * ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + * ) -> AllEqualConstraint | AllDifferentConstraint | None: */ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint { PyObject_HEAD @@ -1733,7 +1733,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_12_to_equality_constrai }; -/* "constraint/parser.py":332 +/* "constraint/parser.py":317 * splitted = restriction.split(comparator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -1748,7 +1748,7 @@ struct __pyx_obj_10constraint_6parser___pyx_scope_struct_13_genexpr { }; -/* "constraint/parser.py":342 +/* "constraint/parser.py":327 * * # remove functionally duplicate restrictions (preserves order and whitespace) * if all(isinstance(r, str) for r in restrictions): # <<<<<<<<<<<<<< @@ -3038,7 +3038,7 @@ typedef struct { PyObject *__pyx_slice[4]; PyObject *__pyx_tuple[4]; PyObject *__pyx_codeobj_tab[21]; - PyObject *__pyx_string_tab[232]; + PyObject *__pyx_string_tab[229]; PyObject *__pyx_number_tab[3]; /* #### Code section: module_state_contents ### */ /* CommonTypesMetaclass.module_state_decls */ @@ -3164,53 +3164,53 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #endif /* #### Code section: constant_name_defines ### */ #define __pyx_kp_u_ __pyx_string_tab[0] -#define __pyx_kp_u_Invalid_comparator __pyx_string_tab[1] -#define __pyx_kp_u_Invalid_operator __pyx_string_tab[2] -#define __pyx_kp_u_Not_possible_comparator_should_b __pyx_string_tab[3] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[4] -#define __pyx_kp_u_Optional_Union_AllEqualConstrain __pyx_string_tab[5] -#define __pyx_kp_u_Optional_Union_MinSumConstraint __pyx_string_tab[6] -#define __pyx_kp_u_Optional_Union_int_float __pyx_string_tab[7] -#define __pyx_kp_u_Restriction __pyx_string_tab[8] -#define __pyx_kp_u_Variables __pyx_string_tab[9] -#define __pyx_kp_u__10 __pyx_string_tab[10] -#define __pyx_kp_u__11 __pyx_string_tab[11] -#define __pyx_kp_u__12 __pyx_string_tab[12] -#define __pyx_kp_u__13 __pyx_string_tab[13] -#define __pyx_kp_u__14 __pyx_string_tab[14] -#define __pyx_kp_u__15 __pyx_string_tab[15] -#define __pyx_kp_u__16 __pyx_string_tab[16] -#define __pyx_kp_u__17 __pyx_string_tab[17] -#define __pyx_kp_u__18 __pyx_string_tab[18] -#define __pyx_kp_u__19 __pyx_string_tab[19] -#define __pyx_kp_u__2 __pyx_string_tab[20] -#define __pyx_kp_u__20 __pyx_string_tab[21] -#define __pyx_kp_u__21 __pyx_string_tab[22] -#define __pyx_kp_u__22 __pyx_string_tab[23] -#define __pyx_kp_u__23 __pyx_string_tab[24] -#define __pyx_kp_u__24 __pyx_string_tab[25] -#define __pyx_kp_u__3 __pyx_string_tab[26] -#define __pyx_kp_u__4 __pyx_string_tab[27] -#define __pyx_kp_u__5 __pyx_string_tab[28] -#define __pyx_kp_u__6 __pyx_string_tab[29] -#define __pyx_kp_u__7 __pyx_string_tab[30] -#define __pyx_kp_u__8 __pyx_string_tab[31] -#define __pyx_kp_u__9 __pyx_string_tab[32] -#define __pyx_kp_u_a_zA_Z__0_9 __pyx_string_tab[33] -#define __pyx_kp_u_a_zA_Z__a_zA_Z__0_9 __pyx_string_tab[34] -#define __pyx_kp_u_add_note __pyx_string_tab[35] -#define __pyx_kp_u_and __pyx_string_tab[36] -#define __pyx_kp_u_constraint_parser_py __pyx_string_tab[37] -#define __pyx_kp_u_d __pyx_string_tab[38] -#define __pyx_kp_u_def_r __pyx_string_tab[39] -#define __pyx_kp_u_disable __pyx_string_tab[40] -#define __pyx_kp_u_enable __pyx_string_tab[41] -#define __pyx_kp_u_gc __pyx_string_tab[42] +#define __pyx_kp_u_AllEqualConstraint_AllDifferentC __pyx_string_tab[1] +#define __pyx_kp_u_Invalid_comparator __pyx_string_tab[2] +#define __pyx_kp_u_Invalid_operator __pyx_string_tab[3] +#define __pyx_kp_u_MinSumConstraint_VariableMinSumC __pyx_string_tab[4] +#define __pyx_kp_u_Not_possible_comparator_should_b __pyx_string_tab[5] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[6] +#define __pyx_kp_u_Restriction __pyx_string_tab[7] +#define __pyx_kp_u_Variables __pyx_string_tab[8] +#define __pyx_kp_u__10 __pyx_string_tab[9] +#define __pyx_kp_u__11 __pyx_string_tab[10] +#define __pyx_kp_u__12 __pyx_string_tab[11] +#define __pyx_kp_u__13 __pyx_string_tab[12] +#define __pyx_kp_u__14 __pyx_string_tab[13] +#define __pyx_kp_u__15 __pyx_string_tab[14] +#define __pyx_kp_u__16 __pyx_string_tab[15] +#define __pyx_kp_u__17 __pyx_string_tab[16] +#define __pyx_kp_u__18 __pyx_string_tab[17] +#define __pyx_kp_u__19 __pyx_string_tab[18] +#define __pyx_kp_u__2 __pyx_string_tab[19] +#define __pyx_kp_u__20 __pyx_string_tab[20] +#define __pyx_kp_u__21 __pyx_string_tab[21] +#define __pyx_kp_u__22 __pyx_string_tab[22] +#define __pyx_kp_u__23 __pyx_string_tab[23] +#define __pyx_kp_u__24 __pyx_string_tab[24] +#define __pyx_kp_u__3 __pyx_string_tab[25] +#define __pyx_kp_u__4 __pyx_string_tab[26] +#define __pyx_kp_u__5 __pyx_string_tab[27] +#define __pyx_kp_u__6 __pyx_string_tab[28] +#define __pyx_kp_u__7 __pyx_string_tab[29] +#define __pyx_kp_u__8 __pyx_string_tab[30] +#define __pyx_kp_u__9 __pyx_string_tab[31] +#define __pyx_kp_u_a_zA_Z__0_9 __pyx_string_tab[32] +#define __pyx_kp_u_a_zA_Z__a_zA_Z__0_9 __pyx_string_tab[33] +#define __pyx_kp_u_add_note __pyx_string_tab[34] +#define __pyx_kp_u_and __pyx_string_tab[35] +#define __pyx_kp_u_constraint_parser_py __pyx_string_tab[36] +#define __pyx_kp_u_d __pyx_string_tab[37] +#define __pyx_kp_u_def_r __pyx_string_tab[38] +#define __pyx_kp_u_disable __pyx_string_tab[39] +#define __pyx_kp_u_enable __pyx_string_tab[40] +#define __pyx_kp_u_gc __pyx_string_tab[41] +#define __pyx_kp_u_int_float_None __pyx_string_tab[42] #define __pyx_kp_u_is_neither_a_string_or_Constrai __pyx_string_tab[43] #define __pyx_kp_u_isenabled __pyx_string_tab[44] #define __pyx_kp_u_list_str __pyx_string_tab[45] -#define __pyx_kp_u_list_tuple_Constraint_list_str_U __pyx_string_tab[46] -#define __pyx_kp_u_list_tuple_Union_Constraint_str __pyx_string_tab[47] +#define __pyx_kp_u_list_tuple_Constraint_list_str_s __pyx_string_tab[46] +#define __pyx_kp_u_list_tuple_Constraint_str_list_s __pyx_string_tab[47] #define __pyx_kp_u_match_but_not_w_d_binary_preced __pyx_string_tab[48] #define __pyx_kp_u_not_in_tune_params __pyx_string_tab[49] #define __pyx_kp_u_or __pyx_string_tab[50] @@ -3229,172 +3229,169 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_MaxSumConstraint __pyx_string_tab[63] #define __pyx_n_u_MinProdConstraint __pyx_string_tab[64] #define __pyx_n_u_MinSumConstraint __pyx_string_tab[65] -#define __pyx_n_u_Optional __pyx_string_tab[66] -#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[67] -#define __pyx_n_u_Union __pyx_string_tab[68] -#define __pyx_n_u_VERBOSE __pyx_string_tab[69] -#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[70] -#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[71] -#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[72] -#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[73] -#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[74] -#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[75] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[76] -#define __pyx_n_u_class_getitem __pyx_string_tab[77] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[78] -#define __pyx_n_u_close __pyx_string_tab[79] -#define __pyx_n_u_co_consts __pyx_string_tab[80] -#define __pyx_n_u_code_object __pyx_string_tab[81] -#define __pyx_n_u_comparator __pyx_string_tab[82] -#define __pyx_n_u_comparators __pyx_string_tab[83] -#define __pyx_n_u_comparators_found __pyx_string_tab[84] -#define __pyx_n_u_comparators_indices __pyx_string_tab[85] -#define __pyx_n_u_compile __pyx_string_tab[86] -#define __pyx_n_u_compile_to_constraints __pyx_string_tab[87] -#define __pyx_n_u_compiled_constraints __pyx_string_tab[88] -#define __pyx_n_u_constraint __pyx_string_tab[89] -#define __pyx_n_u_constraint_constraints __pyx_string_tab[90] -#define __pyx_n_u_constraint_parser __pyx_string_tab[91] -#define __pyx_n_u_constraints __pyx_string_tab[92] -#define __pyx_n_u_dict __pyx_string_tab[93] -#define __pyx_n_u_domains __pyx_string_tab[94] -#define __pyx_n_u_end __pyx_string_tab[95] -#define __pyx_n_u_equalities_found __pyx_string_tab[96] -#define __pyx_n_u_eval __pyx_string_tab[97] -#define __pyx_n_u_exec __pyx_string_tab[98] -#define __pyx_n_u_expr __pyx_string_tab[99] -#define __pyx_n_u_extract_operators __pyx_string_tab[100] -#define __pyx_n_u_finalized_constraint __pyx_string_tab[101] -#define __pyx_n_u_findall __pyx_string_tab[102] -#define __pyx_n_u_finditer __pyx_string_tab[103] -#define __pyx_n_u_fromkeys __pyx_string_tab[104] -#define __pyx_n_u_func __pyx_string_tab[105] -#define __pyx_n_u_func_2 __pyx_string_tab[106] -#define __pyx_n_u_genexpr __pyx_string_tab[107] -#define __pyx_n_u_group __pyx_string_tab[108] -#define __pyx_n_u_i __pyx_string_tab[109] -#define __pyx_n_u_index __pyx_string_tab[110] -#define __pyx_n_u_inequalities_found __pyx_string_tab[111] -#define __pyx_n_u_is_coroutine __pyx_string_tab[112] -#define __pyx_n_u_is_or_evals_to_number __pyx_string_tab[113] -#define __pyx_n_u_items __pyx_string_tab[114] -#define __pyx_n_u_key __pyx_string_tab[115] -#define __pyx_n_u_keys __pyx_string_tab[116] -#define __pyx_n_u_left __pyx_string_tab[117] -#define __pyx_n_u_left_num __pyx_string_tab[118] -#define __pyx_n_u_left_remainder __pyx_string_tab[119] -#define __pyx_n_u_left_swap __pyx_string_tab[120] -#define __pyx_n_u_m __pyx_string_tab[121] -#define __pyx_n_u_main __pyx_string_tab[122] -#define __pyx_n_u_match_object __pyx_string_tab[123] -#define __pyx_n_u_matches __pyx_string_tab[124] -#define __pyx_n_u_module __pyx_string_tab[125] -#define __pyx_n_u_name __pyx_string_tab[126] -#define __pyx_n_u_next __pyx_string_tab[127] -#define __pyx_n_u_next_stop __pyx_string_tab[128] -#define __pyx_n_u_number __pyx_string_tab[129] -#define __pyx_n_u_o __pyx_string_tab[130] -#define __pyx_n_u_offset __pyx_string_tab[131] -#define __pyx_n_u_operator __pyx_string_tab[132] -#define __pyx_n_u_operators __pyx_string_tab[133] -#define __pyx_n_u_operators_found __pyx_string_tab[134] -#define __pyx_n_u_operators_left __pyx_string_tab[135] -#define __pyx_n_u_operators_right __pyx_string_tab[136] -#define __pyx_n_u_p __pyx_string_tab[137] -#define __pyx_n_u_param __pyx_string_tab[138] -#define __pyx_n_u_params __pyx_string_tab[139] -#define __pyx_n_u_params_used __pyx_string_tab[140] -#define __pyx_n_u_params_used_list __pyx_string_tab[141] -#define __pyx_n_u_parse_restrictions __pyx_string_tab[142] -#define __pyx_n_u_parse_restrictions_locals_genexp __pyx_string_tab[143] -#define __pyx_n_u_parse_restrictions_locals_replac __pyx_string_tab[144] -#define __pyx_n_u_parse_restrictions_locals_replac_2 __pyx_string_tab[145] -#define __pyx_n_u_parse_restrictions_locals_to_equ __pyx_string_tab[146] -#define __pyx_n_u_parse_restrictions_locals_to_equ_2 __pyx_string_tab[147] -#define __pyx_n_u_parse_restrictions_locals_to_mul __pyx_string_tab[148] -#define __pyx_n_u_parse_restrictions_locals_to_num __pyx_string_tab[149] -#define __pyx_n_u_parse_restrictions_locals_to_num_2 __pyx_string_tab[150] -#define __pyx_n_u_parse_restrictions_locals_to_num_3 __pyx_string_tab[151] -#define __pyx_n_u_parsed_restriction __pyx_string_tab[152] -#define __pyx_n_u_parsed_restrictions __pyx_string_tab[153] -#define __pyx_n_u_pattern __pyx_string_tab[154] -#define __pyx_n_u_picklable __pyx_string_tab[155] -#define __pyx_n_u_pop __pyx_string_tab[156] -#define __pyx_n_u_prev_stop __pyx_string_tab[157] -#define __pyx_n_u_qualname __pyx_string_tab[158] -#define __pyx_n_u_r __pyx_string_tab[159] -#define __pyx_n_u_re __pyx_string_tab[160] -#define __pyx_n_u_regex_match_variable __pyx_string_tab[161] -#define __pyx_n_u_regex_match_variable_or_constant __pyx_string_tab[162] -#define __pyx_n_u_replace __pyx_string_tab[163] -#define __pyx_n_u_replace_params __pyx_string_tab[164] -#define __pyx_n_u_replace_params_split __pyx_string_tab[165] -#define __pyx_n_u_res __pyx_string_tab[166] -#define __pyx_n_u_restriction __pyx_string_tab[167] -#define __pyx_n_u_restrictions __pyx_string_tab[168] -#define __pyx_n_u_restrictions_cleaned __pyx_string_tab[169] -#define __pyx_n_u_restrictions_cleaned_unique __pyx_string_tab[170] -#define __pyx_n_u_restrictions_unique_indices __pyx_string_tab[171] -#define __pyx_n_u_return __pyx_string_tab[172] -#define __pyx_n_u_right __pyx_string_tab[173] -#define __pyx_n_u_right_num __pyx_string_tab[174] -#define __pyx_n_u_right_remainder __pyx_string_tab[175] -#define __pyx_n_u_right_swap __pyx_string_tab[176] -#define __pyx_n_u_s __pyx_string_tab[177] -#define __pyx_n_u_search __pyx_string_tab[178] -#define __pyx_n_u_send __pyx_string_tab[179] -#define __pyx_n_u_set_name __pyx_string_tab[180] -#define __pyx_n_u_setdefault __pyx_string_tab[181] -#define __pyx_n_u_split __pyx_string_tab[182] -#define __pyx_n_u_split_restrictions __pyx_string_tab[183] -#define __pyx_n_u_splitted __pyx_string_tab[184] -#define __pyx_n_u_start __pyx_string_tab[185] -#define __pyx_n_u_str __pyx_string_tab[186] -#define __pyx_n_u_strip __pyx_string_tab[187] -#define __pyx_n_u_sub __pyx_string_tab[188] -#define __pyx_n_u_swapped_side_first_component __pyx_string_tab[189] -#define __pyx_n_u_temp_copy __pyx_string_tab[190] -#define __pyx_n_u_test __pyx_string_tab[191] -#define __pyx_n_u_throw __pyx_string_tab[192] -#define __pyx_n_u_to_equality_constraint __pyx_string_tab[193] -#define __pyx_n_u_to_multiple_restrictions __pyx_string_tab[194] -#define __pyx_n_u_to_numeric_constraint __pyx_string_tab[195] -#define __pyx_n_u_tune_params __pyx_string_tab[196] -#define __pyx_n_u_types __pyx_string_tab[197] -#define __pyx_n_u_typing __pyx_string_tab[198] -#define __pyx_n_u_union __pyx_string_tab[199] -#define __pyx_n_u_unique_operators __pyx_string_tab[200] -#define __pyx_n_u_unique_operators_left __pyx_string_tab[201] -#define __pyx_n_u_unique_operators_right __pyx_string_tab[202] -#define __pyx_n_u_v __pyx_string_tab[203] -#define __pyx_n_u_value __pyx_string_tab[204] -#define __pyx_n_u_values __pyx_string_tab[205] -#define __pyx_n_u_var __pyx_string_tab[206] -#define __pyx_n_u_variable_operators_left __pyx_string_tab[207] -#define __pyx_n_u_variable_operators_right __pyx_string_tab[208] -#define __pyx_n_u_variable_supported_operators __pyx_string_tab[209] -#define __pyx_n_u_variable_unique_operators __pyx_string_tab[210] -#define __pyx_n_u_variables __pyx_string_tab[211] -#define __pyx_n_u_variables_on_left __pyx_string_tab[212] -#define __pyx_kp_b_iso88591_1 __pyx_string_tab[213] -#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[214] -#define __pyx_kp_b_iso88591_A_3axs_Qa_1_2XQfA_Rxq_a_5_AS_2S __pyx_string_tab[215] -#define __pyx_kp_b_iso88591_A_l_4s_Cq_2V2Q_1 __pyx_string_tab[216] -#define __pyx_kp_b_iso88591_A_l_4s_Cq_t1A_1_1 __pyx_string_tab[217] -#define __pyx_kp_b_iso88591_HA_4vRxq_Q_a_b_1AV3d_q __pyx_string_tab[218] -#define __pyx_kp_b_iso88591_Q __pyx_string_tab[219] -#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[220] -#define __pyx_kp_b_iso88591_Q_G1_xs_c_1_6_uA_AV1D_Qd_e2YasR __pyx_string_tab[221] -#define __pyx_kp_b_iso88591_V1_A_UUV__A_Qm1_q_9_gQm_q_1Kz_g __pyx_string_tab[222] -#define __pyx_kp_b_iso88591_XQ_Qa_z_5_q_q __pyx_string_tab[223] -#define __pyx_kp_b_iso88591_Ya_1_q_Q2_m5_aP_U_6_Q_q_t4uA_d __pyx_string_tab[224] -#define __pyx_kp_b_iso88591__25 __pyx_string_tab[225] -#define __pyx_kp_b_iso88591__26 __pyx_string_tab[226] -#define __pyx_kp_b_iso88591__27 __pyx_string_tab[227] -#define __pyx_kp_b_iso88591__28 __pyx_string_tab[228] -#define __pyx_kp_b_iso88591_a_3axs_C_1_avV6_a_Bhas_q_a_3a_Q __pyx_string_tab[229] -#define __pyx_kp_b_iso88591_q __pyx_string_tab[230] -#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[231] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[66] +#define __pyx_n_u_VERBOSE __pyx_string_tab[67] +#define __pyx_n_u_VariableExactProdConstraint __pyx_string_tab[68] +#define __pyx_n_u_VariableExactSumConstraint __pyx_string_tab[69] +#define __pyx_n_u_VariableMaxProdConstraint __pyx_string_tab[70] +#define __pyx_n_u_VariableMaxSumConstraint __pyx_string_tab[71] +#define __pyx_n_u_VariableMinProdConstraint __pyx_string_tab[72] +#define __pyx_n_u_VariableMinSumConstraint __pyx_string_tab[73] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[74] +#define __pyx_n_u_class_getitem __pyx_string_tab[75] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[76] +#define __pyx_n_u_close __pyx_string_tab[77] +#define __pyx_n_u_co_consts __pyx_string_tab[78] +#define __pyx_n_u_code_object __pyx_string_tab[79] +#define __pyx_n_u_comparator __pyx_string_tab[80] +#define __pyx_n_u_comparators __pyx_string_tab[81] +#define __pyx_n_u_comparators_found __pyx_string_tab[82] +#define __pyx_n_u_comparators_indices __pyx_string_tab[83] +#define __pyx_n_u_compile __pyx_string_tab[84] +#define __pyx_n_u_compile_to_constraints __pyx_string_tab[85] +#define __pyx_n_u_compiled_constraints __pyx_string_tab[86] +#define __pyx_n_u_constraint __pyx_string_tab[87] +#define __pyx_n_u_constraint_constraints __pyx_string_tab[88] +#define __pyx_n_u_constraint_parser __pyx_string_tab[89] +#define __pyx_n_u_constraints __pyx_string_tab[90] +#define __pyx_n_u_dict __pyx_string_tab[91] +#define __pyx_n_u_domains __pyx_string_tab[92] +#define __pyx_n_u_end __pyx_string_tab[93] +#define __pyx_n_u_equalities_found __pyx_string_tab[94] +#define __pyx_n_u_eval __pyx_string_tab[95] +#define __pyx_n_u_exec __pyx_string_tab[96] +#define __pyx_n_u_expr __pyx_string_tab[97] +#define __pyx_n_u_extract_operators __pyx_string_tab[98] +#define __pyx_n_u_finalized_constraint __pyx_string_tab[99] +#define __pyx_n_u_findall __pyx_string_tab[100] +#define __pyx_n_u_finditer __pyx_string_tab[101] +#define __pyx_n_u_fromkeys __pyx_string_tab[102] +#define __pyx_n_u_func __pyx_string_tab[103] +#define __pyx_n_u_func_2 __pyx_string_tab[104] +#define __pyx_n_u_genexpr __pyx_string_tab[105] +#define __pyx_n_u_group __pyx_string_tab[106] +#define __pyx_n_u_i __pyx_string_tab[107] +#define __pyx_n_u_index __pyx_string_tab[108] +#define __pyx_n_u_inequalities_found __pyx_string_tab[109] +#define __pyx_n_u_is_coroutine __pyx_string_tab[110] +#define __pyx_n_u_is_or_evals_to_number __pyx_string_tab[111] +#define __pyx_n_u_items __pyx_string_tab[112] +#define __pyx_n_u_key __pyx_string_tab[113] +#define __pyx_n_u_keys __pyx_string_tab[114] +#define __pyx_n_u_left __pyx_string_tab[115] +#define __pyx_n_u_left_num __pyx_string_tab[116] +#define __pyx_n_u_left_remainder __pyx_string_tab[117] +#define __pyx_n_u_left_swap __pyx_string_tab[118] +#define __pyx_n_u_m __pyx_string_tab[119] +#define __pyx_n_u_main __pyx_string_tab[120] +#define __pyx_n_u_match_object __pyx_string_tab[121] +#define __pyx_n_u_matches __pyx_string_tab[122] +#define __pyx_n_u_module __pyx_string_tab[123] +#define __pyx_n_u_name __pyx_string_tab[124] +#define __pyx_n_u_next __pyx_string_tab[125] +#define __pyx_n_u_next_stop __pyx_string_tab[126] +#define __pyx_n_u_number __pyx_string_tab[127] +#define __pyx_n_u_o __pyx_string_tab[128] +#define __pyx_n_u_offset __pyx_string_tab[129] +#define __pyx_n_u_operator __pyx_string_tab[130] +#define __pyx_n_u_operators __pyx_string_tab[131] +#define __pyx_n_u_operators_found __pyx_string_tab[132] +#define __pyx_n_u_operators_left __pyx_string_tab[133] +#define __pyx_n_u_operators_right __pyx_string_tab[134] +#define __pyx_n_u_p __pyx_string_tab[135] +#define __pyx_n_u_param __pyx_string_tab[136] +#define __pyx_n_u_params __pyx_string_tab[137] +#define __pyx_n_u_params_used __pyx_string_tab[138] +#define __pyx_n_u_params_used_list __pyx_string_tab[139] +#define __pyx_n_u_parse_restrictions __pyx_string_tab[140] +#define __pyx_n_u_parse_restrictions_locals_genexp __pyx_string_tab[141] +#define __pyx_n_u_parse_restrictions_locals_replac __pyx_string_tab[142] +#define __pyx_n_u_parse_restrictions_locals_replac_2 __pyx_string_tab[143] +#define __pyx_n_u_parse_restrictions_locals_to_equ __pyx_string_tab[144] +#define __pyx_n_u_parse_restrictions_locals_to_equ_2 __pyx_string_tab[145] +#define __pyx_n_u_parse_restrictions_locals_to_mul __pyx_string_tab[146] +#define __pyx_n_u_parse_restrictions_locals_to_num __pyx_string_tab[147] +#define __pyx_n_u_parse_restrictions_locals_to_num_2 __pyx_string_tab[148] +#define __pyx_n_u_parse_restrictions_locals_to_num_3 __pyx_string_tab[149] +#define __pyx_n_u_parsed_restriction __pyx_string_tab[150] +#define __pyx_n_u_parsed_restrictions __pyx_string_tab[151] +#define __pyx_n_u_pattern __pyx_string_tab[152] +#define __pyx_n_u_picklable __pyx_string_tab[153] +#define __pyx_n_u_pop __pyx_string_tab[154] +#define __pyx_n_u_prev_stop __pyx_string_tab[155] +#define __pyx_n_u_qualname __pyx_string_tab[156] +#define __pyx_n_u_r __pyx_string_tab[157] +#define __pyx_n_u_re __pyx_string_tab[158] +#define __pyx_n_u_regex_match_variable __pyx_string_tab[159] +#define __pyx_n_u_regex_match_variable_or_constant __pyx_string_tab[160] +#define __pyx_n_u_replace __pyx_string_tab[161] +#define __pyx_n_u_replace_params __pyx_string_tab[162] +#define __pyx_n_u_replace_params_split __pyx_string_tab[163] +#define __pyx_n_u_res __pyx_string_tab[164] +#define __pyx_n_u_restriction __pyx_string_tab[165] +#define __pyx_n_u_restrictions __pyx_string_tab[166] +#define __pyx_n_u_restrictions_cleaned __pyx_string_tab[167] +#define __pyx_n_u_restrictions_cleaned_unique __pyx_string_tab[168] +#define __pyx_n_u_restrictions_unique_indices __pyx_string_tab[169] +#define __pyx_n_u_return __pyx_string_tab[170] +#define __pyx_n_u_right __pyx_string_tab[171] +#define __pyx_n_u_right_num __pyx_string_tab[172] +#define __pyx_n_u_right_remainder __pyx_string_tab[173] +#define __pyx_n_u_right_swap __pyx_string_tab[174] +#define __pyx_n_u_s __pyx_string_tab[175] +#define __pyx_n_u_search __pyx_string_tab[176] +#define __pyx_n_u_send __pyx_string_tab[177] +#define __pyx_n_u_set_name __pyx_string_tab[178] +#define __pyx_n_u_setdefault __pyx_string_tab[179] +#define __pyx_n_u_split __pyx_string_tab[180] +#define __pyx_n_u_split_restrictions __pyx_string_tab[181] +#define __pyx_n_u_splitted __pyx_string_tab[182] +#define __pyx_n_u_start __pyx_string_tab[183] +#define __pyx_n_u_str __pyx_string_tab[184] +#define __pyx_n_u_strip __pyx_string_tab[185] +#define __pyx_n_u_sub __pyx_string_tab[186] +#define __pyx_n_u_swapped_side_first_component __pyx_string_tab[187] +#define __pyx_n_u_temp_copy __pyx_string_tab[188] +#define __pyx_n_u_test __pyx_string_tab[189] +#define __pyx_n_u_throw __pyx_string_tab[190] +#define __pyx_n_u_to_equality_constraint __pyx_string_tab[191] +#define __pyx_n_u_to_multiple_restrictions __pyx_string_tab[192] +#define __pyx_n_u_to_numeric_constraint __pyx_string_tab[193] +#define __pyx_n_u_tune_params __pyx_string_tab[194] +#define __pyx_n_u_types __pyx_string_tab[195] +#define __pyx_n_u_union __pyx_string_tab[196] +#define __pyx_n_u_unique_operators __pyx_string_tab[197] +#define __pyx_n_u_unique_operators_left __pyx_string_tab[198] +#define __pyx_n_u_unique_operators_right __pyx_string_tab[199] +#define __pyx_n_u_v __pyx_string_tab[200] +#define __pyx_n_u_value __pyx_string_tab[201] +#define __pyx_n_u_values __pyx_string_tab[202] +#define __pyx_n_u_var __pyx_string_tab[203] +#define __pyx_n_u_variable_operators_left __pyx_string_tab[204] +#define __pyx_n_u_variable_operators_right __pyx_string_tab[205] +#define __pyx_n_u_variable_supported_operators __pyx_string_tab[206] +#define __pyx_n_u_variable_unique_operators __pyx_string_tab[207] +#define __pyx_n_u_variables __pyx_string_tab[208] +#define __pyx_n_u_variables_on_left __pyx_string_tab[209] +#define __pyx_kp_b_iso88591_1 __pyx_string_tab[210] +#define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[211] +#define __pyx_kp_b_iso88591_A_3axs_Qa_1_2XQfA_Rxq_a_5_AS_2S __pyx_string_tab[212] +#define __pyx_kp_b_iso88591_A_l_4s_Cq_2V2Q_1 __pyx_string_tab[213] +#define __pyx_kp_b_iso88591_A_l_4s_Cq_t1A_1_1 __pyx_string_tab[214] +#define __pyx_kp_b_iso88591_HA_4vRxq_Q_a_b_1AV3d_q __pyx_string_tab[215] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[216] +#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[217] +#define __pyx_kp_b_iso88591_Q_G1_xs_c_1_6_uA_AV1D_Qd_e2YasR __pyx_string_tab[218] +#define __pyx_kp_b_iso88591_V1_A_Oq__A_Qm1_q_9_gQm_q_1Kz_gQ __pyx_string_tab[219] +#define __pyx_kp_b_iso88591_XQ_Qa_z_5_q_q __pyx_string_tab[220] +#define __pyx_kp_b_iso88591_Ya_1_q_Q2_m5_ar_U_6_Q_q_t4uA_d __pyx_string_tab[221] +#define __pyx_kp_b_iso88591__25 __pyx_string_tab[222] +#define __pyx_kp_b_iso88591__26 __pyx_string_tab[223] +#define __pyx_kp_b_iso88591__27 __pyx_string_tab[224] +#define __pyx_kp_b_iso88591__28 __pyx_string_tab[225] +#define __pyx_kp_b_iso88591_a_3axs_C_1_avV6_a_Bhas_q_a_3a_Q __pyx_string_tab[226] +#define __pyx_kp_b_iso88591_q __pyx_string_tab[227] +#define __pyx_kp_b_iso88591_q_2 __pyx_string_tab[228] #define __pyx_int_0 __pyx_number_tab[0] #define __pyx_int_neg_1 __pyx_number_tab[1] #define __pyx_int_1 __pyx_number_tab[2] @@ -3445,7 +3442,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<21; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<232; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<229; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ @@ -3505,7 +3502,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<21; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<232; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<229; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ @@ -3526,7 +3523,7 @@ return 0; /* "constraint/parser.py":32 * * - * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: # <<<<<<<<<<<<<< + * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: # <<<<<<<<<<<<<< * """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 * # rewrite the restrictions so variables are singled out */ @@ -3572,7 +3569,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_restrictions,&__pyx_mstate_global->__pyx_n_u_tune_params,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, 32, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 32, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -3683,7 +3680,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_match_object,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, 38, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 38, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -3903,7 +3900,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_match_object,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, 46, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 46, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -4134,7 +4131,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_restrictions,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, 56, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 56, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -4661,7 +4658,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_4to_multiple * split_restrictions.append(temp_copy[prev_stop:next_stop].strip()) * return split_restrictions # <<<<<<<<<<<<<< * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_split_restrictions); @@ -4704,9 +4701,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_4to_multiple /* "constraint/parser.py":81 * return split_restrictions * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ # <<<<<<<<<<<<<< - * Union[ - * MinSumConstraint, + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 # <<<<<<<<<<<<<< + * """Converts a restriction to a built-in numeric constraint if possible.""" + * # first check if all parameters have only numbers as values */ /* Python wrapper */ @@ -4750,7 +4747,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_params,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, 81, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 81, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -4816,7 +4813,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_7genexpr_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":99 +/* "constraint/parser.py":84 * """Converts a restriction to a built-in numeric constraint if possible.""" * # first check if all parameters have only numbers as values * if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): # <<<<<<<<<<<<<< @@ -4836,7 +4833,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_3_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 99, __pyx_L1_error) + __PYX_ERR(0, 84, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -4844,7 +4841,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_7genexpr_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_7genexpr_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4882,16 +4879,16 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 99, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 99, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 84, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 84, __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, 99, __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, 84, __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, 99, __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, 84, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -4899,7 +4896,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 99, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 84, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4909,7 +4906,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 99, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 84, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4920,13 +4917,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __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, 99, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 84, __pyx_L1_error) PyErr_Clear(); } break; @@ -4997,7 +4994,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 99, __pyx_L1_error) + __PYX_ERR(0, 84, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5008,7 +5005,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5047,40 +5044,40 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 99, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 99, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 84, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 84, __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, 99, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 84, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __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_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 99, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 84, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 99, __pyx_L1_error) + __PYX_ERR(0, 84, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params, __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_7genexpr_genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_4 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_7genexpr_genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { @@ -5122,7 +5119,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":110 +/* "constraint/parser.py":95 * * # split the string on the comparison and remove leading and trailing whitespace * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< @@ -5142,7 +5139,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_4_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 110, __pyx_L1_error) + __PYX_ERR(0, 95, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5153,7 +5150,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_1); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_1); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5193,11 +5190,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric __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, 110, __pyx_L1_error) + __PYX_ERR(0, 95, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 110, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_1)) { __Pyx_RaiseUnboundLocalError(".1"); __PYX_ERR(0, 110, __pyx_L1_error) } - __pyx_t_1 = PyUnicode_Split(__pyx_cur_scope->__pyx_genexpr_arg_0, __Pyx_NoneAsNull(__pyx_cur_scope->__pyx_genexpr_arg_1), -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 95, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_1)) { __Pyx_RaiseUnboundLocalError(".1"); __PYX_ERR(0, 95, __pyx_L1_error) } + __pyx_t_1 = PyUnicode_Split(__pyx_cur_scope->__pyx_genexpr_arg_0, __Pyx_NoneAsNull(__pyx_cur_scope->__pyx_genexpr_arg_1), -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; @@ -5206,13 +5203,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 110, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 95, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1); @@ -5225,7 +5222,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; @@ -5244,7 +5241,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 95, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -5272,7 +5269,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_8generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":155 +/* "constraint/parser.py":140 * * # we have a potentially rewritten restriction, split again * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< @@ -5292,7 +5289,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_5_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 155, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5303,7 +5300,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_1); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_1); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_8generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_8generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5343,11 +5340,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric __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, 155, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 155, __pyx_L1_error) } - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_1)) { __Pyx_RaiseUnboundLocalError(".1"); __PYX_ERR(0, 155, __pyx_L1_error) } - __pyx_t_1 = PyUnicode_Split(__pyx_cur_scope->__pyx_genexpr_arg_0, __Pyx_NoneAsNull(__pyx_cur_scope->__pyx_genexpr_arg_1), -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 140, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_1)) { __Pyx_RaiseUnboundLocalError(".1"); __PYX_ERR(0, 140, __pyx_L1_error) } + __pyx_t_1 = PyUnicode_Split(__pyx_cur_scope->__pyx_genexpr_arg_0, __Pyx_NoneAsNull(__pyx_cur_scope->__pyx_genexpr_arg_1), -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; @@ -5356,13 +5353,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 155, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 140, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1); @@ -5375,7 +5372,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; @@ -5394,7 +5391,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 155, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 140, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -5422,7 +5419,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_11generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":175 +/* "constraint/parser.py":160 * if len(variables) == 0: * return None * if any(var.strip() not in tune_params for var in variables): # <<<<<<<<<<<<<< @@ -5442,7 +5439,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_6_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 175, __pyx_L1_error) + __PYX_ERR(0, 160, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5453,7 +5450,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_11generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_11generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5492,16 +5489,16 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 175, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 175, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 160, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 160, __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, 175, __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, 160, __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, 175, __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, 160, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -5509,7 +5506,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 175, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 160, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5519,7 +5516,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 175, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 160, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5530,13 +5527,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __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, 175, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 160, __pyx_L1_error) PyErr_Clear(); } break; @@ -5554,15 +5551,15 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 175, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 160, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 175, __pyx_L1_error) + __PYX_ERR(0, 160, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_tune_params, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { __Pyx_XDECREF(__pyx_r); @@ -5603,7 +5600,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_14generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":184 +/* "constraint/parser.py":169 * * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) # <<<<<<<<<<<<<< @@ -5623,7 +5620,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 184, __pyx_L1_error) + __PYX_ERR(0, 169, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5634,7 +5631,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_14generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_14generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5672,11 +5669,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 184, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 184, __pyx_L1_error) } - __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 169, __pyx_L1_error) } + __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; @@ -5685,20 +5682,20 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 184, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 169, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators)) { __Pyx_RaiseClosureNameError("variable_supported_operators"); __PYX_ERR(0, 184, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_s, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators)) { __Pyx_RaiseClosureNameError("variable_supported_operators"); __PYX_ERR(0, 169, __pyx_L1_error) } + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_s, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 169, __pyx_L1_error) if (__pyx_t_4) { __pyx_t_5 = __pyx_cur_scope->__pyx_v_s; __Pyx_INCREF(__pyx_t_5); @@ -5707,10 +5704,10 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 184, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } @@ -5740,7 +5737,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_17generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":185 +/* "constraint/parser.py":170 * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) * variable_operators_right = list(s.strip() for s in list(right) if s in variable_supported_operators) # <<<<<<<<<<<<<< @@ -5760,7 +5757,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_8_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 185, __pyx_L1_error) + __PYX_ERR(0, 170, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5771,7 +5768,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_17generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_17generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5809,11 +5806,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 185, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 185, __pyx_L1_error) } - __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 170, __pyx_L1_error) } + __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; @@ -5822,20 +5819,20 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 185, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 170, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators)) { __Pyx_RaiseClosureNameError("variable_supported_operators"); __PYX_ERR(0, 185, __pyx_L1_error) } - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_s, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators)) { __Pyx_RaiseClosureNameError("variable_supported_operators"); __PYX_ERR(0, 170, __pyx_L1_error) } + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_s, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_variable_supported_operators, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 170, __pyx_L1_error) if (__pyx_t_4) { __pyx_t_5 = __pyx_cur_scope->__pyx_v_s; __Pyx_INCREF(__pyx_t_5); @@ -5844,10 +5841,10 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 185, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } } @@ -5877,7 +5874,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_20generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":190 +/* "constraint/parser.py":175 * if ( * len(variable_unique_operators) <= 1 * and all(s.strip() in params for s in variables) # <<<<<<<<<<<<<< @@ -5897,7 +5894,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_9_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 190, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -5908,7 +5905,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_20generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_20generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5948,16 +5945,16 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 190, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 190, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 175, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 175, __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, 190, __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, 175, __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, 190, __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, 175, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -5965,7 +5962,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 190, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5975,7 +5972,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 190, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 175, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -5986,13 +5983,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __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, 190, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 175, __pyx_L1_error) PyErr_Clear(); } break; @@ -6010,11 +6007,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 190, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 190, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 175, __pyx_L1_error) } + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = (!__pyx_t_7); if (__pyx_t_8) { @@ -6056,7 +6053,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_23generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":282 +/* "constraint/parser.py":267 * # check which operator is applied on the variables * operator = operators_found[0] * if not all(o == operator for o in operators_found): # <<<<<<<<<<<<<< @@ -6076,7 +6073,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_10_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 282, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -6087,7 +6084,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_23generator8, ((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_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_23generator8, ((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_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6125,16 +6122,16 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 282, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 282, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 267, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 267, __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, 282, __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, 267, __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, 282, __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, 267, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -6142,7 +6139,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 282, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 267, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6152,7 +6149,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 282, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 267, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6163,13 +6160,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __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, 282, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 267, __pyx_L1_error) PyErr_Clear(); } break; @@ -6180,9 +6177,9 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_o, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_operator)) { __Pyx_RaiseClosureNameError("operator"); __PYX_ERR(0, 282, __pyx_L1_error) } - __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_o, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_operator, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 282, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 282, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_operator)) { __Pyx_RaiseClosureNameError("operator"); __PYX_ERR(0, 267, __pyx_L1_error) } + __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_o, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_operator, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { @@ -6223,7 +6220,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_26generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":289 +/* "constraint/parser.py":274 * splitted = variables.split(operator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -6243,7 +6240,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_11_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 289, __pyx_L1_error) + __PYX_ERR(0, 274, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -6254,7 +6251,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric __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_6parser_18parse_restrictions_21to_numeric_constraint_26generator9, ((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_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_26generator9, ((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_parse_restrictions_locals_to_num_2, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6294,16 +6291,16 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 289, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 289, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 274, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 274, __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, 289, __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, 274, __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, 289, __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, 274, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -6311,7 +6308,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 289, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6321,7 +6318,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric { 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, 289, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -6332,13 +6329,13 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __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, 289, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 274, __pyx_L1_error) PyErr_Clear(); } break; @@ -6356,11 +6353,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 289, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 274, __pyx_L1_error) } + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = (!__pyx_t_7); if (__pyx_t_8) { @@ -6404,9 +6401,9 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_21to_numeric /* "constraint/parser.py":81 * return split_restrictions * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ # <<<<<<<<<<<<<< - * Union[ - * MinSumConstraint, + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 # <<<<<<<<<<<<<< + * """Converts a restriction to a built-in numeric constraint if possible.""" + * # first check if all parameters have only numbers as values */ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_constraint(PyObject *__pyx_self, PyObject *__pyx_v_restriction, PyObject *__pyx_v_params) { @@ -6482,7 +6479,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_params); __Pyx_INCREF(__pyx_v_restriction); - /* "constraint/parser.py":99 + /* "constraint/parser.py":84 * """Converts a restriction to a built-in numeric constraint if possible.""" * # first check if all parameters have only numbers as values * if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): # <<<<<<<<<<<<<< @@ -6491,7 +6488,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_params; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 == 0); if (!__pyx_t_4) { @@ -6499,19 +6496,19 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_v_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_v_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_5 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = (!__pyx_t_4); __pyx_t_1 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":100 + /* "constraint/parser.py":85 * # first check if all parameters have only numbers as values * if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): * return None # <<<<<<<<<<<<<< @@ -6522,7 +6519,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":99 + /* "constraint/parser.py":84 * """Converts a restriction to a built-in numeric constraint if possible.""" * # first check if all parameters have only numbers as values * if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): # <<<<<<<<<<<<<< @@ -6531,34 +6528,34 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":102 + /* "constraint/parser.py":87 * return None * * comparators = ["<=", "==", ">=", ">", "<"] # <<<<<<<<<<<<<< * comparators_found = re.findall("|".join(comparators), restriction) * # check if there is exactly one comparator, if not, return None */ - __pyx_t_5 = PyList_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_5 = PyList_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__2); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_mstate_global->__pyx_kp_u__2) != (0)) __PYX_ERR(0, 102, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_mstate_global->__pyx_kp_u__2) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__7); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_kp_u__7) != (0)) __PYX_ERR(0, 102, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_kp_u__7) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__3); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_mstate_global->__pyx_kp_u__3) != (0)) __PYX_ERR(0, 102, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_mstate_global->__pyx_kp_u__3) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__4); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_mstate_global->__pyx_kp_u__4) != (0)) __PYX_ERR(0, 102, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_mstate_global->__pyx_kp_u__4) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__5); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_mstate_global->__pyx_kp_u__5) != (0)) __PYX_ERR(0, 102, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_mstate_global->__pyx_kp_u__5) != (0)) __PYX_ERR(0, 87, __pyx_L1_error); __pyx_v_comparators = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/parser.py":103 + /* "constraint/parser.py":88 * * comparators = ["<=", "==", ">=", ">", "<"] * comparators_found = re.findall("|".join(comparators), restriction) # <<<<<<<<<<<<<< @@ -6566,12 +6563,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * if len(comparators_found) != 1: */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__6, __pyx_v_comparators); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_7 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__6, __pyx_v_comparators); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -6591,24 +6588,24 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_comparators_found = __pyx_t_5; __pyx_t_5 = 0; - /* "constraint/parser.py":105 + /* "constraint/parser.py":90 * comparators_found = re.findall("|".join(comparators), restriction) * # check if there is exactly one comparator, if not, return None * if len(comparators_found) != 1: # <<<<<<<<<<<<<< * return None * comparator = comparators_found[0] */ - __pyx_t_3 = PyObject_Length(__pyx_v_comparators_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_comparators_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 90, __pyx_L1_error) __pyx_t_1 = (__pyx_t_3 != 1); if (__pyx_t_1) { - /* "constraint/parser.py":106 + /* "constraint/parser.py":91 * # check if there is exactly one comparator, if not, return None * if len(comparators_found) != 1: * return None # <<<<<<<<<<<<<< @@ -6619,7 +6616,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":105 + /* "constraint/parser.py":90 * comparators_found = re.findall("|".join(comparators), restriction) * # check if there is exactly one comparator, if not, return None * if len(comparators_found) != 1: # <<<<<<<<<<<<<< @@ -6628,28 +6625,28 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":107 + /* "constraint/parser.py":92 * if len(comparators_found) != 1: * return None * comparator = comparators_found[0] # <<<<<<<<<<<<<< * * # split the string on the comparison and remove leading and trailing whitespace */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_comparators_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_comparators_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_comparator = __pyx_t_5; __pyx_t_5 = 0; - /* "constraint/parser.py":110 + /* "constraint/parser.py":95 * * # split the string on the comparison and remove leading and trailing whitespace * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< * * # if we have an inverse operation, rewrite to the other side */ - __pyx_t_5 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_3genexpr(NULL, __pyx_v_restriction, __pyx_v_comparator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_5 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_3genexpr(NULL, __pyx_v_restriction, __pyx_v_comparator); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (1) { @@ -6658,7 +6655,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 110, __pyx_L1_error) + __PYX_ERR(0, 95, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); @@ -6666,9 +6663,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -6678,7 +6675,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_v_right = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/parser.py":113 + /* "constraint/parser.py":98 * * # if we have an inverse operation, rewrite to the other side * operators_left = extract_operators(left) # <<<<<<<<<<<<<< @@ -6686,7 +6683,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * if len(operators_left) > 0 and len(operators_right) > 0: */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -6705,13 +6702,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __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_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 113, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_operators_left = __pyx_t_8; __pyx_t_8 = 0; - /* "constraint/parser.py":114 + /* "constraint/parser.py":99 * # if we have an inverse operation, rewrite to the other side * operators_left = extract_operators(left) * operators_right = extract_operators(right) # <<<<<<<<<<<<<< @@ -6719,7 +6716,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # if there are operators on both sides, we can't handle this yet */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -6738,33 +6735,33 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 114, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_operators_right = __pyx_t_8; __pyx_t_8 = 0; - /* "constraint/parser.py":115 + /* "constraint/parser.py":100 * operators_left = extract_operators(left) * operators_right = extract_operators(right) * if len(operators_left) > 0 and len(operators_right) > 0: # <<<<<<<<<<<<<< * # if there are operators on both sides, we can't handle this yet * return None */ - __pyx_t_3 = PyObject_Length(__pyx_v_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 100, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 > 0); if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = PyObject_Length(__pyx_v_operators_right); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_operators_right); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 100, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 > 0); __pyx_t_1 = __pyx_t_6; __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":117 + /* "constraint/parser.py":102 * if len(operators_left) > 0 and len(operators_right) > 0: * # if there are operators on both sides, we can't handle this yet * return None # <<<<<<<<<<<<<< @@ -6775,7 +6772,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":115 + /* "constraint/parser.py":100 * operators_left = extract_operators(left) * operators_right = extract_operators(right) * if len(operators_left) > 0 and len(operators_right) > 0: # <<<<<<<<<<<<<< @@ -6784,67 +6781,67 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":118 + /* "constraint/parser.py":103 * # if there are operators on both sides, we can't handle this yet * return None * unique_operators_left = set(operators_left) # <<<<<<<<<<<<<< * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) */ - __pyx_t_8 = PySet_New(__pyx_v_operators_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_8 = PySet_New(__pyx_v_operators_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_unique_operators_left = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/parser.py":119 + /* "constraint/parser.py":104 * return None * unique_operators_left = set(operators_left) * unique_operators_right = set(operators_right) # <<<<<<<<<<<<<< * unique_operators = unique_operators_left.union(unique_operators_right) * if len(unique_operators) == 1: */ - __pyx_t_8 = PySet_New(__pyx_v_operators_right); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_8 = PySet_New(__pyx_v_operators_right); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_unique_operators_right = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/parser.py":120 + /* "constraint/parser.py":105 * unique_operators_left = set(operators_left) * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) # <<<<<<<<<<<<<< * if len(unique_operators) == 1: * variables_on_left = len(unique_operators_left) > 0 */ - __pyx_t_8 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__union, __pyx_v_unique_operators_left, __pyx_v_unique_operators_right); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_8 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__union, __pyx_v_unique_operators_left, __pyx_v_unique_operators_right); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_unique_operators = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/parser.py":121 + /* "constraint/parser.py":106 * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) * if len(unique_operators) == 1: # <<<<<<<<<<<<<< * variables_on_left = len(unique_operators_left) > 0 * swapped_side_first_component = re.search( */ - __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 106, __pyx_L1_error) __pyx_t_1 = (__pyx_t_3 == 1); if (__pyx_t_1) { - /* "constraint/parser.py":122 + /* "constraint/parser.py":107 * unique_operators = unique_operators_left.union(unique_operators_right) * if len(unique_operators) == 1: * variables_on_left = len(unique_operators_left) > 0 # <<<<<<<<<<<<<< * swapped_side_first_component = re.search( * regex_match_variable_or_constant, left if variables_on_left else right */ - __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 122, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyBool_FromLong((__pyx_t_3 > 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyBool_FromLong((__pyx_t_3 > 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_variables_on_left = __pyx_t_8; __pyx_t_8 = 0; - /* "constraint/parser.py":123 + /* "constraint/parser.py":108 * if len(unique_operators) == 1: * variables_on_left = len(unique_operators_left) > 0 * swapped_side_first_component = re.search( # <<<<<<<<<<<<<< @@ -6852,21 +6849,21 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * ) # noqa: E501 */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 123, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_search); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_search); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/parser.py":124 + /* "constraint/parser.py":109 * variables_on_left = len(unique_operators_left) > 0 * swapped_side_first_component = re.search( * regex_match_variable_or_constant, left if variables_on_left else right # <<<<<<<<<<<<<< * ) # noqa: E501 * if swapped_side_first_component is None: */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_regex_match_variable_or_constant)) { __Pyx_RaiseClosureNameError("regex_match_variable_or_constant"); __PYX_ERR(0, 124, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 124, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_regex_match_variable_or_constant)) { __Pyx_RaiseClosureNameError("regex_match_variable_or_constant"); __PYX_ERR(0, 109, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 109, __pyx_L1_error) if (__pyx_t_1) { __Pyx_INCREF(__pyx_v_left); __pyx_t_5 = __pyx_v_left; @@ -6892,13 +6889,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 123, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_swapped_side_first_component = __pyx_t_8; __pyx_t_8 = 0; - /* "constraint/parser.py":126 + /* "constraint/parser.py":111 * regex_match_variable_or_constant, left if variables_on_left else right * ) # noqa: E501 * if swapped_side_first_component is None: # <<<<<<<<<<<<<< @@ -6908,7 +6905,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_1 = (__pyx_v_swapped_side_first_component == Py_None); if (__pyx_t_1) { - /* "constraint/parser.py":128 + /* "constraint/parser.py":113 * if swapped_side_first_component is None: * # if there is no variable on the left side, we can't handle this yet * return None # <<<<<<<<<<<<<< @@ -6919,7 +6916,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":126 + /* "constraint/parser.py":111 * regex_match_variable_or_constant, left if variables_on_left else right * ) # noqa: E501 * if swapped_side_first_component is None: # <<<<<<<<<<<<<< @@ -6928,7 +6925,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":130 + /* "constraint/parser.py":115 * return None * else: * swapped_side_first_component = swapped_side_first_component.group(0) # <<<<<<<<<<<<<< @@ -6943,83 +6940,83 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_group, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF_SET(__pyx_v_swapped_side_first_component, __pyx_t_8); __pyx_t_8 = 0; } - /* "constraint/parser.py":131 + /* "constraint/parser.py":116 * else: * swapped_side_first_component = swapped_side_first_component.group(0) * if "-" in unique_operators: # <<<<<<<<<<<<<< * if not variables_on_left: * # e.g. "G == B-M" becomes "G+M == B" */ - __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_mstate_global->__pyx_kp_u__8, __pyx_v_unique_operators, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_mstate_global->__pyx_kp_u__8, __pyx_v_unique_operators, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 116, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":132 + /* "constraint/parser.py":117 * swapped_side_first_component = swapped_side_first_component.group(0) * if "-" in unique_operators: * if not variables_on_left: # <<<<<<<<<<<<<< * # e.g. "G == B-M" becomes "G+M == B" * right_remainder = right[len(swapped_side_first_component) :] */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 117, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_1); if (__pyx_t_6) { - /* "constraint/parser.py":134 + /* "constraint/parser.py":119 * if not variables_on_left: * # e.g. "G == B-M" becomes "G+M == B" * right_remainder = right[len(swapped_side_first_component) :] # <<<<<<<<<<<<<< * left_swap = right_remainder.replace("-", "+") * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" */ - __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 134, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_right, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_right, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_right_remainder = __pyx_t_8; __pyx_t_8 = 0; - /* "constraint/parser.py":135 + /* "constraint/parser.py":120 * # e.g. "G == B-M" becomes "G+M == B" * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("-", "+") # <<<<<<<<<<<<<< * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" * else: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_left_swap = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":136 + /* "constraint/parser.py":121 * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("-", "+") * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" # <<<<<<<<<<<<<< * else: * # e.g. "B-M == G" becomes "B == G+M" */ - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_left, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_left, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_left_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_left_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10[0] = __pyx_t_2; __pyx_t_10[1] = __pyx_t_8; __pyx_t_10[2] = __pyx_t_5; __pyx_t_10[3] = __pyx_t_7; __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7)); - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 136, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -7028,7 +7025,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF_SET(__pyx_v_restriction, ((PyObject*)__pyx_t_11)); __pyx_t_11 = 0; - /* "constraint/parser.py":132 + /* "constraint/parser.py":117 * swapped_side_first_component = swapped_side_first_component.group(0) * if "-" in unique_operators: * if not variables_on_left: # <<<<<<<<<<<<<< @@ -7038,7 +7035,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L13; } - /* "constraint/parser.py":139 + /* "constraint/parser.py":124 * else: * # e.g. "B-M == G" becomes "B == G+M" * left_remainder = left[len(swapped_side_first_component) :] # <<<<<<<<<<<<<< @@ -7046,48 +7043,48 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" */ /*else*/ { - __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 139, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_left, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_left, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_v_left_remainder = __pyx_t_11; __pyx_t_11 = 0; - /* "constraint/parser.py":140 + /* "constraint/parser.py":125 * # e.g. "B-M == G" becomes "B == G+M" * left_remainder = left[len(swapped_side_first_component) :] * right_swap = left_remainder.replace("-", "+") # <<<<<<<<<<<<<< * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * if "/" in unique_operators: */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_right_swap = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/parser.py":141 + /* "constraint/parser.py":126 * left_remainder = left[len(swapped_side_first_component) :] * right_swap = left_remainder.replace("-", "+") * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" # <<<<<<<<<<<<<< * if "/" in unique_operators: * if not variables_on_left: */ - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_right, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_right, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_right_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_right_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10[0] = __pyx_t_7; __pyx_t_10[1] = __pyx_t_11; __pyx_t_10[2] = __pyx_t_5; __pyx_t_10[3] = __pyx_t_8; __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -7098,7 +7095,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L13:; - /* "constraint/parser.py":131 + /* "constraint/parser.py":116 * else: * swapped_side_first_component = swapped_side_first_component.group(0) * if "-" in unique_operators: # <<<<<<<<<<<<<< @@ -7107,76 +7104,76 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":142 + /* "constraint/parser.py":127 * right_swap = left_remainder.replace("-", "+") * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * if "/" in unique_operators: # <<<<<<<<<<<<<< * if not variables_on_left: * # e.g. "G == B/M" becomes "G*M == B" */ - __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_mstate_global->__pyx_kp_u__10, __pyx_v_unique_operators, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_mstate_global->__pyx_kp_u__10, __pyx_v_unique_operators, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 127, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/parser.py":143 + /* "constraint/parser.py":128 * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * if "/" in unique_operators: * if not variables_on_left: # <<<<<<<<<<<<<< * # e.g. "G == B/M" becomes "G*M == B" * right_remainder = right[len(swapped_side_first_component) :] */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 128, __pyx_L1_error) __pyx_t_1 = (!__pyx_t_6); if (__pyx_t_1) { - /* "constraint/parser.py":145 + /* "constraint/parser.py":130 * if not variables_on_left: * # e.g. "G == B/M" becomes "G*M == B" * right_remainder = right[len(swapped_side_first_component) :] # <<<<<<<<<<<<<< * left_swap = right_remainder.replace("/", "*") * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" */ - __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 145, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_right, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_right, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_right_remainder, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":146 + /* "constraint/parser.py":131 * # e.g. "G == B/M" becomes "G*M == B" * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("/", "*") # <<<<<<<<<<<<<< * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_left_swap, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/parser.py":147 + /* "constraint/parser.py":132 * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("/", "*") * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" # <<<<<<<<<<<<<< * else: * # e.g. "B/M == G" becomes "B == G*M" */ - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_left, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_left, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_left_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_left_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10[0] = __pyx_t_8; __pyx_t_10[1] = __pyx_t_2; __pyx_t_10[2] = __pyx_t_5; __pyx_t_10[3] = __pyx_t_11; __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7185,7 +7182,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF_SET(__pyx_v_restriction, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "constraint/parser.py":143 + /* "constraint/parser.py":128 * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * if "/" in unique_operators: * if not variables_on_left: # <<<<<<<<<<<<<< @@ -7195,7 +7192,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L15; } - /* "constraint/parser.py":150 + /* "constraint/parser.py":135 * else: * # e.g. "B/M == G" becomes "B == G*M" * left_remainder = left[len(swapped_side_first_component) :] # <<<<<<<<<<<<<< @@ -7203,48 +7200,48 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" */ /*else*/ { - __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 150, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_left, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_swapped_side_first_component); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_left, __pyx_t_3, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_left_remainder, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":151 + /* "constraint/parser.py":136 * # e.g. "B/M == G" becomes "B == G*M" * left_remainder = left[len(swapped_side_first_component) :] * right_swap = left_remainder.replace("/", "*") # <<<<<<<<<<<<<< * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_remainder, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1], NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_right_swap, __pyx_t_11); __pyx_t_11 = 0; - /* "constraint/parser.py":152 + /* "constraint/parser.py":137 * left_remainder = left[len(swapped_side_first_component) :] * right_swap = left_remainder.replace("/", "*") * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" # <<<<<<<<<<<<<< * * # we have a potentially rewritten restriction, split again */ - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_swapped_side_first_component, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_right, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_right, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_right_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_right_swap, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10[0] = __pyx_t_11; __pyx_t_10[1] = __pyx_t_7; __pyx_t_10[2] = __pyx_t_5; __pyx_t_10[3] = __pyx_t_2; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -7255,7 +7252,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L15:; - /* "constraint/parser.py":142 + /* "constraint/parser.py":127 * right_swap = left_remainder.replace("-", "+") * restriction = f"{swapped_side_first_component}{comparator}{right}{right_swap}" * if "/" in unique_operators: # <<<<<<<<<<<<<< @@ -7264,16 +7261,16 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":155 + /* "constraint/parser.py":140 * * # we have a potentially rewritten restriction, split again * left, right = tuple(s.strip() for s in restriction.split(comparator)) # <<<<<<<<<<<<<< * operators_left = extract_operators(left) * operators_right = extract_operators(right) */ - __pyx_t_8 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_6genexpr(NULL, __pyx_v_restriction, __pyx_v_comparator); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_8 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_6genexpr(NULL, __pyx_v_restriction, __pyx_v_comparator); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (1) { @@ -7282,7 +7279,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 155, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); @@ -7290,9 +7287,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7302,7 +7299,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF_SET(__pyx_v_right, __pyx_t_5); __pyx_t_5 = 0; - /* "constraint/parser.py":156 + /* "constraint/parser.py":141 * # we have a potentially rewritten restriction, split again * left, right = tuple(s.strip() for s in restriction.split(comparator)) * operators_left = extract_operators(left) # <<<<<<<<<<<<<< @@ -7310,7 +7307,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * unique_operators_left = set(operators_left) */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 156, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7329,13 +7326,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_operators_left, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":157 + /* "constraint/parser.py":142 * left, right = tuple(s.strip() for s in restriction.split(comparator)) * operators_left = extract_operators(left) * operators_right = extract_operators(right) # <<<<<<<<<<<<<< @@ -7343,7 +7340,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * unique_operators_right = set(operators_right) */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_extract_operators); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7362,49 +7359,49 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_operators_right, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":158 + /* "constraint/parser.py":143 * operators_left = extract_operators(left) * operators_right = extract_operators(right) * unique_operators_left = set(operators_left) # <<<<<<<<<<<<<< * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) */ - __pyx_t_2 = PySet_New(__pyx_v_operators_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_2 = PySet_New(__pyx_v_operators_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_unique_operators_left, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":159 + /* "constraint/parser.py":144 * operators_right = extract_operators(right) * unique_operators_left = set(operators_left) * unique_operators_right = set(operators_right) # <<<<<<<<<<<<<< * unique_operators = unique_operators_left.union(unique_operators_right) * */ - __pyx_t_2 = PySet_New(__pyx_v_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) + __pyx_t_2 = PySet_New(__pyx_v_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_unique_operators_right, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":160 + /* "constraint/parser.py":145 * unique_operators_left = set(operators_left) * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) # <<<<<<<<<<<<<< * * # find out which side is the constant number */ - __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__union, __pyx_v_unique_operators_left, __pyx_v_unique_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__union, __pyx_v_unique_operators_left, __pyx_v_unique_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_unique_operators, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":121 + /* "constraint/parser.py":106 * unique_operators_right = set(operators_right) * unique_operators = unique_operators_left.union(unique_operators_right) * if len(unique_operators) == 1: # <<<<<<<<<<<<<< @@ -7413,7 +7410,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":164 + /* "constraint/parser.py":149 * # find out which side is the constant number * # either the left or right side of the equation must evaluate to a constant number, otherwise we use a VariableConstraint # noqa: E501 * left_num = is_or_evals_to_number(left) # <<<<<<<<<<<<<< @@ -7421,7 +7418,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * if (left_num is None and right_num is None) or (left_num is not None and right_num is not None): */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7440,13 +7437,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_left_num = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":165 + /* "constraint/parser.py":150 * # either the left or right side of the equation must evaluate to a constant number, otherwise we use a VariableConstraint # noqa: E501 * left_num = is_or_evals_to_number(left) * right_num = is_or_evals_to_number(right) # <<<<<<<<<<<<<< @@ -7454,7 +7451,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # if both sides are parameters, try to use the VariableConstraints */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7473,13 +7470,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_right_num = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":166 + /* "constraint/parser.py":151 * left_num = is_or_evals_to_number(left) * right_num = is_or_evals_to_number(right) * if (left_num is None and right_num is None) or (left_num is not None and right_num is not None): # <<<<<<<<<<<<<< @@ -7509,26 +7506,26 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_L17_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":168 + /* "constraint/parser.py":153 * if (left_num is None and right_num is None) or (left_num is not None and right_num is not None): * # if both sides are parameters, try to use the VariableConstraints * variable_supported_operators = ["+", "*"] # <<<<<<<<<<<<<< * # variables = [s.strip() for s in list(left + right) if s not in variable_supported_operators] * variables = re.findall(regex_match_variable, restriction) */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__9); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_kp_u__9) != (0)) __PYX_ERR(0, 168, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_kp_u__9) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__11); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__11); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_kp_u__11) != (0)) __PYX_ERR(0, 168, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_mstate_global->__pyx_kp_u__11) != (0)) __PYX_ERR(0, 153, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_variable_supported_operators = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":170 + /* "constraint/parser.py":155 * variable_supported_operators = ["+", "*"] * # variables = [s.strip() for s in list(left + right) if s not in variable_supported_operators] * variables = re.findall(regex_match_variable, restriction) # <<<<<<<<<<<<<< @@ -7536,12 +7533,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # if the restriction contains more than the variables and supported operators, return None */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_regex_match_variable)) { __Pyx_RaiseClosureNameError("regex_match_variable"); __PYX_ERR(0, 170, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_regex_match_variable)) { __Pyx_RaiseClosureNameError("regex_match_variable"); __PYX_ERR(0, 155, __pyx_L1_error) } __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { @@ -7559,24 +7556,24 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_variables = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":173 + /* "constraint/parser.py":158 * * # if the restriction contains more than the variables and supported operators, return None * if len(variables) == 0: # <<<<<<<<<<<<<< * return None * if any(var.strip() not in tune_params for var in variables): */ - __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_variables); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 158, __pyx_L1_error) __pyx_t_1 = (__pyx_t_3 == 0); if (__pyx_t_1) { - /* "constraint/parser.py":174 + /* "constraint/parser.py":159 * # if the restriction contains more than the variables and supported operators, return None * if len(variables) == 0: * return None # <<<<<<<<<<<<<< @@ -7587,7 +7584,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":173 + /* "constraint/parser.py":158 * * # if the restriction contains more than the variables and supported operators, return None * if len(variables) == 0: # <<<<<<<<<<<<<< @@ -7596,23 +7593,23 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":175 + /* "constraint/parser.py":160 * if len(variables) == 0: * return None * if any(var.strip() not in tune_params for var in variables): # <<<<<<<<<<<<<< * raise ValueError(f"Variables {variables} not in tune_params {tune_params.keys()}") * if ( */ - __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_9genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_9genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_t_1)) { - /* "constraint/parser.py":176 + /* "constraint/parser.py":161 * return None * if any(var.strip() not in tune_params for var in variables): * raise ValueError(f"Variables {variables} not in tune_params {tune_params.keys()}") # <<<<<<<<<<<<<< @@ -7620,16 +7617,16 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * len(re.findall(r"[+-]?\d+", restriction)) > 0 */ __pyx_t_2 = NULL; - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_variables, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_variables, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 176, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 161, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 176, __pyx_L1_error) + __PYX_ERR(0, 161, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Variables; @@ -7637,7 +7634,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_not_in_tune_params; __pyx_t_10[3] = __pyx_t_11; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 20 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 176, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -7647,14 +7644,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 176, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 176, __pyx_L1_error) + __PYX_ERR(0, 161, __pyx_L1_error) - /* "constraint/parser.py":175 + /* "constraint/parser.py":160 * if len(variables) == 0: * return None * if any(var.strip() not in tune_params for var in variables): # <<<<<<<<<<<<<< @@ -7663,7 +7660,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":178 + /* "constraint/parser.py":163 * raise ValueError(f"Variables {variables} not in tune_params {tune_params.keys()}") * if ( * len(re.findall(r"[+-]?\d+", restriction)) > 0 # <<<<<<<<<<<<<< @@ -7671,9 +7668,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # if the restriction contains numbers, return None */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = 1; @@ -7693,14 +7690,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = (__pyx_t_3 > 0); - /* "constraint/parser.py":177 + /* "constraint/parser.py":162 * if any(var.strip() not in tune_params for var in variables): * raise ValueError(f"Variables {variables} not in tune_params {tune_params.keys()}") * if ( # <<<<<<<<<<<<<< @@ -7709,7 +7706,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ if (__pyx_t_1) { - /* "constraint/parser.py":181 + /* "constraint/parser.py":166 * ): # TODO adjust when we support modifiers such as multipliers (see roadmap) # noqa: E501 * # if the restriction contains numbers, return None * return None # <<<<<<<<<<<<<< @@ -7720,7 +7717,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":177 + /* "constraint/parser.py":162 * if any(var.strip() not in tune_params for var in variables): * raise ValueError(f"Variables {variables} not in tune_params {tune_params.keys()}") * if ( # <<<<<<<<<<<<<< @@ -7729,48 +7726,48 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":184 + /* "constraint/parser.py":169 * * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) # <<<<<<<<<<<<<< * variable_operators_right = list(s.strip() for s in list(right) if s in variable_supported_operators) * variable_unique_operators = list(set(variable_operators_left).union(set(variable_operators_right))) */ - __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_12genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_12genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_left); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_variable_operators_left = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - /* "constraint/parser.py":185 + /* "constraint/parser.py":170 * # find all unique variable_supported_operators in the restriction, can have at most one * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) * variable_operators_right = list(s.strip() for s in list(right) if s in variable_supported_operators) # <<<<<<<<<<<<<< * variable_unique_operators = list(set(variable_operators_left).union(set(variable_operators_right))) * # if there is a mix of operators (e.g. 'x + y * z == a') or multiple variables on both sides, return None */ - __pyx_t_11 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_15genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_right); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_11 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_15genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_right); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_variable_operators_right = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":186 + /* "constraint/parser.py":171 * variable_operators_left = list(s.strip() for s in list(left) if s in variable_supported_operators) * variable_operators_right = list(s.strip() for s in list(right) if s in variable_supported_operators) * variable_unique_operators = list(set(variable_operators_left).union(set(variable_operators_right))) # <<<<<<<<<<<<<< * # if there is a mix of operators (e.g. 'x + y * z == a') or multiple variables on both sides, return None * if ( */ - __pyx_t_8 = PySet_New(__pyx_v_variable_operators_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_8 = PySet_New(__pyx_v_variable_operators_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = __pyx_t_8; __Pyx_INCREF(__pyx_t_11); - __pyx_t_2 = PySet_New(__pyx_v_variable_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_2 = PySet_New(__pyx_v_variable_operators_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 0; { @@ -7779,23 +7776,23 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_8 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_variable_unique_operators = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/parser.py":189 + /* "constraint/parser.py":174 * # if there is a mix of operators (e.g. 'x + y * z == a') or multiple variables on both sides, return None * if ( * len(variable_unique_operators) <= 1 # <<<<<<<<<<<<<< * and all(s.strip() in params for s in variables) * and (len(unique_operators_left) == 0 or len(unique_operators_right) == 0) */ - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_variable_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_variable_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 174, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 <= 1); if (__pyx_t_6) { } else { @@ -7803,19 +7800,19 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L25_bool_binop_done; } - /* "constraint/parser.py":190 + /* "constraint/parser.py":175 * if ( * len(variable_unique_operators) <= 1 * and all(s.strip() in params for s in variables) # <<<<<<<<<<<<<< * and (len(unique_operators_left) == 0 or len(unique_operators_right) == 0) * ): # noqa: E501 */ - __pyx_t_8 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_18genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_8 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_18genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_6) { } else { @@ -7823,26 +7820,26 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L25_bool_binop_done; } - /* "constraint/parser.py":191 + /* "constraint/parser.py":176 * len(variable_unique_operators) <= 1 * and all(s.strip() in params for s in variables) * and (len(unique_operators_left) == 0 or len(unique_operators_right) == 0) # <<<<<<<<<<<<<< * ): # noqa: E501 * variables_on_left = len(unique_operators_left) > 0 */ - __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 == 0); if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L25_bool_binop_done; } - __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_right); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_right); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 176, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 == 0); __pyx_t_1 = __pyx_t_6; __pyx_L25_bool_binop_done:; - /* "constraint/parser.py":188 + /* "constraint/parser.py":173 * variable_unique_operators = list(set(variable_operators_left).union(set(variable_operators_right))) * # if there is a mix of operators (e.g. 'x + y * z == a') or multiple variables on both sides, return None * if ( # <<<<<<<<<<<<<< @@ -7851,52 +7848,52 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ if (__pyx_t_1) { - /* "constraint/parser.py":193 + /* "constraint/parser.py":178 * and (len(unique_operators_left) == 0 or len(unique_operators_right) == 0) * ): # noqa: E501 * variables_on_left = len(unique_operators_left) > 0 # <<<<<<<<<<<<<< * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": * if comparator == "==": */ - __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 193, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyBool_FromLong((__pyx_t_3 > 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySet_GET_SIZE(__pyx_v_unique_operators_left); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong((__pyx_t_3 > 0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_variables_on_left, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":194 + /* "constraint/parser.py":179 * ): # noqa: E501 * variables_on_left = len(unique_operators_left) > 0 * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": # <<<<<<<<<<<<<< * if comparator == "==": * return ( */ - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_variable_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_variable_unique_operators); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 179, __pyx_L1_error) __pyx_t_6 = (__pyx_t_3 == 0); if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L30_bool_binop_done; } - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_variable_unique_operators, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_variable_unique_operators, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L30_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":195 + /* "constraint/parser.py":180 * variables_on_left = len(unique_operators_left) > 0 * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": * if comparator == "==": # <<<<<<<<<<<<<< * return ( * VariableExactSumConstraint(variables[-1], variables[:-1]) */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 180, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":196 + /* "constraint/parser.py":181 * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": * if comparator == "==": * return ( # <<<<<<<<<<<<<< @@ -7905,17 +7902,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":198 + /* "constraint/parser.py":183 * return ( * VariableExactSumConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableExactSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 183, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":197 + /* "constraint/parser.py":182 * if comparator == "==": * return ( * VariableExactSumConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -7923,11 +7920,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableExactSumConstraint(variables[0], variables[1:]) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7948,14 +7945,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 197, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":199 + /* "constraint/parser.py":184 * VariableExactSumConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableExactSumConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -7963,11 +7960,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * elif comparator == "<=": */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -7988,7 +7985,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -7998,7 +7995,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":195 + /* "constraint/parser.py":180 * variables_on_left = len(unique_operators_left) > 0 * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": * if comparator == "==": # <<<<<<<<<<<<<< @@ -8007,17 +8004,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":201 + /* "constraint/parser.py":186 * else VariableExactSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == "<=": # <<<<<<<<<<<<<< * # "B+C <= A" (maxsum) if variables_on_left else "A <= B+C" (minsum) * return ( */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":203 + /* "constraint/parser.py":188 * elif comparator == "<=": * # "B+C <= A" (maxsum) if variables_on_left else "A <= B+C" (minsum) * return ( # <<<<<<<<<<<<<< @@ -8026,17 +8023,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":205 + /* "constraint/parser.py":190 * return ( * VariableMaxSumConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableMinSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 190, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":204 + /* "constraint/parser.py":189 * # "B+C <= A" (maxsum) if variables_on_left else "A <= B+C" (minsum) * return ( * VariableMaxSumConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -8044,11 +8041,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableMinSumConstraint(variables[0], variables[1:]) */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8069,14 +8066,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 204, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":206 + /* "constraint/parser.py":191 * VariableMaxSumConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableMinSumConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -8084,11 +8081,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * elif comparator == ">=": */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8109,7 +8106,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -8119,7 +8116,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":201 + /* "constraint/parser.py":186 * else VariableExactSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == "<=": # <<<<<<<<<<<<<< @@ -8128,17 +8125,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":208 + /* "constraint/parser.py":193 * else VariableMinSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == ">=": # <<<<<<<<<<<<<< * # "B+C >= A" (minsum) if variables_on_left else "A >= B+C" (maxsum) * return ( */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":210 + /* "constraint/parser.py":195 * elif comparator == ">=": * # "B+C >= A" (minsum) if variables_on_left else "A >= B+C" (maxsum) * return ( # <<<<<<<<<<<<<< @@ -8147,17 +8144,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":212 + /* "constraint/parser.py":197 * return ( * VariableMinSumConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableMaxSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 197, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":211 + /* "constraint/parser.py":196 * # "B+C >= A" (minsum) if variables_on_left else "A >= B+C" (maxsum) * return ( * VariableMinSumConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -8165,11 +8162,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableMaxSumConstraint(variables[0], variables[1:]) */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8190,14 +8187,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":213 + /* "constraint/parser.py":198 * VariableMinSumConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableMaxSumConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -8205,11 +8202,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * elif variable_unique_operators[0] == "*": */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8230,7 +8227,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -8240,7 +8237,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":208 + /* "constraint/parser.py":193 * else VariableMinSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == ">=": # <<<<<<<<<<<<<< @@ -8249,7 +8246,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":194 + /* "constraint/parser.py":179 * ): # noqa: E501 * variables_on_left = len(unique_operators_left) > 0 * if len(variable_unique_operators) == 0 or variable_unique_operators[0] == "+": # <<<<<<<<<<<<<< @@ -8259,30 +8256,30 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L29; } - /* "constraint/parser.py":215 + /* "constraint/parser.py":200 * else VariableMaxSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif variable_unique_operators[0] == "*": # <<<<<<<<<<<<<< * if comparator == "==": * return ( */ - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_variable_unique_operators, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_variable_unique_operators, 0, long, 1, __Pyx_PyLong_From_long, 1, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u__11, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u__11, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { - /* "constraint/parser.py":216 + /* "constraint/parser.py":201 * ) # noqa: E501 * elif variable_unique_operators[0] == "*": * if comparator == "==": # <<<<<<<<<<<<<< * return ( * VariableExactProdConstraint(variables[-1], variables[:-1]) */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 201, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":217 + /* "constraint/parser.py":202 * elif variable_unique_operators[0] == "*": * if comparator == "==": * return ( # <<<<<<<<<<<<<< @@ -8291,17 +8288,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":219 + /* "constraint/parser.py":204 * return ( * VariableExactProdConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableExactProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 204, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":218 + /* "constraint/parser.py":203 * if comparator == "==": * return ( * VariableExactProdConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -8309,11 +8306,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableExactProdConstraint(variables[0], variables[1:]) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8334,14 +8331,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 218, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":220 + /* "constraint/parser.py":205 * VariableExactProdConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableExactProdConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -8349,11 +8346,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * elif comparator == "<=": */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8374,7 +8371,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 220, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -8384,7 +8381,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":216 + /* "constraint/parser.py":201 * ) # noqa: E501 * elif variable_unique_operators[0] == "*": * if comparator == "==": # <<<<<<<<<<<<<< @@ -8393,17 +8390,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":222 + /* "constraint/parser.py":207 * else VariableExactProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == "<=": # <<<<<<<<<<<<<< * # "B*C <= A" (maxprod) if variables_on_left else "A <= B*C" (minprod) * return ( */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 207, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":224 + /* "constraint/parser.py":209 * elif comparator == "<=": * # "B*C <= A" (maxprod) if variables_on_left else "A <= B*C" (minprod) * return ( # <<<<<<<<<<<<<< @@ -8412,17 +8409,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":226 + /* "constraint/parser.py":211 * return ( * VariableMaxProdConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableMinProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 211, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":225 + /* "constraint/parser.py":210 * # "B*C <= A" (maxprod) if variables_on_left else "A <= B*C" (minprod) * return ( * VariableMaxProdConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -8430,11 +8427,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableMinProdConstraint(variables[0], variables[1:]) */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8455,14 +8452,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 225, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":227 + /* "constraint/parser.py":212 * VariableMaxProdConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableMinProdConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -8470,11 +8467,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * elif comparator == ">=": */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8495,7 +8492,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -8505,7 +8502,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":222 + /* "constraint/parser.py":207 * else VariableExactProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == "<=": # <<<<<<<<<<<<<< @@ -8514,17 +8511,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":229 + /* "constraint/parser.py":214 * else VariableMinProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == ">=": # <<<<<<<<<<<<<< * # "B*C >= A" (minprod) if variables_on_left else "A >= B*C" (maxprod) * return ( */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 229, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 214, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":231 + /* "constraint/parser.py":216 * elif comparator == ">=": * # "B*C >= A" (minprod) if variables_on_left else "A >= B*C" (maxprod) * return ( # <<<<<<<<<<<<<< @@ -8533,17 +8530,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); - /* "constraint/parser.py":233 + /* "constraint/parser.py":218 * return ( * VariableMinProdConstraint(variables[-1], variables[:-1]) * if variables_on_left # <<<<<<<<<<<<<< * else VariableMaxProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 218, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":232 + /* "constraint/parser.py":217 * # "B*C >= A" (minprod) if variables_on_left else "A >= B*C" (maxprod) * return ( * VariableMinProdConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< @@ -8551,11 +8548,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * else VariableMaxProdConstraint(variables[0], variables[1:]) */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 0, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8576,14 +8573,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 232, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { - /* "constraint/parser.py":234 + /* "constraint/parser.py":219 * VariableMinProdConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableMaxProdConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< @@ -8591,11 +8588,11 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * */ __pyx_t_12 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_variables, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_variables, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8616,7 +8613,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_7 = __pyx_t_8; @@ -8626,7 +8623,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":229 + /* "constraint/parser.py":214 * else VariableMinProdConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif comparator == ">=": # <<<<<<<<<<<<<< @@ -8635,7 +8632,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":215 + /* "constraint/parser.py":200 * else VariableMaxSumConstraint(variables[0], variables[1:]) * ) # noqa: E501 * elif variable_unique_operators[0] == "*": # <<<<<<<<<<<<<< @@ -8645,7 +8642,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L29:; - /* "constraint/parser.py":188 + /* "constraint/parser.py":173 * variable_unique_operators = list(set(variable_operators_left).union(set(variable_operators_right))) * # if there is a mix of operators (e.g. 'x + y * z == a') or multiple variables on both sides, return None * if ( # <<<<<<<<<<<<<< @@ -8654,7 +8651,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":238 + /* "constraint/parser.py":223 * * # left_num and right_num can't both be constants, or for other reasons we can't use a VariableConstraint * return None # <<<<<<<<<<<<<< @@ -8665,7 +8662,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":166 + /* "constraint/parser.py":151 * left_num = is_or_evals_to_number(left) * right_num = is_or_evals_to_number(right) * if (left_num is None and right_num is None) or (left_num is not None and right_num is not None): # <<<<<<<<<<<<<< @@ -8674,7 +8671,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":242 + /* "constraint/parser.py":227 * # if one side is a number, the other side must be a variable or expression * number, variables, variables_on_left = ( * (left_num, right.strip(), False) if left_num is not None else (right_num, left.strip(), True) # <<<<<<<<<<<<<< @@ -8690,19 +8687,19 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_left_num); __Pyx_GIVEREF(__pyx_v_left_num); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_left_num) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_left_num) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_False) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_False) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __pyx_t_8 = 0; __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; @@ -8714,19 +8711,19 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_right_num); __Pyx_GIVEREF(__pyx_v_right_num); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_right_num) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_right_num) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, Py_True) != (0)) __PYX_ERR(0, 242, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, Py_True) != (0)) __PYX_ERR(0, 227, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; @@ -8737,7 +8734,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 241, __pyx_L1_error) + __PYX_ERR(0, 226, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); @@ -8747,19 +8744,19 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 226, __pyx_L1_error) } - /* "constraint/parser.py":241 + /* "constraint/parser.py":226 * * # if one side is a number, the other side must be a variable or expression * number, variables, variables_on_left = ( # <<<<<<<<<<<<<< @@ -8773,7 +8770,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_XDECREF_SET(__pyx_v_variables_on_left, __pyx_t_11); __pyx_t_11 = 0; - /* "constraint/parser.py":246 + /* "constraint/parser.py":231 * * # we can map '>' to '>=' and '<' to '<=' by adding a tiny offset to the number * offset = 1e-12 # <<<<<<<<<<<<<< @@ -8782,42 +8779,42 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __pyx_v_offset = 1e-12; - /* "constraint/parser.py":247 + /* "constraint/parser.py":232 * # we can map '>' to '>=' and '<' to '<=' by adding a tiny offset to the number * offset = 1e-12 * if comparator == "<": # <<<<<<<<<<<<<< * if variables_on_left: * # (x < 2) == (x <= 2-offset) */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 232, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":248 + /* "constraint/parser.py":233 * offset = 1e-12 * if comparator == "<": * if variables_on_left: # <<<<<<<<<<<<<< * # (x < 2) == (x <= 2-offset) * number -= offset */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 233, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":250 + /* "constraint/parser.py":235 * if variables_on_left: * # (x < 2) == (x <= 2-offset) * number -= offset # <<<<<<<<<<<<<< * else: * # (2 < x) == (2+offset <= x) */ - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = PyNumber_InPlaceSubtract(__pyx_v_number, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_11 = PyNumber_InPlaceSubtract(__pyx_v_number, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_number, __pyx_t_11); __pyx_t_11 = 0; - /* "constraint/parser.py":248 + /* "constraint/parser.py":233 * offset = 1e-12 * if comparator == "<": * if variables_on_left: # <<<<<<<<<<<<<< @@ -8827,7 +8824,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L35; } - /* "constraint/parser.py":253 + /* "constraint/parser.py":238 * else: * # (2 < x) == (2+offset <= x) * number += offset # <<<<<<<<<<<<<< @@ -8835,9 +8832,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * if variables_on_left: */ /*else*/ { - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_number, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_number, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_number, __pyx_t_7); @@ -8845,7 +8842,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L35:; - /* "constraint/parser.py":247 + /* "constraint/parser.py":232 * # we can map '>' to '>=' and '<' to '<=' by adding a tiny offset to the number * offset = 1e-12 * if comparator == "<": # <<<<<<<<<<<<<< @@ -8855,42 +8852,42 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L34; } - /* "constraint/parser.py":254 + /* "constraint/parser.py":239 * # (2 < x) == (2+offset <= x) * number += offset * elif comparator == ">": # <<<<<<<<<<<<<< * if variables_on_left: * # (x > 2) == (x >= 2+offset) */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 239, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":255 + /* "constraint/parser.py":240 * number += offset * elif comparator == ">": * if variables_on_left: # <<<<<<<<<<<<<< * # (x > 2) == (x >= 2+offset) * number += offset */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 240, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":257 + /* "constraint/parser.py":242 * if variables_on_left: * # (x > 2) == (x >= 2+offset) * number += offset # <<<<<<<<<<<<<< * else: * # (2 > x) == (2-offset >= x) */ - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_number, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_v_number, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_number, __pyx_t_11); __pyx_t_11 = 0; - /* "constraint/parser.py":255 + /* "constraint/parser.py":240 * number += offset * elif comparator == ">": * if variables_on_left: # <<<<<<<<<<<<<< @@ -8900,7 +8897,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L36; } - /* "constraint/parser.py":260 + /* "constraint/parser.py":245 * else: * # (2 > x) == (2-offset >= x) * number -= offset # <<<<<<<<<<<<<< @@ -8908,9 +8905,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # check if an operator is applied on the variables, if not return */ /*else*/ { - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_v_number, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceSubtract(__pyx_v_number, __pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_number, __pyx_t_7); @@ -8918,7 +8915,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L36:; - /* "constraint/parser.py":254 + /* "constraint/parser.py":239 * # (2 < x) == (2+offset <= x) * number += offset * elif comparator == ">": # <<<<<<<<<<<<<< @@ -8928,28 +8925,28 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ } __pyx_L34:; - /* "constraint/parser.py":263 + /* "constraint/parser.py":248 * * # check if an operator is applied on the variables, if not return * operators = [r"\*\*", r"\*", r"\+"] # <<<<<<<<<<<<<< * operators_found = re.findall(str("|".join(operators)), variables) * if len(operators_found) == 0: */ - __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__12); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__12); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_mstate_global->__pyx_kp_u__12) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_mstate_global->__pyx_kp_u__12) != (0)) __PYX_ERR(0, 248, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__13); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__13); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_mstate_global->__pyx_kp_u__13) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_mstate_global->__pyx_kp_u__13) != (0)) __PYX_ERR(0, 248, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u__14); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u__14); - if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_mstate_global->__pyx_kp_u__14) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_mstate_global->__pyx_kp_u__14) != (0)) __PYX_ERR(0, 248, __pyx_L1_error); __pyx_v_operators = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":264 + /* "constraint/parser.py":249 * # check if an operator is applied on the variables, if not return * operators = [r"\*\*", r"\*", r"\+"] * operators_found = re.findall(str("|".join(operators)), variables) # <<<<<<<<<<<<<< @@ -8957,12 +8954,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # no operators found, return only based on comparator */ __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__6, __pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__6, __pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -8982,24 +8979,24 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_operators_found = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/parser.py":265 + /* "constraint/parser.py":250 * operators = [r"\*\*", r"\*", r"\+"] * operators_found = re.findall(str("|".join(operators)), variables) * if len(operators_found) == 0: # <<<<<<<<<<<<<< * # no operators found, return only based on comparator * if len(params) != 1 or variables not in params: */ - __pyx_t_3 = PyObject_Length(__pyx_v_operators_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_operators_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 250, __pyx_L1_error) __pyx_t_1 = (__pyx_t_3 == 0); if (__pyx_t_1) { - /* "constraint/parser.py":267 + /* "constraint/parser.py":252 * if len(operators_found) == 0: * # no operators found, return only based on comparator * if len(params) != 1 or variables not in params: # <<<<<<<<<<<<<< @@ -9008,7 +9005,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __pyx_t_7 = __pyx_cur_scope->__pyx_v_params; __Pyx_INCREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = (__pyx_t_3 != 1); if (!__pyx_t_6) { @@ -9016,12 +9013,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_1 = __pyx_t_6; goto __pyx_L39_bool_binop_done; } - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_variables, __pyx_cur_scope->__pyx_v_params, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_variables, __pyx_cur_scope->__pyx_v_params, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 252, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L39_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":269 + /* "constraint/parser.py":254 * if len(params) != 1 or variables not in params: * # there were more than one variable but no operator * return None # <<<<<<<<<<<<<< @@ -9032,7 +9029,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":267 + /* "constraint/parser.py":252 * if len(operators_found) == 0: * # no operators found, return only based on comparator * if len(params) != 1 or variables not in params: # <<<<<<<<<<<<<< @@ -9041,17 +9038,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":272 + /* "constraint/parser.py":257 * # map to a Constraint * # if there are restrictions with a single variable, it will be used to prune the domain at the start * elif comparator == "==": # <<<<<<<<<<<<<< * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 257, __pyx_L1_error) if (__pyx_t_1) { - /* "constraint/parser.py":273 + /* "constraint/parser.py":258 * # if there are restrictions with a single variable, it will be used to prune the domain at the start * elif comparator == "==": * return ExactSumConstraint(number) # <<<<<<<<<<<<<< @@ -9060,7 +9057,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9079,14 +9076,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":272 + /* "constraint/parser.py":257 * # map to a Constraint * # if there are restrictions with a single variable, it will be used to prune the domain at the start * elif comparator == "==": # <<<<<<<<<<<<<< @@ -9095,25 +9092,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":274 + /* "constraint/parser.py":259 * elif comparator == "==": * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 259, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L41_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L41_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":275 + /* "constraint/parser.py":260 * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) # <<<<<<<<<<<<<< @@ -9121,10 +9118,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 260, __pyx_L1_error) if (__pyx_t_1) { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9143,14 +9140,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 275, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9169,7 +9166,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; @@ -9179,7 +9176,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":274 + /* "constraint/parser.py":259 * elif comparator == "==": * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< @@ -9188,25 +9185,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":276 + /* "constraint/parser.py":261 * elif comparator == "<=" or comparator == "<": * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) * raise ValueError(f"Invalid comparator {comparator}") */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 261, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L43_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L43_bool_binop_done:; if (__pyx_t_1) { - /* "constraint/parser.py":277 + /* "constraint/parser.py":262 * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) # <<<<<<<<<<<<<< @@ -9214,10 +9211,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 262, __pyx_L1_error) if (__pyx_t_1) { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9236,14 +9233,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9262,7 +9259,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; @@ -9272,7 +9269,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":276 + /* "constraint/parser.py":261 * elif comparator == "<=" or comparator == "<": * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< @@ -9281,7 +9278,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":278 + /* "constraint/parser.py":263 * elif comparator == ">=" or comparator == ">": * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) * raise ValueError(f"Invalid comparator {comparator}") # <<<<<<<<<<<<<< @@ -9289,9 +9286,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * # check which operator is applied on the variables */ __pyx_t_2 = NULL; - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_comparator, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_comparator, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = 1; @@ -9300,14 +9297,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 278, __pyx_L1_error) + __PYX_ERR(0, 263, __pyx_L1_error) - /* "constraint/parser.py":265 + /* "constraint/parser.py":250 * operators = [r"\*\*", r"\*", r"\+"] * operators_found = re.findall(str("|".join(operators)), variables) * if len(operators_found) == 0: # <<<<<<<<<<<<<< @@ -9316,37 +9313,37 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":281 + /* "constraint/parser.py":266 * * # check which operator is applied on the variables * operator = operators_found[0] # <<<<<<<<<<<<<< * if not all(o == operator for o in operators_found): * # if there is a mix of operators (e.g. 'x + y * z == 3'), return None */ - __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_operators_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_operators_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_cur_scope->__pyx_v_operator = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/parser.py":282 + /* "constraint/parser.py":267 * # check which operator is applied on the variables * operator = operators_found[0] * if not all(o == operator for o in operators_found): # <<<<<<<<<<<<<< * # if there is a mix of operators (e.g. 'x + y * z == 3'), return None * return None */ - __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_21genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_operators_found); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_21genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_operators_found); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_11 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_6 = (!__pyx_t_1); if (__pyx_t_6) { - /* "constraint/parser.py":284 + /* "constraint/parser.py":269 * if not all(o == operator for o in operators_found): * # if there is a mix of operators (e.g. 'x + y * z == 3'), return None * return None # <<<<<<<<<<<<<< @@ -9357,7 +9354,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":282 + /* "constraint/parser.py":267 * # check which operator is applied on the variables * operator = operators_found[0] * if not all(o == operator for o in operators_found): # <<<<<<<<<<<<<< @@ -9366,7 +9363,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":287 + /* "constraint/parser.py":272 * * # split the string on the comparison * splitted = variables.split(operator) # <<<<<<<<<<<<<< @@ -9380,23 +9377,23 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_operator}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_split, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 287, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_v_splitted = __pyx_t_11; __pyx_t_11 = 0; - /* "constraint/parser.py":289 + /* "constraint/parser.py":274 * splitted = variables.split(operator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< * # map to a Constraint * if operator == "**": */ - __pyx_t_3 = PyObject_Length(__pyx_v_splitted); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_splitted); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error) __pyx_t_11 = __pyx_cur_scope->__pyx_v_params; __Pyx_INCREF(__pyx_t_11); - __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_t_11); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyList_GET_SIZE(__pyx_t_11); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = (__pyx_t_3 == __pyx_t_13); if (__pyx_t_1) { @@ -9404,28 +9401,28 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_6 = __pyx_t_1; goto __pyx_L47_bool_binop_done; } - __pyx_t_11 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_24genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_splitted); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_11 = __pyx_pf_10constraint_6parser_18parse_restrictions_21to_numeric_constraint_24genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_splitted); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_7 = __Pyx_Generator_GetInlinedResult(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = __pyx_t_1; __pyx_L47_bool_binop_done:; if (__pyx_t_6) { - /* "constraint/parser.py":291 + /* "constraint/parser.py":276 * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): * # map to a Constraint * if operator == "**": # <<<<<<<<<<<<<< * # power operations are not (yet) supported, added to avoid matching the double asterisk * return None */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__15, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__15, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 276, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/parser.py":293 + /* "constraint/parser.py":278 * if operator == "**": * # power operations are not (yet) supported, added to avoid matching the double asterisk * return None # <<<<<<<<<<<<<< @@ -9436,7 +9433,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":291 + /* "constraint/parser.py":276 * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): * # map to a Constraint * if operator == "**": # <<<<<<<<<<<<<< @@ -9445,27 +9442,27 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":294 + /* "constraint/parser.py":279 * # power operations are not (yet) supported, added to avoid matching the double asterisk * return None * elif operator == "*": # <<<<<<<<<<<<<< * if comparator == "==": * return ExactProdConstraint(number) */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__11, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__11, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 279, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/parser.py":295 + /* "constraint/parser.py":280 * return None * elif operator == "*": * if comparator == "==": # <<<<<<<<<<<<<< * return ExactProdConstraint(number) * elif comparator == "<=" or comparator == "<": */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 280, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/parser.py":296 + /* "constraint/parser.py":281 * elif operator == "*": * if comparator == "==": * return ExactProdConstraint(number) # <<<<<<<<<<<<<< @@ -9474,7 +9471,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExactProdConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9493,14 +9490,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":295 + /* "constraint/parser.py":280 * return None * elif operator == "*": * if comparator == "==": # <<<<<<<<<<<<<< @@ -9509,25 +9506,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":297 + /* "constraint/parser.py":282 * if comparator == "==": * return ExactProdConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< * return MaxProdConstraint(number) if variables_on_left else MinProdConstraint(number) * elif comparator == ">=" or comparator == ">": */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 282, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_6 = __pyx_t_1; goto __pyx_L51_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 282, __pyx_L1_error) __pyx_t_6 = __pyx_t_1; __pyx_L51_bool_binop_done:; if (__pyx_t_6) { - /* "constraint/parser.py":298 + /* "constraint/parser.py":283 * return ExactProdConstraint(number) * elif comparator == "<=" or comparator == "<": * return MaxProdConstraint(number) if variables_on_left else MinProdConstraint(number) # <<<<<<<<<<<<<< @@ -9535,10 +9532,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 283, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 298, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9557,14 +9554,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MinProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 298, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MinProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9583,7 +9580,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; @@ -9593,7 +9590,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":297 + /* "constraint/parser.py":282 * if comparator == "==": * return ExactProdConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< @@ -9602,25 +9599,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":299 + /* "constraint/parser.py":284 * elif comparator == "<=" or comparator == "<": * return MaxProdConstraint(number) if variables_on_left else MinProdConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) * elif operator == "+": */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 284, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_6 = __pyx_t_1; goto __pyx_L53_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 284, __pyx_L1_error) __pyx_t_6 = __pyx_t_1; __pyx_L53_bool_binop_done:; if (__pyx_t_6) { - /* "constraint/parser.py":300 + /* "constraint/parser.py":285 * return MaxProdConstraint(number) if variables_on_left else MinProdConstraint(number) * elif comparator == ">=" or comparator == ">": * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) # <<<<<<<<<<<<<< @@ -9628,10 +9625,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * if comparator == "==": */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 285, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_11 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinProdConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinProdConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9650,14 +9647,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MaxProdConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9676,7 +9673,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __pyx_t_2; @@ -9686,7 +9683,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":299 + /* "constraint/parser.py":284 * elif comparator == "<=" or comparator == "<": * return MaxProdConstraint(number) if variables_on_left else MinProdConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< @@ -9695,7 +9692,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":294 + /* "constraint/parser.py":279 * # power operations are not (yet) supported, added to avoid matching the double asterisk * return None * elif operator == "*": # <<<<<<<<<<<<<< @@ -9705,27 +9702,27 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L49; } - /* "constraint/parser.py":301 + /* "constraint/parser.py":286 * elif comparator == ">=" or comparator == ">": * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) * elif operator == "+": # <<<<<<<<<<<<<< * if comparator == "==": * return ExactSumConstraint(number) */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 286, __pyx_L1_error) if (likely(__pyx_t_6)) { - /* "constraint/parser.py":302 + /* "constraint/parser.py":287 * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) * elif operator == "+": * if comparator == "==": # <<<<<<<<<<<<<< * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 287, __pyx_L1_error) if (__pyx_t_6) { - /* "constraint/parser.py":303 + /* "constraint/parser.py":288 * elif operator == "+": * if comparator == "==": * return ExactSumConstraint(number) # <<<<<<<<<<<<<< @@ -9734,7 +9731,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ExactSumConstraint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9753,14 +9750,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 303, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":302 + /* "constraint/parser.py":287 * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) * elif operator == "+": * if comparator == "==": # <<<<<<<<<<<<<< @@ -9769,25 +9766,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":304 + /* "constraint/parser.py":289 * if comparator == "==": * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< * # raise ValueError(restriction, comparator) * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_6 = __pyx_t_1; goto __pyx_L56_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__5, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) __pyx_t_6 = __pyx_t_1; __pyx_L56_bool_binop_done:; if (__pyx_t_6) { - /* "constraint/parser.py":306 + /* "constraint/parser.py":291 * elif comparator == "<=" or comparator == "<": * # raise ValueError(restriction, comparator) * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) # <<<<<<<<<<<<<< @@ -9795,10 +9792,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 291, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9817,14 +9814,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 306, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_7 = __pyx_t_11; __pyx_t_11 = 0; } else { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9843,7 +9840,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 306, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_7 = __pyx_t_11; @@ -9853,7 +9850,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":304 + /* "constraint/parser.py":289 * if comparator == "==": * return ExactSumConstraint(number) * elif comparator == "<=" or comparator == "<": # <<<<<<<<<<<<<< @@ -9862,25 +9859,25 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":307 + /* "constraint/parser.py":292 * # raise ValueError(restriction, comparator) * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) * else: */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 292, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_6 = __pyx_t_1; goto __pyx_L58_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 292, __pyx_L1_error) __pyx_t_6 = __pyx_t_1; __pyx_L58_bool_binop_done:; if (__pyx_t_6) { - /* "constraint/parser.py":308 + /* "constraint/parser.py":293 * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) # <<<<<<<<<<<<<< @@ -9888,10 +9885,10 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ * raise ValueError(f"Invalid operator {operator}") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables_on_left); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 293, __pyx_L1_error) if (__pyx_t_6) { __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_MinSumConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9910,14 +9907,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_7 = __pyx_t_11; __pyx_t_11 = 0; } else { __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MaxSumConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS @@ -9936,7 +9933,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 308, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_7 = __pyx_t_11; @@ -9946,7 +9943,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = 0; goto __pyx_L0; - /* "constraint/parser.py":307 + /* "constraint/parser.py":292 * # raise ValueError(restriction, comparator) * return MaxSumConstraint(number) if variables_on_left else MinSumConstraint(number) * elif comparator == ">=" or comparator == ">": # <<<<<<<<<<<<<< @@ -9955,7 +9952,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":301 + /* "constraint/parser.py":286 * elif comparator == ">=" or comparator == ">": * return MinProdConstraint(number) if variables_on_left else MaxProdConstraint(number) * elif operator == "+": # <<<<<<<<<<<<<< @@ -9965,7 +9962,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ goto __pyx_L49; } - /* "constraint/parser.py":310 + /* "constraint/parser.py":295 * return MinSumConstraint(number) if variables_on_left else MaxSumConstraint(number) * else: * raise ValueError(f"Invalid operator {operator}") # <<<<<<<<<<<<<< @@ -9974,9 +9971,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ /*else*/ { __pyx_t_11 = NULL; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_operator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_operator, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_operator, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = 1; @@ -9985,16 +9982,16 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 310, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 310, __pyx_L1_error) + __PYX_ERR(0, 295, __pyx_L1_error) } __pyx_L49:; - /* "constraint/parser.py":289 + /* "constraint/parser.py":274 * splitted = variables.split(operator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -10003,7 +10000,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ */ } - /* "constraint/parser.py":311 + /* "constraint/parser.py":296 * else: * raise ValueError(f"Invalid operator {operator}") * return None # <<<<<<<<<<<<<< @@ -10017,9 +10014,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ /* "constraint/parser.py":81 * return split_restrictions * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ # <<<<<<<<<<<<<< - * Union[ - * MinSumConstraint, + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 # <<<<<<<<<<<<<< + * """Converts a restriction to a built-in numeric constraint if possible.""" + * # first check if all parameters have only numbers as values */ /* function exit code */ @@ -10075,12 +10072,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_ return __pyx_r; } -/* "constraint/parser.py":313 +/* "constraint/parser.py":298 * return None * * def to_equality_constraint( # <<<<<<<<<<<<<< * restriction: str, params: list[str] - * ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + * ) -> AllEqualConstraint | AllDifferentConstraint | None: */ /* Python wrapper */ @@ -10124,39 +10121,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_restriction,&__pyx_mstate_global->__pyx_n_u_params,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, 313, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 298, __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, 313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __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, 313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __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, "to_equality_constraint", 0) < (0)) __PYX_ERR(0, 313, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "to_equality_constraint", 0) < (0)) __PYX_ERR(0, 298, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_equality_constraint", 1, 2, 2, i); __PYX_ERR(0, 313, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("to_equality_constraint", 1, 2, 2, i); __PYX_ERR(0, 298, __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, 313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 298, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 313, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 298, __pyx_L3_error) } __pyx_v_restriction = ((PyObject*)values[0]); __pyx_v_params = ((PyObject*)values[1]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("to_equality_constraint", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 313, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("to_equality_constraint", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 298, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10167,8 +10164,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_restriction), (&PyUnicode_Type), 0, "restriction", 2))) __PYX_ERR(0, 314, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), (&PyList_Type), 0, "params", 2))) __PYX_ERR(0, 314, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_restriction), (&PyUnicode_Type), 0, "restriction", 2))) __PYX_ERR(0, 299, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), (&PyList_Type), 0, "params", 2))) __PYX_ERR(0, 299, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality_constraint(__pyx_self, __pyx_v_restriction, __pyx_v_params); /* function exit code */ @@ -10189,7 +10186,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_22to_equality_constraint_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":332 +/* "constraint/parser.py":317 * splitted = restriction.split(comparator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -10209,7 +10206,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_22to_equalit if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_13_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 332, __pyx_L1_error) + __PYX_ERR(0, 317, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -10220,7 +10217,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_22to_equalit __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_6parser_18parse_restrictions_22to_equality_constraint_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_parse_restrictions_locals_to_equ, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_22to_equality_constraint_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_parse_restrictions_locals_to_equ, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10259,21 +10256,21 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_22to_equalit return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 332, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 332, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 317, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 317, __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, 332, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 317, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_3); @@ -10286,11 +10283,11 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_22to_equalit PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 332, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_params)) { __Pyx_RaiseClosureNameError("params"); __PYX_ERR(0, 317, __pyx_L1_error) } + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_params, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { @@ -10331,12 +10328,12 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_22to_equalit return __pyx_r; } -/* "constraint/parser.py":313 +/* "constraint/parser.py":298 * return None * * def to_equality_constraint( # <<<<<<<<<<<<<< * restriction: str, params: list[str] - * ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + * ) -> AllEqualConstraint | AllDifferentConstraint | None: */ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality_constraint(PyObject *__pyx_self, PyObject *__pyx_v_restriction, PyObject *__pyx_v_params) { @@ -10365,7 +10362,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 313, __pyx_L1_error) + __PYX_ERR(0, 298, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -10376,7 +10373,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __Pyx_INCREF(__pyx_cur_scope->__pyx_v_params); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_params); - /* "constraint/parser.py":318 + /* "constraint/parser.py":303 * """Converts a restriction to either an equality or inequality constraint on all the parameters if possible.""" * # check if all parameters are involved * if len(params) != len(tune_params): # <<<<<<<<<<<<<< @@ -10385,21 +10382,21 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_params; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 318, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params)) { __Pyx_RaiseClosureNameError("tune_params"); __PYX_ERR(0, 303, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_tune_params; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 318, __pyx_L1_error) + __PYX_ERR(0, 303, __pyx_L1_error) } - __pyx_t_3 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_3 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_2 != __pyx_t_3); if (__pyx_t_4) { - /* "constraint/parser.py":319 + /* "constraint/parser.py":304 * # check if all parameters are involved * if len(params) != len(tune_params): * return None # <<<<<<<<<<<<<< @@ -10410,7 +10407,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":318 + /* "constraint/parser.py":303 * """Converts a restriction to either an equality or inequality constraint on all the parameters if possible.""" * # check if all parameters are involved * if len(params) != len(tune_params): # <<<<<<<<<<<<<< @@ -10419,7 +10416,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ } - /* "constraint/parser.py":322 + /* "constraint/parser.py":307 * * # find whether (in)equalities appear in this restriction * equalities_found = re.findall("==", restriction) # <<<<<<<<<<<<<< @@ -10427,9 +10424,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality * # check if one of the two have been found, if none or both have been found, return None */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; @@ -10449,13 +10446,13 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_equalities_found = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/parser.py":323 + /* "constraint/parser.py":308 * # find whether (in)equalities appear in this restriction * equalities_found = re.findall("==", restriction) * inequalities_found = re.findall("!=", restriction) # <<<<<<<<<<<<<< @@ -10463,9 +10460,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality * if not (bool(len(equalities_found) > 0) ^ bool(len(inequalities_found) > 0)): */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = 1; @@ -10485,37 +10482,37 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_inequalities_found = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/parser.py":325 + /* "constraint/parser.py":310 * inequalities_found = re.findall("!=", restriction) * # check if one of the two have been found, if none or both have been found, return None * if not (bool(len(equalities_found) > 0) ^ bool(len(inequalities_found) > 0)): # <<<<<<<<<<<<<< * return None * comparator = equalities_found[0] if len(equalities_found) > 0 else inequalities_found[0] */ - __pyx_t_3 = PyObject_Length(__pyx_v_equalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_equalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 310, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 > 0); - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Length(__pyx_v_inequalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_inequalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 310, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 > 0); - __pyx_t_6 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyNumber_Xor(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_7 = PyNumber_Xor(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_9 = (!__pyx_t_4); if (__pyx_t_9) { - /* "constraint/parser.py":326 + /* "constraint/parser.py":311 * # check if one of the two have been found, if none or both have been found, return None * if not (bool(len(equalities_found) > 0) ^ bool(len(inequalities_found) > 0)): * return None # <<<<<<<<<<<<<< @@ -10526,7 +10523,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":325 + /* "constraint/parser.py":310 * inequalities_found = re.findall("!=", restriction) * # check if one of the two have been found, if none or both have been found, return None * if not (bool(len(equalities_found) > 0) ^ bool(len(inequalities_found) > 0)): # <<<<<<<<<<<<<< @@ -10535,22 +10532,22 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ } - /* "constraint/parser.py":327 + /* "constraint/parser.py":312 * if not (bool(len(equalities_found) > 0) ^ bool(len(inequalities_found) > 0)): * return None * comparator = equalities_found[0] if len(equalities_found) > 0 else inequalities_found[0] # <<<<<<<<<<<<<< * * # split the string on the comparison */ - __pyx_t_3 = PyObject_Length(__pyx_v_equalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_equalities_found); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 312, __pyx_L1_error) __pyx_t_9 = (__pyx_t_3 > 0); if (__pyx_t_9) { - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_equalities_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_equalities_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __pyx_t_6 = 0; } else { - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_inequalities_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_inequalities_found, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __pyx_t_6 = 0; @@ -10558,29 +10555,29 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_v_comparator = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/parser.py":330 + /* "constraint/parser.py":315 * * # split the string on the comparison * splitted = restriction.split(comparator) # <<<<<<<<<<<<<< * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): */ - __pyx_t_7 = PyUnicode_Split(__pyx_v_restriction, __Pyx_NoneAsNull(__pyx_v_comparator), -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_7 = PyUnicode_Split(__pyx_v_restriction, __Pyx_NoneAsNull(__pyx_v_comparator), -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_splitted = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":332 + /* "constraint/parser.py":317 * splitted = restriction.split(comparator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< * # map to a Constraint * if comparator == "==": */ - __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_splitted); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_splitted); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 317, __pyx_L1_error) __pyx_t_7 = __pyx_cur_scope->__pyx_v_params; __Pyx_INCREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_GET_SIZE(__pyx_t_7); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = (__pyx_t_3 == __pyx_t_2); if (__pyx_t_4) { @@ -10588,28 +10585,28 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_9 = __pyx_t_4; goto __pyx_L6_bool_binop_done; } - __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_22to_equality_constraint_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_splitted); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_7 = __pyx_pf_10constraint_6parser_18parse_restrictions_22to_equality_constraint_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_splitted); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_6 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __pyx_t_4; __pyx_L6_bool_binop_done:; if (__pyx_t_9) { - /* "constraint/parser.py":334 + /* "constraint/parser.py":319 * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): * # map to a Constraint * if comparator == "==": # <<<<<<<<<<<<<< * return AllEqualConstraint() * elif comparator == "!=": */ - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 319, __pyx_L1_error) if (__pyx_t_9) { - /* "constraint/parser.py":335 + /* "constraint/parser.py":320 * # map to a Constraint * if comparator == "==": * return AllEqualConstraint() # <<<<<<<<<<<<<< @@ -10618,7 +10615,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AllEqualConstraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS @@ -10637,14 +10634,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__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_6)) __PYX_ERR(0, 335, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/parser.py":334 + /* "constraint/parser.py":319 * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): * # map to a Constraint * if comparator == "==": # <<<<<<<<<<<<<< @@ -10653,17 +10650,17 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ } - /* "constraint/parser.py":336 + /* "constraint/parser.py":321 * if comparator == "==": * return AllEqualConstraint() * elif comparator == "!=": # <<<<<<<<<<<<<< * return AllDifferentConstraint() * return ValueError(f"Not possible: comparator should be '==' or '!=', is {comparator}") */ - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__16, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_comparator, __pyx_mstate_global->__pyx_kp_u__16, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 321, __pyx_L1_error) if (__pyx_t_9) { - /* "constraint/parser.py":337 + /* "constraint/parser.py":322 * return AllEqualConstraint() * elif comparator == "!=": * return AllDifferentConstraint() # <<<<<<<<<<<<<< @@ -10672,7 +10669,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_AllDifferentConstraint); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS @@ -10691,14 +10688,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/parser.py":336 + /* "constraint/parser.py":321 * if comparator == "==": * return AllEqualConstraint() * elif comparator == "!=": # <<<<<<<<<<<<<< @@ -10707,7 +10704,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ } - /* "constraint/parser.py":338 + /* "constraint/parser.py":323 * elif comparator == "!=": * return AllDifferentConstraint() * return ValueError(f"Not possible: comparator should be '==' or '!=', is {comparator}") # <<<<<<<<<<<<<< @@ -10716,9 +10713,9 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = NULL; - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_comparator, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Not_possible_comparator_should_b, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Not_possible_comparator_should_b, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = 1; @@ -10727,14 +10724,14 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "constraint/parser.py":332 + /* "constraint/parser.py":317 * splitted = restriction.split(comparator) * # check if there are only pure, non-recurring variables (no operations or constants) in the restriction * if len(splitted) == len(params) and all(s.strip() in params for s in splitted): # <<<<<<<<<<<<<< @@ -10743,7 +10740,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality */ } - /* "constraint/parser.py":339 + /* "constraint/parser.py":324 * return AllDifferentConstraint() * return ValueError(f"Not possible: comparator should be '==' or '!=', is {comparator}") * return None # <<<<<<<<<<<<<< @@ -10754,12 +10751,12 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/parser.py":313 + /* "constraint/parser.py":298 * return None * * def to_equality_constraint( # <<<<<<<<<<<<<< * restriction: str, params: list[str] - * ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + * ) -> AllEqualConstraint | AllDifferentConstraint | None: */ /* function exit code */ @@ -10783,7 +10780,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality } static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_12generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/parser.py":342 +/* "constraint/parser.py":327 * * # remove functionally duplicate restrictions (preserves order and whitespace) * if all(isinstance(r, str) for r in restrictions): # <<<<<<<<<<<<<< @@ -10803,7 +10800,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_10genexpr(CY if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_6parser___pyx_scope_struct_14_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 342, __pyx_L1_error) + __PYX_ERR(0, 327, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -10811,7 +10808,7 @@ static PyObject *__pyx_pf_10constraint_6parser_18parse_restrictions_10genexpr(CY __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_6parser_18parse_restrictions_12generator11, ((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_parse_restrictions_locals_genexp, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_6parser_18parse_restrictions_12generator11, ((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_parse_restrictions_locals_genexp, __pyx_mstate_global->__pyx_n_u_constraint_parser); if (unlikely(!gen)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -10848,21 +10845,21 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_12generator1 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 342, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 342, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 327, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 327, __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, 342, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 327, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_r); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_r, __pyx_t_3); @@ -10910,7 +10907,7 @@ static PyObject *__pyx_gb_10constraint_6parser_18parse_restrictions_12generator1 /* "constraint/parser.py":32 * * - * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: # <<<<<<<<<<<<<< + * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: # <<<<<<<<<<<<<< * """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 * # rewrite the restrictions so variables are singled out */ @@ -11033,15 +11030,15 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED /* "constraint/parser.py":81 * return split_restrictions * - * def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ # <<<<<<<<<<<<<< - * Union[ - * MinSumConstraint, + * def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 # <<<<<<<<<<<<<< + * """Converts a restriction to a built-in numeric constraint if possible.""" + * # first check if all parameters have only numbers as values */ __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_restriction, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 81, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_params, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 81, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_Union_MinSumConstraint) < (0)) __PYX_ERR(0, 81, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_MinSumConstraint_VariableMinSumC) < (0)) __PYX_ERR(0, 81, __pyx_L1_error) __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_18parse_restrictions_7to_numeric_constraint, 0, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_num_3, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2); @@ -11049,42 +11046,42 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_v_to_numeric_constraint = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/parser.py":313 + /* "constraint/parser.py":298 * return None * * def to_equality_constraint( # <<<<<<<<<<<<<< * restriction: str, params: list[str] - * ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + * ) -> AllEqualConstraint | AllDifferentConstraint | None: */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_restriction, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_params, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_Union_AllEqualConstrain) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_18parse_restrictions_9to_equality_constraint, 0, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_equ_2, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_restriction, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_params, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_AllEqualConstraint_AllDifferentC) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_18parse_restrictions_9to_equality_constraint, 0, __pyx_mstate_global->__pyx_n_u_parse_restrictions_locals_to_equ_2, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_to_equality_constraint = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":342 + /* "constraint/parser.py":327 * * # remove functionally duplicate restrictions (preserves order and whitespace) * if all(isinstance(r, str) for r in restrictions): # <<<<<<<<<<<<<< * # clean the restriction strings to functional equivalence * restrictions_cleaned = [r.replace(" ", "") for r in restrictions] */ - __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_10genexpr(NULL, __pyx_v_restrictions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_10genexpr(NULL, __pyx_v_restrictions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "constraint/parser.py":344 + /* "constraint/parser.py":329 * if all(isinstance(r, str) for r in restrictions): * # clean the restriction strings to functional equivalence * restrictions_cleaned = [r.replace(" ", "") for r in restrictions] # <<<<<<<<<<<<<< @@ -11092,7 +11089,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED * # get the indices of the unique restrictions, use these to build a new list of restrictions */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L6_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_restrictions; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; @@ -11100,22 +11097,22 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED { 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, 344, __pyx_L6_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 329, __pyx_L6_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L6_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_r, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr13__pyx_v_r, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 344, __pyx_L6_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr13__pyx_v_r, __pyx_mstate_global->__pyx_n_u_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 344, __pyx_L6_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 344, __pyx_L6_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 329, __pyx_L6_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11129,7 +11126,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_v_restrictions_cleaned = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":345 + /* "constraint/parser.py":330 * # clean the restriction strings to functional equivalence * restrictions_cleaned = [r.replace(" ", "") for r in restrictions] * restrictions_cleaned_unique = list(dict.fromkeys(restrictions_cleaned)) # dict preserves order # <<<<<<<<<<<<<< @@ -11143,16 +11140,16 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_restrictions_cleaned}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fromkeys, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_restrictions_cleaned_unique = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":347 + /* "constraint/parser.py":332 * restrictions_cleaned_unique = list(dict.fromkeys(restrictions_cleaned)) # dict preserves order * # get the indices of the unique restrictions, use these to build a new list of restrictions * restrictions_unique_indices = [restrictions_cleaned.index(r) for r in restrictions_cleaned_unique] # <<<<<<<<<<<<<< @@ -11160,7 +11157,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED * */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L13_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_restrictions_cleaned_unique; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; @@ -11168,19 +11165,19 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED { 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, 347, __pyx_L13_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 332, __pyx_L13_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L13_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_r, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__index, __pyx_v_restrictions_cleaned, __pyx_9genexpr14__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L13_error) + __pyx_t_6 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__index, __pyx_v_restrictions_cleaned, __pyx_9genexpr14__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 332, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 347, __pyx_L13_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 332, __pyx_L13_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11194,7 +11191,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_v_restrictions_unique_indices = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":348 + /* "constraint/parser.py":333 * # get the indices of the unique restrictions, use these to build a new list of restrictions * restrictions_unique_indices = [restrictions_cleaned.index(r) for r in restrictions_cleaned_unique] * restrictions = [restrictions[i] for i in restrictions_unique_indices] # <<<<<<<<<<<<<< @@ -11202,7 +11199,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED * # create the parsed restrictions, split into multiple restrictions where possible */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L20_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_restrictions_unique_indices; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; @@ -11210,19 +11207,19 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED { 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, 348, __pyx_L20_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 333, __pyx_L20_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L20_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_i, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_restrictions, __pyx_9genexpr15__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L20_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_restrictions, __pyx_9genexpr15__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 333, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 348, __pyx_L20_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 333, __pyx_L20_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11236,7 +11233,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __Pyx_DECREF_SET(__pyx_v_restrictions, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":342 + /* "constraint/parser.py":327 * * # remove functionally duplicate restrictions (preserves order and whitespace) * if all(isinstance(r, str) for r in restrictions): # <<<<<<<<<<<<<< @@ -11245,32 +11242,32 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ } - /* "constraint/parser.py":351 + /* "constraint/parser.py":336 * * # create the parsed restrictions, split into multiple restrictions where possible * restrictions = to_multiple_restrictions(restrictions) # <<<<<<<<<<<<<< * # split into functions that only take their relevant parameters * parsed_restrictions = list() */ - __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_4to_multiple_restrictions(__pyx_v_to_multiple_restrictions, __pyx_v_restrictions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_6parser_18parse_restrictions_4to_multiple_restrictions(__pyx_v_to_multiple_restrictions, __pyx_v_restrictions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 351, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_restrictions, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":353 + /* "constraint/parser.py":338 * restrictions = to_multiple_restrictions(restrictions) * # split into functions that only take their relevant parameters * parsed_restrictions = list() # <<<<<<<<<<<<<< * for res in restrictions: * params_used: set[str] = set() */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_parsed_restrictions = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":354 + /* "constraint/parser.py":339 * # split into functions that only take their relevant parameters * parsed_restrictions = list() * for res in restrictions: # <<<<<<<<<<<<<< @@ -11279,7 +11276,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ if (unlikely(__pyx_v_restrictions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 354, __pyx_L1_error) + __PYX_ERR(0, 339, __pyx_L1_error) } __pyx_t_2 = __pyx_v_restrictions; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; @@ -11287,32 +11284,32 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED { 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, 354, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 339, __pyx_L1_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":355 + /* "constraint/parser.py":340 * parsed_restrictions = list() * for res in restrictions: * params_used: set[str] = set() # <<<<<<<<<<<<<< * parsed_restriction = re.sub(regex_match_variable, replace_params_split, res).strip() * params_used_list = list(params_used) */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_params_used); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_params_used, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":356 + /* "constraint/parser.py":341 * for res in restrictions: * params_used: set[str] = set() * parsed_restriction = re.sub(regex_match_variable, replace_params_split, res).strip() # <<<<<<<<<<<<<< @@ -11320,9 +11317,9 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED * finalized_constraint = None */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 356, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sub); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sub); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; @@ -11342,7 +11339,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_6 = __pyx_t_5; @@ -11353,25 +11350,25 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_parsed_restriction, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":357 + /* "constraint/parser.py":342 * params_used: set[str] = set() * parsed_restriction = re.sub(regex_match_variable, replace_params_split, res).strip() * params_used_list = list(params_used) # <<<<<<<<<<<<<< * finalized_constraint = None * if " or " not in res and " and " not in res: */ - __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_v_params_used); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_cur_scope->__pyx_v_params_used); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_params_used_list, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "constraint/parser.py":358 + /* "constraint/parser.py":343 * parsed_restriction = re.sub(regex_match_variable, replace_params_split, res).strip() * params_used_list = list(params_used) * finalized_constraint = None # <<<<<<<<<<<<<< @@ -11381,25 +11378,25 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_finalized_constraint, Py_None); - /* "constraint/parser.py":359 + /* "constraint/parser.py":344 * params_used_list = list(params_used) * finalized_constraint = None * if " or " not in res and " and " not in res: # <<<<<<<<<<<<<< * # if applicable, strip the outermost round brackets * while ( */ - __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_or, __pyx_v_res, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_or, __pyx_v_res, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 344, __pyx_L1_error) if (__pyx_t_11) { } else { __pyx_t_3 = __pyx_t_11; goto __pyx_L28_bool_binop_done; } - __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_and, __pyx_v_res, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_and, __pyx_v_res, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 344, __pyx_L1_error) __pyx_t_3 = __pyx_t_11; __pyx_L28_bool_binop_done:; if (__pyx_t_3) { - /* "constraint/parser.py":361 + /* "constraint/parser.py":346 * if " or " not in res and " and " not in res: * # if applicable, strip the outermost round brackets * while ( # <<<<<<<<<<<<<< @@ -11408,16 +11405,16 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ while (1) { - /* "constraint/parser.py":362 + /* "constraint/parser.py":347 * # if applicable, strip the outermost round brackets * while ( * parsed_restriction[0] == "(" # <<<<<<<<<<<<<< * and parsed_restriction[-1] == ")" * and "(" not in parsed_restriction[1:] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parsed_restriction, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parsed_restriction, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__19, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__19, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { } else { @@ -11425,16 +11422,16 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED goto __pyx_L32_bool_binop_done; } - /* "constraint/parser.py":363 + /* "constraint/parser.py":348 * while ( * parsed_restriction[0] == "(" * and parsed_restriction[-1] == ")" # <<<<<<<<<<<<<< * and "(" not in parsed_restriction[1:] * and ")" not in parsed_restriction[:1] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parsed_restriction, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_parsed_restriction, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__20, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u__20, Py_EQ)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { } else { @@ -11442,16 +11439,16 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED goto __pyx_L32_bool_binop_done; } - /* "constraint/parser.py":364 + /* "constraint/parser.py":349 * parsed_restriction[0] == "(" * and parsed_restriction[-1] == ")" * and "(" not in parsed_restriction[1:] # <<<<<<<<<<<<<< * and ")" not in parsed_restriction[:1] * ): */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 1, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[1], 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u__19, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u__19, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { } else { @@ -11459,35 +11456,35 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED goto __pyx_L32_bool_binop_done; } - /* "constraint/parser.py":365 + /* "constraint/parser.py":350 * and parsed_restriction[-1] == ")" * and "(" not in parsed_restriction[1:] * and ")" not in parsed_restriction[:1] # <<<<<<<<<<<<<< * ): * parsed_restriction = parsed_restriction[1:-1] */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 0, 1, NULL, NULL, &__pyx_mstate_global->__pyx_slice[2], 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 0, 1, NULL, NULL, &__pyx_mstate_global->__pyx_slice[2], 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u__20, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u__20, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_11; __pyx_L32_bool_binop_done:; if (!__pyx_t_3) break; - /* "constraint/parser.py":367 + /* "constraint/parser.py":352 * and ")" not in parsed_restriction[:1] * ): * parsed_restriction = parsed_restriction[1:-1] # <<<<<<<<<<<<<< * # check if we can turn this into the built-in numeric comparison constraint * finalized_constraint = to_numeric_constraint(parsed_restriction, params_used_list) */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 1, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[3], 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_parsed_restriction, 1, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[3], 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_parsed_restriction, __pyx_t_1); __pyx_t_1 = 0; } - /* "constraint/parser.py":369 + /* "constraint/parser.py":354 * parsed_restriction = parsed_restriction[1:-1] * # check if we can turn this into the built-in numeric comparison constraint * finalized_constraint = to_numeric_constraint(parsed_restriction, params_used_list) # <<<<<<<<<<<<<< @@ -11496,14 +11493,14 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ __pyx_t_1 = __pyx_v_parsed_restriction; __Pyx_INCREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 369, __pyx_L1_error) - __pyx_t_5 = __pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_constraint(__pyx_v_to_numeric_constraint, ((PyObject*)__pyx_t_1), __pyx_v_params_used_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 369, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_5 = __pyx_pf_10constraint_6parser_18parse_restrictions_6to_numeric_constraint(__pyx_v_to_numeric_constraint, ((PyObject*)__pyx_t_1), __pyx_v_params_used_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_finalized_constraint, __pyx_t_5); __pyx_t_5 = 0; - /* "constraint/parser.py":370 + /* "constraint/parser.py":355 * # check if we can turn this into the built-in numeric comparison constraint * finalized_constraint = to_numeric_constraint(parsed_restriction, params_used_list) * if finalized_constraint is None: # <<<<<<<<<<<<<< @@ -11513,7 +11510,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_t_3 = (__pyx_v_finalized_constraint == Py_None); if (__pyx_t_3) { - /* "constraint/parser.py":372 + /* "constraint/parser.py":357 * if finalized_constraint is None: * # check if we can turn this into the built-in equality comparison constraint * finalized_constraint = to_equality_constraint(parsed_restriction, params_used_list) # <<<<<<<<<<<<<< @@ -11522,14 +11519,14 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ __pyx_t_5 = __pyx_v_parsed_restriction; __Pyx_INCREF(__pyx_t_5); - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 372, __pyx_L1_error) - __pyx_t_1 = __pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality_constraint(__pyx_v_to_equality_constraint, ((PyObject*)__pyx_t_5), __pyx_v_params_used_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_5))) __PYX_ERR(0, 357, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_6parser_18parse_restrictions_8to_equality_constraint(__pyx_v_to_equality_constraint, ((PyObject*)__pyx_t_5), __pyx_v_params_used_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_finalized_constraint, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":370 + /* "constraint/parser.py":355 * # check if we can turn this into the built-in numeric comparison constraint * finalized_constraint = to_numeric_constraint(parsed_restriction, params_used_list) * if finalized_constraint is None: # <<<<<<<<<<<<<< @@ -11538,7 +11535,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ } - /* "constraint/parser.py":359 + /* "constraint/parser.py":344 * params_used_list = list(params_used) * finalized_constraint = None * if " or " not in res and " and " not in res: # <<<<<<<<<<<<<< @@ -11547,7 +11544,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ } - /* "constraint/parser.py":373 + /* "constraint/parser.py":358 * # check if we can turn this into the built-in equality comparison constraint * finalized_constraint = to_equality_constraint(parsed_restriction, params_used_list) * if finalized_constraint is None: # <<<<<<<<<<<<<< @@ -11557,16 +11554,16 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_t_3 = (__pyx_v_finalized_constraint == Py_None); if (__pyx_t_3) { - /* "constraint/parser.py":375 + /* "constraint/parser.py":360 * if finalized_constraint is None: * # we must turn it into a general function * finalized_constraint = f"def r({', '.join(params_used_list)}): return {parsed_restriction} \n" # <<<<<<<<<<<<<< * parsed_restrictions.append((finalized_constraint, params_used_list)) * */ - __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__21, __pyx_v_params_used_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__21, __pyx_v_params_used_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_parsed_restriction, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_parsed_restriction, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_def_r; __pyx_t_12[1] = __pyx_t_1; @@ -11574,14 +11571,14 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED __pyx_t_12[3] = __pyx_t_5; __pyx_t_12[4] = __pyx_mstate_global->__pyx_kp_u__22; __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 375, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_finalized_constraint, __pyx_t_6); __pyx_t_6 = 0; - /* "constraint/parser.py":373 + /* "constraint/parser.py":358 * # check if we can turn this into the built-in equality comparison constraint * finalized_constraint = to_equality_constraint(parsed_restriction, params_used_list) * if finalized_constraint is None: # <<<<<<<<<<<<<< @@ -11590,25 +11587,25 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED */ } - /* "constraint/parser.py":376 + /* "constraint/parser.py":361 * # we must turn it into a general function * finalized_constraint = f"def r({', '.join(params_used_list)}): return {parsed_restriction} \n" * parsed_restrictions.append((finalized_constraint, params_used_list)) # <<<<<<<<<<<<<< * * return parsed_restrictions */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_finalized_constraint); __Pyx_GIVEREF(__pyx_v_finalized_constraint); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_finalized_constraint) != (0)) __PYX_ERR(0, 376, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_finalized_constraint) != (0)) __PYX_ERR(0, 361, __pyx_L1_error); __Pyx_INCREF(__pyx_v_params_used_list); __Pyx_GIVEREF(__pyx_v_params_used_list); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_params_used_list) != (0)) __PYX_ERR(0, 376, __pyx_L1_error); - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_parsed_restrictions, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_params_used_list) != (0)) __PYX_ERR(0, 361, __pyx_L1_error); + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_parsed_restrictions, __pyx_t_6); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "constraint/parser.py":354 + /* "constraint/parser.py":339 * # split into functions that only take their relevant parameters * parsed_restrictions = list() * for res in restrictions: # <<<<<<<<<<<<<< @@ -11618,7 +11615,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":378 + /* "constraint/parser.py":363 * parsed_restrictions.append((finalized_constraint, params_used_list)) * * return parsed_restrictions # <<<<<<<<<<<<<< @@ -11633,7 +11630,7 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED /* "constraint/parser.py":32 * * - * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: # <<<<<<<<<<<<<< + * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: # <<<<<<<<<<<<<< * """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 * # rewrite the restrictions so variables are singled out */ @@ -11674,12 +11671,12 @@ static PyObject *__pyx_pf_10constraint_6parser_parse_restrictions(CYTHON_UNUSED return __pyx_r; } -/* "constraint/parser.py":381 +/* "constraint/parser.py":366 * * * def compile_to_constraints( # <<<<<<<<<<<<<< * constraints: list[str], domains: dict, picklable=False - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 */ /* Python wrapper */ @@ -11724,49 +11721,49 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_constraints,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_picklable,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, 381, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 366, __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, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 366, __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, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 366, __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, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __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, "compile_to_constraints", 0) < (0)) __PYX_ERR(0, 381, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "compile_to_constraints", 0) < (0)) __PYX_ERR(0, 366, __pyx_L3_error) - /* "constraint/parser.py":382 + /* "constraint/parser.py":367 * * def compile_to_constraints( * constraints: list[str], domains: dict, picklable=False # <<<<<<<<<<<<<< - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 * """Parses constraints in string format (referred to as restrictions) from a list of strings into a list of Constraints, parameters used, and source if applicable. */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compile_to_constraints", 0, 2, 3, i); __PYX_ERR(0, 381, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("compile_to_constraints", 0, 2, 3, i); __PYX_ERR(0, 366, __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, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 366, __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, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 366, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 381, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 366, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -11778,7 +11775,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("compile_to_constraints", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 381, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("compile_to_constraints", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 366, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11789,16 +11786,16 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 382, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 382, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_constraints), (&PyList_Type), 0, "constraints", 2))) __PYX_ERR(0, 367, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_domains), (&PyDict_Type), 0, "domains", 2))) __PYX_ERR(0, 367, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_6parser_2compile_to_constraints(__pyx_self, __pyx_v_constraints, __pyx_v_domains, __pyx_v_picklable); - /* "constraint/parser.py":381 + /* "constraint/parser.py":366 * * * def compile_to_constraints( # <<<<<<<<<<<<<< * constraints: list[str], domains: dict, picklable=False - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 */ /* function exit code */ @@ -11846,15 +11843,15 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compile_to_constraints", 0); - /* "constraint/parser.py":394 + /* "constraint/parser.py":379 * list of tuples with restrictions, parameters used (list[str]), and source (str) if applicable. Returned restrictions are strings, functions, or Constraints depending on the options provided. * """ # noqa: E501 * parsed_restrictions = parse_restrictions(constraints, domains) # <<<<<<<<<<<<<< - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() * for restriction, params_used in parsed_restrictions: */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_parse_restrictions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_parse_restrictions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -11873,27 +11870,27 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__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, 394, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_parsed_restrictions = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/parser.py":395 + /* "constraint/parser.py":380 * """ # noqa: E501 * parsed_restrictions = parse_restrictions(constraints, domains) - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() # <<<<<<<<<<<<<< + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() # <<<<<<<<<<<<<< * for restriction, params_used in parsed_restrictions: * if isinstance(restriction, str): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_compiled_constraints = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":396 + /* "constraint/parser.py":381 * parsed_restrictions = parse_restrictions(constraints, domains) - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() * for restriction, params_used in parsed_restrictions: # <<<<<<<<<<<<<< * if isinstance(restriction, str): * # if it's a string, wrap it in a (compilable or compiled) function constraint @@ -11903,9 +11900,9 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parsed_restrictions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parsed_restrictions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { @@ -11913,7 +11910,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN { 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, 396, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 381, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -11923,7 +11920,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN { 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, 396, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 381, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -11934,13 +11931,13 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_6(__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, 396, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 381, __pyx_L1_error) PyErr_Clear(); } break; @@ -11953,7 +11950,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 396, __pyx_L1_error) + __PYX_ERR(0, 381, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -11963,22 +11960,22 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 396, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); @@ -11986,7 +11983,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 396, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 381, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; @@ -11994,7 +11991,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 396, __pyx_L1_error) + __PYX_ERR(0, 381, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_restriction, __pyx_t_2); @@ -12002,8 +11999,8 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_params_used, __pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":397 - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + /* "constraint/parser.py":382 + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() * for restriction, params_used in parsed_restrictions: * if isinstance(restriction, str): # <<<<<<<<<<<<<< * # if it's a string, wrap it in a (compilable or compiled) function constraint @@ -12012,17 +12009,17 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_10 = PyUnicode_Check(__pyx_v_restriction); if (__pyx_t_10) { - /* "constraint/parser.py":399 + /* "constraint/parser.py":384 * if isinstance(restriction, str): * # if it's a string, wrap it in a (compilable or compiled) function constraint * if picklable: # <<<<<<<<<<<<<< * constraint = CompilableFunctionConstraint(restriction) * else: */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_picklable); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_picklable); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 384, __pyx_L1_error) if (__pyx_t_10) { - /* "constraint/parser.py":400 + /* "constraint/parser.py":385 * # if it's a string, wrap it in a (compilable or compiled) function constraint * if picklable: * constraint = CompilableFunctionConstraint(restriction) # <<<<<<<<<<<<<< @@ -12030,7 +12027,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN * code_object = compile(restriction, "", "exec") */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -12049,13 +12046,13 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/parser.py":399 + /* "constraint/parser.py":384 * if isinstance(restriction, str): * # if it's a string, wrap it in a (compilable or compiled) function constraint * if picklable: # <<<<<<<<<<<<<< @@ -12065,7 +12062,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN goto __pyx_L8; } - /* "constraint/parser.py":402 + /* "constraint/parser.py":387 * constraint = CompilableFunctionConstraint(restriction) * else: * code_object = compile(restriction, "", "exec") # <<<<<<<<<<<<<< @@ -12079,13 +12076,13 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_restriction, __pyx_mstate_global->__pyx_kp_u_string, __pyx_mstate_global->__pyx_n_u_exec}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_compile, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_code_object, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/parser.py":403 + /* "constraint/parser.py":388 * else: * code_object = compile(restriction, "", "exec") * func = FunctionType(code_object.co_consts[0], globals()) # <<<<<<<<<<<<<< @@ -12093,14 +12090,14 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN * compiled_constraints.append((constraint, params_used, restriction)) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FunctionType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FunctionType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_object, __pyx_mstate_global->__pyx_n_u_co_consts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_object, __pyx_mstate_global->__pyx_n_u_co_consts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_Globals(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_8 = __Pyx_Globals(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -12121,13 +12118,13 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/parser.py":404 + /* "constraint/parser.py":389 * code_object = compile(restriction, "", "exec") * func = FunctionType(code_object.co_consts[0], globals()) * constraint = FunctionConstraint(func) # <<<<<<<<<<<<<< @@ -12135,7 +12132,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN * elif isinstance(restriction, Constraint): */ __pyx_t_7 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -12154,7 +12151,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__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_3)) __PYX_ERR(0, 404, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_3); @@ -12162,29 +12159,29 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN } __pyx_L8:; - /* "constraint/parser.py":405 + /* "constraint/parser.py":390 * func = FunctionType(code_object.co_consts[0], globals()) * constraint = FunctionConstraint(func) * compiled_constraints.append((constraint, params_used, restriction)) # <<<<<<<<<<<<<< * elif isinstance(restriction, Constraint): * # otherwise it already is a Constraint, pass it directly */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_constraint); __Pyx_GIVEREF(__pyx_v_constraint); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 405, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 390, __pyx_L1_error); __Pyx_INCREF(__pyx_v_params_used); __Pyx_GIVEREF(__pyx_v_params_used); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_params_used) != (0)) __PYX_ERR(0, 405, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_params_used) != (0)) __PYX_ERR(0, 390, __pyx_L1_error); __Pyx_INCREF(__pyx_v_restriction); __Pyx_GIVEREF(__pyx_v_restriction); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_restriction) != (0)) __PYX_ERR(0, 405, __pyx_L1_error); - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_compiled_constraints, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 405, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_restriction) != (0)) __PYX_ERR(0, 390, __pyx_L1_error); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_compiled_constraints, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/parser.py":397 - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + /* "constraint/parser.py":382 + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() * for restriction, params_used in parsed_restrictions: * if isinstance(restriction, str): # <<<<<<<<<<<<<< * # if it's a string, wrap it in a (compilable or compiled) function constraint @@ -12193,41 +12190,41 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN goto __pyx_L7; } - /* "constraint/parser.py":406 + /* "constraint/parser.py":391 * constraint = FunctionConstraint(func) * compiled_constraints.append((constraint, params_used, restriction)) * elif isinstance(restriction, Constraint): # <<<<<<<<<<<<<< * # otherwise it already is a Constraint, pass it directly * compiled_constraints.append((restriction, params_used, None)) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = PyObject_IsInstance(__pyx_v_restriction, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_10 = PyObject_IsInstance(__pyx_v_restriction, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_10)) { - /* "constraint/parser.py":408 + /* "constraint/parser.py":393 * elif isinstance(restriction, Constraint): * # otherwise it already is a Constraint, pass it directly * compiled_constraints.append((restriction, params_used, None)) # <<<<<<<<<<<<<< * else: * raise ValueError(f"Restriction {restriction} is neither a string or Constraint {type(restriction)}") */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_restriction); __Pyx_GIVEREF(__pyx_v_restriction); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_restriction) != (0)) __PYX_ERR(0, 408, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_restriction) != (0)) __PYX_ERR(0, 393, __pyx_L1_error); __Pyx_INCREF(__pyx_v_params_used); __Pyx_GIVEREF(__pyx_v_params_used); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_params_used) != (0)) __PYX_ERR(0, 408, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_params_used) != (0)) __PYX_ERR(0, 393, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(0, 408, __pyx_L1_error); - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_compiled_constraints, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(0, 393, __pyx_L1_error); + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_compiled_constraints, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/parser.py":406 + /* "constraint/parser.py":391 * constraint = FunctionConstraint(func) * compiled_constraints.append((constraint, params_used, restriction)) * elif isinstance(restriction, Constraint): # <<<<<<<<<<<<<< @@ -12237,7 +12234,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN goto __pyx_L7; } - /* "constraint/parser.py":410 + /* "constraint/parser.py":395 * compiled_constraints.append((restriction, params_used, None)) * else: * raise ValueError(f"Restriction {restriction} is neither a string or Constraint {type(restriction)}") # <<<<<<<<<<<<<< @@ -12246,16 +12243,16 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN */ /*else*/ { __pyx_t_8 = NULL; - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_restriction, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_restriction, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_restriction)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_restriction)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13[0] = __pyx_mstate_global->__pyx_kp_u_Restriction; __pyx_t_13[1] = __pyx_t_7; __pyx_t_13[2] = __pyx_mstate_global->__pyx_kp_u_is_neither_a_string_or_Constrai; __pyx_t_13[3] = __pyx_t_11; __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_13, 4, 12 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 35 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -12265,18 +12262,18 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 410, __pyx_L1_error) + __PYX_ERR(0, 395, __pyx_L1_error) } __pyx_L7:; - /* "constraint/parser.py":396 + /* "constraint/parser.py":381 * parsed_restrictions = parse_restrictions(constraints, domains) - * compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + * compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() * for restriction, params_used in parsed_restrictions: # <<<<<<<<<<<<<< * if isinstance(restriction, str): * # if it's a string, wrap it in a (compilable or compiled) function constraint @@ -12284,7 +12281,7 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/parser.py":413 + /* "constraint/parser.py":398 * * # return the restrictions and used parameters * return compiled_constraints # <<<<<<<<<<<<<< @@ -12296,12 +12293,12 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN __pyx_r = __pyx_v_compiled_constraints; goto __pyx_L0; - /* "constraint/parser.py":381 + /* "constraint/parser.py":366 * * * def compile_to_constraints( # <<<<<<<<<<<<<< * constraints: list[str], domains: dict, picklable=False - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 */ /* function exit code */ @@ -12327,10 +12324,10 @@ static PyObject *__pyx_pf_10constraint_6parser_2compile_to_constraints(CYTHON_UN return __pyx_r; } -/* "constraint/parser.py":419 +/* "constraint/parser.py":404 * * - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: # <<<<<<<<<<<<<< + * def is_or_evals_to_number(s: str) -> int | float | None: # <<<<<<<<<<<<<< * """Check if the string is a number or can be evaluated to a number.""" * try: */ @@ -12375,32 +12372,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_s,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, 419, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 404, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 419, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 404, __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, "is_or_evals_to_number", 0) < (0)) __PYX_ERR(0, 419, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_or_evals_to_number", 0) < (0)) __PYX_ERR(0, 404, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_or_evals_to_number", 1, 1, 1, i); __PYX_ERR(0, 419, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_or_evals_to_number", 1, 1, 1, i); __PYX_ERR(0, 404, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 419, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 404, __pyx_L3_error) } __pyx_v_s = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("is_or_evals_to_number", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 419, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("is_or_evals_to_number", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 404, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12411,7 +12408,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyUnicode_Type), 0, "s", 2))) __PYX_ERR(0, 419, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyUnicode_Type), 0, "s", 2))) __PYX_ERR(0, 404, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_6parser_4is_or_evals_to_number(__pyx_self, __pyx_v_s); /* function exit code */ @@ -12451,8 +12448,8 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_or_evals_to_number", 0); - /* "constraint/parser.py":421 - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: + /* "constraint/parser.py":406 + * def is_or_evals_to_number(s: str) -> int | float | None: * """Check if the string is a number or can be evaluated to a number.""" * try: # <<<<<<<<<<<<<< * # check if it's a number or solvable to a number (e.g. '32*2') @@ -12467,7 +12464,7 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "constraint/parser.py":423 + /* "constraint/parser.py":408 * try: * # check if it's a number or solvable to a number (e.g. '32*2') * number = eval(s) # <<<<<<<<<<<<<< @@ -12475,15 +12472,15 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU * return number */ __pyx_t_5 = NULL; - __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L3_error) + __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 423, __pyx_L3_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 408, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_v_number) { - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_number, __pyx_v_number) < (0)) __PYX_ERR(0, 423, __pyx_L3_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_number, __pyx_v_number) < (0)) __PYX_ERR(0, 408, __pyx_L3_error) } if (__pyx_v_s) { - if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_s, __pyx_v_s) < (0)) __PYX_ERR(0, 423, __pyx_L3_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_s, __pyx_v_s) < (0)) __PYX_ERR(0, 408, __pyx_L3_error) } __pyx_t_8 = 1; { @@ -12492,13 +12489,13 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 408, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_number = __pyx_t_4; __pyx_t_4 = 0; - /* "constraint/parser.py":424 + /* "constraint/parser.py":409 * # check if it's a number or solvable to a number (e.g. '32*2') * number = eval(s) * assert isinstance(number, (int, float)) # <<<<<<<<<<<<<< @@ -12518,14 +12515,14 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU __pyx_L9_bool_binop_done:; if (unlikely(!__pyx_t_9)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); - __PYX_ERR(0, 424, __pyx_L3_error) + __PYX_ERR(0, 409, __pyx_L3_error) } } #else - if ((1)); else __PYX_ERR(0, 424, __pyx_L3_error) + if ((1)); else __PYX_ERR(0, 409, __pyx_L3_error) #endif - /* "constraint/parser.py":425 + /* "constraint/parser.py":410 * number = eval(s) * assert isinstance(number, (int, float)) * return number # <<<<<<<<<<<<<< @@ -12537,8 +12534,8 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU __pyx_r = __pyx_v_number; goto __pyx_L7_try_return; - /* "constraint/parser.py":421 - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: + /* "constraint/parser.py":406 + * def is_or_evals_to_number(s: str) -> int | float | None: * """Check if the string is a number or can be evaluated to a number.""" * try: # <<<<<<<<<<<<<< * # check if it's a number or solvable to a number (e.g. '32*2') @@ -12551,7 +12548,7 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/parser.py":426 + /* "constraint/parser.py":411 * assert isinstance(number, (int, float)) * return number * except Exception: # <<<<<<<<<<<<<< @@ -12562,7 +12559,7 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU if (__pyx_t_11) { __Pyx_ErrRestore(0,0,0); - /* "constraint/parser.py":428 + /* "constraint/parser.py":413 * except Exception: * # it's not a solvable subexpression, return None * return None # <<<<<<<<<<<<<< @@ -12575,8 +12572,8 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU } goto __pyx_L5_except_error; - /* "constraint/parser.py":421 - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: + /* "constraint/parser.py":406 + * def is_or_evals_to_number(s: str) -> int | float | None: * """Check if the string is a number or can be evaluated to a number.""" * try: # <<<<<<<<<<<<<< * # check if it's a number or solvable to a number (e.g. '32*2') @@ -12602,10 +12599,10 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU goto __pyx_L0; } - /* "constraint/parser.py":419 + /* "constraint/parser.py":404 * * - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: # <<<<<<<<<<<<<< + * def is_or_evals_to_number(s: str) -> int | float | None: # <<<<<<<<<<<<<< * """Check if the string is a number or can be evaluated to a number.""" * try: */ @@ -12625,7 +12622,7 @@ static PyObject *__pyx_pf_10constraint_6parser_4is_or_evals_to_number(CYTHON_UNU return __pyx_r; } -/* "constraint/parser.py":431 +/* "constraint/parser.py":416 * * * def extract_operators(expr: str) -> list[str]: # <<<<<<<<<<<<<< @@ -12673,32 +12670,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_expr,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, 431, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 416, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 431, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 416, __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, "extract_operators", 0) < (0)) __PYX_ERR(0, 431, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "extract_operators", 0) < (0)) __PYX_ERR(0, 416, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extract_operators", 1, 1, 1, i); __PYX_ERR(0, 431, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("extract_operators", 1, 1, 1, i); __PYX_ERR(0, 416, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 431, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 416, __pyx_L3_error) } __pyx_v_expr = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("extract_operators", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 431, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("extract_operators", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 416, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12709,7 +12706,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_expr), (&PyUnicode_Type), 0, "expr", 2))) __PYX_ERR(0, 431, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_expr), (&PyUnicode_Type), 0, "expr", 2))) __PYX_ERR(0, 416, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_6parser_6extract_operators(__pyx_self, __pyx_v_expr); /* function exit code */ @@ -12749,22 +12746,22 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED __Pyx_RefNannySetupContext("extract_operators", 0); __Pyx_INCREF(__pyx_v_expr); - /* "constraint/parser.py":437 + /* "constraint/parser.py":422 * * # remove any whitespace from the expression * expr = expr.strip().replace(" ", "") # <<<<<<<<<<<<<< * * # Match ** first to avoid matching * twice */ - __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__strip, __pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyUnicode_Type__strip, __pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyUnicode_Replace(((PyObject*)__pyx_t_1), __pyx_mstate_global->__pyx_kp_u__17, __pyx_mstate_global->__pyx_kp_u__18, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Replace(((PyObject*)__pyx_t_1), __pyx_mstate_global->__pyx_kp_u__17, __pyx_mstate_global->__pyx_kp_u__18, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_expr, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "constraint/parser.py":440 + /* "constraint/parser.py":425 * * # Match ** first to avoid matching * twice * pattern = r""" # <<<<<<<<<<<<<< @@ -12774,21 +12771,21 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_match_but_not_w_d_binary_preced); __pyx_v_pattern = __pyx_mstate_global->__pyx_kp_u_match_but_not_w_d_binary_preced; - /* "constraint/parser.py":445 + /* "constraint/parser.py":430 * [+\*[inserted by cython to avoid comment closer]/] # match +, *, / * """ * matches = re.findall(pattern, expr, re.VERBOSE) # <<<<<<<<<<<<<< * return [m.strip() for m in matches] */ __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VERBOSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_VERBOSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; @@ -12809,29 +12806,29 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_matches = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/parser.py":446 + /* "constraint/parser.py":431 * """ * matches = re.findall(pattern, expr, re.VERBOSE) * return [m.strip() for m in matches] # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L5_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_matches)) || PyTuple_CheckExact(__pyx_v_matches)) { __pyx_t_4 = __pyx_v_matches; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_matches); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L5_error) + __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_matches); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L5_error) + __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_8)) { @@ -12839,7 +12836,7 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED { 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, 446, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 431, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12849,7 +12846,7 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED { 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, 446, __pyx_L5_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 431, __pyx_L5_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } @@ -12860,13 +12857,13 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED #endif ++__pyx_t_7; } - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L5_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L5_error) } else { __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 446, __pyx_L5_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 431, __pyx_L5_error) PyErr_Clear(); } break; @@ -12882,10 +12879,10 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L5_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 431, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 446, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 431, __pyx_L5_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -12900,7 +12897,7 @@ static PyObject *__pyx_pf_10constraint_6parser_6extract_operators(CYTHON_UNUSED __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/parser.py":431 + /* "constraint/parser.py":416 * * * def extract_operators(expr: str) -> list[str]: # <<<<<<<<<<<<<< @@ -15566,15 +15563,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 99, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 84, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_2_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_2_genexpr); @@ -15585,15 +15582,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 99, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 84, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_3_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 99, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_3_genexpr); @@ -15604,15 +15601,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 110, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 95, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 95, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_4_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 110, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 95, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_4_genexpr); @@ -15623,15 +15620,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 155, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr)) __PYX_ERR(0, 140, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_5_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 140, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_5_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 155, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr) < (0)) __PYX_ERR(0, 140, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_5_genexpr); @@ -15642,15 +15639,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 175, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 160, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_6_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_6_genexpr); @@ -15661,15 +15658,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 184, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 169, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_7_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_7_genexpr); @@ -15680,15 +15677,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_8_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr)) __PYX_ERR(0, 185, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_8_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_8_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr)) __PYX_ERR(0, 170, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_8_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_8_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 185, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 170, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_8_genexpr); @@ -15699,15 +15696,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_9_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr)) __PYX_ERR(0, 190, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_9_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_9_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr)) __PYX_ERR(0, 175, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_9_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_9_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 190, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_9_genexpr); @@ -15718,15 +15715,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_10_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr)) __PYX_ERR(0, 282, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_10_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_10_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr)) __PYX_ERR(0, 267, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_10_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 267, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_10_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr) < (0)) __PYX_ERR(0, 267, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_10_genexpr); @@ -15737,15 +15734,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_11_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr)) __PYX_ERR(0, 289, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_11_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_11_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr)) __PYX_ERR(0, 274, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_11_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr = &__pyx_type_10constraint_6parser___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_6parser___pyx_scope_struct_11_genexpr) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_11_genexpr); @@ -15756,15 +15753,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint)) __PYX_ERR(0, 313, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint)) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint = &__pyx_type_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint) < (0)) __PYX_ERR(0, 313, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_12_to_equality_constraint); @@ -15775,15 +15772,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_13_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr)) __PYX_ERR(0, 332, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_13_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr) < (0)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_13_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr)) __PYX_ERR(0, 317, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_13_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr) < (0)) __PYX_ERR(0, 317, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr = &__pyx_type_10constraint_6parser___pyx_scope_struct_13_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr) < (0)) __PYX_ERR(0, 332, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr) < (0)) __PYX_ERR(0, 317, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_13_genexpr); @@ -15794,15 +15791,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_14_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr)) __PYX_ERR(0, 342, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_14_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr) < (0)) __PYX_ERR(0, 342, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_6parser___pyx_scope_struct_14_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr)) __PYX_ERR(0, 327, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_6parser___pyx_scope_struct_14_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr) < (0)) __PYX_ERR(0, 327, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr = &__pyx_type_10constraint_6parser___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_6parser___pyx_scope_struct_14_genexpr) < (0)) __PYX_ERR(0, 342, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr) < (0)) __PYX_ERR(0, 327, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_6parser___pyx_scope_struct_14_genexpr); @@ -16119,7 +16116,7 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); * * import re # <<<<<<<<<<<<<< * from types import FunctionType - * from typing import Union, Optional + * */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; @@ -16131,7 +16128,7 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); * * import re * from types import FunctionType # <<<<<<<<<<<<<< - * from typing import Union, Optional + * * from constraint.constraints import ( */ { @@ -16151,45 +16148,21 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":5 - * import re - * from types import FunctionType - * from typing import Union, Optional # <<<<<<<<<<<<<< - * from constraint.constraints import ( - * AllDifferentConstraint, -*/ - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Union,__pyx_mstate_global->__pyx_n_u_Optional}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) - } - __pyx_t_2 = __pyx_t_1; - __Pyx_GOTREF(__pyx_t_2); - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Union,__pyx_mstate_global->__pyx_n_u_Optional}; - for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":6 * from types import FunctionType - * from typing import Union, Optional + * * from constraint.constraints import ( # <<<<<<<<<<<<<< * AllDifferentConstraint, * AllEqualConstraint, */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AllDifferentConstraint,__pyx_mstate_global->__pyx_n_u_AllEqualConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_ExactSumConstraint,__pyx_mstate_global->__pyx_n_u_MinSumConstraint,__pyx_mstate_global->__pyx_n_u_MaxSumConstraint,__pyx_mstate_global->__pyx_n_u_ExactProdConstraint,__pyx_mstate_global->__pyx_n_u_MinProdConstraint,__pyx_mstate_global->__pyx_n_u_MaxProdConstraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AllDifferentConstraint,__pyx_mstate_global->__pyx_n_u_AllEqualConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_ExactProdConstraint,__pyx_mstate_global->__pyx_n_u_ExactSumConstraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_MaxProdConstraint,__pyx_mstate_global->__pyx_n_u_MaxSumConstraint,__pyx_mstate_global->__pyx_n_u_MinProdConstraint,__pyx_mstate_global->__pyx_n_u_MinSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_imported_names, 17, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AllDifferentConstraint,__pyx_mstate_global->__pyx_n_u_AllEqualConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_ExactSumConstraint,__pyx_mstate_global->__pyx_n_u_MinSumConstraint,__pyx_mstate_global->__pyx_n_u_MaxSumConstraint,__pyx_mstate_global->__pyx_n_u_ExactProdConstraint,__pyx_mstate_global->__pyx_n_u_MinProdConstraint,__pyx_mstate_global->__pyx_n_u_MaxProdConstraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AllDifferentConstraint,__pyx_mstate_global->__pyx_n_u_AllEqualConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_ExactProdConstraint,__pyx_mstate_global->__pyx_n_u_ExactSumConstraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_MaxProdConstraint,__pyx_mstate_global->__pyx_n_u_MaxSumConstraint,__pyx_mstate_global->__pyx_n_u_MinProdConstraint,__pyx_mstate_global->__pyx_n_u_MinSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableExactSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMaxSumConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinProdConstraint,__pyx_mstate_global->__pyx_n_u_VariableMinSumConstraint}; for (__pyx_t_3=0; __pyx_t_3 < 17; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -16202,7 +16175,7 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); /* "constraint/parser.py":32 * * - * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: # <<<<<<<<<<<<<< + * def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: # <<<<<<<<<<<<<< * """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 * # rewrite the restrictions so variables are singled out */ @@ -16210,7 +16183,7 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_restrictions, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_tune_params, __pyx_mstate_global->__pyx_n_u_dict) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple_Union_Constraint_str) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple_Constraint_str_list_s) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_1parse_restrictions, 0, __pyx_mstate_global->__pyx_n_u_parse_restrictions, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 @@ -16221,19 +16194,19 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_restrictions, __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/parser.py":381 + /* "constraint/parser.py":366 * * * def compile_to_constraints( # <<<<<<<<<<<<<< * constraints: list[str], domains: dict, picklable=False - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 381, __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, 381, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple_Constraint_list_str_U) < (0)) __PYX_ERR(0, 381, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_3compile_to_constraints, 0, __pyx_mstate_global->__pyx_n_u_compile_to_constraints, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 366, __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, 366, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple_Constraint_list_str_s) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_3compile_to_constraints, 0, __pyx_mstate_global->__pyx_n_u_compile_to_constraints, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); @@ -16241,49 +16214,49 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_compile_to_constraints, __pyx_t_2) < (0)) __PYX_ERR(0, 381, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_compile_to_constraints, __pyx_t_2) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/parser.py":419 + /* "constraint/parser.py":404 * * - * def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: # <<<<<<<<<<<<<< + * def is_or_evals_to_number(s: str) -> int | float | None: # <<<<<<<<<<<<<< * """Check if the string is a number or can be evaluated to a number.""" * try: */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_s, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 419, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_Optional_Union_int_float) < (0)) __PYX_ERR(0, 419, __pyx_L1_error) - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_5is_or_evals_to_number, 0, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_s, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 404, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_int_float_None) < (0)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_5is_or_evals_to_number, 0, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number, __pyx_t_4) < (0)) __PYX_ERR(0, 419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_or_evals_to_number, __pyx_t_4) < (0)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/parser.py":431 + /* "constraint/parser.py":416 * * * def extract_operators(expr: str) -> list[str]: # <<<<<<<<<<<<<< * """Extracts all operators from an expression string.""" * # Regex for all supported binary operators: */ - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_expr, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_7extract_operators, 0, __pyx_mstate_global->__pyx_n_u_extract_operators, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_expr, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_6parser_7extract_operators, 0, __pyx_mstate_global->__pyx_n_u_extract_operators, NULL, __pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extract_operators, __pyx_t_2) < (0)) __PYX_ERR(0, 431, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_extract_operators, __pyx_t_2) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "constraint/parser.py":1 @@ -16333,8 +16306,8 @@ __Pyx_RefNannySetupContext("PyInit_parser", 0); static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_builtin_compile = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_compile); if (!__pyx_builtin_compile) __PYX_ERR(0, 402, __pyx_L1_error) - __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 423, __pyx_L1_error) + __pyx_builtin_compile = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_compile); if (!__pyx_builtin_compile) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 408, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; @@ -16362,107 +16335,111 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "constraint/parser.py":135 + /* "constraint/parser.py":120 * # e.g. "G == B-M" becomes "G+M == B" * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("-", "+") # <<<<<<<<<<<<<< * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" * else: */ - __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__8, __pyx_mstate_global->__pyx_kp_u__9); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__8, __pyx_mstate_global->__pyx_kp_u__9); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - /* "constraint/parser.py":146 + /* "constraint/parser.py":131 * # e.g. "G == B/M" becomes "G*M == B" * right_remainder = right[len(swapped_side_first_component) :] * left_swap = right_remainder.replace("/", "*") # <<<<<<<<<<<<<< * restriction = f"{left}{left_swap}{comparator}{swapped_side_first_component}" * else: */ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__10, __pyx_mstate_global->__pyx_kp_u__11); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__10, __pyx_mstate_global->__pyx_kp_u__11); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); - /* "constraint/parser.py":197 + /* "constraint/parser.py":182 * if comparator == "==": * return ( * VariableExactSumConstraint(variables[-1], variables[:-1]) # <<<<<<<<<<<<<< * if variables_on_left * else VariableExactSumConstraint(variables[0], variables[1:]) */ - __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_neg_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_neg_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - /* "constraint/parser.py":199 + /* "constraint/parser.py":184 * VariableExactSumConstraint(variables[-1], variables[:-1]) * if variables_on_left * else VariableExactSumConstraint(variables[0], variables[1:]) # <<<<<<<<<<<<<< * ) # noqa: E501 * elif comparator == "<=": */ - __pyx_mstate_global->__pyx_slice[1] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[1] = PySlice_New(__pyx_mstate_global->__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[1])) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[1]); - /* "constraint/parser.py":344 + /* "constraint/parser.py":329 * if all(isinstance(r, str) for r in restrictions): * # clean the restriction strings to functional equivalence * restrictions_cleaned = [r.replace(" ", "") for r in restrictions] # <<<<<<<<<<<<<< * restrictions_cleaned_unique = list(dict.fromkeys(restrictions_cleaned)) # dict preserves order * # get the indices of the unique restrictions, use these to build a new list of restrictions */ - __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__17, __pyx_mstate_global->__pyx_kp_u__18); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__17, __pyx_mstate_global->__pyx_kp_u__18); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); - /* "constraint/parser.py":365 + /* "constraint/parser.py":350 * and parsed_restriction[-1] == ")" * and "(" not in parsed_restriction[1:] * and ")" not in parsed_restriction[:1] # <<<<<<<<<<<<<< * ): * parsed_restriction = parsed_restriction[1:-1] */ - __pyx_mstate_global->__pyx_slice[2] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[2])) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[2] = PySlice_New(Py_None, __pyx_mstate_global->__pyx_int_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[2])) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[2]); - /* "constraint/parser.py":367 + /* "constraint/parser.py":352 * and ")" not in parsed_restriction[:1] * ): * parsed_restriction = parsed_restriction[1:-1] # <<<<<<<<<<<<<< * # check if we can turn this into the built-in numeric comparison constraint * finalized_constraint = to_numeric_constraint(parsed_restriction, params_used_list) */ - __pyx_mstate_global->__pyx_slice[3] = PySlice_New(__pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_neg_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[3])) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[3] = PySlice_New(__pyx_mstate_global->__pyx_int_1, __pyx_mstate_global->__pyx_int_neg_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[3])) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[3]); - /* "constraint/parser.py":381 + /* "constraint/parser.py":366 * * * def compile_to_constraints( # <<<<<<<<<<<<<< * constraints: list[str], domains: dict, picklable=False - * ) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 + * ) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 */ - __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 381, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<4; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -16472,16 +16449,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_slice; for (Py_ssize_t i=0; i<4; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -16498,39 +16479,39 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { - const struct { const unsigned int length: 11; } index[] = {{3},{19},{17},{52},{179},{59},{293},{27},{12},{10},{1},{1},{4},{2},{2},{2},{2},{1},{0},{1},{2},{1},{2},{2},{1},{1},{2},{1},{1},{1},{2},{1},{1},{16},{26},{8},{5},{20},{8},{6},{7},{6},{2},{35},{9},{9},{52},{46},{176},{20},{4},{21},{10},{8},{22},{18},{28},{10},{19},{18},{18},{12},{17},{16},{17},{16},{8},{20},{5},{7},{27},{26},{25},{24},{25},{24},{18},{17},{18},{5},{9},{11},{10},{11},{17},{19},{7},{22},{20},{10},{22},{17},{11},{4},{7},{3},{16},{4},{4},{4},{17},{20},{7},{8},{8},{8},{4},{7},{5},{1},{5},{18},{13},{21},{5},{3},{4},{4},{8},{14},{9},{1},{8},{12},{7},{10},{8},{4},{9},{6},{1},{6},{8},{9},{15},{14},{15},{1},{5},{6},{11},{16},{18},{35},{42},{48},{67},{50},{52},{83},{66},{49},{18},{19},{7},{9},{3},{9},{12},{1},{2},{20},{32},{7},{14},{20},{3},{11},{12},{20},{27},{27},{6},{5},{9},{15},{10},{1},{6},{4},{12},{10},{5},{18},{8},{5},{3},{5},{3},{28},{9},{8},{5},{22},{24},{21},{11},{5},{6},{5},{16},{21},{22},{1},{5},{6},{3},{23},{24},{28},{25},{9},{17},{2},{2},{223},{50},{50},{69},{2},{2},{251},{177},{45},{392},{2},{2},{2},{2},{1757},{2},{2}}; - #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (3196 bytes) */ -const char* const cstring = "(\265/\375`\206\030\225c\000\n\201\320\033;\360\0327\314\300l\000\2222\3101\342\246\001+\244\220\224A>anJ|\310\265;\331\254\355.\321:\235\"e\202$\304EH\022@\t\000\000\001@\021\202K\002QfRT\021B\004\250\001\234\001\265\001*\253\232%*j\246B\256s\214\206l\212r\222x\273\250\rn\241\022'($*\313Ux\224\002uz\350\r\215\314\230\262\300v\263#L\215\226\013\3563E\313\334\310}\345N\201&\343H\3108\"2\352LB\234Dr5\256\366L\023\03705au\325(\334\347^G\030\222Q\310\352\024\335\2218\325t\247S\315\312)7\023\322\252\351\330\206\204\214Rf\253}#GV-\304\211\224\251\001\031\021t\272\235\216\214#\271\335[\201\255.\327r\264wj\251\026\335\251\031\225n\216\236 \354\310\333\247\310\351T\243#\021\311\t\327\022vs\0233-\317S\353j!\272\027\222\223\216\262\211\344vE\242s \"$33Y24345%\010\3438R\233\221\001\031g\310\220\020\021\247\020\223\221\357\"\255\366x\247\312\022\005uPk\352`\216FY\235\344\003\032\245h\220N\327\246\233\335<\036\2123\216\264)\252S\365\246\247\201\277\234^\357\226K\221r=\275\016\225l\336\323:\273\ne\321s\244E\245h\231\252h\253[5Mu\273\371\230n\256\327Qm\307s\357t\004\252\302\221\3273\226\360\275\n\3331E\333\036\n\334\215\362\326\334S\233\035\317T\217*.*$D9Dc\312\356\326D\331\226\217\302\336\336\241\275}\246\252T+\274\031[-\325\216\233\243\343\010m\206\244\215\264\231\031\332\270w\343\331\003\252R\034f\367v(\347\352:\266\252\320^\325\221U[\315\352\325\247\232\343\211\366tU\332\243\323\321\002A\267\310\255\212\275\000b]7\317\323/\000\376\255\333z\353J\024\2138\030\005Nz\370\001\375\347\336\270\263\330L\272|\2502\313|\200\377\350\275\341\002\327o\310\000\233\223\220>\322\321?\312\370\270\016\203{I.d\263\354\255I|\211\206\031k\310\020+\2221\014\310\207\371_\277\351\017\375\n\347o\236\327c\334Y\371\364\237t_\367\363w\344\r\331\346\344\377\336\033\017\210\017\001\233\213p\237%\016\305|2\346\260\206;`\001\330\350EyE(~@7ro.\201\2732L\200\025\365[\360\376|\260\027u\014\330|{y\036\347\227:J\277\260\271\017\261Yw\\\347\350\334\r\016\3650e\030;\000(\350B8\230I\277\0011\337""\270l\260\315\247j\311\252\353\n\344|\003\253\200V*+\325\226\245p]}\351N\325\022\345\225\373D\371\272\003\362\265e\317\335j\336>\333\315\313R\312d\365\346|\003\177h\n,\317\235\352\335\246\272*\270\2436\273Y\266,\253Vu\2452\3215m\317\335[\321\266\007\364\tW^\232\272\267n\266\204\306T{2%\234-\313ss`\311\327V*\ne\333\315y\225\345\261\275\236>\257R\224\307\203\301m\356\340\336\033m\321\315}\352\331\226\224\234m\271\267\211\236)P\345\225|\247\226\373TM^\252\346\2462\365n\233\245o\267h\273\243\312\262\344\033\030\264\206\033\337\301\360q\304\240\227\037\020\273p|\216x \376\301-\260\003\t\313`\233\3067\3508\256~Sv\376c\366g\r\246OQ\210\025\003`\211\243>\3534\267eV\351\026\2609G\364\211`>L\307\267y\016\230\201\356\031\004\305\333L\006\347\274\004\257Q\014\202x$s\3102\231%\216\241}]\224\305\001\261\360Uy\311\367\364\0371\020V\201\333\327c\342\3275\334\210\027\000\013HGr\r\210\026b\030\274\362\372\272\306\013\000\245+\303o\274\000f\000\r]\004\263\255_h\231)\236\361\370\036\000\277\030K\230\003\336\025_\353\262\231+\203\025_\004E\214\235\376\032\352C\345~n\344\333\336\247~\353!\256\203\354\2031\024$\024fR\326\301\027/\353\r\374\210\223\243\342\216\253\367\307\333|\226\033\313\300\276\250\236\321 \213_0>\206\367\2718\027\346\346KWa\010#\210u\357\355\035\251\370\026/\200\210\256\202\327\354!\233\0034\261\2008\025\373\3006\270&\025\365\315o:}\247\246\337\224\363o\362\203\314\306\0211\013L\356h\263Y\211\210BL\222_\362.N\211\311X \336\301\005\360\3575\271\370\267~\341I\317\273\356\020\375\300m(\202<\3749\212\367yK\177I\351+\025}N\324D&\031E\336qG|\3028x\006\007\3008\257\355M\332\360\033/\320Gx\226N\366\212XQ\326 {i~\243a\266\275\003\257\2047{\007\303\3160F\306[\257\t\301\307\2718\370\327=\372\351\246\270I\303\333\3206L \230\311W\340\375\360\024=\240\303\334\035B\227\0362\274p\376\025\277\376\3638\362\027\241\312/\364\205Z\376O\221d\350\017\271\374\\l\3021+\020\263\207\n\331,|\251\261\301$\214\202\361}""\276O\312O\300\002b8\300\354zJwa\210I\340\007&\367\346B\014\364\t\205\231\354\026\262n\2721\256\303>\377\231\364c\210\t\262D|\000O\371\016\257\323\201n\323\320\326\023\\\331L\201\342&\277\304\346\014]y!\266\362-\226\021\312*\262\003\216C\034\020qd\233\\\303\021}#b\217L\300\004\337`\025\212\032\361\224qrOl\213c\310y\324\340DT\356\220\005d!\313\305L1\201\345J\314`>\207\213`\016\030E\342\313j@~CQ\346\033\r\300'\020\3745\231\375\"\321\377\021#\210=\266\037p\003\211\3156\330\005\344\025\371\271\023\262[\274\021\013\275ZR\256\215;/\375\034\361F\004*\371\270\367b\312\2150\0338\276@\237\210\025\315\335\337\341\376\021\361E\224\220\017b\034\230W\361\352\251\301`]6\035XE\343k\304\002<\336\214\237\361\352\267$6{t\020\367AA)\351W\305\310\244l\343\3613<9\303\275\034G$\025\014\322\354\025|\031\3748\273\331*\356C\313B\3741\371&\305\221\"\016\346\203\300(\260R\214\022\307\374`}b\361\037\315R\234\007C\266\367cU\222\001Z\001\277\207A\305\230\202#z\000\025|\364\257d\r}\024-\347\372\245\356\352Y\343\026\213\\\013\200\024\205p\216\203\336D\300(\345\177\3200\257nV[\2555\005\255\316d}+\272$\207!\027\365H\003\201\372\224?[u.\2331\353b\006k \352A\021\241\342J\256\224\335\362\336H\337,\304\224\242\354\212 \243\233\215\305\371\311BU\264\213\016m\306\025\253\365\376\220\n\223\320\3623\242R#\314E'=\2445\373\017\303\361@!:\255\364\321q\204\255\220\n\31530\364\255\223?m>\342\234\322\302*\231\027\326\326\rNmx\265m`u\n\034\251\230S\251\000H\007\231C\265\222\245\276\3323\226\353\007\262\253^5;7R #\312\254\263\310\022\005e\365\214'\203\327\314)\355\227\261\024c\215\337%\346\017\365\217`\251\202\021\022\365l`\334A~V\255\276\030\263pR\310g\r\222\336\255Co\330\305\355\323\265[\245A\241\340\205\265j\t-)\306\312\313\263;\224nS\032^\271\213\021\341\240\337C\260\331W*I\237\231\200y\374\233\241=\345\267\014\353\222jQ\220|\345n$y\247\234\0225d,\323H\2026-p \364>I\362I""\272\317}\021\020T\200C\315X\257o\246w\236D\205W[ \344p\201\245\263re\344X\230\257\372x\252\003;\264?\316\271a\337\323\224$x\357\201x\321\021\373\323Od\260wV!\325\316bIw\205gc\333%A\303<%\207\177\036\001p\371L\357\323\373VTh\371\347\315\023\022~$\266\202\371g-\221\336\221\004K\177lp;\373\300\373_` 9\3714\2471=\342\323\271({\372\237]s\333\3562+\373\226H\014L\244]\225\327\004M\230\024gX\020C\233(a\224\004\0029\325`\362\343r\302\340\273*NJ\002\005\241\3029\376\213#\006\350\302\264\307\r\267\020\272\022V-\"\252\271\\W#\265\004zaXp\203\034\225B}uW\007\326@\322eCnlSi\004\022\314\343\325\203|B\016\003\373\301\344\177\323\234\300\005\202C\307\263U\262Y\214p_\236\372A@\353\235;Z\000\246\025K\036'\037\244qE}\031\234\375K\233y\370\253\030\370\031s\244\204./\3177\320^\230\210G\362\366\221\230\257\310Yz\301*8k\341\201u\366i3\266\214\365K\220\326\206\201\031\005.\356\026\370\222.\241TN\220\231\241x\342\351In\255)\000\241\246\236q\321\215\360\260\034\023p\023\341\215\335\253O\342l\335\273\320\317\340\375\275\037\376n\241\027\354\327b'\2012\\ \r\350\021\302\022\224\001\306\330\032iA]\013q{\305\300K\374\202\261\022\023Z~\222H\022C\334\034\001"; - PyObject *data = __Pyx_DecompressString(cstring, 3196, 3); + const struct { const unsigned int length: 11; } index[] = {{3},{50},{19},{17},{294},{52},{179},{12},{10},{1},{1},{4},{2},{2},{2},{2},{1},{0},{1},{2},{1},{2},{2},{1},{1},{2},{1},{1},{1},{2},{1},{1},{16},{26},{8},{5},{20},{8},{6},{7},{6},{2},{18},{35},{9},{9},{46},{40},{176},{20},{4},{21},{10},{8},{22},{18},{28},{10},{19},{18},{18},{12},{17},{16},{17},{16},{20},{7},{27},{26},{25},{24},{25},{24},{18},{17},{18},{5},{9},{11},{10},{11},{17},{19},{7},{22},{20},{10},{22},{17},{11},{4},{7},{3},{16},{4},{4},{4},{17},{20},{7},{8},{8},{8},{4},{7},{5},{1},{5},{18},{13},{21},{5},{3},{4},{4},{8},{14},{9},{1},{8},{12},{7},{10},{8},{4},{9},{6},{1},{6},{8},{9},{15},{14},{15},{1},{5},{6},{11},{16},{18},{35},{42},{48},{67},{50},{52},{83},{66},{49},{18},{19},{7},{9},{3},{9},{12},{1},{2},{20},{32},{7},{14},{20},{3},{11},{12},{20},{27},{27},{6},{5},{9},{15},{10},{1},{6},{4},{12},{10},{5},{18},{8},{5},{3},{5},{3},{28},{9},{8},{5},{22},{24},{21},{11},{5},{5},{16},{21},{22},{1},{5},{6},{3},{23},{24},{28},{25},{9},{17},{2},{2},{223},{50},{50},{69},{2},{2},{251},{176},{45},{392},{2},{2},{2},{2},{1757},{2},{2}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (3170 bytes) */ +const char* const cstring = "(\265/\375`U\030\305b\000\372\200\304\033:\340\032=0\314\363D\204\201k1\236\347y\236\347y>\256\205k1\233'\\\311+\270\302\312\262\032\341\207\333\\\365J\364\013\364Bv\201\276\205\332G\321\024\252\225\036\252\207\333\021\001\250\001\235\001\264\001QeY\266\374UY\325,QQ3\005\266;\307h\310\246('i\307\213\334\037\027*q~@\242\262\\\201G\351\253\303Cohd\304\224}]\316\21205\032\356\307\317\024-qb\333+y\372\232\210#!\342\210\210\2303\tq\022\301\325Z\225g\232\364\336\324\204\335U\"\220\237|\025aHD \273STG\342T\313\235N5+'\334L\210\253\246\242\033\022\"J\231\356\356\211\034Y\265\020\247Q\246\006DD\310\345r#\342\010\216\363\326\327\315\341\334\026\345\235[dQ\236n\225\2673\243R\336\242'\010+\356\370)r:\325\344HDp\300\265\204\345\255\211\231\226\347\271s\265\220\334\013\311IG\331Dr\273\"\3318\020\021\222\231\231,\031\232\031\232\232\022\004Q\034\251\315\310\200\2103cH\210\210S\210\t/*\341-o\353\360*\224EO\221\026\225\242e\252\242\356v\3254\335.o\305\224\267{\025UW<9O\305W\005\212\273\036\261\244\345+\320\025S\324\345\241\257N\334\251b\313\333v\363L\335\333\212\255k\362)\316\212g\272E\025\027\025\022\242\034\"1e\271k\242\"\220\307u(\217\237\251*\345\002oDwK\271\"\027[T\034\241\315\2144\22163C\023\271N\375\247\334\317\375\374\035z\203\2669\371\276\370\306\003\342C\300\352\"\362\263\302\241\230?\316\255\274\345\016Y@6\212Qb\021\212\037\320\215\340\033L\000\257\004\023`\303\035\027\304>\377\353E\035\003V\337\342\235'\375RG\351\0276\370!V\357Nv\216\336\302""\277\340\016\246\004c\007\000\005]\010\007\365\3507 \352\033\227M\266\371T-Yu]\337\266\345oU\372Z\251\254\224[\226\300u\355\245)\014z\371\001\263\013\307\347\230\007f\237\334\";\214\262L\266i|\203\216\003\3578E\347?f\177\326`\372\024\205\3300@\2268\352\263N\203[j\225n\001\253qD\237\010\346\303t|\233\347\200\031\354\236A0\274\315drNL\020\033\305 \204G4\007-\243Y\346\030\332\337C\331\0340\003c\225x\214O\3771\277\262\212\354\306\036\023\276\256\001G\274\000X@:\022\\\300.\3140y%\356u\215\027\000JW\206\337x\001\314\000\032\272\010j[\277\3304\323<\343\361=\000\3760\226P\007\304+\276\326e3X\006\033\276\010\206\030\272\3757\324\207\302}\334\310\267\305O\375\326C`\007\272'c(H(\324#\235\223/b\326\033x\221\244\243\346\216\253\370\307\333|\026<\313\310\275\250\236\321 \233_0>\206\357\301$\014s\363%\254\020\204\021\324>\341\320\234\213o\361H\305\267x\001Dt\025\274j\017Y\035\260\205\005\302\251\331G\266\3115\251\250o~\323\351;5\375\246\234\177\243\037hv\216\230Y\344QG\233\325JB\024a\022\375\242us\312<\316\002\263N.\220}\261\311\305\277\365\013?\372\266\357\016\321\017\340\206!\310\303\257\243v\177\267\364\227\224\276R\321o\205[\310D\243\320|\356\230O\231\224gr\200\214\023\333\342\244\r\277\021\277>\302\263\364\261W\304\206\262\006YL\363\033\r\265-\036\210%\274\331;\030v\202\261q\336\212M\010>\t\223\262\257{\364\023N\201\223\202\267\240-\230@P\217\261@\374\341)z@\207\301:\204\256\035\014\276\356\363\344\370\207P\345\027\372B-\377gH2\364\207\\>n6\345\230\025\210\331C\205\254\006""\276\324\330\344QF\301\370>\337'\345'`\275\030\0160\272\236\322]\030f\022\371\201\t\276\301\020\003}B\241\036\273\205\254\233p\014\354\300\317\177&\375\030a\002-1\037\310S\276\303\353\364\027n\n\332z\002,\233)P\334\350\227\331\234\241+/B\227\276\3152@Z\205v [\210\003!\016m\243k$\3217\022\366\320\004L\362MV\241\250\tO\232\244{f\333\0343\326\242F+D\351\016Z\200\006\262\\\324\024\023X\260\304\014\346\267r\221\314!\243H|Y\r\310o\030\312|\243\001\371\004\242\215Mf\177H\364}\302\010a\217\355\007\334@b\265Mv\001\211E|\360\204\3546o\314B\261\226\024l\003\327K\037'\274\t\201J>\031_L\301\021f\003\307\027\350\023\261\241\251\373:\362\037\t_B\t\372`\306\221w\025\257\236\032\014\326e\323\221U4\276F,\300#\316\370\031\361\216Kb\265G\007\201\037\024\224\222~U\014=\3226\036?\303\21732\3468\032\251`\220f\257_\314\340\305\331\rW\201\037\\\026\341\217\3117\031\216\014I\230\017\"\243\310J3\312\0343\340\223\367\211\305\177\360\243\315,#\362G\025\357\340\331\256QW\374\212\020\212_\341]:\207\245\202\014>Oz\016\277\301\360\367\274\340\021\267~{\251n\323/b\210\230\305'\365*x\303\021\2601\306\332\230\211E\010\3768\217~\224\307x\303\267\034\031}\226O\312/\027\357\007\274\230\360\215\212~\021\315'\347\031Z\202\200\250\022\273\214%\231S$2\"\222$)\244\003\"\030\014\020\215\306i*l\037\262\332\230E\306(cFDDDD\002\021IA\312((\2445x89\310\200\013E@\301\350OHb,\023\034\014\210O\313\002\\N\214B\301-\004P5\242U\314\225\0252\276\227 \301\253\247\001\213U\223\264\331z\016?a\2208\356]9\325\305Kpk\000\205\235h\321T\324\332\370\340#\371\325\335\206\356%\240\347>\272\247@\227\236\271k\344\2377\246\372(B!X\306\016\364\200%\305\263\022v\306\335\225z\276|c\014\200~L\324\276yo2gI\306\014\r\355\032\240\300\013\241\325%PE\025&\036\351`Q\263]\177\t\352\242\236\361\3545\224A\370m\265i\244\253\036\261\246k\366\200\276\310\251\272\313\245\3208m\233\201\270L\330\326b\007t\230\326\337\220\362\214s\360\327V_\036\336\235\277c\222uC\374\300\241\n\t\335D\207E\265E\311\020P\233/n\223\027\312\277\264\263]\216\343F\036#\020""\342\223\303I\214\307\242\007\033\206\352\331\222~,k\214\004\311\355\230w\3436\254)\242J\225\305\321N\0079\256\t\245\262g\370\003\265\024\335\336\354\350\273\364\225Ll\2308o\213\266\371\354+\030w\234^\263y0\345\326\002b\000;U\213\327\344\3076\330;M\240Ru\262\347\006v%\031\237\010\032F\277\201\246\232\217\2401\260\237\313HA\273\321Y\233\"\277tJ\364\002|\364\347\271\306\325\227{2\232\247\333h,\336\254\233\2501kO!mWXD\267\214 \021\314_D\333\016\271\307\307}\241G(\r+\333\275\252F\306Ci5\256&\373\377\022\\@\354\234\016k\204\262\027\353\375\202\304\367`\356*>\344'w3\332\237\010ET@\234\222\007I\315\301\030*\235\0361v\036F\356\343Q\240\267\247[\223)\346\316\020s\203:Wo\000\350\331\227K\302_\377l\243tXk\007}Jb\211\002\351\212'h\327\254\241\276\200\224\243\nf\322U.(F6H\246\343s%Rh\327\276_O\224-y\303\0274\347\211\222\242\203\2230\267\373\226\177=\002M\203Q\231\224\340pZ\3143ZbH\324\334\217L\236}\3552\362)\240ak\024[\265\004\226\331T\330)\332{\\\372\r\353\2768\226\377\220\237\017\236\341j\373\306q\344n\266q\336\336\005'1FE0\000\237\342a\022\312Oj9\324O!\253\001\217\013Z\344%\200\326)\224|\273\275\345@\031\312\370\"\000W%\313\210\254\201\202\372\316$\337\212U\222\224\311\221\375' \240:\255\317\346\316q}lx\230\301\336\177\005S\344)\302\237\303\302\005\336\333\203\232\031L?\227\004\010ht\023Xp<\031\356G\233\350\210f\\\261Z\257\021\251 \363 \3314\017\304\177\273h\242 n\325\200\275\225z\037\274\036(\177h1\363i\246CJ\350C\207H\016\211\300\2201D;\244\204\212\026\216\320\017\003\034\271E\362\246\t%.\247[p+\357\302L\267\211\3244\257\277?\246\257@X%\231\352\007\242u\310\034\251[\002u\353<\003\256\337(N\325\377\263z\323\203q\242\243-\007A\"_;\362\274\026\370\202\234V\364\220\226JB\223_\214\370 \250\021\364\256\200s\242\237\025J\247\231\037\020\247\217\216YL\251\240Y\n\244]\004B\020v\325\235\322\272\372zB\211\345E\265\265\202\206ru5g\351\035\252\341)\t\257\276\333x\030\220\271\020\374\361\365%cj\3721\201\314f(\232\0345S])\353)2hQA\220\201\247|\005\321E\215_>\007*\235@.b\364K\226\032\245%,""v\376.=e\207>5-\033\356q\003\263\222E\232k\361\262\354\224\3273T\372o\337\244\222\3709\242C \264\266\277\276\277\241T\034d\032\302I\303\022\366\357\307H\235\024\213hR\307\014\224\030j!DV\304\341$\342\202s\266DM=\002M1\034\236Ve""\200\314\2140\3271m\257\234\307\002\200\262/J\212\302y;\377\010\235\026y)\253\234\021\205d`\023\226\303\217QGz\361\351e\352\245;\\\\z\315S\227\262\331\246\363ND\022\271\214\222\r\352\370{\220\264\363\215\014sGb\355\206\336\35540\300\206\231\313~\372\223\262\265\027\251!\314T\270\327\360].}\025\342\370\335\014\331\272$\\\343ON\313x\342j`\310\231\325\226\312\n{\213\365<\236\221\241\360\245{\311\r^\016\365j\267+\001\314\267\223'+\340A\240`<\026\271q\310\2358\010px|2\3602\253\226\222c4\214j\3132h\354\264\014\321\320\246\322!\300\257\220\325\224\350JR\231\023\242\321E\205\223\273;\n\322nK\272i\346\366lE\370s2\003\020\303,J\372\3340\220DG\235\254\321\236v\204!\315\031\335\251\\\366\034\264z\021\3371\260\327\307\275m\241\365h\0333>\010\352,\233%\361\304\300\346}!b \034\035\270v\314\275\233\255\365PLL[L\233\306\232\272-\027Z\007\243\275\1771\004\2027n\3369\036\225\313\276i\032\3437+\247\001\205z\211p\032[\215\254\327J\021G\363\035\3517\207\262p\236s\373m\262[Gc\213\037;\271\347\244$\222YI\313\230\363\234;\244\222J\023\322\342\346lL\031\003\231\200\231\006L\247\007\347\370\361*r)\261\206f\2029\234TG5\016\037\246\262e\351\274\240\233\342\032\376mF\274k\005\255\206f33u'9\357I\272\207VR\027\220\352\362M\357\2423!\257\220\355\263332\324t\245\003CX\342kM)D7Y\251M\352\312\0162\2638\302\326S\0067\305-:Jd\366p@\257\007\300\233\247\271\327D\353\316\211\2040Ufffh%Ii\033\213o\3422\242D\t\354)0\2529;\207|\352aJ=\355\260\315\202\263\223\322E\372\024\263\022\255K\257Z\315vf\313\273\255\370\001Bb\3255\346\332\3311z\240\261\240\260\344+\301q\243V\330\336\211\326\276\365\"\321\225{7\261\2276p\257\276\257C\247;\273i;/\274\351\327\311\314MkY\033wD\262\256D\304\220\252\304\311z]\246\361\004\3046\265\365\001r\317\004\206\335\300\310\310\272\023#\232\317\222\312\235\304\312V\271\263\267\223\202J\312\3679&q\367Y02\210l\252\246\375]\266\311\351cK\017\241-\357=\237\304\321\312>:\221l\355{\tx\351\241\312I\360\341\252,s\013\000e\223\366\031\2739\330F9c\010\352\330=\033\275\271&$\254\343\014\304;X\231\2250{\224\317\272:\223\264\365\265?o\247\302\031\"E\314\212&\236\313\211\274\323\256\223\250ha\337}o\206\301\202\372\341\251\016)~\204\033\232\002\357\201Z\261\322]\230\366ODL\177\253&9\264Z\226\366k\027p\340\213\266\365\267LzQ\357\036\357mV\265\265\207o\246z\365\211'|\217\247\305WH\253\337\"\322\331\364\212\\(\266\332J\203\371\373\214\207\250\374\3234\244\372`y\375\2020{\212\346\362~\3478d&\305\325[%g\343\342\342\252\342\3115\305g:\361_z\0100r\035\013B \347\333\034\356\222I\346f\241b3\260\213UVh\345\326hF\227S \264\245\017r\251C\336\231\324\372\210\260\302\322ki-\005U\213Np\354\332\3321|4]\220\231\2010\236\345\254\327y\260\"\225\226\341\367\t$\325Md\220\035\366\363e\224\257\013dI\312\245s\326\014\341\\g\271\262\311KO\347\337\225\013)\241As\342i\325\234lr\255s\212\271\250\373\315\262\304\224\362\337\033\276\336\250\352io\374]\311\024\341B@\017\177s\310"; - PyObject *data = __Pyx_DecompressString(cstring, 3276, 2); + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (3246 bytes) */ +const char* const cstring = "BZh91AY&SY\021z\037\314\000\002\016\177\377\377\377\377\377\377\377\377\377\277\377\377\377\377\377\377\377@@@@@@@@@@@@@\000@\000`\014=\337\003\326\367w\260\357\033\225\266\273;\303=-A\241\273\234\323v\033\300\000\016\363\330J\021!\006\205\017\324d\233S\311\247\24044\311<\023JzO&\230Li\251\352b\036\212dy\251\r\250\3614#d\310\311\246\232'\251\240\320\211\246\002h\020)\2645M=\t\344\312\001\264\010\320\006A\240\000\000h\000\014\206OH\006\200\006\210\302\232\023CS\"d4d\032\r\006\324\000\000\006\200\000\000\000\000\000\000\0004\tM\020\232M52\247\342\236I\264\210\311\270\260 \2645*t\030\344\311\264\357\326d\222I%\302\305S6?\320\016%\013o\220\355\005A\303\256)\224k\210\223\010s\210\354\352\210:\370\360\267v\270\303\225\002\337\344\032r\372\350[\026\333<\245\352\224\362r\262\334\013`d\2669\rK9\330\363\312w0wW-\366\321G\2725\337\027%\033\261\351\025;\354\215\247\257\201\325\374\0162\351\276\354K\373Z\026\325\270\214\026\n3]EW\177^\"#\005]\251\202\002\321:\025]\256y\027\212\302\347\2241\005\237E\\!M\020\202d\t\022 p\202\022\022@\177\025L(\202H\034\032\001\306G\334\255\001\262\035""\033\224\roB\361\207\310hX\336\343\020\261@9\237\217H\021\356\356\010\010\027\3545\246\2134\303r\024\275fMP\013^F\303\332n\374\312\256\320\202~\000Q\023dD\247\013#\241J\3169\n\3710E\036\037\020\036hr\351=\371\326\272\327\235\330\251\nh\361\252\247'Tb@<-\324T\365p9o\321\320\310i#\370\204*$\253\2775\371`\272k[\255\013\220\242\214J\007\305=Q\265}h\262\316\037\010M\275\271we\2760\277\016\371\301V&\364P\036r\242a\360\201\205U\332\366@\303\266\235\001\2438k\234L\273\025\267\002O=\000\312 K)\220A&1|\2540\254\026c\030\253\274UlD&\337u\333:\257\332{\317\211$\251b\301\002\276%\tz\025\362\3614].\3359\311Ma\033^\324\220f\340\311H\312\254I\221\231\333o\030IB\256\246x.!\341\214\3337\03086\242`\363\326\362\326S\274\230j\335J\332\370W%\356\037#\222O\277A\222\343\014\210\312\252of\353\266\027V\376@}I\017\334\255\346;\270gF|Z\325}d\214\004\313\346#\370\256\325\026\320\272\270\031c\344\231\032\331WF\001R\350\354\3247v\177(\345\345\356Qv^\035\273\314j7=\352\007\347h\244\274\355<\377\353\353\317\020\215\033\251\032q\235\254\342W\314\227j\235\203.\356\337\355\2005K\230\026\355H\221O\301\010{\031b\357\001J\221\325]kJ\306\355v\007\331\205hU,\013:\324\213h\220\342\353\276\307\254>\364\370\017\321\253J\302\302%\236q\352\323#\236\002\323;\21770\315\360\021g\353z\005>\345\026\3071P\203\271\260\310zO\334\310'\300\227\033\236\261\0309\nf\332o\2370\301M[\\\332\305(;\027\327\312\267\3165\005g;A\324\266d\330\334S<\027\005T\230\353)ksQ\"p\010\254 \223\236xe\331G\302J\222\301\310\251h\231\212Y\2130c\310\036AA\244NP4\006f\362\214]\225p\025\351j+\235HDP\"\004r\322\222\316\303\024\021\213\"\335\317@$\232\251\255$\342>}\352\250\263r\332\024\206\023\215\016\310Dq8g\205\367\262\270\376\376P\221[3\260xp\321\247\nq?\365v\034\357\006\031\302\252\225\0041\350\262/fM\201)U\377\213\271\"\234(H\010\275\017\346\000"; + PyObject *data = __Pyx_DecompressString(cstring, 3246, 2); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (3177 bytes) */ -const char* const cstring = "x\332\305WK{\323H\026M \001\003N'&\016\341\021@\316\203\274\023\034B\200<\3403\001\272i\246!NBx8n\265l\225\023\201-\331\222\234\216\351\236\371f\351\245\226Zj\251\245\226Zj\351e-\275\364O\340'\314\275%\333q^\014\314f\302g\251TU\367\326\255{\3179U\214&\223/\345=!+\211\\Z\311\345\005U\320\025\225kt)y\342w\274Vt.\257h\232\224\312\222\305\326\231\332\256R\314\212\\\212p\243++\243\034\364\214FVF\2478IC\033\302\351\273\202\316\255\226\364]E\306>\221d\245\024\372$\331\022\247\351\252\224\326\211\212\223dn\355\371\332\364\374\303yN\220EN%\237HZ\3278\255\230Jg\005M#\032\247d\270TQ\312\352\222\314\351\245<\321f\270\227\031\256\244\0249\231\020\221\323\025.\017\363Z\r\364]\"s\032\321\261\301\215\n\262\254\350\202.)2\017\346\222\2743\312\211\222\n\213H{\004\255_\010Y\215\314\274\311\343\014!\233x+\303;\021\313f\237\027\212BvU\221!VA\222\365)\016\372\236I\231\014Q\211\254\037\364'\223GL\177\223\344\215b\256\325pKP%\001\322w|\344\371\276\220\326O\231}\322\330o\302\376i\276\217\215\300jk\252\"\236\022\310\321!\266\332i\363O\034\204\025O\365\177t\350X\222\330\364LV\021`h\235\370p\200\376\246\007\215\233\235\330\366\377MNLDV\270\261\345\225\361)\216\2738\363\344\361\312\343\345\277WV\246'\307\022\302\364\227\330\364G~\370\356\364\243\344\304\370\301w\362\310\210 \212\274\214\230D\204\245\233Q\315\002\2245\242\316\344K\211\311\351\344\223mqR$\031N\035\023%\rc 2>w\322\210^\231H\000&\225\023\030t\345\035\204\373\301\366`\206?Y\314J\232\236\200\336$k\350\305|\226$Z3\324\034\237\342\374D@{\n\370\"\223d\262\325\306\037l\265\364\215\232\366\311\344E\256\3767\366d9\262=1\216\311\362;\376\206\337\020\227\023\364\364.71\001\344\3219\330=4'ZmV\022\333\177\216o\213\311\361\355\351\246MJ\222\005\265\304M/ry`\010\021\201_\251\022\267'\250\263r1\007\354\235Mg\025\r\267?\336\364\224\230\334\236\230Mr\207\377\032\253ONq\023S\334\254?\031c@\016\027e\302\243\210\3444\016\323\3507\023\376\213\227d\221\354'F\307\027A\t\364\242*s\313~\302\037\237\314\276\343<]\005\205\222\262X\214\027E\231\201\252u\254""\321:\001\321\307\371v\334A\243g\023t\350\030\310\217R\360\030\313\216\362\277\301\t\236_+\355\303\357\031\220\200\177M\366\365u\222a\000\330z\276\376\364\315\306\363o\320\360t\2618\225\213\247)\306\251\342p\232|\tZINK\312LZQ\225\"\2503\321x\236I0\277CtI'9\374\204n\250)\017\026i\222\022\322\237\021@$\255\360\214\205ZZ\021\t\257\244P\362\017N\226\203\226\326\322\3443JQ\026[;\000*R\232\2609R\226\324_\274^\367\315Bl\014\212\207\373\032\315\203\326\314\211\3433\276@\264\214\301\212\272\250\344\240\r\214\027\tBO\322%R\217\216\300\331I\366\2018\373@\237}\334\263\3167\016R-\003\334\312J_\016\305\002}\242\220\315\342\013\022\246fT%\367\231\224 \217\031\000\232\377\334!2\272\333\201\034\347%\306\016H\351\221uyI\343\233U\200\266\242\362\030\212\206\311\360\211\213\345\320\3005z\317\222\214\216?\034bo\225\340\206D\242\262/\355O!\017\245\303.|\002\215\353\025bm,rN\021\213\220i\370\223\205\034\274!@\035\177\274\246+y\177=E\311d\340\004nl\276\231\204f\303\017\374\340\023\227>\370R\245\235]=\317$\301\327\205\272:\0245\"\2664y\224CV#\330C\363\020\321\216\367\314,g\2254$\344\361L=\235\337\232\242\222|\026\320\3127W\376\316\231\274\226\207\242|k>\224\243^\272R\013\010~(\270\223]\374\027\213\\\021nOp\254|w\226|\334\000l\322\337\212\363G\003\377\016\227?\354\201\031\210\255\026\307{`\253:\260K\316K\351\317\354d\310+y \350\036\303+\317c:} \253*\034/;d\277\016\373\275\272\360\235\324\207\034cQ\010\262^\207\301a4\234\204\r\210\251%\254\326\010[\333\240\232D\220\211xR\037_\224\245B\221\034\032\362\273\032r\350\037\233\214@\354\2019\363\033M\232\373\237\310s\270.\013jz\027\265\214\347\201\257uBC\013nB\002\240\206\205\315\036\207\022\312zt\"\302\366U\035\272q$\0177p\364\231\207(5\tt=#A?\217\n\014\327\033\031\246\347\362\360\225/\361\274\016\256\340\271\253*\177\236\214\347\3230{\"\004Z.\024\354\377\007\376-\277\210\007h=5Ma9\372\315d\347X'\313\317\036\010h\221\260\207\006E?\250\373!\333\023\272}\353F\277V\314\347\025\025Ru0\2439vt\341\306\300A\203\207\377\264\3402V\324\211\376;V\355\033\264""\"\325\013\027\277\236k\273\020,\337+\013\345}C3\207\314\270)T\203\275F\024\373\007\3149\363\275\025\2672v\254\032\270i\256\233\373V\301>g\013\265\300\245\362}\243\303\210\031\033f;\2756i\317\331\033\316\031g\330\021\034\315\215\320\2457\025\225\306\327\231\233j\240\217\366\2150\037\253v\201\336}\352\rz?\323WI\232\374\235\376\316\343\"ac\311\314X1+\216^1\216/f\257\271j\026\254\000\035[t#\265`w\371/\214\253\332\323O\373\307\355P54\200\303\354s\332\216\343*\213f\234\336\332\244\233o\351\333\255j\240\273\\\200\355\005~*g\315;V\273\025\252\202\337\371\262fD\252\301\260\261j\024\314v\260\241\275\030\365\2263\347\304k\030\347\277c\265o[\364\033\272\0315clS\314\202\266\r\230\277X\261\257\301\266\316 \314\3363\326\215}\210\272\323\212\303\256:\273\313\302\327\213\370J\031\001\263\335\274f\335\261\317\330\221j\307\245r\264\034+o\031\367\014\321\0341\013N\334\210\323\216Y\373_.l?\202+\007\313?\343\002\335\254\034\303f\332\352\267\317\332\321j\317\2405j\207\300CO\250\026\274nF\314\005\353\212U\204\272\004\007\255A\310\336\226\035\265\2379\355N\330\211;\242;\354\022o\316\373P\021*\032]\177G\337\275\247\35734\263S\005\267\260+\332;\206>k\207|\366\030\027\314>S05+b\301r\003\260\325\236\001:0k\027\234sN\312=\343F\334{n\312\353\364\266*s\225w\220k\260\252\206G\031 RP\374\210\263\340^qU\257\327\213\321\347\037\351\307m\272\235\246i\\\225\356\3546\226\032w\242\316\257\356\247\312\271\212\340\327\251\275\032\032\301\330\253\235\347\276^i\353\274A\257O\3311;\351B\246X1;\002\345.\203\267bX\221E#n\344,\226\033\250\376Mz\363\221\033\002|\364\3342w\000_9g\331EP\030\177[Q\353\225\375\005\306\206\335\035/\316f\342.\240\206\234u\336R\355\001'\351E\252]\375P\327.@]\275\367\246\223\363\300\367ec\302\214\231\277\333Q:\225\240\t\330\304\037\364\017\201\n)\254i\260\014E\277\211\214\250ut\326\002!#\014\021\261\215|1C\346\270u\337ng\273\252^\n\326\360M\333F\350\310\212\373\301\023\320z\300\214V; _`\373\265\247\r\366\033n\353\034\264na\351\277\316\265u\3366s\366}'\340\376\004\263\327\316\30380\307xk""\216\371$]h\353\274b\000Dn\003\302\332\255\253\220\312\021[w\346\235\242\013\251\271c\211v\304\236\267Kn\273\033\252\301\247@G\227\334\005/\344\ry\233\225>\3145n6\0100\331\260;\354\347N\010\343\t#\005\242v\254\326q\013(\017\211>\017\221\007\206\240\370\214\352 \023tx\221.\256\3215`\026\0244Q\r\3340\347q\375*\206\201\025y`\214\232as\023\342\351w\332k\301.Di\304\272g\245\201\245=a\032\276c\245\000h\367l\001\276\214g\346yz;\352\204\234H\313\327e\007`\010Yz\340\024\334\263.\344\177\210\016=t\333\351\243\337*\300\354n\332=l\255B\312zF\351\350\212\033\247\217\327\351\372\006\254L/q\326Y\204\302\220\365\220\001\277\323\211\323\005\034\244\033\233\030\347\003k\020\242\007t \341\354\210\023\261\" L\035\223\366\nK\360p\253\346\r\202\234\374\005,`\314\016\\1\004c\317\334\262\026\354>\210;0`>5w-\301\322 \341\005\347'W\250\253\024\355\036\264\206\254\370\201\306A\326\255\002\352Ywy\327 \346C\213)\350uzm\002j\003S\256\323\353,\335\325\206\375mS\265.[\363\3409B'\227\335\247\340\332w\306\266\206\220\217X\275\250\213\260\037z\343.\260Pp\nMk6\206\210>\213uZr\347\\\210\005%\355\235\003\304\235s\306\350b\0344\270\2069\234B\351\255\0015\3401Kg_U\026`\004\023\tL\322A\211\240<\275\306<\214B\301\010\304\270\312\330\022\346\254n{\037\352\322\t\256\303\276\312\274\205\275,\202\302|\006lE`\177\260\353M\300\342\220\035\207\\\205#\200\346\303\006t\344\251\027\361\226@\207\366\200\315t\353\335\377aI\260\351\3525\306@m\341\364\252\006A\rfl\301\206\326-z\253\256\013\014d@\336\340\010\020\244\035\300\033\274Mo\317;/@\363\242_\003pD\241bb\177\000@=\316$\023t\372%\234~\235\200\376\353\200\360\214\363\314\275\340\365W:+\2334\016\302\221\242\251t-\210\005\007\266\325\202W\3153\310d:\004\222\205\361\364\240\014\303\271\227\006\305\307\272\300\202x\242]1>\001\273\007\3548\235\371G%VI\320\367xNV\221X\200\014\343\251\261\013\002\375O\373\265;\350\306\300M\350\252\201\210\353\232\264\307\200T\260\332C'Z\r\216\001\305cp\036\267\323\350\313\312\225J\201\256!)@\260ku?4L\371?NZ\343\330\244\232/\0254\202\034\210\263K\207U0\013\377\001]{(_"; - PyObject *data = __Pyx_DecompressString(cstring, 3177, 1); + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (3151 bytes) */ +const char* const cstring = "x\332\305V\313[\323\332\026\007\005O\325r\240R\304\007j\312C\336`\021Qy\350WQ\317\361x\217R@|@ON\332\354B\264M\332$\345P\365\336\357\014;\3140\303\0143\3140\303\014;\334\303\016\373'\370'\234\265v\332R\244x\365N.|Mv\326\332\353\261\327\343\267\366h\"\021\313d\236\344\013BfU\2215]\025$Y\347>s@|,\245\323D%\262~\204\361B\221\3113y_\310H\"\227R\2629A\025tE\345\352$%G|\302\357\222\274Q\310\036\021\335\022TIHfH\013\326\223\003!\245\237\264\277%\363w\341\340D\375\307Y`rMU\304\223\3349\306c&O\224h\315\005\263'\333h\301\303H\276Pt.\247h\232\004{\026\233\343\251\355)\205\214\310%\t7\272\2622\312\001e4\2622:\305I\032\310\351\204\323\367\004\235[-\352{\212\2144\221d\244$F\236d\212\034\230\220R:Qq\223\314\255=Y\233\236\2777\317\t\262\310\251\344=I\351\032\247\025\222\251\214\240iD\343\2244\227,H\031]\2229\275\230#\332\014\367,\315\025\225\002'\023\"r\272\302\345`_\263\200\276GdN#:.\270QA\226\025]\320%E\346A\\\222wG9QR\301\210\264OP\372\251\220\321\310\314:\361}\202m\215\220h\334\354\304\216\377?91\021Y\341\306\226W\306\2478\356\334\314\303\007+\017\226?\257\254LO\216m\013\323\037c\323\357\370\341[\323\367\023\023\343\207\337\211\2578\202(\3622\006\006\217\231j\204y\026\342\251\021u&W\334\236\234N<\334\021'E\222\346\3241Q\322\320\007\"\343s7\345'$\235Q\204zb0\2502\221\340\214*'\260\210\312\273\230\205\246\014J\232/.f$M\337\006j\202-\364B.C\266\017\367Mq\r\376\024*\252\031H\264\336\r\\X5\311$\022\347\270\332\337\330\303\345\310\316\3048\206\314'|\206\337\020\227\025\364\324\03671\001y\3249\210\001,'\232eV\266w\376\032\337\021\023\343;\323\r\231\244$\013j\221\233^\344r\220,\"B\252\223En_Pg\345B\026\ni6\225Q4<\362xC\323\366\344\316\304l\202;\372W\267>9\305MLq\263\376f\364\001\313\251 \023\036\3539\253q\030:\177\271\355\277xI\026\311\301\366\350\370\"\024\245^Pen\331\017\362\203\326\310s\034\244V\241Y\244\014&\340iAf\245\325\314\253\257Z\264\352q89\256\240N\331\204\2268\326\273_\343\3131\000\371\032\340x~\255x\000\277\307\320\002\374\013r\240\257\223\364\326\223\365G/7\236|\003RN""\206\277\023Q\345$\004<\021\352N\202dA+\312)I\231I)\252R\000l \032\3173\000\340w\211.\351$\213\237@\2064\362 \221\"I!\365\001k\206\244\024\236\265\237\226RD\302+I\004\234C\\;\\iMK>\255\024d\261\231\000\325!\245\010\333#eH\355\305\3535\335\314\305:S24\361\300\242.*YXCc\213\004\253M\322%R\363\216\300|#\007\320+\007\3201\007xf\235\257\017;-\r\355\224\221>\036\361\005h\242\220\311\340\013\002\246\246U%\373\201\024!\216i\250-\377\271KdT\267\0131\316I\254! \244_\331\345%\215od\001\326\212\312\243+\032\006\303\357UL\207\006\252Q{\206\244u\374!\213\275U\202\007\022\211\312\276\264\277\204\034\244\016I\370\204\316\255e\210\2551\311YE,@\244\341O\026\262\360\006\007u\374\361\232\256\344|{\212\222N\003\376\327\017\337\010Bc\341;~\370\211\246\017\277TiwO\3171\024\360\241\240\006\010\005\215\210MK\036\021\220\345\010\316\320\230\036\332q\312\314rFIA@\036\314\324\302\371\255-*\311e\240Z\371\206\345\357\334\311k9H\312\267\366C:j\251+6\025\301\0179\327Z\305\177\221\310\026`v\303\014\371\356(\371u\003e\223\372\226\237?\352\370w\250\374a\rL@l\2268N\201\243\352\320]rNJ}`\303 \247\344\240A\367Y\275\362<\206\323/dU\205\211\262K\016je\277_\003\276V4\3541\346\205 \353\26528Z\r\255j\003|jr\253\331\303\3465\240&\021d\"\266\242\361\005Y\312\027\310\021\226O\252\303\241?)Y\003\261\007\306\314_4\332\334\377\304>\207\313\232\240\246\366\020\313x\036\372\265\326\320\260\202+\220\000U\303\334f\217#\001e\024\235\210p|U\0072rrp\377C\2359\360R\223\000\327\323\022\320yD`\270\312\310\260=\233\203\257\\\221\347uP\005\317=U\371\253u=\237T\263-K\240\351\016\301n\247\020\017E\256\005\245\001)_\1773\3009Fd\221\331\007\350,\020\366\320 \335\207\031?\"\333\202\354K\327\351Z!\227ST\010\322\341\216\006\357k\303u\306\341\202\207\3132\232\261\242N\364\357X\245o\320\212T\316\236\373r\246\355l\260t\273$\224\016\014\315\0342\343\246P\t\366\032Q\244\017\230s\346\033+n\245\355X%p\315\\7\017\254\274}\306\026\252\201\363\245;F\207\02136\314vzy\322\236\2637\234S\316\260#8\232\033\241K/\313*\215\25735""\225@\037\355\033a:V\355<\275\365\310\033\364~\241\317\0234\361\007\375\203G#ac\311L[1+\216Z\321\217\217f\257\271j\346\255\000\035[t#\325`w\351\023\372U\351\351\247\375\343v\250\022\032@6\373\234\266\343he\321\214\323\353\233t\363\025}\265U\tt\227\362p\274\300\317\245\214y\323j\267B\025\320;_\322\214H%\0306V\215\274\331\0162\264\027\275\336r\346\234x\025\375\374;V\375\266D\277\241\233Q3\306\016\305$h\333\200\371\253\025\373\022l\353\014\302\356}c\3358\000\257;\2558\234\252\263\273$|9\207\257\244\0210\333\315\313\326M\373\224\035\251t\234/EK\261\322\226q\333\020\315\0213\357\304\2158\355\230\265\377\343\302\361#h9X\372\005\rt\263t\014\233)\253\337>mG+=\203\326\250\035\002\r=\241j\360\212\0311\027\254\213V\001\362\022\034\264\006!z[v\324~\354\264;a'\356\210\356\260K\2749\357mY(kt\3755}\375\206\276I\323\364n\005\324\302\251h\357\030\352\254\036\321\331c\2345\373L\301\324\254\210\005\346\006\340\250=\003t`\326\316;g\234\244{\312\215\270\267\335\244\327\351m\225\347\312\257!\326 U\t\217\262\202HB\362#\316\202{\321U\275^/F\237\274\243\357v\350N\212\246\320*\335\335\253\233\032w\242\316o\356\373\362\231\262\340\347\251\275\022\032A\337+\235g\276\\l\353\274J\257L\3311;\341B\244^\226\363\225\216@\251\313\340\255\030&d\321\210\033Y\213\205\006\222\177\215^\273\357\206\240[Q\353\271\375\021x\303\356\256\027g;\361\020\220B\316\372\311R\355\001'\341E*]\375\220\326.(\272\032\365\232\223\365@\367\005c\302\214\231\177\330Q:\265M\267\341\014\177\322?\005*$1\245\301\022\344\374\0326D\265\243\263\032\010\031a\360\210\235\343\243\0312\307\255;v;;T\345|\260\212o\3326BGV\334\267\236\200\322\003f\264\322\001\341\002\331/=mp\334p[\347\240u\0353\377e\256\255\363\206\231\265\3578\001\367g\330\255\302\3663\3208\306+s\314\357\321\205\266\316\213\006T\310\r(\260v\353\022Dr\304\326\235y\247\340BhnZ\242\035\261\347\355\242\333\356\206\252\360)\320\321%w\301\013yC\336f\271\017C\215\207\rB\225l\330\035\366\023'\204\376\204\261\003\242v\254\332q\035:\036\002\375\023x""\036\030\202\334\263N\007\224\240\303\213tq\215\256AcA>\267+\201\253\346<\332\257\240\033\230\221\273\306\250\03167\301\237~\247\275\032\354\302\"\215X\267\255\0244iO\230\206oZI\250\263\333\266\000_\306c\363'z#\352\204\234H\323\327\005\007\252\020\242t\327\311\273\247]\210\377\020\035\272\347\266\323\373\277\227\241\261\273i\367\260\265\n!\353\031\245\243+n\234>X\247\353\033`\231\236\347\254\323X\nC\326=V\367\235N\234. \223nl\242\237w\255A\360\036\252\003\373\315\2168\021+\002\270\3241i\257\260\000\037\201\274A@\223O\320\004\254\261\003\027\r\301\3307\267\254\005\273\017\374\016\014\230\217\314=K\2604\010x\336\371\331\025j E\273\007\255!+~\010q\020u+\217\212\273K{\0061\357Y\014@\257\320\313\023\220\033\330r\205^a\341\256\324\345o\230\252u\301\232\007\315\021:\271\354>\002\325\2762v4,\371\210\325\213\260\010\347\241WoA\023\nN\276!\315xX\321\2471OK\356\234\013\276 \242\275v\240o\347\2341\272\030\007\010\256b\014\247\020y\253\320\032\360\230\245\263\317\313\013\300\301@B'\351\000D\220\236^c\036\270\2200\002>\256\262n\tsV\267}\000y\351\004\325a\037d^\301Y\026\001`>@mE\340|p\352M\250\305!;\016\261\nG\240\232\217\n\320\221G^\304[\002\030\332\007d\246[\257\377\017&A\246\253\327\030\003\260\205\341U\t\002\032\314\330\202\r\253\353\364z\r\027X\221A\363\006G\240A\332\241x\2037\350\215y\347)@^\364K\000&\024\002&\322\003P\324\343\0141\001\246\237\301\360\353\204\352\277\002\025\236v\036\273g\275\376rgy\223\306\0018\2224\231\252\0061\341\320m\325\340%\363\024v2\035\002\310B\177z\020\205a\354\245\000\3601/`\020\007\332E\343=t\367\200\035\2473\377*\307\312\333\364\r\216\311\n6\026T\206\361\310\330\003|\376\267\375\302\035tc\240&t\311\300\212\353\232\264\307\240\251\300\332='Z\t\216A\213\307`\034\267\323\350\263\362\305r\236\256aS\000^Wkzhx\326\326\260\013q\376\367\364\371#\374\226s\032F\341\0066!]\206\33583\252=,0t\354!\300z\010e!q\264\177\316\031r\326\035\215.\372za'C\207p\277\361\211\265\304\245\313\225\201\005(\326\242w\312\033\366$\234@\033\225\033\\%\262\344F\335g^\334\023""\313\3435\217.\373\355\215\022\363N\314y\013\363\245\303{V\336\240kq&\201\010?\356E\275\307\345\263~\311\376\017\022}\230n\r|\216\037u\021!\347\254w\301\233\367\212~\210\230\374\262\033C\300\366\364\362}\377:\321l\361\016\324\241\004\261\010\303dM\341\005\007%\000e\334\373^\014\220\366\262\217\077\077.\0015\326\025\366o\\!\343<\314\211`W\351\235Q0\237Z\303\326{\347\254\333\357\235//\321-\0103L#\221\212\004\213\362\202\301\256)KF\312\014a[As\303\265\000\313\342\252\t\343\355\222y\032\025}EG\023}pm{\2133\023@\t\300\357W6\026\332\355^,Ug\332=\304\230\032\306\262+\203q\317\274m&\201\260\210\010\303\300\004t]\270\326\270\211\371m\301\256f\0058\376'\026pd\340\r\341<\275\375\033\375\r\313\004f\352\367m\362'1\2756\007\027\213\250\177M|\310n&\376M\240Z\277\242\206\215\373\020'`\234|{,b(\230\313\225\320\025\377&\331[k\2760@\253\017\007}x\332;0\256\226\234\224\3533\360&\262M\357\275\244/k\227\200\357\333\324\312\3064\203\253\243\342Ud D<\247w_\320\027x\035\246\374\237\255l\034\333T\365\241\202F\260\007\342\354\322a\345\315\374?\023\234\023\345"; + PyObject *data = __Pyx_DecompressString(cstring, 3151, 1); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #else /* compression: none (6534 bytes) */ -const char* const bytes = "']]Invalid comparator Invalid operator Not possible: comparator should be '==' or '!=', is Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Optional[Union[AllEqualConstraint, AllDifferentConstraint]]Optional[Union[MinSumConstraint, VariableMinSumConstraint, ExactSumConstraint, VariableExactSumConstraint, MaxSumConstraint, VariableMaxSumConstraint, MinProdConstraint, VariableMinProdConstraint, ExactProdConstraint, VariableExactProdConstraint, MaxProdConstraint, VariableMaxProdConstraint]]Optional[Union[int, float]]Restriction Variables /*\\*\\*\\*\\+**!= (<=), \n.?>=><|==-+([a-zA-Z_$0-9]*)([a-zA-Z_$][a-zA-Z_$0-9]*)add_note and constraint/parser.py[+-]?\\d+def r(disableenablegc is neither a string or Constraint isenabledlist[str]list[tuple[Constraint, list[str], Union[str, None]]]list[tuple[Union[Constraint, str], list[str]]]\n (?AllDifferentConstraintAllEqualConstraintCompilableFunctionConstraintConstraintExactProdConstraintExactSumConstraintFunctionConstraintFunctionTypeMaxProdConstraintMaxSumConstraintMinProdConstraintMinSumConstraintOptional__Pyx_PyDict_NextRefUnionVERBOSEVariableExactProdConstraintVariableExactSumConstraintVariableMaxProdConstraintVariableMaxSumConstraintVariableMinProdConstraintVariableMinSumConstraintasyncio.coroutines__class_getitem__cline_in_tracebackcloseco_constscode_objectcomparatorcomparatorscomparators_foundcomparators_indicescompilecompile_to_constraintscompiled_constraintsconstraintconstraint.constraintsconstraint.parserconstraintsdictdomainsendequalities_foundevalexecexprextract_operatorsfinalized_constraintfindallfinditerfromkeys__func__funcgenexprgroupiindexinequa""lities_found_is_coroutineis_or_evals_to_numberitemskeykeysleftleft_numleft_remainderleft_swapm__main__match_objectmatches__module____name__nextnext_stopnumberooffsetoperatoroperatorsoperators_foundoperators_leftoperators_rightpparamparamsparams_usedparams_used_listparse_restrictionsparse_restrictions..genexprparse_restrictions..replace_paramsparse_restrictions..replace_params_splitparse_restrictions..to_equality_constraint..genexprparse_restrictions..to_equality_constraintparse_restrictions..to_multiple_restrictionsparse_restrictions..to_numeric_constraint..genexpr..genexprparse_restrictions..to_numeric_constraint..genexprparse_restrictions..to_numeric_constraintparsed_restrictionparsed_restrictionspatternpicklablepopprev_stop__qualname__rreregex_match_variableregex_match_variable_or_constantreplacereplace_paramsreplace_params_splitresrestrictionrestrictionsrestrictions_cleanedrestrictions_cleaned_uniquerestrictions_unique_indicesreturnrightright_numright_remainderright_swapssearchsend__set_name__setdefaultsplitsplit_restrictionssplittedstartstrstripsubswapped_side_first_componenttemp_copy__test__throwto_equality_constraintto_multiple_restrictionsto_numeric_constrainttune_paramstypestypingunionunique_operatorsunique_operators_leftunique_operators_rightvvaluevaluesvarvariable_operators_leftvariable_operators_rightvariable_supported_operatorsvariable_unique_operatorsvariablesvariables_on_left\2401\2601\200A\330\025\"\240!\330\t\n\360\006\000\t\014\2103\210a\210x\220s\230#\230Q\230a\330\014\023\2201\360\006\000\t\034\2302\230X\240Q\240f\250A\330\010\035\230R\230x\240q\250\006\250a\340\010\013\2105\220\004\220A\220S\230\001\320\031+\2502\250S\260\002\260$\260a\260s\270!\320;O\310r\320QR\330\014\023\2201\330\010\025\320\025%\240Q\240f\250C\250q\3200B\300\"\300G\320K]\320]^\320^_\360\006\000\t\024\220;\230f\240A\240Q\340\010\013\2103\210a\210z\230\023\230C\230q\240\010""\320(:\270!\340\014\017\210{\230#\230Q\330\020\027\320\027)\250\021\330\021\034\230C\230q\330\020\027\320\027-\250Q\330\014\023\220:\230Q\320\036T\320TU\320UV\330\010\017\210q\200A\330\010\016\210l\230&\240\001\240\021\330\010\013\2104\210s\220!\330\014\024\220C\220q\230\001\330\014\023\320\023+\2502\250V\2602\260Q\340\014\023\2201\200A\340\010\016\210l\230&\240\001\240\021\330\010\013\2104\210s\220!\330\014\024\220C\220q\230\001\330\014\027\220t\2301\230A\330\014\023\2201\340\014\023\2201\320\000\034\230H\240A\360\014\000\005\014\2104\210v\220R\220x\230q\240\005\240Q\360\006\000\005\017\210a\360\n\000\005\017\210b\220\010\230\001\230\031\240&\250\002\250!\330\004\013\2101\210A\210V\2203\220d\230%\230q\260Q\220Q\320\004/\250~\270Q\340\010!\240\021\330\010\014\210G\2201\340\014\017\210x\220s\230$\230c\240\027\250\003\2501\330\020\"\240'\250\021\250!\330\020\021\340\014\032\230!\2306\240\026\240u\250A\330\014\"\240\"\240A\240V\2501\250D\260\001\260\024\260Q\260d\270$\270e\3002\300Y\310a\310s\320RW\320WX\320Xf\320fg\330\014\017\210s\220!\320\023(\250\003\2501\340\020\"\240'\250\021\250!\330\020\021\340\014\020\220\t\230\025\230a\230s\240!\2401\330\020\034\230A\330\020\034\320\034/\250q\260\006\260b\270\002\270!\2703\270b\300\005\300V\3102\310W\320TU\330\020\021\330\024'\240q\250\006\250b\260\002\260!\2606\270\026\270r\300\023\300A\320EZ\320Z\\\320\\c\320cf\320fg\320gh\340\020\"\240'\250\021\250)\2601\260J\270j\310\006\310a\330\010\017\210q\200\001\330\021%\240V\2501\330\005\006\360\026\000\005\033\320\032,\250A\250]\270!\330\004U\320UV\330\004\010\210\r\220_\240A\330\010\013\210:\220Q\220m\2401\340\014\017\210q\330\020\035\320\0359\270\021\270!\340\020\036\230g\240Q\240m\260<\270q\330\020\027\220|\2401\240K\250z\270\021\270$\270g\300Q\330\020\035\320\035/\250q\260\001\330\014 \240\007\240r\250\034\260]\300!\330\r\027\220q\230\r\240Q\340\014 \240\007\240r\250\035\260m\3001\340\014\022\220*\230A\230^\2501\320,[\320[\\\320\\`\320`a\320ab\360\006\000\005\014\2101\320\000""\035\230X\240Q\340\004\005\340\010\021\220\024\220Q\220a\330\010\017\210z\230\021\230)\2405\250\001\330\010\017\210q\330\013\014\340\010\017\210q\320\000%\320%=\270Y\300a\360\006\000\005\034\2301\330\004'\240q\340\004\005\360\020\000\005\006\360\024\000\005\"\240\036\250~\270Q\3602\000\005\037\230m\2505\260\010\270\016\300a\360P\007\000\005\006\330\010\025\220U\230(\240!\330\t\n\3606\000\005\026\220Q\340\010\037\230q\240\001\240\030\250\021\250%\250t\2604\260u\270A\330\010&\240d\250!\2504\250y\270\001\270\021\340\010&\240a\320';\2706\300\021\300#\300T\310\025\310a\330\010\027\220q\230\014\240A\240S\250\004\250E\260\021\360\006\000\005\024\320\023+\2501\250A\340\004\036\230a\330\004\010\210\007\210q\330\010#\2401\330\010\035\230R\230t\2401\320$:\320:P\320PT\320TZ\320Z[\330\010\033\2304\230q\240\001\330\010\037\230q\330\010\013\2107\220'\230\024\230T\240\030\250\027\260\001\340\014\r\330\020\"\240!\2403\240c\250\021\330\020\024\320\024&\240b\250\003\2503\250a\330\020\024\220D\230\007\320\0371\260\021\260!\330\020\024\220D\230\007\320\0371\260\022\2601\340\020%\320%7\260q\270\003\2701\340\014#\320#8\270\001\3209M\310Q\330\014\017\320\017$\240C\240q\340\020'\320'=\270Q\320>R\320RS\330\010\013\320\013 \240\003\2401\340\014#\2408\2501\250D\260\005\260Q\3206R\320RS\320ST\330\010\033\2307\240\"\320$:\270!\340\004\013\2101\250!\260!\240!\270!\320\004+\250=\270\016\300a\360$\000\t\014\2103\210a\210x\220s\230\"\230C\230{\250!\330\014\023\2201\340\010\026\220a\220v\230V\2406\250\025\250a\330\010\034\230B\230h\240a\240s\250%\250q\260\016\270a\340\010\013\2103\210a\320\017\"\240#\240Q\330\014\023\2201\330\010\025\320\025&\240a\240q\360\006\000\t\017\210h\220e\2308\2401\360\006\000\t\032\320\031*\250!\2501\330\010\032\320\032+\2501\250A\330\010\013\2103\210a\320\017\037\230r\240\022\2404\240s\250!\320+<\270B\270a\340\014\023\2201\330\010 \240\003\2401\240A\330\010!\240\023\240A\240Q\330\010\033\320\0330\260\006\260a\260q\330\010\013\2103\210a\320\017!\240\023\240A\330\014 \240""\003\2401\320$;\2702\270Q\330\014+\2502\250W\260A\330\0202\260(\320:Q\320QR\340\014\017\320\017,\250C\250q\340\020\027\220q\340\020/\320/K\3106\320QR\320RS\330\014\017\210t\2203\220a\330\020\023\2204\220q\340\024&\240e\2501\250C\250q\260\001\330\024 \240\017\250x\260q\270\005\270Q\330\024\"\240\"\240A\240U\250!\250:\260Q\260k\300\021\300!\360\006\000\025&\240T\250\021\250#\250Q\250a\330\024!\240\036\250x\260q\270\005\270Q\330\024\"\240\"\240A\320%B\300!\300;\310a\310v\320UV\320VW\330\014\017\210t\2203\220a\330\020\023\2204\220q\340\024&\240e\2501\250C\250q\260\001\330\024 \240\017\250x\260q\270\005\270Q\330\024\"\240\"\240A\240U\250!\250:\260Q\260k\300\021\300!\360\006\000\025&\240T\250\021\250#\250Q\250a\330\024!\240\036\250x\260q\270\005\270Q\330\024\"\240\"\240A\320%B\300!\300;\310a\310v\320UV\320VW\360\006\000\r\023\220(\230%\230x\240q\330\014\035\320\035.\250a\250q\330\014\036\320\036/\250q\260\001\330\014$\240C\240q\250\001\330\014%\240S\250\001\250\021\330\014\037\320\0374\260F\270!\2701\360\010\000\t\024\320\023(\250\001\250\021\330\010\024\320\024)\250\021\250!\330\010\014\210I\220S\230\005\230T\240\032\2503\250f\260D\270\t\300\027\310\005\310T\320Q[\320[b\320bc\340\014+\2501\250E\260\021\340\014\030\230\002\230(\240!\320#9\270\021\360\006\000\r\020\210s\220!\220;\230c\240\021\330\020\027\220q\330\014\037\230q\330\020\026\220j\240\001\240\034\250Q\320.L\310A\310[\320X]\320]^\330\014\r\330\020\023\2201\220B\220h\230a\230}\250N\270\"\270A\360\006\000\021\030\220q\360\006\000\r+\250(\260!\330\014+\2508\2601\330\014(\250\004\250A\250S\260\001\3201I\310\026\310q\320PS\320ST\320TU\340\014\r\330\020\023\2201\320\024/\250s\260!\330\020\"\240!\330\020\025\220S\230\001\320\0310\260\003\2602\260S\270\003\2701\320.genexprparse_restrictions..replace_paramsparse_restrictions..replace_params_splitparse_restrictions..to_equality_constraint..genexprparse_restrictions..to_equality_constraintparse_restrictions..to_multiple_restrictionsparse_restrictions..to_numeric_constraint..genexpr..genexprparse_restrictions..to_numeric_constraint..genexprparse_restrictions..to_numeric_constraintparsed_restrictionparsed_restrictionspatternpicklablepopprev_stop__qualname__rreregex_match_variableregex_match_variable_or_constantreplacereplace_paramsreplace_params_splitresrestrictionrestrictionsrestrictions_cleanedrestrictions_cleaned_uniquerestrictions_unique_indicesreturnrightright_numright_remainderright_swapssearchsend__set_name__setdefaultsplitsplit_restrictionssplittedstartstrstripsubswapped_side_first_componenttemp_copy__test__throwto_equality_constraintto_multiple_restrictionsto_numeric_constrainttune_paramstypesunionunique_operatorsunique_operators_leftunique_operators_rightvvaluevaluesvarvariable_operators_leftvariable_operators_rightvariable_supported_operatorsvariable_unique_operatorsvariablesvariables_on_left\2401\2601\200A\330\025\"\240!\330\t\n\360\006\000\t\014\2103\210a\210x\220s\230#\230Q\230a\330\014\023\2201\360\006\000\t\034\2302\230X\240Q\240f\250A\330\010\035\230R\230x\240q\250\006\250a\340\010\013\2105\220\004\220A\220S\230\001\320\031+\2502\250S\260\002\260$\260a\260s\270!\320;O\310r\320QR\330\014\023\2201\330\010\025\320\025%\240Q\240f\250C\250q\3200B\300\"\300G\320K]\320]^\320^_\360\006\000\t\024\220;\230f\240A\240Q\340\010\013\2103\210a\210z\230\023\230C\230q\240\010\320(:\270!\340\014\017\210{\230#\230Q\330\020""\027\320\027)\250\021\330\021\034\230C\230q\330\020\027\320\027-\250Q\330\014\023\220:\230Q\320\036T\320TU\320UV\330\010\017\210q\200A\330\010\016\210l\230&\240\001\240\021\330\010\013\2104\210s\220!\330\014\024\220C\220q\230\001\330\014\023\320\023+\2502\250V\2602\260Q\340\014\023\2201\200A\340\010\016\210l\230&\240\001\240\021\330\010\013\2104\210s\220!\330\014\024\220C\220q\230\001\330\014\027\220t\2301\230A\330\014\023\2201\340\014\023\2201\320\000\034\230H\240A\360\014\000\005\014\2104\210v\220R\220x\230q\240\005\240Q\360\006\000\005\017\210a\360\n\000\005\017\210b\220\010\230\001\230\031\240&\250\002\250!\330\004\013\2101\210A\210V\2203\220d\230%\230q\260Q\220Q\320\004/\250~\270Q\340\010!\240\021\330\010\014\210G\2201\340\014\017\210x\220s\230$\230c\240\027\250\003\2501\330\020\"\240'\250\021\250!\330\020\021\340\014\032\230!\2306\240\026\240u\250A\330\014\"\240\"\240A\240V\2501\250D\260\001\260\024\260Q\260d\270$\270e\3002\300Y\310a\310s\320RW\320WX\320Xf\320fg\330\014\017\210s\220!\320\023(\250\003\2501\340\020\"\240'\250\021\250!\330\020\021\340\014\020\220\t\230\025\230a\230s\240!\2401\330\020\034\230A\330\020\034\320\034/\250q\260\006\260b\270\002\270!\2703\270b\300\005\300V\3102\310W\320TU\330\020\021\330\024'\240q\250\006\250b\260\002\260!\2606\270\026\270r\300\023\300A\320EZ\320Z\\\320\\c\320cf\320fg\320gh\340\020\"\240'\250\021\250)\2601\260J\270j\310\006\310a\330\010\017\210q\200\001\330\021%\240V\2501\330\005\006\360\026\000\005\033\320\032,\250A\250]\270!\330\004O\310q\330\004\010\210\r\220_\240A\330\010\013\210:\220Q\220m\2401\340\014\017\210q\330\020\035\320\0359\270\021\270!\340\020\036\230g\240Q\240m\260<\270q\330\020\027\220|\2401\240K\250z\270\021\270$\270g\300Q\330\020\035\320\035/\250q\260\001\330\014 \240\007\240r\250\034\260]\300!\330\r\027\220q\230\r\240Q\340\014 \240\007\240r\250\035\260m\3001\340\014\022\220*\230A\230^\2501\320,[\320[\\\320\\`\320`a\320ab\360\006\000\005\014\2101\320\000\035\230X\240Q\340\004\005\340\010\021\220\024""\220Q\220a\330\010\017\210z\230\021\230)\2405\250\001\330\010\017\210q\330\013\014\340\010\017\210q\320\000%\320%=\270Y\300a\360\006\000\005\034\2301\330\004'\240q\340\004\005\360\020\000\005\006\360\024\000\005\"\240\036\250~\270Q\3602\000\005\037\230m\2505\260\010\270\016\300a\360r\006\000\005\006\330\010\025\220U\230(\240!\330\t\n\3606\000\005\026\220Q\340\010\037\230q\240\001\240\030\250\021\250%\250t\2604\260u\270A\330\010&\240d\250!\2504\250y\270\001\270\021\340\010&\240a\320';\2706\300\021\300#\300T\310\025\310a\330\010\027\220q\230\014\240A\240S\250\004\250E\260\021\360\006\000\005\024\320\023+\2501\250A\340\004\036\230a\330\004\010\210\007\210q\330\010#\2401\330\010\035\230R\230t\2401\320$:\320:P\320PT\320TZ\320Z[\330\010\033\2304\230q\240\001\330\010\037\230q\330\010\013\2107\220'\230\024\230T\240\030\250\027\260\001\340\014\r\330\020\"\240!\2403\240c\250\021\330\020\024\320\024&\240b\250\003\2503\250a\330\020\024\220D\230\007\320\0371\260\021\260!\330\020\024\220D\230\007\320\0371\260\022\2601\340\020%\320%7\260q\270\003\2701\340\014#\320#8\270\001\3209M\310Q\330\014\017\320\017$\240C\240q\340\020'\320'=\270Q\320>R\320RS\330\010\013\320\013 \240\003\2401\340\014#\2408\2501\250D\260\005\260Q\3206R\320RS\320ST\330\010\033\2307\240\"\320$:\270!\340\004\013\2101\250!\260!\240!\270!\320\004+\250=\270\016\300a\360\006\000\t\014\2103\210a\210x\220s\230\"\230C\230{\250!\330\014\023\2201\340\010\026\220a\220v\230V\2406\250\025\250a\330\010\034\230B\230h\240a\240s\250%\250q\260\016\270a\340\010\013\2103\210a\320\017\"\240#\240Q\330\014\023\2201\330\010\025\320\025&\240a\240q\360\006\000\t\017\210h\220e\2308\2401\360\006\000\t\032\320\031*\250!\2501\330\010\032\320\032+\2501\250A\330\010\013\2103\210a\320\017\037\230r\240\022\2404\240s\250!\320+<\270B\270a\340\014\023\2201\330\010 \240\003\2401\240A\330\010!\240\023\240A\240Q\330\010\033\320\0330\260\006\260a\260q\330\010\013\2103\210a\320\017!\240\023\240A\330\014 \240\003\2401\320$;\2702\270Q\330\014+\2502\250W""\260A\330\0202\260(\320:Q\320QR\340\014\017\320\017,\250C\250q\340\020\027\220q\340\020/\320/K\3106\320QR\320RS\330\014\017\210t\2203\220a\330\020\023\2204\220q\340\024&\240e\2501\250C\250q\260\001\330\024 \240\017\250x\260q\270\005\270Q\330\024\"\240\"\240A\240U\250!\250:\260Q\260k\300\021\300!\360\006\000\025&\240T\250\021\250#\250Q\250a\330\024!\240\036\250x\260q\270\005\270Q\330\024\"\240\"\240A\320%B\300!\300;\310a\310v\320UV\320VW\330\014\017\210t\2203\220a\330\020\023\2204\220q\340\024&\240e\2501\250C\250q\260\001\330\024 \240\017\250x\260q\270\005\270Q\330\024\"\240\"\240A\240U\250!\250:\260Q\260k\300\021\300!\360\006\000\025&\240T\250\021\250#\250Q\250a\330\024!\240\036\250x\260q\270\005\270Q\330\024\"\240\"\240A\320%B\300!\300;\310a\310v\320UV\320VW\360\006\000\r\023\220(\230%\230x\240q\330\014\035\320\035.\250a\250q\330\014\036\320\036/\250q\260\001\330\014$\240C\240q\250\001\330\014%\240S\250\001\250\021\330\014\037\320\0374\260F\270!\2701\360\010\000\t\024\320\023(\250\001\250\021\330\010\024\320\024)\250\021\250!\330\010\014\210I\220S\230\005\230T\240\032\2503\250f\260D\270\t\300\027\310\005\310T\320Q[\320[b\320bc\340\014+\2501\250E\260\021\340\014\030\230\002\230(\240!\320#9\270\021\360\006\000\r\020\210s\220!\220;\230c\240\021\330\020\027\220q\330\014\037\230q\330\020\026\220j\240\001\240\034\250Q\320.L\310A\310[\320X]\320]^\330\014\r\330\020\023\2201\220B\220h\230a\230}\250N\270\"\270A\360\006\000\021\030\220q\360\006\000\r+\250(\260!\330\014+\2508\2601\330\014(\250\004\250A\250S\260\001\3201I\310\026\310q\320PS\320ST\320TU\340\014\r\330\020\023\2201\320\024/\250s\260!\330\020\"\240!\330\020\025\220S\230\001\320\0310\260\003\2602\260S\270\003\2701\320__pyx_string_tab; Py_ssize_t pos = 0; - for (int i = 0; i < 213; i++) { + for (int i = 0; i < 210; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); if (likely(string) && i >= 54) PyUnicode_InternInPlace(&string); @@ -16541,7 +16522,7 @@ const char* const bytes = "']]Invalid comparator Invalid operator Not possible: stringtab[i] = string; pos += bytes_length; } - for (int i = 213; i < 232; i++) { + for (int i = 210; i < 229; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; @@ -16552,25 +16533,29 @@ const char* const bytes = "']]Invalid comparator Invalid operator Not possible: } } Py_XDECREF(data); - for (Py_ssize_t i = 0; i < 232; i++) { + for (Py_ssize_t i = 0; i < 229; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { - PyObject **table = stringtab + 213; + PyObject **table = stringtab + 210; for (Py_ssize_t i=0; i<19; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -16589,16 +16574,20 @@ const char* const bytes = "']]Invalid comparator Invalid operator Not possible: { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<3; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -16632,62 +16621,62 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 99}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 84}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 99}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 84}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__25, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 110}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 95}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 155}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 140}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 175}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 160}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_var}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 184}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 169}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__26, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 185}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 170}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 190}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 175}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__27, 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), 282}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 267}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_o}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, 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), 289}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 274}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__28, 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), 332}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 317}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__28, 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), 342}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 327}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_r}; __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } @@ -16712,27 +16701,27 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_to_numeric_constraint, __pyx_mstate->__pyx_kp_b_iso88591_a_3axs_C_1_avV6_a_Bhas_q_a_3a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 313}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 298}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_params, __pyx_mstate->__pyx_n_u_equalities_found, __pyx_mstate->__pyx_n_u_inequalities_found, __pyx_mstate->__pyx_n_u_comparator, __pyx_mstate->__pyx_n_u_splitted, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_to_equality_constraint, __pyx_mstate->__pyx_kp_b_iso88591_A_3axs_Qa_1_2XQfA_Rxq_a_5_AS_2S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 28, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 32}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_restrictions, __pyx_mstate->__pyx_n_u_tune_params, __pyx_mstate->__pyx_n_u_regex_match_variable, __pyx_mstate->__pyx_n_u_regex_match_variable_or_constant, __pyx_mstate->__pyx_n_u_replace_params, __pyx_mstate->__pyx_n_u_replace_params, __pyx_mstate->__pyx_n_u_replace_params_split, __pyx_mstate->__pyx_n_u_replace_params_split, __pyx_mstate->__pyx_n_u_to_multiple_restrictions, __pyx_mstate->__pyx_n_u_to_multiple_restrictions, __pyx_mstate->__pyx_n_u_to_numeric_constraint, __pyx_mstate->__pyx_n_u_to_numeric_constraint, __pyx_mstate->__pyx_n_u_to_equality_constraint, __pyx_mstate->__pyx_n_u_to_equality_constraint, __pyx_mstate->__pyx_n_u_restrictions_cleaned, __pyx_mstate->__pyx_n_u_restrictions_cleaned_unique, __pyx_mstate->__pyx_n_u_restrictions_unique_indices, __pyx_mstate->__pyx_n_u_parsed_restrictions, __pyx_mstate->__pyx_n_u_res, __pyx_mstate->__pyx_n_u_params_used, __pyx_mstate->__pyx_n_u_parsed_restriction, __pyx_mstate->__pyx_n_u_params_used_list, __pyx_mstate->__pyx_n_u_finalized_constraint, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_r, __pyx_mstate->__pyx_n_u_i}; - __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_parse_restrictions, __pyx_mstate->__pyx_kp_b_iso88591_Ya_1_q_Q2_m5_aP_U_6_Q_q_t4uA_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_parse_restrictions, __pyx_mstate->__pyx_kp_b_iso88591_Ya_1_q_Q2_m5_ar_U_6_Q_q_t4uA_d, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 381}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 366}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_constraints, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_picklable, __pyx_mstate->__pyx_n_u_parsed_restrictions, __pyx_mstate->__pyx_n_u_compiled_constraints, __pyx_mstate->__pyx_n_u_restriction, __pyx_mstate->__pyx_n_u_params_used, __pyx_mstate->__pyx_n_u_constraint, __pyx_mstate->__pyx_n_u_code_object, __pyx_mstate->__pyx_n_u_func_2}; - __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_compile_to_constraints, __pyx_mstate->__pyx_kp_b_iso88591_V1_A_UUV__A_Qm1_q_9_gQm_q_1Kz_g, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_compile_to_constraints, __pyx_mstate->__pyx_kp_b_iso88591_V1_A_Oq__A_Qm1_q_9_gQm_q_1Kz_gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 419}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 404}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s, __pyx_mstate->__pyx_n_u_number}; __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_is_or_evals_to_number, __pyx_mstate->__pyx_kp_b_iso88591_XQ_Qa_z_5_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 431}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 416}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_expr, __pyx_mstate->__pyx_n_u_pattern, __pyx_mstate->__pyx_n_u_matches, __pyx_mstate->__pyx_n_u_m}; __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_parser_py, __pyx_mstate->__pyx_n_u_extract_operators, __pyx_mstate->__pyx_kp_b_iso88591_HA_4vRxq_Q_a_b_1AV3d_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } @@ -16985,11 +16974,11 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { + Py_INCREF(src[i]); if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } - Py_INCREF(src[i]); } return res; } @@ -18746,6 +18735,7 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { } PyException_SetCause(new_exc, val); // steals ref to val PyErr_SetObject(PyExc_RuntimeError, new_exc); + Py_DECREF(new_exc); } /* DictGetItem */ @@ -18978,8 +18968,8 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); for (i=0; i__pyx_empty_unicode, value_tuple); bad: @@ -19952,6 +19942,48 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { __Pyx_END_CRITICAL_SECTION(); return result; } +static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) { + CYTHON_UNUSED_VAR(args); + if (unlikely(!self)) { + PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument"); + } + Py_XINCREF(self); + return self; +} +static PyMethodDef __Pyx_CyFunction_annotate_method = { + "__annotate__", + (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl, + METH_VARARGS, + "Placeholder __annotate__ function to allow 'functools.wraps' to work " + "on Cython functions." +}; +static PyObject * +__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *annotations = __Pyx_CyFunction_get_annotations((__pyx_CyFunctionObject *) op_in, NULL); + if (unlikely(!annotations)) return NULL; + PyObject *method = PyCFunction_New( + &__Pyx_CyFunction_annotate_method, + annotations); + Py_DECREF(annotations); + return method; +} +static int +__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted"); + return -1; + } + if (value == Py_None) { + return 0; + } + PyObject *annotations = PyObject_CallObject(value, NULL); + if (!annotations) return -1; + int result = __Pyx_CyFunction_set_annotations((__pyx_CyFunctionObject *) op_in, annotations, NULL); + Py_DECREF(annotations); + return result; +} static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; @@ -19964,7 +19996,6 @@ __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { - Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } @@ -20067,6 +20098,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, @@ -20205,8 +20237,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API -#if PY_VERSION_HEX < 0x030900B1 +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { @@ -20214,7 +20245,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } -#endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); @@ -20266,11 +20296,10 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); -#endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_annotations); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; @@ -21559,8 +21588,8 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; - if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; args[n] = value; return 0; } @@ -23106,7 +23135,8 @@ static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; - ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + size_t nargs = 1U + (val != NULL) + (tb != NULL); + ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } @@ -23303,14 +23333,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } -static PyObject * -__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) -{ #if !CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) { PyObject *frame; - #if PY_VERSION_HEX >= 0x030d0000 - Py_BEGIN_CRITICAL_SECTION(self); - #endif frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { @@ -23335,9 +23361,17 @@ __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) } } Py_INCREF(frame); - #if PY_VERSION_HEX >= 0x030d0000 - Py_END_CRITICAL_SECTION(); - #endif + return frame; +} +#endif +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self); + frame = __Pyx__Coroutine_get_frame_locked(self); + __Pyx_END_CRITICAL_SECTION(); return frame; #else CYTHON_UNUSED_VAR(self); @@ -23398,35 +23432,23 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; gen->is_running = 1; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); assert(gen->is_running); gen->is_running = 0; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); } static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { diff --git a/constraint/parser.py b/constraint/parser.py index d7734a3..d2ea965 100644 --- a/constraint/parser.py +++ b/constraint/parser.py @@ -2,34 +2,34 @@ import re from types import FunctionType -from typing import Union, Optional + from constraint.constraints import ( AllDifferentConstraint, AllEqualConstraint, + CompilableFunctionConstraint, Constraint, + ExactProdConstraint, ExactSumConstraint, - MinSumConstraint, + FunctionConstraint, + MaxProdConstraint, MaxSumConstraint, - ExactProdConstraint, MinProdConstraint, - MaxProdConstraint, - FunctionConstraint, - CompilableFunctionConstraint, - VariableExactSumConstraint, - VariableMinSumConstraint, - VariableMaxSumConstraint, + MinSumConstraint, VariableExactProdConstraint, - VariableMinProdConstraint, + VariableExactSumConstraint, VariableMaxProdConstraint, # TODO implement parsing for these constraints: # InSetConstraint, # NotInSetConstraint, # SomeInSetConstraint, # SomeNotInSetConstraint, + VariableMaxSumConstraint, + VariableMinProdConstraint, + VariableMinSumConstraint, ) -def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Union[Constraint, str], list[str]]]: +def parse_restrictions(restrictions: list[str], tune_params: dict) -> list[tuple[Constraint | str, list[str]]]: """Parses restrictions (constraints in string format) from a list of strings into compilable functions and constraints. Returns a list of tuples of (strings or constraints) and parameters.""" # noqa: E501 # rewrite the restrictions so variables are singled out regex_match_variable = r"([a-zA-Z_$][a-zA-Z_$0-9]*)" @@ -78,22 +78,7 @@ def to_multiple_restrictions(restrictions: list[str]) -> list[str]: split_restrictions.append(temp_copy[prev_stop:next_stop].strip()) return split_restrictions - def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ - Union[ - MinSumConstraint, - VariableMinSumConstraint, - ExactSumConstraint, - VariableExactSumConstraint, - MaxSumConstraint, - VariableMaxSumConstraint, - MinProdConstraint, - VariableMinProdConstraint, - ExactProdConstraint, - VariableExactProdConstraint, - MaxProdConstraint, - VariableMaxProdConstraint, - ] - ]: # noqa: E501 + def to_numeric_constraint(restriction: str, params: list[str]) -> MinSumConstraint | VariableMinSumConstraint | ExactSumConstraint | VariableExactSumConstraint | MaxSumConstraint | VariableMaxSumConstraint | MinProdConstraint | VariableMinProdConstraint | ExactProdConstraint | VariableExactProdConstraint | MaxProdConstraint | VariableMaxProdConstraint | None: # noqa: E501 """Converts a restriction to a built-in numeric constraint if possible.""" # first check if all parameters have only numbers as values if len(params) == 0 or not all(all(isinstance(v, (int, float)) for v in tune_params[p]) for p in params): @@ -312,7 +297,7 @@ def to_numeric_constraint(restriction: str, params: list[str]) -> Optional[ def to_equality_constraint( restriction: str, params: list[str] - ) -> Optional[Union[AllEqualConstraint, AllDifferentConstraint]]: + ) -> AllEqualConstraint | AllDifferentConstraint | None: """Converts a restriction to either an equality or inequality constraint on all the parameters if possible.""" # check if all parameters are involved if len(params) != len(tune_params): @@ -380,7 +365,7 @@ def to_equality_constraint( def compile_to_constraints( constraints: list[str], domains: dict, picklable=False -) -> list[tuple[Constraint, list[str], Union[str, None]]]: # noqa: E501 +) -> list[tuple[Constraint, list[str], str | None]]: # noqa: E501 """Parses constraints in string format (referred to as restrictions) from a list of strings into a list of Constraints, parameters used, and source if applicable. Args: @@ -392,7 +377,7 @@ def compile_to_constraints( list of tuples with restrictions, parameters used (list[str]), and source (str) if applicable. Returned restrictions are strings, functions, or Constraints depending on the options provided. """ # noqa: E501 parsed_restrictions = parse_restrictions(constraints, domains) - compiled_constraints: list[tuple[Constraint, list[str], Union[str, None]]] = list() + compiled_constraints: list[tuple[Constraint, list[str], str | None]] = list() for restriction, params_used in parsed_restrictions: if isinstance(restriction, str): # if it's a string, wrap it in a (compilable or compiled) function constraint @@ -416,7 +401,7 @@ def compile_to_constraints( # Utility functions -def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]: +def is_or_evals_to_number(s: str) -> int | float | None: """Check if the string is a number or can be evaluated to a number.""" try: # check if it's a number or solvable to a number (e.g. '32*2') diff --git a/constraint/problem.c b/constraint/problem.c index bb0e06b..3b5efa8 100644 --- a/constraint/problem.c +++ b/constraint/problem.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.2.4 */ +/* Generated by Cython 3.2.6 */ /* BEGIN: Cython Metadata { @@ -37,8 +37,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_2_4" -#define CYTHON_HEX_VERSION 0x030204F0 +#define __PYX_ABI_VERSION "3_2_6" +#define CYTHON_HEX_VERSION 0x030206F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include @@ -1531,7 +1531,7 @@ struct __pyx_obj_10constraint_7problem___pyx_scope_struct_2_genexpr; struct __pyx_obj_10constraint_7problem___pyx_scope_struct_3_genexpr; struct __pyx_obj_10constraint_7problem___pyx_scope_struct_4_genexpr; -/* "constraint/problem.py":164 +/* "constraint/problem.py":163 * return * elif isinstance(constraint, list): * assert all(isinstance(c, str) for c in constraint), f"Expected constraints to be strings, got {constraint}" # <<<<<<<<<<<<<< @@ -1545,7 +1545,7 @@ struct __pyx_obj_10constraint_7problem___pyx_scope_struct__genexpr { }; -/* "constraint/problem.py":239 +/* "constraint/problem.py":238 * return self._solver.getSolutionIter(domains, constraints, vconstraints) * * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: # <<<<<<<<<<<<<< @@ -1558,7 +1558,7 @@ struct __pyx_obj_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedL }; -/* "constraint/problem.py":243 +/* "constraint/problem.py":242 * solutions: list[dict] = self.getSolutions() * if order is None or len(order) == 1: * return list(tuple(solution.values()) for solution in solutions) # <<<<<<<<<<<<<< @@ -1572,7 +1572,7 @@ struct __pyx_obj_10constraint_7problem___pyx_scope_struct_2_genexpr { }; -/* "constraint/problem.py":245 +/* "constraint/problem.py":244 * return list(tuple(solution.values()) for solution in solutions) * get_in_order = itemgetter(*order) * return list(get_in_order(params) for params in solutions) # <<<<<<<<<<<<<< @@ -1587,7 +1587,7 @@ struct __pyx_obj_10constraint_7problem___pyx_scope_struct_3_genexpr { }; -/* "constraint/problem.py":290 +/* "constraint/problem.py":289 * # check if there are any precompiled FunctionConstraints when there shouldn't be * if picklable: * assert not any(isinstance(c, FunctionConstraint) for c, _ in constraints), f"You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why)" # noqa E501 # <<<<<<<<<<<<<< @@ -2825,7 +2825,7 @@ typedef struct { PyObject *__pyx_slice[1]; PyObject *__pyx_tuple[3]; PyObject *__pyx_codeobj_tab[17]; - PyObject *__pyx_string_tab[192]; + PyObject *__pyx_string_tab[189]; PyObject *__pyx_number_tab[1]; /* #### Code section: module_state_contents ### */ @@ -2906,32 +2906,32 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_kp_u_Add_one_or_more_variables_to_the __pyx_string_tab[3] #define __pyx_kp_u_Change_the_problem_solver_curren __pyx_string_tab[4] #define __pyx_kp_u_Class_used_to_define_a_problem_a __pyx_string_tab[5] -#define __pyx_kp_u_Constraints __pyx_string_tab[6] -#define __pyx_kp_u_Constraints_must_be_instances_of __pyx_string_tab[7] -#define __pyx_kp_u_Domain_is_empty __pyx_string_tab[8] -#define __pyx_kp_u_Domains_must_be_instances_of_sub __pyx_string_tab[9] -#define __pyx_kp_u_Duplicate_configs __pyx_string_tab[10] -#define __pyx_kp_u_Expected_constraints_to_be_strin __pyx_string_tab[11] -#define __pyx_kp_u_Find_and_return_a_solution_to_th __pyx_string_tab[12] -#define __pyx_kp_u_Find_and_return_all_solutions_to __pyx_string_tab[13] -#define __pyx_kp_u_None __pyx_string_tab[14] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[15] -#define __pyx_kp_u_Obtain_the_problem_solver_curren __pyx_string_tab[16] -#define __pyx_kp_u_Optional_Sequence __pyx_string_tab[17] +#define __pyx_kp_u_Constraint_Callable_str __pyx_string_tab[6] +#define __pyx_kp_u_Constraints __pyx_string_tab[7] +#define __pyx_kp_u_Constraints_must_be_instances_of __pyx_string_tab[8] +#define __pyx_kp_u_Domain_is_empty __pyx_string_tab[9] +#define __pyx_kp_u_Domains_must_be_instances_of_sub __pyx_string_tab[10] +#define __pyx_kp_u_Duplicate_configs __pyx_string_tab[11] +#define __pyx_kp_u_Expected_constraints_to_be_strin __pyx_string_tab[12] +#define __pyx_kp_u_Find_and_return_a_solution_to_th __pyx_string_tab[13] +#define __pyx_kp_u_Find_and_return_all_solutions_to __pyx_string_tab[14] +#define __pyx_kp_u_None __pyx_string_tab[15] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[16] +#define __pyx_kp_u_Obtain_the_problem_solver_curren __pyx_string_tab[17] #define __pyx_kp_u_ParallelSolver_is_currently_expe __pyx_string_tab[18] -#define __pyx_kp_u_Problem_addConstraint_line_141 __pyx_string_tab[19] -#define __pyx_kp_u_Problem_addVariable_line_86 __pyx_string_tab[20] -#define __pyx_kp_u_Problem_addVariables_line_118 __pyx_string_tab[21] -#define __pyx_kp_u_Problem_getSolutionIter_line_218 __pyx_string_tab[22] -#define __pyx_kp_u_Problem_getSolution_line_180 __pyx_string_tab[23] -#define __pyx_kp_u_Problem_getSolutions_line_199 __pyx_string_tab[24] -#define __pyx_kp_u_Problem_getSolver_line_72 __pyx_string_tab[25] -#define __pyx_kp_u_Problem_reset_line_44 __pyx_string_tab[26] -#define __pyx_kp_u_Problem_setSolver_line_57 __pyx_string_tab[27] +#define __pyx_kp_u_Problem_addConstraint_line_140 __pyx_string_tab[19] +#define __pyx_kp_u_Problem_addVariable_line_85 __pyx_string_tab[20] +#define __pyx_kp_u_Problem_addVariables_line_117 __pyx_string_tab[21] +#define __pyx_kp_u_Problem_getSolutionIter_line_217 __pyx_string_tab[22] +#define __pyx_kp_u_Problem_getSolution_line_179 __pyx_string_tab[23] +#define __pyx_kp_u_Problem_getSolutions_line_198 __pyx_string_tab[24] +#define __pyx_kp_u_Problem_getSolver_line_71 __pyx_string_tab[25] +#define __pyx_kp_u_Problem_reset_line_43 __pyx_string_tab[26] +#define __pyx_kp_u_Problem_setSolver_line_56 __pyx_string_tab[27] #define __pyx_kp_u_Reset_the_current_problem_defini __pyx_string_tab[28] #define __pyx_kp_u_Return_an_iterator_to_the_soluti __pyx_string_tab[29] -#define __pyx_kp_u_Tried_to_insert_duplicated_varia __pyx_string_tab[30] -#define __pyx_kp_u_Union_Constraint_Callable_str __pyx_string_tab[31] +#define __pyx_kp_u_Sequence_None __pyx_string_tab[30] +#define __pyx_kp_u_Tried_to_insert_duplicated_varia __pyx_string_tab[31] #define __pyx_kp_u_Using_the_ParallelSolver_in_Thre __pyx_string_tab[32] #define __pyx_kp_u_You_have_used_FunctionConstraint __pyx_string_tab[33] #define __pyx_kp_u__2 __pyx_string_tab[34] @@ -2956,142 +2956,139 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_FunctionConstraint __pyx_string_tab[53] #define __pyx_n_u_Hashable __pyx_string_tab[54] #define __pyx_n_u_OptimizedBacktrackingSolver __pyx_string_tab[55] -#define __pyx_n_u_Optional __pyx_string_tab[56] -#define __pyx_n_u_ParallelSolver __pyx_string_tab[57] -#define __pyx_n_u_Problem __pyx_string_tab[58] -#define __pyx_n_u_Problem___init __pyx_string_tab[59] -#define __pyx_n_u_Problem__getArgs __pyx_string_tab[60] -#define __pyx_n_u_Problem__getArgs_locals_genexpr __pyx_string_tab[61] -#define __pyx_n_u_Problem_addConstraint __pyx_string_tab[62] -#define __pyx_n_u_Problem_addConstraint_locals_gen __pyx_string_tab[63] -#define __pyx_n_u_Problem_addVariable __pyx_string_tab[64] -#define __pyx_n_u_Problem_addVariables __pyx_string_tab[65] -#define __pyx_n_u_Problem_getSolution __pyx_string_tab[66] -#define __pyx_n_u_Problem_getSolutionIter __pyx_string_tab[67] -#define __pyx_n_u_Problem_getSolutions __pyx_string_tab[68] -#define __pyx_n_u_Problem_getSolutionsAsListDict __pyx_string_tab[69] -#define __pyx_n_u_Problem_getSolutionsOrderedList __pyx_string_tab[70] -#define __pyx_n_u_Problem_getSolutionsOrderedList_2 __pyx_string_tab[71] -#define __pyx_n_u_Problem_getSolver __pyx_string_tab[72] -#define __pyx_n_u_Problem_reset __pyx_string_tab[73] -#define __pyx_n_u_Problem_setSolver __pyx_string_tab[74] -#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[75] -#define __pyx_n_u_Sequence __pyx_string_tab[76] -#define __pyx_n_u_Solver __pyx_string_tab[77] -#define __pyx_n_u_Union __pyx_string_tab[78] -#define __pyx_n_u__7 __pyx_string_tab[79] -#define __pyx_n_u_addConstraint __pyx_string_tab[80] -#define __pyx_n_u_addVariable __pyx_string_tab[81] -#define __pyx_n_u_addVariables __pyx_string_tab[82] -#define __pyx_n_u_allvariables __pyx_string_tab[83] -#define __pyx_n_u_append __pyx_string_tab[84] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[85] -#define __pyx_n_u_bool __pyx_string_tab[86] -#define __pyx_n_u_c __pyx_string_tab[87] -#define __pyx_n_u_clear __pyx_string_tab[88] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[89] -#define __pyx_n_u_close __pyx_string_tab[90] -#define __pyx_n_u_collections_abc __pyx_string_tab[91] -#define __pyx_n_u_compile_to_constraints __pyx_string_tab[92] -#define __pyx_n_u_constraint __pyx_string_tab[93] -#define __pyx_n_u_constraint_constraints __pyx_string_tab[94] -#define __pyx_n_u_constraint_domain __pyx_string_tab[95] -#define __pyx_n_u_constraint_parser __pyx_string_tab[96] -#define __pyx_n_u_constraint_problem __pyx_string_tab[97] -#define __pyx_n_u_constraint_solvers __pyx_string_tab[98] -#define __pyx_n_u_constraints __pyx_string_tab[99] -#define __pyx_n_u_constraints_2 __pyx_string_tab[100] -#define __pyx_n_u_copy __pyx_string_tab[101] -#define __pyx_n_u_count __pyx_string_tab[102] -#define __pyx_n_u_deepcopy __pyx_string_tab[103] -#define __pyx_n_u_doc __pyx_string_tab[104] -#define __pyx_n_u_domain __pyx_string_tab[105] -#define __pyx_n_u_domains __pyx_string_tab[106] -#define __pyx_n_u_extend __pyx_string_tab[107] -#define __pyx_n_u_freethreading __pyx_string_tab[108] -#define __pyx_n_u_func __pyx_string_tab[109] -#define __pyx_n_u_genexpr __pyx_string_tab[110] -#define __pyx_n_u_getArgs __pyx_string_tab[111] -#define __pyx_n_u_getSolution __pyx_string_tab[112] -#define __pyx_n_u_getSolutionIter __pyx_string_tab[113] -#define __pyx_n_u_getSolutions __pyx_string_tab[114] -#define __pyx_n_u_getSolutionsAsListDict __pyx_string_tab[115] -#define __pyx_n_u_getSolutionsOrderedList __pyx_string_tab[116] -#define __pyx_n_u_getSolver __pyx_string_tab[117] -#define __pyx_n_u_get_in_order __pyx_string_tab[118] -#define __pyx_n_u_getitem __pyx_string_tab[119] -#define __pyx_n_u_init __pyx_string_tab[120] -#define __pyx_n_u_is_coroutine __pyx_string_tab[121] -#define __pyx_n_u_is_gil_enabled __pyx_string_tab[122] -#define __pyx_n_u_itemgetter __pyx_string_tab[123] -#define __pyx_n_u_items __pyx_string_tab[124] -#define __pyx_n_u_keys __pyx_string_tab[125] -#define __pyx_n_u_main __pyx_string_tab[126] -#define __pyx_n_u_metaclass __pyx_string_tab[127] -#define __pyx_n_u_module __pyx_string_tab[128] -#define __pyx_n_u_msg __pyx_string_tab[129] -#define __pyx_n_u_name __pyx_string_tab[130] -#define __pyx_n_u_next __pyx_string_tab[131] -#define __pyx_n_u_operator __pyx_string_tab[132] -#define __pyx_n_u_order __pyx_string_tab[133] -#define __pyx_n_u_params __pyx_string_tab[134] -#define __pyx_n_u_parsed __pyx_string_tab[135] -#define __pyx_n_u_picklable __pyx_string_tab[136] -#define __pyx_n_u_pop __pyx_string_tab[137] -#define __pyx_n_u_preProcess __pyx_string_tab[138] -#define __pyx_n_u_prepare __pyx_string_tab[139] -#define __pyx_n_u_process_mode __pyx_string_tab[140] -#define __pyx_n_u_qualname __pyx_string_tab[141] -#define __pyx_n_u_requires_pickling __pyx_string_tab[142] -#define __pyx_n_u_reset __pyx_string_tab[143] -#define __pyx_n_u_resetState __pyx_string_tab[144] -#define __pyx_n_u_return __pyx_string_tab[145] -#define __pyx_n_u_self __pyx_string_tab[146] -#define __pyx_n_u_send __pyx_string_tab[147] -#define __pyx_n_u_setSolver __pyx_string_tab[148] -#define __pyx_n_u_set_name __pyx_string_tab[149] -#define __pyx_n_u_setdefault __pyx_string_tab[150] -#define __pyx_n_u_size_dict __pyx_string_tab[151] -#define __pyx_n_u_size_list __pyx_string_tab[152] -#define __pyx_n_u_solution __pyx_string_tab[153] -#define __pyx_n_u_solutions __pyx_string_tab[154] -#define __pyx_n_u_solutions_dict __pyx_string_tab[155] -#define __pyx_n_u_solutions_list __pyx_string_tab[156] -#define __pyx_n_u_solver __pyx_string_tab[157] -#define __pyx_n_u_solver_2 __pyx_string_tab[158] -#define __pyx_n_u_str_constraints __pyx_string_tab[159] -#define __pyx_n_u_sys __pyx_string_tab[160] -#define __pyx_n_u_test __pyx_string_tab[161] -#define __pyx_n_u_throw __pyx_string_tab[162] -#define __pyx_n_u_typing __pyx_string_tab[163] -#define __pyx_n_u_v __pyx_string_tab[164] -#define __pyx_n_u_validate __pyx_string_tab[165] -#define __pyx_n_u_value __pyx_string_tab[166] -#define __pyx_n_u_values __pyx_string_tab[167] -#define __pyx_n_u_variable __pyx_string_tab[168] -#define __pyx_n_u_variables __pyx_string_tab[169] -#define __pyx_n_u_variables_2 __pyx_string_tab[170] -#define __pyx_n_u_vconstraints __pyx_string_tab[171] -#define __pyx_n_u_warn __pyx_string_tab[172] -#define __pyx_n_u_warnings __pyx_string_tab[173] -#define __pyx_n_u_zip __pyx_string_tab[174] -#define __pyx_kp_b_iso88591_A_9Ct1_8_Qa_AQ_4z_V7_4t7_8ST_T __pyx_string_tab[175] -#define __pyx_kp_b_iso88591_A_D_Q_KvQ __pyx_string_tab[176] -#define __pyx_kp_b_iso88591_A_Kq __pyx_string_tab[177] -#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q __pyx_string_tab[178] -#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q_a __pyx_string_tab[179] -#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_4q_t8_1I __pyx_string_tab[180] -#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[181] -#define __pyx_kp_b_iso88591_A_z_5Qa_Cq_t1Cq_8_Qa_1_1A_z_A_j __pyx_string_tab[182] -#define __pyx_kp_b_iso88591_J_UV_Ql_q_A_jjkkl_4z_a_xq_q_1L __pyx_string_tab[183] -#define __pyx_kp_b_iso88591_Q __pyx_string_tab[184] -#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[185] -#define __pyx_kp_b_iso88591__5 __pyx_string_tab[186] -#define __pyx_kp_b_iso88591__6 __pyx_string_tab[187] -#define __pyx_kp_b_iso88591_a_L_AZq __pyx_string_tab[188] -#define __pyx_kp_b_iso88591_g_B_M_6_E_Cq_s_vQ_z_1 __pyx_string_tab[189] -#define __pyx_kp_b_iso88591_q_k_a_we1_5Q_3at_b_d_q_izQR_Cs __pyx_string_tab[190] -#define __pyx_kp_b_iso88591_xq_Kwc_A_1_2_z_j_1_aaeeffjjk_Qd __pyx_string_tab[191] +#define __pyx_n_u_ParallelSolver __pyx_string_tab[56] +#define __pyx_n_u_Problem __pyx_string_tab[57] +#define __pyx_n_u_Problem___init __pyx_string_tab[58] +#define __pyx_n_u_Problem__getArgs __pyx_string_tab[59] +#define __pyx_n_u_Problem__getArgs_locals_genexpr __pyx_string_tab[60] +#define __pyx_n_u_Problem_addConstraint __pyx_string_tab[61] +#define __pyx_n_u_Problem_addConstraint_locals_gen __pyx_string_tab[62] +#define __pyx_n_u_Problem_addVariable __pyx_string_tab[63] +#define __pyx_n_u_Problem_addVariables __pyx_string_tab[64] +#define __pyx_n_u_Problem_getSolution __pyx_string_tab[65] +#define __pyx_n_u_Problem_getSolutionIter __pyx_string_tab[66] +#define __pyx_n_u_Problem_getSolutions __pyx_string_tab[67] +#define __pyx_n_u_Problem_getSolutionsAsListDict __pyx_string_tab[68] +#define __pyx_n_u_Problem_getSolutionsOrderedList __pyx_string_tab[69] +#define __pyx_n_u_Problem_getSolutionsOrderedList_2 __pyx_string_tab[70] +#define __pyx_n_u_Problem_getSolver __pyx_string_tab[71] +#define __pyx_n_u_Problem_reset __pyx_string_tab[72] +#define __pyx_n_u_Problem_setSolver __pyx_string_tab[73] +#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[74] +#define __pyx_n_u_Sequence __pyx_string_tab[75] +#define __pyx_n_u_Solver __pyx_string_tab[76] +#define __pyx_n_u__7 __pyx_string_tab[77] +#define __pyx_n_u_addConstraint __pyx_string_tab[78] +#define __pyx_n_u_addVariable __pyx_string_tab[79] +#define __pyx_n_u_addVariables __pyx_string_tab[80] +#define __pyx_n_u_allvariables __pyx_string_tab[81] +#define __pyx_n_u_append __pyx_string_tab[82] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[83] +#define __pyx_n_u_bool __pyx_string_tab[84] +#define __pyx_n_u_c __pyx_string_tab[85] +#define __pyx_n_u_clear __pyx_string_tab[86] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[87] +#define __pyx_n_u_close __pyx_string_tab[88] +#define __pyx_n_u_collections_abc __pyx_string_tab[89] +#define __pyx_n_u_compile_to_constraints __pyx_string_tab[90] +#define __pyx_n_u_constraint __pyx_string_tab[91] +#define __pyx_n_u_constraint_constraints __pyx_string_tab[92] +#define __pyx_n_u_constraint_domain __pyx_string_tab[93] +#define __pyx_n_u_constraint_parser __pyx_string_tab[94] +#define __pyx_n_u_constraint_problem __pyx_string_tab[95] +#define __pyx_n_u_constraint_solvers __pyx_string_tab[96] +#define __pyx_n_u_constraints __pyx_string_tab[97] +#define __pyx_n_u_constraints_2 __pyx_string_tab[98] +#define __pyx_n_u_copy __pyx_string_tab[99] +#define __pyx_n_u_count __pyx_string_tab[100] +#define __pyx_n_u_deepcopy __pyx_string_tab[101] +#define __pyx_n_u_doc __pyx_string_tab[102] +#define __pyx_n_u_domain __pyx_string_tab[103] +#define __pyx_n_u_domains __pyx_string_tab[104] +#define __pyx_n_u_extend __pyx_string_tab[105] +#define __pyx_n_u_freethreading __pyx_string_tab[106] +#define __pyx_n_u_func __pyx_string_tab[107] +#define __pyx_n_u_genexpr __pyx_string_tab[108] +#define __pyx_n_u_getArgs __pyx_string_tab[109] +#define __pyx_n_u_getSolution __pyx_string_tab[110] +#define __pyx_n_u_getSolutionIter __pyx_string_tab[111] +#define __pyx_n_u_getSolutions __pyx_string_tab[112] +#define __pyx_n_u_getSolutionsAsListDict __pyx_string_tab[113] +#define __pyx_n_u_getSolutionsOrderedList __pyx_string_tab[114] +#define __pyx_n_u_getSolver __pyx_string_tab[115] +#define __pyx_n_u_get_in_order __pyx_string_tab[116] +#define __pyx_n_u_getitem __pyx_string_tab[117] +#define __pyx_n_u_init __pyx_string_tab[118] +#define __pyx_n_u_is_coroutine __pyx_string_tab[119] +#define __pyx_n_u_is_gil_enabled __pyx_string_tab[120] +#define __pyx_n_u_itemgetter __pyx_string_tab[121] +#define __pyx_n_u_items __pyx_string_tab[122] +#define __pyx_n_u_keys __pyx_string_tab[123] +#define __pyx_n_u_main __pyx_string_tab[124] +#define __pyx_n_u_metaclass __pyx_string_tab[125] +#define __pyx_n_u_module __pyx_string_tab[126] +#define __pyx_n_u_msg __pyx_string_tab[127] +#define __pyx_n_u_name __pyx_string_tab[128] +#define __pyx_n_u_next __pyx_string_tab[129] +#define __pyx_n_u_operator __pyx_string_tab[130] +#define __pyx_n_u_order __pyx_string_tab[131] +#define __pyx_n_u_params __pyx_string_tab[132] +#define __pyx_n_u_parsed __pyx_string_tab[133] +#define __pyx_n_u_picklable __pyx_string_tab[134] +#define __pyx_n_u_pop __pyx_string_tab[135] +#define __pyx_n_u_preProcess __pyx_string_tab[136] +#define __pyx_n_u_prepare __pyx_string_tab[137] +#define __pyx_n_u_process_mode __pyx_string_tab[138] +#define __pyx_n_u_qualname __pyx_string_tab[139] +#define __pyx_n_u_requires_pickling __pyx_string_tab[140] +#define __pyx_n_u_reset __pyx_string_tab[141] +#define __pyx_n_u_resetState __pyx_string_tab[142] +#define __pyx_n_u_return __pyx_string_tab[143] +#define __pyx_n_u_self __pyx_string_tab[144] +#define __pyx_n_u_send __pyx_string_tab[145] +#define __pyx_n_u_setSolver __pyx_string_tab[146] +#define __pyx_n_u_set_name __pyx_string_tab[147] +#define __pyx_n_u_setdefault __pyx_string_tab[148] +#define __pyx_n_u_size_dict __pyx_string_tab[149] +#define __pyx_n_u_size_list __pyx_string_tab[150] +#define __pyx_n_u_solution __pyx_string_tab[151] +#define __pyx_n_u_solutions __pyx_string_tab[152] +#define __pyx_n_u_solutions_dict __pyx_string_tab[153] +#define __pyx_n_u_solutions_list __pyx_string_tab[154] +#define __pyx_n_u_solver __pyx_string_tab[155] +#define __pyx_n_u_solver_2 __pyx_string_tab[156] +#define __pyx_n_u_str_constraints __pyx_string_tab[157] +#define __pyx_n_u_sys __pyx_string_tab[158] +#define __pyx_n_u_test __pyx_string_tab[159] +#define __pyx_n_u_throw __pyx_string_tab[160] +#define __pyx_n_u_v __pyx_string_tab[161] +#define __pyx_n_u_validate __pyx_string_tab[162] +#define __pyx_n_u_value __pyx_string_tab[163] +#define __pyx_n_u_values __pyx_string_tab[164] +#define __pyx_n_u_variable __pyx_string_tab[165] +#define __pyx_n_u_variables __pyx_string_tab[166] +#define __pyx_n_u_variables_2 __pyx_string_tab[167] +#define __pyx_n_u_vconstraints __pyx_string_tab[168] +#define __pyx_n_u_warn __pyx_string_tab[169] +#define __pyx_n_u_warnings __pyx_string_tab[170] +#define __pyx_n_u_zip __pyx_string_tab[171] +#define __pyx_kp_b_iso88591_A_9Ct1_8_Qa_AQ_4z_V7_4t7_8ST_T __pyx_string_tab[172] +#define __pyx_kp_b_iso88591_A_D_Q_KvQ __pyx_string_tab[173] +#define __pyx_kp_b_iso88591_A_Kq __pyx_string_tab[174] +#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q __pyx_string_tab[175] +#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q_a __pyx_string_tab[176] +#define __pyx_kp_b_iso88591_A_oT_T_QR_4q_4q_t8_1I __pyx_string_tab[177] +#define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[178] +#define __pyx_kp_b_iso88591_A_z_5Qa_Cq_t1Cq_8_Qa_1_1A_z_A_j __pyx_string_tab[179] +#define __pyx_kp_b_iso88591_E_PQ_Ql_q_A_jjkkl_4z_a_xq_q_1L __pyx_string_tab[180] +#define __pyx_kp_b_iso88591_Q __pyx_string_tab[181] +#define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[182] +#define __pyx_kp_b_iso88591__5 __pyx_string_tab[183] +#define __pyx_kp_b_iso88591__6 __pyx_string_tab[184] +#define __pyx_kp_b_iso88591_a_L_AZq __pyx_string_tab[185] +#define __pyx_kp_b_iso88591_g_B_M_6_E_Cq_s_vQ_z_1 __pyx_string_tab[186] +#define __pyx_kp_b_iso88591_q_k_a_we1_5Q_3at_b_d_q_izQR_Cs __pyx_string_tab[187] +#define __pyx_kp_b_iso88591_xq_Kwc_A_1_2_z_j_1_aaeeffjjk_Qd __pyx_string_tab[188] #define __pyx_int_1 __pyx_number_tab[0] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE @@ -3120,7 +3117,7 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_slice[i]); } for (int i=0; i<3; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<17; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<192; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<189; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ @@ -3160,7 +3157,7 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_slice[i]); } for (int i=0; i<3; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<17; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<192; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<189; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ @@ -3178,7 +3175,7 @@ return 0; #endif /* #### Code section: module_code ### */ -/* "constraint/problem.py":24 +/* "constraint/problem.py":23 * """Class used to define a problem and retrieve solutions.""" * * def __init__(self, solver: Solver=None): # <<<<<<<<<<<<<< @@ -3227,35 +3224,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_solver,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, 24, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 23, __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, 24, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 23, __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, 24, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 23, __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, 24, __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, 23, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, i); __PYX_ERR(0, 24, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, i); __PYX_ERR(0, 23, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 24, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 23, __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, 24, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 23, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -3266,7 +3263,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 24, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 23, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3304,14 +3301,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "constraint/problem.py":30 + /* "constraint/problem.py":29 * solver (instance of a :py:class:`Solver`): Problem solver (default :py:class:`OptimizedBacktrackingSolver`) * """ * self._solver = solver or OptimizedBacktrackingSolver() # <<<<<<<<<<<<<< * self._constraints: list[tuple[Constraint, any]] = [] * self._str_constraints: list[str] = [] */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_solver); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 30, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_solver); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 29, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_solver); @@ -3319,7 +3316,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED goto __pyx_L3_bool_binop_done; } __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -3338,53 +3335,53 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2, __pyx_t_1) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2, __pyx_t_1) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":31 + /* "constraint/problem.py":30 * """ * self._solver = solver or OptimizedBacktrackingSolver() * self._constraints: list[tuple[Constraint, any]] = [] # <<<<<<<<<<<<<< * self._str_constraints: list[str] = [] * self._variables: dict[Hashable, Domain] = {} */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_t_1) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints, __pyx_t_1) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":32 + /* "constraint/problem.py":31 * self._solver = solver or OptimizedBacktrackingSolver() * self._constraints: list[tuple[Constraint, any]] = [] * self._str_constraints: list[str] = [] # <<<<<<<<<<<<<< * self._variables: dict[Hashable, Domain] = {} * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints, __pyx_t_1) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints, __pyx_t_1) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":33 + /* "constraint/problem.py":32 * self._constraints: list[tuple[Constraint, any]] = [] * self._str_constraints: list[str] = [] * self._variables: dict[Hashable, Domain] = {} # <<<<<<<<<<<<<< * * # check if solver is instance instead of class */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables, __pyx_t_1) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables, __pyx_t_1) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":36 + /* "constraint/problem.py":35 * * # check if solver is instance instead of class * assert isinstance(self._solver, Solver), f"`solver` is not instance of Solver class (is {type(self._solver)})." # <<<<<<<<<<<<<< @@ -3393,52 +3390,52 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Solver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Solver); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_t_3)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_t_3)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_solver_is_not_instance_of_Solve; __pyx_t_7[1] = __pyx_t_1; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, 45 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 2, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 36, __pyx_L1_error) + __PYX_ERR(0, 35, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 36, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 35, __pyx_L1_error) #endif - /* "constraint/problem.py":39 + /* "constraint/problem.py":38 * * # warn for experimental parallel solver * if isinstance(self._solver, ParallelSolver): # <<<<<<<<<<<<<< * warn("ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.") # future: remove # noqa E501 * if not self._solver._process_mode and not freethreading: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ParallelSolver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ParallelSolver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_t_3, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 39, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_t_3, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/problem.py":40 + /* "constraint/problem.py":39 * # warn for experimental parallel solver * if isinstance(self._solver, ParallelSolver): * warn("ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.") # future: remove # noqa E501 # <<<<<<<<<<<<<< @@ -3446,7 +3443,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -3465,24 +3462,24 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":41 + /* "constraint/problem.py":40 * if isinstance(self._solver, ParallelSolver): * warn("ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.") # future: remove # noqa E501 * if not self._solver._process_mode and not freethreading: # <<<<<<<<<<<<<< * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_process_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_process_mode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = (!__pyx_t_8); if (__pyx_t_9) { @@ -3490,16 +3487,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED __pyx_t_2 = __pyx_t_9; goto __pyx_L7_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_freethreading); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_freethreading); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 41, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = (!__pyx_t_9); __pyx_t_2 = __pyx_t_8; __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "constraint/problem.py":42 + /* "constraint/problem.py":41 * warn("ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.") # future: remove # noqa E501 * if not self._solver._process_mode and not freethreading: * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") # <<<<<<<<<<<<<< @@ -3507,7 +3504,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED * def reset(self): */ __pyx_t_1 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -3526,12 +3523,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/problem.py":41 + /* "constraint/problem.py":40 * if isinstance(self._solver, ParallelSolver): * warn("ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.") # future: remove # noqa E501 * if not self._solver._process_mode and not freethreading: # <<<<<<<<<<<<<< @@ -3540,7 +3537,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED */ } - /* "constraint/problem.py":39 + /* "constraint/problem.py":38 * * # warn for experimental parallel solver * if isinstance(self._solver, ParallelSolver): # <<<<<<<<<<<<<< @@ -3549,7 +3546,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED */ } - /* "constraint/problem.py":24 + /* "constraint/problem.py":23 * """Class used to define a problem and retrieve solutions.""" * * def __init__(self, solver: Solver=None): # <<<<<<<<<<<<<< @@ -3573,7 +3570,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem___init__(CYTHON_UNUSED return __pyx_r; } -/* "constraint/problem.py":44 +/* "constraint/problem.py":43 * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") * * def reset(self): # <<<<<<<<<<<<<< @@ -3621,32 +3618,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 44, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 43, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 44, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __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, "reset", 0) < (0)) __PYX_ERR(0, 44, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reset", 0) < (0)) __PYX_ERR(0, 43, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, i); __PYX_ERR(0, 44, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, i); __PYX_ERR(0, 43, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 44, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 44, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("reset", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 43, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3679,26 +3676,26 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_2reset(CYTHON_UNUSED Py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); - /* "constraint/problem.py":54 + /* "constraint/problem.py":53 * >>> * """ * del self._constraints[:] # <<<<<<<<<<<<<< * self._variables.clear() * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_DelSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_t_1, 0, 0, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 0, 0, 1) < (0)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":55 + /* "constraint/problem.py":54 * """ * del self._constraints[:] * self._variables.clear() # <<<<<<<<<<<<<< * * def setSolver(self, solver): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); @@ -3708,12 +3705,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_2reset(CYTHON_UNUSED Py __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_clear, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__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, 55, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":44 + /* "constraint/problem.py":43 * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") * * def reset(self): # <<<<<<<<<<<<<< @@ -3736,7 +3733,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_2reset(CYTHON_UNUSED Py return __pyx_r; } -/* "constraint/problem.py":57 +/* "constraint/problem.py":56 * self._variables.clear() * * def setSolver(self, solver): # <<<<<<<<<<<<<< @@ -3785,39 +3782,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_solver,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, 57, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 56, __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, 57, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 56, __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, 57, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 56, __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, "setSolver", 0) < (0)) __PYX_ERR(0, 57, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "setSolver", 0) < (0)) __PYX_ERR(0, 56, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setSolver", 1, 2, 2, i); __PYX_ERR(0, 57, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("setSolver", 1, 2, 2, i); __PYX_ERR(0, 56, __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, 57, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 56, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 57, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 56, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_solver = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setSolver", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 57, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("setSolver", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 56, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3846,16 +3843,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_4setSolver(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("setSolver", 0); - /* "constraint/problem.py":70 + /* "constraint/problem.py":69 * solver * """ * self._solver = solver # <<<<<<<<<<<<<< * * def getSolver(self): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2, __pyx_v_solver) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2, __pyx_v_solver) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) - /* "constraint/problem.py":57 + /* "constraint/problem.py":56 * self._variables.clear() * * def setSolver(self, solver): # <<<<<<<<<<<<<< @@ -3875,7 +3872,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_4setSolver(CYTHON_UNUSE return __pyx_r; } -/* "constraint/problem.py":72 +/* "constraint/problem.py":71 * self._solver = solver * * def getSolver(self): # <<<<<<<<<<<<<< @@ -3923,32 +3920,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 72, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 71, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 72, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 71, __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, "getSolver", 0) < (0)) __PYX_ERR(0, 72, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolver", 0) < (0)) __PYX_ERR(0, 71, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolver", 1, 1, 1, i); __PYX_ERR(0, 72, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolver", 1, 1, 1, i); __PYX_ERR(0, 71, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 72, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 71, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolver", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 72, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolver", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 71, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3978,7 +3975,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_6getSolver(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolver", 0); - /* "constraint/problem.py":84 + /* "constraint/problem.py":83 * instance of a :py:class:`Solver` subclass: Solver currently in use * """ * return self._solver # <<<<<<<<<<<<<< @@ -3986,13 +3983,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_6getSolver(CYTHON_UNUSE * def addVariable(self, variable: Hashable, domain): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":72 + /* "constraint/problem.py":71 * self._solver = solver * * def getSolver(self): # <<<<<<<<<<<<<< @@ -4011,7 +4008,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_6getSolver(CYTHON_UNUSE return __pyx_r; } -/* "constraint/problem.py":86 +/* "constraint/problem.py":85 * return self._solver * * def addVariable(self, variable: Hashable, domain): # <<<<<<<<<<<<<< @@ -4061,38 +4058,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variable,&__pyx_mstate_global->__pyx_n_u_domain,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, 86, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 85, __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, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 85, __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, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 85, __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, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 85, __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, "addVariable", 0) < (0)) __PYX_ERR(0, 86, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "addVariable", 0) < (0)) __PYX_ERR(0, 85, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addVariable", 1, 3, 3, i); __PYX_ERR(0, 86, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addVariable", 1, 3, 3, i); __PYX_ERR(0, 85, __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, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 85, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 85, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 86, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 85, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variable = values[1]; @@ -4100,7 +4097,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addVariable", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 86, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addVariable", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 85, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4139,38 +4136,38 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU __Pyx_RefNannySetupContext("addVariable", 0); __Pyx_INCREF(__pyx_v_domain); - /* "constraint/problem.py":102 + /* "constraint/problem.py":101 * assume * """ * if variable in self._variables: # <<<<<<<<<<<<<< * msg = f"Tried to insert duplicated variable {repr(variable)}" * raise ValueError(msg) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_variable, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { - /* "constraint/problem.py":103 + /* "constraint/problem.py":102 * """ * if variable in self._variables: * msg = f"Tried to insert duplicated variable {repr(variable)}" # <<<<<<<<<<<<<< * raise ValueError(msg) * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): */ - __pyx_t_1 = PyObject_Repr(__pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(__pyx_v_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Tried_to_insert_duplicated_varia, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Tried_to_insert_duplicated_varia, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_msg = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":104 + /* "constraint/problem.py":103 * if variable in self._variables: * msg = f"Tried to insert duplicated variable {repr(variable)}" * raise ValueError(msg) # <<<<<<<<<<<<<< @@ -4183,14 +4180,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __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, 104, __pyx_L1_error) + __PYX_ERR(0, 103, __pyx_L1_error) - /* "constraint/problem.py":102 + /* "constraint/problem.py":101 * assume * """ * if variable in self._variables: # <<<<<<<<<<<<<< @@ -4199,14 +4196,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU */ } - /* "constraint/problem.py":105 + /* "constraint/problem.py":104 * msg = f"Tried to insert duplicated variable {repr(variable)}" * raise ValueError(msg) * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): # <<<<<<<<<<<<<< * domain = list(domain) * if isinstance(domain, Domain): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyList_Check(__pyx_v_variable); if (!__pyx_t_6) { @@ -4230,25 +4227,25 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU __pyx_t_2 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } - __pyx_t_6 = __Pyx_HasAttr(__pyx_v_domain, __pyx_mstate_global->__pyx_n_u_getitem); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_6 = __Pyx_HasAttr(__pyx_v_domain, __pyx_mstate_global->__pyx_n_u_getitem); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 104, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_6); __pyx_t_2 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "constraint/problem.py":106 + /* "constraint/problem.py":105 * raise ValueError(msg) * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): * domain = list(domain) # <<<<<<<<<<<<<< * if isinstance(domain, Domain): * domain = copy.deepcopy(domain) */ - __pyx_t_1 = PySequence_List(__pyx_v_domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":105 + /* "constraint/problem.py":104 * msg = f"Tried to insert duplicated variable {repr(variable)}" * raise ValueError(msg) * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): # <<<<<<<<<<<<<< @@ -4257,20 +4254,20 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU */ } - /* "constraint/problem.py":107 + /* "constraint/problem.py":106 * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): * domain = list(domain) * if isinstance(domain, Domain): # <<<<<<<<<<<<<< * domain = copy.deepcopy(domain) * elif hasattr(domain, "__getitem__"): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_domain, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 107, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_domain, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "constraint/problem.py":108 + /* "constraint/problem.py":107 * domain = list(domain) * if isinstance(domain, Domain): * domain = copy.deepcopy(domain) # <<<<<<<<<<<<<< @@ -4278,9 +4275,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU * domain = Domain(domain) */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 108, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_deepcopy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = 1; @@ -4300,13 +4297,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":107 + /* "constraint/problem.py":106 * if not isinstance(variable, (list, tuple, Domain)) and not hasattr(domain, "__getitem__"): * domain = list(domain) * if isinstance(domain, Domain): # <<<<<<<<<<<<<< @@ -4316,17 +4313,17 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU goto __pyx_L10; } - /* "constraint/problem.py":109 + /* "constraint/problem.py":108 * if isinstance(domain, Domain): * domain = copy.deepcopy(domain) * elif hasattr(domain, "__getitem__"): # <<<<<<<<<<<<<< * domain = Domain(domain) * else: */ - __pyx_t_2 = __Pyx_HasAttr(__pyx_v_domain, __pyx_mstate_global->__pyx_n_u_getitem); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_2 = __Pyx_HasAttr(__pyx_v_domain, __pyx_mstate_global->__pyx_n_u_getitem); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L1_error) if (likely(__pyx_t_2)) { - /* "constraint/problem.py":110 + /* "constraint/problem.py":109 * domain = copy.deepcopy(domain) * elif hasattr(domain, "__getitem__"): * domain = Domain(domain) # <<<<<<<<<<<<<< @@ -4334,7 +4331,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU * msg = "Domains must be instances of subclasses of the Domain class" */ __pyx_t_8 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Domain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS @@ -4353,13 +4350,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_domain, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":109 + /* "constraint/problem.py":108 * if isinstance(domain, Domain): * domain = copy.deepcopy(domain) * elif hasattr(domain, "__getitem__"): # <<<<<<<<<<<<<< @@ -4369,7 +4366,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU goto __pyx_L10; } - /* "constraint/problem.py":112 + /* "constraint/problem.py":111 * domain = Domain(domain) * else: * msg = "Domains must be instances of subclasses of the Domain class" # <<<<<<<<<<<<<< @@ -4380,7 +4377,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Domains_must_be_instances_of_sub); __pyx_v_msg = __pyx_mstate_global->__pyx_kp_u_Domains_must_be_instances_of_sub; - /* "constraint/problem.py":113 + /* "constraint/problem.py":112 * else: * msg = "Domains must be instances of subclasses of the Domain class" * raise TypeError(msg) # <<<<<<<<<<<<<< @@ -4393,27 +4390,27 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_msg}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __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, 113, __pyx_L1_error) + __PYX_ERR(0, 112, __pyx_L1_error) } __pyx_L10:; - /* "constraint/problem.py":114 + /* "constraint/problem.py":113 * msg = "Domains must be instances of subclasses of the Domain class" * raise TypeError(msg) * if not domain: # <<<<<<<<<<<<<< * raise ValueError("Domain is empty") * self._variables[variable] = domain */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_t_5 = (!__pyx_t_2); if (unlikely(__pyx_t_5)) { - /* "constraint/problem.py":115 + /* "constraint/problem.py":114 * raise TypeError(msg) * if not domain: * raise ValueError("Domain is empty") # <<<<<<<<<<<<<< @@ -4426,14 +4423,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Domain_is_empty}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __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, 115, __pyx_L1_error) + __PYX_ERR(0, 114, __pyx_L1_error) - /* "constraint/problem.py":114 + /* "constraint/problem.py":113 * msg = "Domains must be instances of subclasses of the Domain class" * raise TypeError(msg) * if not domain: # <<<<<<<<<<<<<< @@ -4442,19 +4439,19 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU */ } - /* "constraint/problem.py":116 + /* "constraint/problem.py":115 * if not domain: * raise ValueError("Domain is empty") * self._variables[variable] = domain # <<<<<<<<<<<<<< * * def addVariables(self, variables: Sequence, domain): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_variable, __pyx_v_domain) < 0))) __PYX_ERR(0, 116, __pyx_L1_error) + if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_variable, __pyx_v_domain) < 0))) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":86 + /* "constraint/problem.py":85 * return self._solver * * def addVariable(self, variable: Hashable, domain): # <<<<<<<<<<<<<< @@ -4480,7 +4477,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8addVariable(CYTHON_UNU return __pyx_r; } -/* "constraint/problem.py":118 +/* "constraint/problem.py":117 * self._variables[variable] = domain * * def addVariables(self, variables: Sequence, domain): # <<<<<<<<<<<<<< @@ -4530,38 +4527,38 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_variables_2,&__pyx_mstate_global->__pyx_n_u_domain,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, 118, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 117, __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, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 117, __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, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 117, __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, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 117, __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, "addVariables", 0) < (0)) __PYX_ERR(0, 118, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "addVariables", 0) < (0)) __PYX_ERR(0, 117, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addVariables", 1, 3, 3, i); __PYX_ERR(0, 118, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addVariables", 1, 3, 3, i); __PYX_ERR(0, 117, __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, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 117, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 117, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 118, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 117, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_variables = values[1]; @@ -4569,7 +4566,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addVariables", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addVariables", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 117, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4605,7 +4602,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U int __pyx_clineno = 0; __Pyx_RefNannySetupContext("addVariables", 0); - /* "constraint/problem.py":138 + /* "constraint/problem.py":137 * may assume * """ * for variable in variables: # <<<<<<<<<<<<<< @@ -4617,9 +4614,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U __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, 138, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __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, 138, __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, 137, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -4627,7 +4624,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U { 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, 138, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 137, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4637,7 +4634,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U { 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, 138, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 137, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4648,13 +4645,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __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, 138, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 137, __pyx_L1_error) PyErr_Clear(); } break; @@ -4664,12 +4661,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_4); __pyx_t_4 = 0; - /* "constraint/problem.py":139 + /* "constraint/problem.py":138 * """ * for variable in variables: * self.addVariable(variable, domain) # <<<<<<<<<<<<<< * - * def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): + * def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); @@ -4678,12 +4675,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_variable, __pyx_v_domain}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_addVariable, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "constraint/problem.py":138 + /* "constraint/problem.py":137 * may assume * """ * for variable in variables: # <<<<<<<<<<<<<< @@ -4693,7 +4690,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":118 + /* "constraint/problem.py":117 * self._variables[variable] = domain * * def addVariables(self, variables: Sequence, domain): # <<<<<<<<<<<<<< @@ -4717,10 +4714,10 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_10addVariables(CYTHON_U return __pyx_r; } -/* "constraint/problem.py":141 +/* "constraint/problem.py":140 * self.addVariable(variable, domain) * - * def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): # <<<<<<<<<<<<<< * """Add a constraint to the problem. * */ @@ -4767,41 +4764,41 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_constraint,&__pyx_mstate_global->__pyx_n_u_variables_2,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, 141, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 140, __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, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 140, __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, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 140, __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, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 140, __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, "addConstraint", 0) < (0)) __PYX_ERR(0, 141, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "addConstraint", 0) < (0)) __PYX_ERR(0, 140, __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("addConstraint", 0, 2, 3, i); __PYX_ERR(0, 141, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("addConstraint", 0, 2, 3, i); __PYX_ERR(0, 140, __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, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 140, __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, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 140, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 141, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 140, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -4813,7 +4810,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("addConstraint", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 141, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("addConstraint", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 140, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -4835,7 +4832,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/problem.py":164 +/* "constraint/problem.py":163 * return * elif isinstance(constraint, list): * assert all(isinstance(c, str) for c in constraint), f"Expected constraints to be strings, got {constraint}" # <<<<<<<<<<<<<< @@ -4855,7 +4852,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_13addConstraint_genexpr if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_7problem___pyx_scope_struct__genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 164, __pyx_L1_error) + __PYX_ERR(0, 163, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -4863,7 +4860,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_13addConstraint_genexpr __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_7problem_7Problem_13addConstraint_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_addConstraint_locals_gen, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_7problem_7Problem_13addConstraint_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_addConstraint_locals_gen, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4901,16 +4898,16 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 164, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 164, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 163, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 163, __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, 164, __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, 163, __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, 164, __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, 163, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { @@ -4918,7 +4915,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2genera { 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, 164, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 163, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4928,7 +4925,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2genera { 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, 164, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 163, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } @@ -4939,13 +4936,13 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2genera #endif ++__pyx_t_2; } - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __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, 164, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 163, __pyx_L1_error) PyErr_Clear(); } break; @@ -4995,10 +4992,10 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_13addConstraint_2genera return __pyx_r; } -/* "constraint/problem.py":141 +/* "constraint/problem.py":140 * self.addVariable(variable, domain) * - * def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): # <<<<<<<<<<<<<< * """Add a constraint to the problem. * */ @@ -5021,7 +5018,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __Pyx_RefNannySetupContext("addConstraint", 0); __Pyx_INCREF(__pyx_v_constraint); - /* "constraint/problem.py":160 + /* "constraint/problem.py":159 * """ # noqa: E501 * # compile string constraints (variables argument ignored as it is inferred from the string and may be reordered) * if isinstance(constraint, str): # <<<<<<<<<<<<<< @@ -5031,19 +5028,19 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_1 = PyUnicode_Check(__pyx_v_constraint); if (__pyx_t_1) { - /* "constraint/problem.py":161 + /* "constraint/problem.py":160 * # compile string constraints (variables argument ignored as it is inferred from the string and may be reordered) * if isinstance(constraint, str): * self._str_constraints.append(constraint) # <<<<<<<<<<<<<< * return * elif isinstance(constraint, list): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_constraint); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_constraint); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":162 + /* "constraint/problem.py":161 * if isinstance(constraint, str): * self._str_constraints.append(constraint) * return # <<<<<<<<<<<<<< @@ -5054,7 +5051,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/problem.py":160 + /* "constraint/problem.py":159 * """ # noqa: E501 * # compile string constraints (variables argument ignored as it is inferred from the string and may be reordered) * if isinstance(constraint, str): # <<<<<<<<<<<<<< @@ -5063,7 +5060,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ */ } - /* "constraint/problem.py":163 + /* "constraint/problem.py":162 * self._str_constraints.append(constraint) * return * elif isinstance(constraint, list): # <<<<<<<<<<<<<< @@ -5073,7 +5070,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_1 = PyList_Check(__pyx_v_constraint); if (__pyx_t_1) { - /* "constraint/problem.py":164 + /* "constraint/problem.py":163 * return * elif isinstance(constraint, list): * assert all(isinstance(c, str) for c in constraint), f"Expected constraints to be strings, got {constraint}" # <<<<<<<<<<<<<< @@ -5082,36 +5079,36 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_2 = __pyx_pf_10constraint_7problem_7Problem_13addConstraint_genexpr(NULL, __pyx_v_constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_10constraint_7problem_7Problem_13addConstraint_genexpr(NULL, __pyx_v_constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_4 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) { - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_constraint, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_constraint, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_constraints_to_be_strin, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_constraints_to_be_strin, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 164, __pyx_L1_error) + __PYX_ERR(0, 163, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 164, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 163, __pyx_L1_error) #endif - /* "constraint/problem.py":165 + /* "constraint/problem.py":164 * elif isinstance(constraint, list): * assert all(isinstance(c, str) for c in constraint), f"Expected constraints to be strings, got {constraint}" * self._str_constraints.extend(constraint) # <<<<<<<<<<<<<< * return * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); @@ -5121,12 +5118,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":166 + /* "constraint/problem.py":165 * assert all(isinstance(c, str) for c in constraint), f"Expected constraints to be strings, got {constraint}" * self._str_constraints.extend(constraint) * return # <<<<<<<<<<<<<< @@ -5137,7 +5134,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/problem.py":163 + /* "constraint/problem.py":162 * self._str_constraints.append(constraint) * return * elif isinstance(constraint, list): # <<<<<<<<<<<<<< @@ -5146,31 +5143,31 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ */ } - /* "constraint/problem.py":169 + /* "constraint/problem.py":168 * * # add regular constraints * if not isinstance(constraint, Constraint): # <<<<<<<<<<<<<< * if callable(constraint): * # future warn("A function or lambda has been used for a constraint, consider using string constraints") */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_IsInstance(__pyx_v_constraint, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 169, __pyx_L1_error) + __pyx_t_1 = PyObject_IsInstance(__pyx_v_constraint, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (!__pyx_t_1); if (__pyx_t_7) { - /* "constraint/problem.py":170 + /* "constraint/problem.py":169 * # add regular constraints * if not isinstance(constraint, Constraint): * if callable(constraint): # <<<<<<<<<<<<<< * # future warn("A function or lambda has been used for a constraint, consider using string constraints") * constraint = FunctionConstraint(constraint) */ - __pyx_t_7 = __Pyx_PyCallable_Check(__pyx_v_constraint); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCallable_Check(__pyx_v_constraint); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 169, __pyx_L1_error) if (__pyx_t_7) { - /* "constraint/problem.py":172 + /* "constraint/problem.py":171 * if callable(constraint): * # future warn("A function or lambda has been used for a constraint, consider using string constraints") * constraint = FunctionConstraint(constraint) # <<<<<<<<<<<<<< @@ -5178,7 +5175,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ * constraint = CompilableFunctionConstraint(constraint) */ __pyx_t_5 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -5197,13 +5194,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_constraint, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":170 + /* "constraint/problem.py":169 * # add regular constraints * if not isinstance(constraint, Constraint): * if callable(constraint): # <<<<<<<<<<<<<< @@ -5213,7 +5210,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ goto __pyx_L5; } - /* "constraint/problem.py":173 + /* "constraint/problem.py":172 * # future warn("A function or lambda has been used for a constraint, consider using string constraints") * constraint = FunctionConstraint(constraint) * elif isinstance(constraint, str): # <<<<<<<<<<<<<< @@ -5223,7 +5220,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_7 = PyUnicode_Check(__pyx_v_constraint); if (likely(__pyx_t_7)) { - /* "constraint/problem.py":174 + /* "constraint/problem.py":173 * constraint = FunctionConstraint(constraint) * elif isinstance(constraint, str): * constraint = CompilableFunctionConstraint(constraint) # <<<<<<<<<<<<<< @@ -5231,7 +5228,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ * msg = "Constraints must be instances of subclasses " "of the Constraint class" */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 174, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS @@ -5250,13 +5247,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_constraint, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":173 + /* "constraint/problem.py":172 * # future warn("A function or lambda has been used for a constraint, consider using string constraints") * constraint = FunctionConstraint(constraint) * elif isinstance(constraint, str): # <<<<<<<<<<<<<< @@ -5266,7 +5263,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ goto __pyx_L5; } - /* "constraint/problem.py":176 + /* "constraint/problem.py":175 * constraint = CompilableFunctionConstraint(constraint) * else: * msg = "Constraints must be instances of subclasses " "of the Constraint class" # <<<<<<<<<<<<<< @@ -5277,7 +5274,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Constraints_must_be_instances_of); __pyx_v_msg = __pyx_mstate_global->__pyx_kp_u_Constraints_must_be_instances_of; - /* "constraint/problem.py":177 + /* "constraint/problem.py":176 * else: * msg = "Constraints must be instances of subclasses " "of the Constraint class" * raise ValueError(msg) # <<<<<<<<<<<<<< @@ -5290,16 +5287,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_msg}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 177, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) } __pyx_L5:; - /* "constraint/problem.py":169 + /* "constraint/problem.py":168 * * # add regular constraints * if not isinstance(constraint, Constraint): # <<<<<<<<<<<<<< @@ -5308,31 +5305,31 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ */ } - /* "constraint/problem.py":178 + /* "constraint/problem.py":177 * msg = "Constraints must be instances of subclasses " "of the Constraint class" * raise ValueError(msg) * self._constraints.append((constraint, variables)) # <<<<<<<<<<<<<< * * def getSolution(self): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_constraint); __Pyx_GIVEREF(__pyx_v_constraint); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 178, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 177, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 178, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 177, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_t_5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "constraint/problem.py":141 + /* "constraint/problem.py":140 * self.addVariable(variable, domain) * - * def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): # <<<<<<<<<<<<<< * """Add a constraint to the problem. * */ @@ -5355,7 +5352,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_12addConstraint(CYTHON_ return __pyx_r; } -/* "constraint/problem.py":180 +/* "constraint/problem.py":179 * self._constraints.append((constraint, variables)) * * def getSolution(self): # <<<<<<<<<<<<<< @@ -5403,32 +5400,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 180, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 179, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 180, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 179, __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, "getSolution", 0) < (0)) __PYX_ERR(0, 180, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolution", 0) < (0)) __PYX_ERR(0, 179, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolution", 1, 1, 1, i); __PYX_ERR(0, 180, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolution", 1, 1, 1, i); __PYX_ERR(0, 179, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 180, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 179, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolution", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolution", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 179, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5469,7 +5466,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolution", 0); - /* "constraint/problem.py":194 + /* "constraint/problem.py":193 * dictionary mapping variables to values: Solution for the problem * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) # <<<<<<<<<<<<<< @@ -5478,22 +5475,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_getArgs, __pyx_callargs+__pyx_t_5, (1-__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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -5502,7 +5499,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 194, __pyx_L1_error) + __PYX_ERR(0, 193, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5514,27 +5511,27 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __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, 194, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -5544,7 +5541,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 194, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; @@ -5552,7 +5549,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 194, __pyx_L1_error) + __PYX_ERR(0, 193, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_domains = __pyx_t_3; @@ -5562,18 +5559,18 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __pyx_v_vconstraints = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/problem.py":195 + /* "constraint/problem.py":194 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< * return None * return self._solver.getSolution(domains, constraints, vconstraints) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 194, __pyx_L1_error) __pyx_t_9 = (!__pyx_t_8); if (__pyx_t_9) { - /* "constraint/problem.py":196 + /* "constraint/problem.py":195 * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: * return None # <<<<<<<<<<<<<< @@ -5584,7 +5581,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "constraint/problem.py":195 + /* "constraint/problem.py":194 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< @@ -5593,7 +5590,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN */ } - /* "constraint/problem.py":197 + /* "constraint/problem.py":196 * if not domains: * return None * return self._solver.getSolution(domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -5601,7 +5598,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN * def getSolutions(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); @@ -5611,14 +5608,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getSolution, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__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, 197, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":180 + /* "constraint/problem.py":179 * self._constraints.append((constraint, variables)) * * def getSolution(self): # <<<<<<<<<<<<<< @@ -5644,7 +5641,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_14getSolution(CYTHON_UN return __pyx_r; } -/* "constraint/problem.py":199 +/* "constraint/problem.py":198 * return self._solver.getSolution(domains, constraints, vconstraints) * * def getSolutions(self): # <<<<<<<<<<<<<< @@ -5692,32 +5689,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 199, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 198, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 199, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 198, __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, "getSolutions", 0) < (0)) __PYX_ERR(0, 199, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolutions", 0) < (0)) __PYX_ERR(0, 198, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutions", 1, 1, 1, i); __PYX_ERR(0, 199, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutions", 1, 1, 1, i); __PYX_ERR(0, 198, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 199, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 198, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolutions", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 199, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolutions", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 198, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5758,7 +5755,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolutions", 0); - /* "constraint/problem.py":213 + /* "constraint/problem.py":212 * list of dictionaries mapping variables to values: All solutions for the problem * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) # <<<<<<<<<<<<<< @@ -5767,22 +5764,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 213, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 212, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_getArgs, __pyx_callargs+__pyx_t_5, (1-__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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -5791,7 +5788,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 213, __pyx_L1_error) + __PYX_ERR(0, 212, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -5803,27 +5800,27 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __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, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -5833,7 +5830,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 213, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 212, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; @@ -5841,7 +5838,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 213, __pyx_L1_error) + __PYX_ERR(0, 212, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_domains = __pyx_t_3; @@ -5851,18 +5848,18 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U __pyx_v_vconstraints = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/problem.py":214 + /* "constraint/problem.py":213 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< * return [] * return self._solver.getSolutions(domains, constraints, vconstraints) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_t_9 = (!__pyx_t_8); if (__pyx_t_9) { - /* "constraint/problem.py":215 + /* "constraint/problem.py":214 * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: * return [] # <<<<<<<<<<<<<< @@ -5870,13 +5867,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":214 + /* "constraint/problem.py":213 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< @@ -5885,7 +5882,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U */ } - /* "constraint/problem.py":216 + /* "constraint/problem.py":215 * if not domains: * return [] * return self._solver.getSolutions(domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -5893,7 +5890,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U * def getSolutionIter(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); @@ -5903,14 +5900,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getSolutions, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__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, 216, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":199 + /* "constraint/problem.py":198 * return self._solver.getSolution(domains, constraints, vconstraints) * * def getSolutions(self): # <<<<<<<<<<<<<< @@ -5936,7 +5933,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_16getSolutions(CYTHON_U return __pyx_r; } -/* "constraint/problem.py":218 +/* "constraint/problem.py":217 * return self._solver.getSolutions(domains, constraints, vconstraints) * * def getSolutionIter(self): # <<<<<<<<<<<<<< @@ -5984,32 +5981,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,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, 218, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 217, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 217, __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, "getSolutionIter", 0) < (0)) __PYX_ERR(0, 218, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolutionIter", 0) < (0)) __PYX_ERR(0, 217, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionIter", 1, 1, 1, i); __PYX_ERR(0, 218, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionIter", 1, 1, 1, i); __PYX_ERR(0, 217, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { 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, 218, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 217, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolutionIter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolutionIter", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 217, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6050,7 +6047,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolutionIter", 0); - /* "constraint/problem.py":234 + /* "constraint/problem.py":233 * StopIteration * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) # <<<<<<<<<<<<<< @@ -6059,22 +6056,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_requires_pickling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, NULL}; - __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 234, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_t_4, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 233, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_getArgs, __pyx_callargs+__pyx_t_5, (1-__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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -6083,7 +6080,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 234, __pyx_L1_error) + __PYX_ERR(0, 233, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6095,27 +6092,27 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __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, 234, __pyx_L1_error) + __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -6125,7 +6122,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 234, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 233, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; @@ -6133,7 +6130,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 234, __pyx_L1_error) + __PYX_ERR(0, 233, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_domains = __pyx_t_3; @@ -6143,18 +6140,18 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO __pyx_v_vconstraints = __pyx_t_2; __pyx_t_2 = 0; - /* "constraint/problem.py":235 + /* "constraint/problem.py":234 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< * return iter(()) * return self._solver.getSolutionIter(domains, constraints, vconstraints) */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_domains); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 234, __pyx_L1_error) __pyx_t_9 = (!__pyx_t_8); if (__pyx_t_9) { - /* "constraint/problem.py":236 + /* "constraint/problem.py":235 * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: * return iter(()) # <<<<<<<<<<<<<< @@ -6162,13 +6159,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetIter(__pyx_mstate_global->__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_mstate_global->__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":235 + /* "constraint/problem.py":234 * """ * domains, constraints, vconstraints = self._getArgs(picklable=self._solver.requires_pickling) * if not domains: # <<<<<<<<<<<<<< @@ -6177,7 +6174,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO */ } - /* "constraint/problem.py":237 + /* "constraint/problem.py":236 * if not domains: * return iter(()) * return self._solver.getSolutionIter(domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -6185,7 +6182,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_solver_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); @@ -6195,14 +6192,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getSolutionIter, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__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, 237, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":218 + /* "constraint/problem.py":217 * return self._solver.getSolutions(domains, constraints, vconstraints) * * def getSolutionIter(self): # <<<<<<<<<<<<<< @@ -6228,7 +6225,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_18getSolutionIter(CYTHO return __pyx_r; } -/* "constraint/problem.py":239 +/* "constraint/problem.py":238 * return self._solver.getSolutionIter(domains, constraints, vconstraints) * * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: # <<<<<<<<<<<<<< @@ -6277,35 +6274,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_order,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, 239, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 238, __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, 239, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 238, __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, 239, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __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, "getSolutionsOrderedList", 0) < (0)) __PYX_ERR(0, 239, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolutionsOrderedList", 0) < (0)) __PYX_ERR(0, 238, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionsOrderedList", 0, 1, 2, i); __PYX_ERR(0, 239, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionsOrderedList", 0, 1, 2, i); __PYX_ERR(0, 238, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 239, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 238, __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, 239, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 238, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -6316,7 +6313,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolutionsOrderedList", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 239, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolutionsOrderedList", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 238, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6327,7 +6324,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_order), (&PyList_Type), 1, "order", 2))) __PYX_ERR(0, 239, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_order), (&PyList_Type), 1, "order", 2))) __PYX_ERR(0, 238, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedList(__pyx_self, __pyx_v_self, __pyx_v_order); /* function exit code */ @@ -6348,7 +6345,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedList_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/problem.py":243 +/* "constraint/problem.py":242 * solutions: list[dict] = self.getSolutions() * if order is None or len(order) == 1: * return list(tuple(solution.values()) for solution in solutions) # <<<<<<<<<<<<<< @@ -6368,7 +6365,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedLi if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_7problem___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 243, __pyx_L1_error) + __PYX_ERR(0, 242, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -6376,7 +6373,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedLi __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_7problem_7Problem_23getSolutionsOrderedList_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedList_2generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6413,13 +6410,13 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 243, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 243, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 242, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 243, __pyx_L1_error) + __PYX_ERR(0, 242, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -6427,13 +6424,13 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi { 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, 243, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 242, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_solution); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_solution, __pyx_t_3); @@ -6446,13 +6443,13 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6481,7 +6478,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi } static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedList_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/problem.py":245 +/* "constraint/problem.py":244 * return list(tuple(solution.values()) for solution in solutions) * get_in_order = itemgetter(*order) * return list(get_in_order(params) for params in solutions) # <<<<<<<<<<<<<< @@ -6501,7 +6498,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedLi if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_7problem___pyx_scope_struct_3_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 245, __pyx_L1_error) + __PYX_ERR(0, 244, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -6512,7 +6509,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedLi __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_7problem_7Problem_23getSolutionsOrderedList_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedList_5generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6550,13 +6547,13 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 245, __pyx_L1_error) - __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 245, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 244, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 245, __pyx_L1_error) + __PYX_ERR(0, 244, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; @@ -6564,20 +6561,20 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi { 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, 245, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 244, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_params); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_params, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_in_order)) { __Pyx_RaiseClosureNameError("get_in_order"); __PYX_ERR(0, 245, __pyx_L1_error) } + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_in_order)) { __Pyx_RaiseClosureNameError("get_in_order"); __PYX_ERR(0, 244, __pyx_L1_error) } __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_in_order); __pyx_t_5 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_get_in_order; __pyx_t_6 = 1; @@ -6597,10 +6594,10 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } - if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 245, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6629,7 +6626,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_23getSolutionsOrderedLi return __pyx_r; } -/* "constraint/problem.py":239 +/* "constraint/problem.py":238 * return self._solver.getSolutionIter(domains, constraints, vconstraints) * * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: # <<<<<<<<<<<<<< @@ -6659,12 +6656,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 239, __pyx_L1_error) + __PYX_ERR(0, 238, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - /* "constraint/problem.py":241 + /* "constraint/problem.py":240 * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: * """Returns the solutions as a list of tuples, with each solution tuple ordered according to `order`.""" * solutions: list[dict] = self.getSolutions() # <<<<<<<<<<<<<< @@ -6678,14 +6675,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getSolutions, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 241, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_1))) __PYX_ERR(0, 240, __pyx_L1_error) __pyx_v_solutions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":242 + /* "constraint/problem.py":241 * """Returns the solutions as a list of tuples, with each solution tuple ordered according to `order`.""" * solutions: list[dict] = self.getSolutions() * if order is None or len(order) == 1: # <<<<<<<<<<<<<< @@ -6700,15 +6697,15 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi } if (unlikely(__pyx_v_order == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 242, __pyx_L1_error) + __PYX_ERR(0, 241, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_order); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_order); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 241, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 == 1); __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_4) { - /* "constraint/problem.py":243 + /* "constraint/problem.py":242 * solutions: list[dict] = self.getSolutions() * if order is None or len(order) == 1: * return list(tuple(solution.values()) for solution in solutions) # <<<<<<<<<<<<<< @@ -6716,16 +6713,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi * return list(get_in_order(params) for params in solutions) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedList_genexpr(NULL, __pyx_v_solutions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedList_genexpr(NULL, __pyx_v_solutions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "constraint/problem.py":242 + /* "constraint/problem.py":241 * """Returns the solutions as a list of tuples, with each solution tuple ordered according to `order`.""" * solutions: list[dict] = self.getSolutions() * if order is None or len(order) == 1: # <<<<<<<<<<<<<< @@ -6734,18 +6731,18 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi */ } - /* "constraint/problem.py":244 + /* "constraint/problem.py":243 * if order is None or len(order) == 1: * return list(tuple(solution.values()) for solution in solutions) * get_in_order = itemgetter(*order) # <<<<<<<<<<<<<< * return list(get_in_order(params) for params in solutions) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_itemgetter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_itemgetter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PySequence_Tuple(__pyx_v_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_1 = PySequence_Tuple(__pyx_v_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6753,7 +6750,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi __pyx_cur_scope->__pyx_v_get_in_order = __pyx_t_7; __pyx_t_7 = 0; - /* "constraint/problem.py":245 + /* "constraint/problem.py":244 * return list(tuple(solution.values()) for solution in solutions) * get_in_order = itemgetter(*order) * return list(get_in_order(params) for params in solutions) # <<<<<<<<<<<<<< @@ -6761,16 +6758,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi * def getSolutionsAsListDict( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedList_3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_solutions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_7 = __pyx_pf_10constraint_7problem_7Problem_23getSolutionsOrderedList_3genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_solutions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":239 + /* "constraint/problem.py":238 * return self._solver.getSolutionIter(domains, constraints, vconstraints) * * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: # <<<<<<<<<<<<<< @@ -6795,7 +6792,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_20getSolutionsOrderedLi return __pyx_r; } -/* "constraint/problem.py":247 +/* "constraint/problem.py":246 * return list(get_in_order(params) for params in solutions) * * def getSolutionsAsListDict( # <<<<<<<<<<<<<< @@ -6845,28 +6842,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_order,&__pyx_mstate_global->__pyx_n_u_validate,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, 247, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 246, __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, "getSolutionsAsListDict", 0) < (0)) __PYX_ERR(0, 247, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "getSolutionsAsListDict", 0) < (0)) __PYX_ERR(0, 246, __pyx_L3_error) - /* "constraint/problem.py":248 + /* "constraint/problem.py":247 * * def getSolutionsAsListDict( * self, order: list[str] = None, validate: bool = True # <<<<<<<<<<<<<< @@ -6875,21 +6872,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ if (!values[1]) values[1] = __Pyx_NewRef(((PyObject*)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionsAsListDict", 0, 1, 3, i); __PYX_ERR(0, 247, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("getSolutionsAsListDict", 0, 1, 3, i); __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 246, __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, 247, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 246, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -6898,14 +6895,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __pyx_v_self = values[0]; __pyx_v_order = ((PyObject*)values[1]); if (values[2]) { - __pyx_v_validate = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_validate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L3_error) + __pyx_v_validate = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_validate == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L3_error) } else { __pyx_v_validate = ((int)((int)1)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getSolutionsAsListDict", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 247, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("getSolutionsAsListDict", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 246, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6916,10 +6913,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_order), (&PyList_Type), 1, "order", 2))) __PYX_ERR(0, 248, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_order), (&PyList_Type), 1, "order", 2))) __PYX_ERR(0, 247, __pyx_L1_error) __pyx_r = __pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDict(__pyx_self, __pyx_v_self, __pyx_v_order, __pyx_v_validate); - /* "constraint/problem.py":247 + /* "constraint/problem.py":246 * return list(get_in_order(params) for params in solutions) * * def getSolutionsAsListDict( # <<<<<<<<<<<<<< @@ -6969,7 +6966,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getSolutionsAsListDict", 0); - /* "constraint/problem.py":251 + /* "constraint/problem.py":250 * ) -> tuple[list[tuple], dict[tuple, int], int]: # noqa: E501 * """Returns the searchspace as a list of tuples, a dict of the searchspace for fast lookups and the size.""" * solutions_list = self.getSolutionsOrderedList(order) # <<<<<<<<<<<<<< @@ -6983,26 +6980,26 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_order}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_getSolutionsOrderedList, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_solutions_list = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/problem.py":252 + /* "constraint/problem.py":251 * """Returns the searchspace as a list of tuples, a dict of the searchspace for fast lookups and the size.""" * solutions_list = self.getSolutionsOrderedList(order) * size_list = len(solutions_list) # <<<<<<<<<<<<<< * solutions_dict: dict = dict(zip(solutions_list, range(size_list))) * if validate: */ - __pyx_t_4 = PyObject_Length(__pyx_v_solutions_list); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 252, __pyx_L1_error) - __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_solutions_list); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 251, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_size_list = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/problem.py":253 + /* "constraint/problem.py":252 * solutions_list = self.getSolutionsOrderedList(order) * size_list = len(solutions_list) * solutions_dict: dict = dict(zip(solutions_list, range(size_list))) # <<<<<<<<<<<<<< @@ -7017,7 +7014,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_size_list}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_3 = 1; @@ -7026,7 +7023,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_zip, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_3 = 1; @@ -7035,13 +7032,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyDict_Type), __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_solutions_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":254 + /* "constraint/problem.py":253 * size_list = len(solutions_list) * solutions_dict: dict = dict(zip(solutions_list, range(size_list))) * if validate: # <<<<<<<<<<<<<< @@ -7050,32 +7047,32 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic */ if (__pyx_v_validate) { - /* "constraint/problem.py":256 + /* "constraint/problem.py":255 * if validate: * # check for duplicates * size_dict = len(solutions_dict) # <<<<<<<<<<<<<< * if size_list != size_dict: * raise ValueError( */ - __pyx_t_4 = PyDict_Size(__pyx_v_solutions_dict); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error) - __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_4 = PyDict_Size(__pyx_v_solutions_dict); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_size_dict = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/problem.py":257 + /* "constraint/problem.py":256 * # check for duplicates * size_dict = len(solutions_dict) * if size_list != size_dict: # <<<<<<<<<<<<<< * raise ValueError( * f"{size_list - size_dict} duplicate parameter configurations out of {size_dict} unique.", */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_size_list, __pyx_v_size_dict, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_size_list, __pyx_v_size_dict, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_9)) { - /* "constraint/problem.py":258 + /* "constraint/problem.py":257 * size_dict = len(solutions_dict) * if size_list != size_dict: * raise ValueError( # <<<<<<<<<<<<<< @@ -7084,31 +7081,31 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic */ __pyx_t_5 = NULL; - /* "constraint/problem.py":259 + /* "constraint/problem.py":258 * if size_list != size_dict: * raise ValueError( * f"{size_list - size_dict} duplicate parameter configurations out of {size_dict} unique.", # <<<<<<<<<<<<<< * f"Duplicate configs: {list(set([c for c in solutions_list if solutions_list.count(c) > 1]))}", * f"Constraints: {self._constraints}, {self._str_constraints}" */ - __pyx_t_2 = PyNumber_Subtract(__pyx_v_size_list, __pyx_v_size_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_v_size_list, __pyx_v_size_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_size_dict, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_size_dict, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10[0] = __pyx_t_7; __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u_duplicate_parameter_configurati; __pyx_t_10[2] = __pyx_t_2; __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u_unique; __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":260 + /* "constraint/problem.py":259 * raise ValueError( * f"{size_list - size_dict} duplicate parameter configurations out of {size_dict} unique.", * f"Duplicate configs: {list(set([c for c in solutions_list if solutions_list.count(c) > 1]))}", # <<<<<<<<<<<<<< @@ -7116,16 +7113,16 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic * ) */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L7_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_solutions_list)) || PyTuple_CheckExact(__pyx_v_solutions_list)) { __pyx_t_7 = __pyx_v_solutions_list; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_solutions_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L7_error) + __pyx_t_4 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_solutions_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 260, __pyx_L7_error) + __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 259, __pyx_L7_error) } for (;;) { if (likely(!__pyx_t_11)) { @@ -7133,7 +7130,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic { 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, 260, __pyx_L7_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 259, __pyx_L7_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -7143,7 +7140,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic { 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, 260, __pyx_L7_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 259, __pyx_L7_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } @@ -7154,13 +7151,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic #endif ++__pyx_t_4; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L7_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L7_error) } else { __pyx_t_8 = __pyx_t_11(__pyx_t_7); 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, 260, __pyx_L7_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 259, __pyx_L7_error) PyErr_Clear(); } break; @@ -7176,15 +7173,15 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_8genexpr3__pyx_v_c}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_count, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L7_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 259, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); } - __pyx_t_12 = PyObject_RichCompare(__pyx_t_8, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 260, __pyx_L7_error) + __pyx_t_12 = PyObject_RichCompare(__pyx_t_8, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 259, __pyx_L7_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 260, __pyx_L7_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 259, __pyx_L7_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_9) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr3__pyx_v_c))) __PYX_ERR(0, 260, __pyx_L7_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr3__pyx_v_c))) __PYX_ERR(0, 259, __pyx_L7_error) } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -7195,34 +7192,34 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic goto __pyx_L1_error; __pyx_L12_exit_scope:; } /* exit inner scope */ - __pyx_t_7 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_7 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Duplicate_configs, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Duplicate_configs, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "constraint/problem.py":261 + /* "constraint/problem.py":260 * f"{size_list - size_dict} duplicate parameter configurations out of {size_dict} unique.", * f"Duplicate configs: {list(set([c for c in solutions_list if solutions_list.count(c) > 1]))}", * f"Constraints: {self._constraints}, {self._str_constraints}" # <<<<<<<<<<<<<< * ) * return ( */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_Constraints; @@ -7230,7 +7227,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_10[3] = __pyx_t_8; __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_10, 4, 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8)); - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -7242,14 +7239,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __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, 258, __pyx_L1_error) + __PYX_ERR(0, 257, __pyx_L1_error) - /* "constraint/problem.py":257 + /* "constraint/problem.py":256 * # check for duplicates * size_dict = len(solutions_dict) * if size_list != size_dict: # <<<<<<<<<<<<<< @@ -7258,7 +7255,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic */ } - /* "constraint/problem.py":254 + /* "constraint/problem.py":253 * size_list = len(solutions_list) * solutions_dict: dict = dict(zip(solutions_list, range(size_list))) * if validate: # <<<<<<<<<<<<<< @@ -7267,7 +7264,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic */ } - /* "constraint/problem.py":263 + /* "constraint/problem.py":262 * f"Constraints: {self._constraints}, {self._str_constraints}" * ) * return ( # <<<<<<<<<<<<<< @@ -7276,29 +7273,29 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic */ __Pyx_XDECREF(__pyx_r); - /* "constraint/problem.py":264 + /* "constraint/problem.py":263 * ) * return ( * solutions_list, # <<<<<<<<<<<<<< * solutions_dict, * size_list, */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_solutions_list); __Pyx_GIVEREF(__pyx_v_solutions_list); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_solutions_list) != (0)) __PYX_ERR(0, 264, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_solutions_list) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); __Pyx_INCREF(__pyx_v_solutions_dict); __Pyx_GIVEREF(__pyx_v_solutions_dict); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_solutions_dict) != (0)) __PYX_ERR(0, 264, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_solutions_dict) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); __Pyx_INCREF(__pyx_v_size_list); __Pyx_GIVEREF(__pyx_v_size_list); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_size_list) != (0)) __PYX_ERR(0, 264, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_size_list) != (0)) __PYX_ERR(0, 263, __pyx_L1_error); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":247 + /* "constraint/problem.py":246 * return list(get_in_order(params) for params in solutions) * * def getSolutionsAsListDict( # <<<<<<<<<<<<<< @@ -7328,7 +7325,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_22getSolutionsAsListDic return __pyx_r; } -/* "constraint/problem.py":269 +/* "constraint/problem.py":268 * ) * * def _getArgs(self, picklable=False): # <<<<<<<<<<<<<< @@ -7376,35 +7373,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_picklable,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, 269, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 268, __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, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 268, __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, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 268, __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, "_getArgs", 0) < (0)) __PYX_ERR(0, 269, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_getArgs", 0) < (0)) __PYX_ERR(0, 268, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_getArgs", 0, 1, 2, i); __PYX_ERR(0, 269, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_getArgs", 0, 1, 2, i); __PYX_ERR(0, 268, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 268, __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, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 268, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -7415,7 +7412,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_getArgs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 269, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_getArgs", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 268, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7437,7 +7434,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "constraint/problem.py":290 +/* "constraint/problem.py":289 * # check if there are any precompiled FunctionConstraints when there shouldn't be * if picklable: * assert not any(isinstance(c, FunctionConstraint) for c, _ in constraints), f"You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why)" # noqa E501 # <<<<<<<<<<<<<< @@ -7457,7 +7454,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8_getArgs_genexpr(CYTHO if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_10constraint_7problem___pyx_scope_struct_4_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 290, __pyx_L1_error) + __PYX_ERR(0, 289, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } @@ -7465,7 +7462,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_8_getArgs_genexpr(CYTHO __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_7problem_7Problem_8_getArgs_2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem__getArgs_locals_genexpr, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Problem__getArgs_locals_genexpr, __pyx_mstate_global->__pyx_n_u_constraint_problem); if (unlikely(!gen)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -7505,21 +7502,21 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 290, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 290, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 289, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 289, __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, 290, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 289, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -7527,7 +7524,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 290, __pyx_L1_error) + __PYX_ERR(0, 289, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7537,22 +7534,22 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ __Pyx_INCREF(__pyx_t_5); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); } #else - __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); @@ -7560,7 +7557,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 290, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; @@ -7568,7 +7565,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 290, __pyx_L1_error) + __PYX_ERR(0, 289, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); @@ -7579,9 +7576,9 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FunctionConstraint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_8 = PyObject_IsInstance(__pyx_cur_scope->__pyx_v_c, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { __Pyx_XDECREF(__pyx_r); @@ -7623,7 +7620,7 @@ static PyObject *__pyx_gb_10constraint_7problem_7Problem_8_getArgs_2generator3(_ return __pyx_r; } -/* "constraint/problem.py":269 +/* "constraint/problem.py":268 * ) * * def _getArgs(self, picklable=False): # <<<<<<<<<<<<<< @@ -7670,14 +7667,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_getArgs", 0); - /* "constraint/problem.py":270 + /* "constraint/problem.py":269 * * def _getArgs(self, picklable=False): * domains = self._variables.copy() # <<<<<<<<<<<<<< * allvariables = domains.keys() * constraints: list[tuple[Constraint, list]] = [] */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); @@ -7687,13 +7684,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__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, 270, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_domains = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/problem.py":271 + /* "constraint/problem.py":270 * def _getArgs(self, picklable=False): * domains = self._variables.copy() * allvariables = domains.keys() # <<<<<<<<<<<<<< @@ -7707,55 +7704,55 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_allvariables = __pyx_t_1; __pyx_t_1 = 0; - /* "constraint/problem.py":272 + /* "constraint/problem.py":271 * domains = self._variables.copy() * allvariables = domains.keys() * constraints: list[tuple[Constraint, list]] = [] # <<<<<<<<<<<<<< * * # parse string constraints */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_constraints = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":275 + /* "constraint/problem.py":274 * * # parse string constraints * if len(self._str_constraints) > 0: # <<<<<<<<<<<<<< * # warn("String constraints are a beta feature, please report issues experienced.") # future: remove * for constraint in self._str_constraints: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 275, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 > 0); if (__pyx_t_6) { - /* "constraint/problem.py":277 + /* "constraint/problem.py":276 * if len(self._str_constraints) > 0: * # warn("String constraints are a beta feature, please report issues experienced.") # future: remove * for constraint in self._str_constraints: # <<<<<<<<<<<<<< * parsed = compile_to_constraints([constraint], domains, picklable=picklable) * for c, v, _ in parsed: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_str_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __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_5 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __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, 277, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -7764,7 +7761,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 277, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -7774,7 +7771,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 277, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 276, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -7785,13 +7782,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); 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, 277, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 276, __pyx_L1_error) PyErr_Clear(); } break; @@ -7801,7 +7798,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":278 + /* "constraint/problem.py":277 * # warn("String constraints are a beta feature, please report issues experienced.") # future: remove * for constraint in self._str_constraints: * parsed = compile_to_constraints([constraint], domains, picklable=picklable) # <<<<<<<<<<<<<< @@ -7809,13 +7806,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE * self.addConstraint(c, v) */ __pyx_t_2 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_compile_to_constraints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_compile_to_constraints); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_constraint); __Pyx_GIVEREF(__pyx_v_constraint); - if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 278, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 277, __pyx_L1_error); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { @@ -7830,21 +7827,21 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_9, __pyx_v_domains}; - __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_v_picklable, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 278, __pyx_L1_error) + if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_picklable, __pyx_v_picklable, __pyx_t_10, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 277, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_parsed, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":279 + /* "constraint/problem.py":278 * for constraint in self._str_constraints: * parsed = compile_to_constraints([constraint], domains, picklable=picklable) * for c, v, _ in parsed: # <<<<<<<<<<<<<< @@ -7856,9 +7853,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_parsed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_12 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 278, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { @@ -7866,7 +7863,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 279, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 278, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -7876,7 +7873,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 279, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 278, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -7887,13 +7884,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_12(__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, 279, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 278, __pyx_L1_error) PyErr_Clear(); } break; @@ -7906,7 +7903,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 279, __pyx_L1_error) + __PYX_ERR(0, 278, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7918,27 +7915,27 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_10 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_10 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); @@ -7948,7 +7945,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_GOTREF(__pyx_t_9); index = 2; __pyx_t_2 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < (0)) __PYX_ERR(0, 279, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 3) < (0)) __PYX_ERR(0, 278, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L9_unpacking_done; @@ -7956,7 +7953,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 279, __pyx_L1_error) + __PYX_ERR(0, 278, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_10); @@ -7966,7 +7963,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":280 + /* "constraint/problem.py":279 * parsed = compile_to_constraints([constraint], domains, picklable=picklable) * for c, v, _ in parsed: * self.addConstraint(c, v) # <<<<<<<<<<<<<< @@ -7980,12 +7977,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_c, __pyx_v_v}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_addConstraint, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 280, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":279 + /* "constraint/problem.py":278 * for constraint in self._str_constraints: * parsed = compile_to_constraints([constraint], domains, picklable=picklable) * for c, v, _ in parsed: # <<<<<<<<<<<<<< @@ -7995,7 +7992,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":277 + /* "constraint/problem.py":276 * if len(self._str_constraints) > 0: * # warn("String constraints are a beta feature, please report issues experienced.") # future: remove * for constraint in self._str_constraints: # <<<<<<<<<<<<<< @@ -8005,7 +8002,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":275 + /* "constraint/problem.py":274 * * # parse string constraints * if len(self._str_constraints) > 0: # <<<<<<<<<<<<<< @@ -8014,23 +8011,23 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE */ } - /* "constraint/problem.py":283 + /* "constraint/problem.py":282 * * # add regular constraints * for constraint, variables in self._constraints: # <<<<<<<<<<<<<< * if not variables: * variables = list(allvariables) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_constraints); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __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_5 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __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, 283, __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, 282, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -8039,7 +8036,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 283, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 282, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -8049,7 +8046,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 283, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 282, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -8060,13 +8057,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) } else { __pyx_t_3 = __pyx_t_7(__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, 283, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 282, __pyx_L1_error) PyErr_Clear(); } break; @@ -8079,7 +8076,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 283, __pyx_L1_error) + __PYX_ERR(0, 282, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8089,22 +8086,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -8112,7 +8109,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_2 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 283, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 282, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_unpacking_done; @@ -8120,7 +8117,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 283, __pyx_L1_error) + __PYX_ERR(0, 282, __pyx_L1_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_8); @@ -8128,30 +8125,30 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_variables, __pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":284 + /* "constraint/problem.py":283 * # add regular constraints * for constraint, variables in self._constraints: * if not variables: # <<<<<<<<<<<<<< * variables = list(allvariables) * constraints.append((constraint, variables)) */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_variables); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 283, __pyx_L1_error) __pyx_t_15 = (!__pyx_t_6); if (__pyx_t_15) { - /* "constraint/problem.py":285 + /* "constraint/problem.py":284 * for constraint, variables in self._constraints: * if not variables: * variables = list(allvariables) # <<<<<<<<<<<<<< * constraints.append((constraint, variables)) * */ - __pyx_t_3 = PySequence_List(__pyx_v_allvariables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_3 = PySequence_List(__pyx_v_allvariables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_variables, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":284 + /* "constraint/problem.py":283 * # add regular constraints * for constraint, variables in self._constraints: * if not variables: # <<<<<<<<<<<<<< @@ -8160,25 +8157,25 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE */ } - /* "constraint/problem.py":286 + /* "constraint/problem.py":285 * if not variables: * variables = list(allvariables) * constraints.append((constraint, variables)) # <<<<<<<<<<<<<< * * # check if there are any precompiled FunctionConstraints when there shouldn't be */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_constraint); __Pyx_GIVEREF(__pyx_v_constraint); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 285, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 286, __pyx_L1_error); - __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_constraints, __pyx_t_3); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 285, __pyx_L1_error); + __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_constraints, __pyx_t_3); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":283 + /* "constraint/problem.py":282 * * # add regular constraints * for constraint, variables in self._constraints: # <<<<<<<<<<<<<< @@ -8188,17 +8185,17 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":289 + /* "constraint/problem.py":288 * * # check if there are any precompiled FunctionConstraints when there shouldn't be * if picklable: # <<<<<<<<<<<<<< * assert not any(isinstance(c, FunctionConstraint) for c, _ in constraints), f"You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why)" # noqa E501 * */ - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_picklable); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_picklable); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 288, __pyx_L1_error) if (__pyx_t_15) { - /* "constraint/problem.py":290 + /* "constraint/problem.py":289 * # check if there are any precompiled FunctionConstraints when there shouldn't be * if picklable: * assert not any(isinstance(c, FunctionConstraint) for c, _ in constraints), f"You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why)" # noqa E501 # <<<<<<<<<<<<<< @@ -8207,24 +8204,24 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { - __pyx_t_1 = __pyx_pf_10constraint_7problem_7Problem_8_getArgs_genexpr(NULL, __pyx_v_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_10constraint_7problem_7Problem_8_getArgs_genexpr(NULL, __pyx_v_constraints); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __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, 290, __pyx_L1_error) + __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (!__pyx_t_15); if (unlikely(!__pyx_t_6)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_mstate_global->__pyx_kp_u_You_have_used_FunctionConstraint, 0, 0); - __PYX_ERR(0, 290, __pyx_L1_error) + __PYX_ERR(0, 289, __pyx_L1_error) } } #else - if ((1)); else __PYX_ERR(0, 290, __pyx_L1_error) + if ((1)); else __PYX_ERR(0, 289, __pyx_L1_error) #endif - /* "constraint/problem.py":289 + /* "constraint/problem.py":288 * * # check if there are any precompiled FunctionConstraints when there shouldn't be * if picklable: # <<<<<<<<<<<<<< @@ -8233,19 +8230,19 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE */ } - /* "constraint/problem.py":292 + /* "constraint/problem.py":291 * assert not any(isinstance(c, FunctionConstraint) for c, _ in constraints), f"You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why)" # noqa E501 * * vconstraints = {} # <<<<<<<<<<<<<< * for variable in domains: * vconstraints[variable] = [] */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_vconstraints = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":293 + /* "constraint/problem.py":292 * * vconstraints = {} * for variable in domains: # <<<<<<<<<<<<<< @@ -8257,9 +8254,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __pyx_t_5 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_domains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_domains); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __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, 293, __pyx_L1_error) + __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 292, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -8267,7 +8264,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 293, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 292, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -8277,7 +8274,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE - if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 293, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 292, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } @@ -8288,13 +8285,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif ++__pyx_t_5; } - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_3); 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, 293, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 292, __pyx_L1_error) PyErr_Clear(); } break; @@ -8304,19 +8301,19 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":294 + /* "constraint/problem.py":293 * vconstraints = {} * for variable in domains: * vconstraints[variable] = [] # <<<<<<<<<<<<<< * for constraint, variables in constraints: * for variable in variables: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_vconstraints, __pyx_v_variable, __pyx_t_1) < 0))) __PYX_ERR(0, 294, __pyx_L1_error) + if (unlikely((PyDict_SetItem(__pyx_v_vconstraints, __pyx_v_variable, __pyx_t_1) < 0))) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":293 + /* "constraint/problem.py":292 * * vconstraints = {} * for variable in domains: # <<<<<<<<<<<<<< @@ -8326,7 +8323,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":295 + /* "constraint/problem.py":294 * for variable in domains: * vconstraints[variable] = [] * for constraint, variables in constraints: # <<<<<<<<<<<<<< @@ -8339,13 +8336,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 295, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 294, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -8353,7 +8350,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 295, __pyx_L1_error) + __PYX_ERR(0, 294, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8363,22 +8360,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #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, 295, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -8386,7 +8383,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 295, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_unpacking_done; @@ -8394,7 +8391,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 295, __pyx_L1_error) + __PYX_ERR(0, 294, __pyx_L1_error) __pyx_L25_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_2); @@ -8402,7 +8399,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_variables, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":296 + /* "constraint/problem.py":295 * vconstraints[variable] = [] * for constraint, variables in constraints: * for variable in variables: # <<<<<<<<<<<<<< @@ -8414,9 +8411,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __pyx_t_11 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_variables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __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, 296, __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, 295, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { @@ -8424,7 +8421,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 296, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -8434,7 +8431,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 296, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 295, __pyx_L1_error) #endif if (__pyx_t_11 >= __pyx_temp) break; } @@ -8445,13 +8442,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE #endif ++__pyx_t_11; } - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_7(__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, 296, __pyx_L1_error) + if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 295, __pyx_L1_error) PyErr_Clear(); } break; @@ -8461,28 +8458,28 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_variable, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":297 + /* "constraint/problem.py":296 * for constraint, variables in constraints: * for variable in variables: * vconstraints[variable].append((constraint, variables)) # <<<<<<<<<<<<<< * for constraint, variables in constraints[:]: * constraint.preProcess(variables, domains, constraints, vconstraints) */ - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_vconstraints, __pyx_v_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_constraint); __Pyx_GIVEREF(__pyx_v_constraint); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_constraint) != (0)) __PYX_ERR(0, 296, __pyx_L1_error); __Pyx_INCREF(__pyx_v_variables); __Pyx_GIVEREF(__pyx_v_variables); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); - __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_8, __pyx_t_2); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 297, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_variables) != (0)) __PYX_ERR(0, 296, __pyx_L1_error); + __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_8, __pyx_t_2); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":296 + /* "constraint/problem.py":295 * vconstraints[variable] = [] * for constraint, variables in constraints: * for variable in variables: # <<<<<<<<<<<<<< @@ -8492,7 +8489,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":295 + /* "constraint/problem.py":294 * for variable in domains: * vconstraints[variable] = [] * for constraint, variables in constraints: # <<<<<<<<<<<<<< @@ -8502,14 +8499,14 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":298 + /* "constraint/problem.py":297 * for variable in variables: * vconstraints[variable].append((constraint, variables)) * for constraint, variables in constraints[:]: # <<<<<<<<<<<<<< * constraint.preProcess(variables, domains, constraints, vconstraints) * for domain in domains.values(): */ - __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_constraints, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_constraints, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; @@ -8518,13 +8515,13 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE { 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, 298, __pyx_L1_error) + if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 297, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -8532,7 +8529,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 298, __pyx_L1_error) + __PYX_ERR(0, 297, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8542,22 +8539,22 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_INCREF(__pyx_t_8); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_8); } #else - __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); @@ -8565,7 +8562,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L32_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 297, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L33_unpacking_done; @@ -8573,7 +8570,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 298, __pyx_L1_error) + __PYX_ERR(0, 297, __pyx_L1_error) __pyx_L33_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_2); @@ -8581,7 +8578,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_XDECREF_SET(__pyx_v_variables, __pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":299 + /* "constraint/problem.py":298 * vconstraints[variable].append((constraint, variables)) * for constraint, variables in constraints[:]: * constraint.preProcess(variables, domains, constraints, vconstraints) # <<<<<<<<<<<<<< @@ -8595,12 +8592,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_variables, __pyx_v_domains, __pyx_v_constraints, __pyx_v_vconstraints}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_preProcess, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":298 + /* "constraint/problem.py":297 * for variable in variables: * vconstraints[variable].append((constraint, variables)) * for constraint, variables in constraints[:]: # <<<<<<<<<<<<<< @@ -8610,7 +8607,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":300 + /* "constraint/problem.py":299 * for constraint, variables in constraints[:]: * constraint.preProcess(variables, domains, constraints, vconstraints) * for domain in domains.values(): # <<<<<<<<<<<<<< @@ -8620,9 +8617,9 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __pyx_t_5 = 0; if (unlikely(__pyx_v_domains == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 300, __pyx_L1_error) + __PYX_ERR(0, 299, __pyx_L1_error) } - __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_domains, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_11), (&__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_domains, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_11), (&__pyx_t_17)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; @@ -8630,12 +8627,12 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE while (1) { __pyx_t_18 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_11, &__pyx_t_5, NULL, &__pyx_t_3, NULL, __pyx_t_17); if (unlikely(__pyx_t_18 == 0)) break; - if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 300, __pyx_L1_error) + if (unlikely(__pyx_t_18 == -1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_domain, __pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":301 + /* "constraint/problem.py":300 * constraint.preProcess(variables, domains, constraints, vconstraints) * for domain in domains.values(): * domain.resetState() # <<<<<<<<<<<<<< @@ -8649,23 +8646,23 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_resetState, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "constraint/problem.py":302 + /* "constraint/problem.py":301 * for domain in domains.values(): * domain.resetState() * if not domain: # <<<<<<<<<<<<<< * return None, None, None * # doArc8(getArcs(domains, constraints), domains, {}) */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_domain); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_t_15 = (!__pyx_t_6); if (__pyx_t_15) { - /* "constraint/problem.py":303 + /* "constraint/problem.py":302 * domain.resetState() * if not domain: * return None, None, None # <<<<<<<<<<<<<< @@ -8678,7 +8675,7 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":302 + /* "constraint/problem.py":301 * for domain in domains.values(): * domain.resetState() * if not domain: # <<<<<<<<<<<<<< @@ -8689,28 +8686,28 @@ static PyObject *__pyx_pf_10constraint_7problem_7Problem_24_getArgs(CYTHON_UNUSE } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "constraint/problem.py":305 + /* "constraint/problem.py":304 * return None, None, None * # doArc8(getArcs(domains, constraints), domains, {}) * return domains, constraints, vconstraints # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_domains); __Pyx_GIVEREF(__pyx_v_domains); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_domains) != (0)) __PYX_ERR(0, 305, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_domains) != (0)) __PYX_ERR(0, 304, __pyx_L1_error); __Pyx_INCREF(__pyx_v_constraints); __Pyx_GIVEREF(__pyx_v_constraints); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_constraints) != (0)) __PYX_ERR(0, 305, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_constraints) != (0)) __PYX_ERR(0, 304, __pyx_L1_error); __Pyx_INCREF(__pyx_v_vconstraints); __Pyx_GIVEREF(__pyx_v_vconstraints); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_vconstraints) != (0)) __PYX_ERR(0, 305, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_vconstraints) != (0)) __PYX_ERR(0, 304, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "constraint/problem.py":269 + /* "constraint/problem.py":268 * ) * * def _getArgs(self, picklable=False): # <<<<<<<<<<<<<< @@ -9632,15 +9629,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr)) __PYX_ERR(0, 164, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr)) __PYX_ERR(0, 163, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct__genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr = &__pyx_type_10constraint_7problem___pyx_scope_struct__genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr) < (0)) __PYX_ERR(0, 163, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct__genexpr); @@ -9651,15 +9648,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList)) __PYX_ERR(0, 239, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList)) __PYX_ERR(0, 238, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList = &__pyx_type_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_1_getSolutionsOrderedList); @@ -9670,15 +9667,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 243, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 242, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 242, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr = &__pyx_type_10constraint_7problem___pyx_scope_struct_2_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 243, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 242, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_2_genexpr); @@ -9689,15 +9686,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 245, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr)) __PYX_ERR(0, 244, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_3_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 244, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr = &__pyx_type_10constraint_7problem___pyx_scope_struct_3_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr) < (0)) __PYX_ERR(0, 244, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_3_genexpr); @@ -9708,15 +9705,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 290, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10constraint_7problem___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 289, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10constraint_7problem___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr = &__pyx_type_10constraint_7problem___pyx_scope_struct_4_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 290, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 289, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_10constraint_7problem___pyx_scope_struct_4_genexpr); @@ -10039,7 +10036,7 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); * """Module containing the code for problem definitions.""" * * import copy # <<<<<<<<<<<<<< - * from warnings import warn + * from collections.abc import Callable, Hashable, Sequence * from operator import itemgetter */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_copy, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) @@ -10051,19 +10048,19 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); /* "constraint/problem.py":4 * * import copy - * from warnings import warn # <<<<<<<<<<<<<< + * from collections.abc import Callable, Hashable, Sequence # <<<<<<<<<<<<<< * from operator import itemgetter - * from typing import Callable, Optional, Union + * from warnings import warn */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Hashable,__pyx_mstate_global->__pyx_n_u_Sequence}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; - __pyx_t_3 = 0; { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Hashable,__pyx_mstate_global->__pyx_n_u_Sequence}; + for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 4, __pyx_L1_error) @@ -10074,10 +10071,10 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); /* "constraint/problem.py":5 * import copy - * from warnings import warn + * from collections.abc import Callable, Hashable, Sequence * from operator import itemgetter # <<<<<<<<<<<<<< - * from typing import Callable, Optional, Union - * from collections.abc import Sequence, Hashable + * from warnings import warn + * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_itemgetter}; @@ -10097,21 +10094,21 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "constraint/problem.py":6 - * from warnings import warn + * from collections.abc import Callable, Hashable, Sequence * from operator import itemgetter - * from typing import Callable, Optional, Union # <<<<<<<<<<<<<< - * from collections.abc import Sequence, Hashable + * from warnings import warn # <<<<<<<<<<<<<< * + * from constraint.constraints import CompilableFunctionConstraint, Constraint, FunctionConstraint */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Optional,__pyx_mstate_global->__pyx_n_u_Union}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_typing, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Callable,__pyx_mstate_global->__pyx_n_u_Optional,__pyx_mstate_global->__pyx_n_u_Union}; - for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; + __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 6, __pyx_L1_error) @@ -10120,46 +10117,46 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":7 - * from operator import itemgetter - * from typing import Callable, Optional, Union - * from collections.abc import Sequence, Hashable # <<<<<<<<<<<<<< + /* "constraint/problem.py":8 + * from warnings import warn * - * from constraint.constraints import Constraint, FunctionConstraint, CompilableFunctionConstraint + * from constraint.constraints import CompilableFunctionConstraint, Constraint, FunctionConstraint # <<<<<<<<<<<<<< + * from constraint.domain import Domain + * from constraint.parser import compile_to_constraints */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence,__pyx_mstate_global->__pyx_n_u_Hashable}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Sequence,__pyx_mstate_global->__pyx_n_u_Hashable}; - for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint,__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint}; + for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 7, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "constraint/problem.py":9 - * from collections.abc import Sequence, Hashable * - * from constraint.constraints import Constraint, FunctionConstraint, CompilableFunctionConstraint # <<<<<<<<<<<<<< - * from constraint.domain import Domain - * from constraint.solvers import Solver, OptimizedBacktrackingSolver, ParallelSolver + * from constraint.constraints import CompilableFunctionConstraint, Constraint, FunctionConstraint + * from constraint.domain import Domain # <<<<<<<<<<<<<< + * from constraint.parser import compile_to_constraints + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_constraints, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Domain}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_domain, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Constraint,__pyx_mstate_global->__pyx_n_u_FunctionConstraint,__pyx_mstate_global->__pyx_n_u_CompilableFunctionConstraint}; - for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Domain}; + __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) @@ -10169,20 +10166,20 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "constraint/problem.py":10 + * from constraint.constraints import CompilableFunctionConstraint, Constraint, FunctionConstraint + * from constraint.domain import Domain + * from constraint.parser import compile_to_constraints # <<<<<<<<<<<<<< + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver * - * from constraint.constraints import Constraint, FunctionConstraint, CompilableFunctionConstraint - * from constraint.domain import Domain # <<<<<<<<<<<<<< - * from constraint.solvers import Solver, OptimizedBacktrackingSolver, ParallelSolver - * from constraint.parser import compile_to_constraints */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Domain}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_domain, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_compile_to_constraints}; + __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Domain}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_compile_to_constraints}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -10193,20 +10190,20 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "constraint/problem.py":11 - * from constraint.constraints import Constraint, FunctionConstraint, CompilableFunctionConstraint * from constraint.domain import Domain - * from constraint.solvers import Solver, OptimizedBacktrackingSolver, ParallelSolver # <<<<<<<<<<<<<< * from constraint.parser import compile_to_constraints + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver # <<<<<<<<<<<<<< * + * try: */ { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Solver,__pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver,__pyx_mstate_global->__pyx_n_u_ParallelSolver}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver,__pyx_mstate_global->__pyx_n_u_ParallelSolver,__pyx_mstate_global->__pyx_n_u_Solver}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_solvers, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Solver,__pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver,__pyx_mstate_global->__pyx_n_u_ParallelSolver}; + PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_OptimizedBacktrackingSolver,__pyx_mstate_global->__pyx_n_u_ParallelSolver,__pyx_mstate_global->__pyx_n_u_Solver}; for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -10216,32 +10213,8 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":12 - * from constraint.domain import Domain - * from constraint.solvers import Solver, OptimizedBacktrackingSolver, ParallelSolver - * from constraint.parser import compile_to_constraints # <<<<<<<<<<<<<< - * - * try: -*/ - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_compile_to_constraints}; - __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_constraint_parser, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) - } - __pyx_t_2 = __pyx_t_1; - __Pyx_GOTREF(__pyx_t_2); - { - PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_compile_to_constraints}; - __pyx_t_3 = 0; { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "constraint/problem.py":14 - * from constraint.parser import compile_to_constraints + /* "constraint/problem.py":13 + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver * * try: # <<<<<<<<<<<<<< * from sys import _is_gil_enabled @@ -10256,7 +10229,7 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "constraint/problem.py":15 + /* "constraint/problem.py":14 * * try: * from sys import _is_gil_enabled # <<<<<<<<<<<<<< @@ -10265,22 +10238,22 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_gil_enabled}; - __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 15, __pyx_L2_error) + __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L2_error) } __pyx_t_2 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_is_gil_enabled}; __pyx_t_3 = 0; { - __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L2_error) + __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 15, __pyx_L2_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 14, __pyx_L2_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":16 + /* "constraint/problem.py":15 * try: * from sys import _is_gil_enabled * freethreading = _is_gil_enabled() # <<<<<<<<<<<<<< @@ -10288,7 +10261,7 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); * freethreading = False */ __pyx_t_4 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_is_gil_enabled); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 16, __pyx_L2_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_is_gil_enabled); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 15, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; { @@ -10296,14 +10269,14 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L2_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_2); } - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_freethreading, __pyx_t_2) < (0)) __PYX_ERR(0, 16, __pyx_L2_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_freethreading, __pyx_t_2) < (0)) __PYX_ERR(0, 15, __pyx_L2_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":14 - * from constraint.parser import compile_to_constraints + /* "constraint/problem.py":13 + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver * * try: # <<<<<<<<<<<<<< * from sys import _is_gil_enabled @@ -10319,7 +10292,7 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":17 + /* "constraint/problem.py":16 * from sys import _is_gil_enabled * freethreading = _is_gil_enabled() * except ImportError: # <<<<<<<<<<<<<< @@ -10329,19 +10302,19 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); if (__pyx_t_10) { __Pyx_AddTraceback("constraint.problem", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_4) < 0) __PYX_ERR(0, 17, __pyx_L4_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_4) < 0) __PYX_ERR(0, 16, __pyx_L4_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_4); - /* "constraint/problem.py":18 + /* "constraint/problem.py":17 * freethreading = _is_gil_enabled() * except ImportError: * freethreading = False # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_freethreading, Py_False) < (0)) __PYX_ERR(0, 18, __pyx_L4_except_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_freethreading, Py_False) < (0)) __PYX_ERR(0, 17, __pyx_L4_except_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -10349,8 +10322,8 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); } goto __pyx_L4_except_error; - /* "constraint/problem.py":14 - * from constraint.parser import compile_to_constraints + /* "constraint/problem.py":13 + * from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver * * try: # <<<<<<<<<<<<<< * from sys import _is_gil_enabled @@ -10370,27 +10343,27 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __pyx_L7_try_end:; } - /* "constraint/problem.py":21 + /* "constraint/problem.py":20 * * * class Problem: # <<<<<<<<<<<<<< * """Class used to define a problem and retrieve solutions.""" * */ - __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Problem, __pyx_mstate_global->__pyx_n_u_Problem, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_kp_u_Class_used_to_define_a_problem_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Problem, __pyx_mstate_global->__pyx_n_u_Problem, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_kp_u_Class_used_to_define_a_problem_a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "constraint/problem.py":24 + /* "constraint/problem.py":23 * """Class used to define a problem and retrieve solutions.""" * * def __init__(self, solver: Solver=None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_solver, __pyx_mstate_global->__pyx_n_u_Solver) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Problem___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_solver, __pyx_mstate_global->__pyx_n_u_Solver) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Problem___init, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); @@ -10398,106 +10371,106 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":44 + /* "constraint/problem.py":43 * warn("Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.") * * def reset(self): # <<<<<<<<<<<<<< * """Reset the current problem definition. * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_3reset, 0, __pyx_mstate_global->__pyx_n_u_Problem_reset, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_3reset, 0, __pyx_mstate_global->__pyx_n_u_Problem_reset, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 44, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":57 + /* "constraint/problem.py":56 * self._variables.clear() * * def setSolver(self, solver): # <<<<<<<<<<<<<< * """Change the problem solver currently in use. * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_5setSolver, 0, __pyx_mstate_global->__pyx_n_u_Problem_setSolver, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_5setSolver, 0, __pyx_mstate_global->__pyx_n_u_Problem_setSolver, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_setSolver, __pyx_t_2) < (0)) __PYX_ERR(0, 57, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_setSolver, __pyx_t_2) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":72 + /* "constraint/problem.py":71 * self._solver = solver * * def getSolver(self): # <<<<<<<<<<<<<< * """Obtain the problem solver currently in use. * */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_7getSolver, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolver, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_7getSolver, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolver, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolver, __pyx_t_2) < (0)) __PYX_ERR(0, 72, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolver, __pyx_t_2) < (0)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":86 + /* "constraint/problem.py":85 * return self._solver * * def addVariable(self, variable: Hashable, domain): # <<<<<<<<<<<<<< * """Add a variable to the problem. * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variable, __pyx_mstate_global->__pyx_n_u_Hashable) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_9addVariable, 0, __pyx_mstate_global->__pyx_n_u_Problem_addVariable, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variable, __pyx_mstate_global->__pyx_n_u_Hashable) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_9addVariable, 0, __pyx_mstate_global->__pyx_n_u_Problem_addVariable, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addVariable, __pyx_t_8) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addVariable, __pyx_t_8) < (0)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":118 + /* "constraint/problem.py":117 * self._variables[variable] = domain * * def addVariables(self, variables: Sequence, domain): # <<<<<<<<<<<<<< * """Add one or more variables to the problem. * */ - __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_variables_2, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 118, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_11addVariables, 0, __pyx_mstate_global->__pyx_n_u_Problem_addVariables, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_variables_2, __pyx_mstate_global->__pyx_n_u_Sequence) < (0)) __PYX_ERR(0, 117, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_11addVariables, 0, __pyx_mstate_global->__pyx_n_u_Problem_addVariables, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addVariables, __pyx_t_2) < (0)) __PYX_ERR(0, 118, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addVariables, __pyx_t_2) < (0)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":141 + /* "constraint/problem.py":140 * self.addVariable(variable, domain) * - * def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): # <<<<<<<<<<<<<< + * def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): # <<<<<<<<<<<<<< * """Add a constraint to the problem. * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_constraint, __pyx_mstate_global->__pyx_kp_u_Union_Constraint_Callable_str) < (0)) __PYX_ERR(0, 141, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variables_2, __pyx_mstate_global->__pyx_kp_u_Optional_Sequence) < (0)) __PYX_ERR(0, 141, __pyx_L1_error) - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_13addConstraint, 0, __pyx_mstate_global->__pyx_n_u_Problem_addConstraint, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_constraint, __pyx_mstate_global->__pyx_kp_u_Constraint_Callable_str) < (0)) __PYX_ERR(0, 140, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_variables_2, __pyx_mstate_global->__pyx_kp_u_Sequence_None) < (0)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_13addConstraint, 0, __pyx_mstate_global->__pyx_n_u_Problem_addConstraint, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); @@ -10505,66 +10478,66 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addConstraint, __pyx_t_8) < (0)) __PYX_ERR(0, 141, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_addConstraint, __pyx_t_8) < (0)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":180 + /* "constraint/problem.py":179 * self._constraints.append((constraint, variables)) * * def getSolution(self): # <<<<<<<<<<<<<< * """Find and return a solution to the problem. * */ - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_15getSolution, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolution, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_15getSolution, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolution, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolution, __pyx_t_8) < (0)) __PYX_ERR(0, 180, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolution, __pyx_t_8) < (0)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":199 + /* "constraint/problem.py":198 * return self._solver.getSolution(domains, constraints, vconstraints) * * def getSolutions(self): # <<<<<<<<<<<<<< * """Find and return all solutions to the problem. * */ - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_17getSolutions, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutions, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_17getSolutions, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutions, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutions, __pyx_t_8) < (0)) __PYX_ERR(0, 199, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutions, __pyx_t_8) < (0)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":218 + /* "constraint/problem.py":217 * return self._solver.getSolutions(domains, constraints, vconstraints) * * def getSolutionIter(self): # <<<<<<<<<<<<<< * """Return an iterator to the solutions of the problem. * */ - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_19getSolutionIter, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionIter, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_19getSolutionIter, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionIter, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8); #endif - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionIter, __pyx_t_8) < (0)) __PYX_ERR(0, 218, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionIter, __pyx_t_8) < (0)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "constraint/problem.py":239 + /* "constraint/problem.py":238 * return self._solver.getSolutionIter(domains, constraints, vconstraints) * * def getSolutionsOrderedList(self, order: list[str] = None) -> list[tuple]: # <<<<<<<<<<<<<< * """Returns the solutions as a list of tuples, with each solution tuple ordered according to `order`.""" * solutions: list[dict] = self.getSolutions() */ - __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_21getSolutionsOrderedList, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_tuple) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_21getSolutionsOrderedList, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsOrderedList_2, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); @@ -10572,35 +10545,35 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionsOrderedList, __pyx_t_2) < (0)) __PYX_ERR(0, 239, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionsOrderedList, __pyx_t_2) < (0)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "constraint/problem.py":248 + /* "constraint/problem.py":247 * * def getSolutionsAsListDict( * self, order: list[str] = None, validate: bool = True # <<<<<<<<<<<<<< * ) -> tuple[list[tuple], dict[tuple, int], int]: # noqa: E501 * """Returns the searchspace as a list of tuples, a dict of the searchspace for fast lookups and the size.""" */ - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "constraint/problem.py":247 + /* "constraint/problem.py":246 * return list(get_in_order(params) for params in solutions) * * def getSolutionsAsListDict( # <<<<<<<<<<<<<< * self, order: list[str] = None, validate: bool = True * ) -> tuple[list[tuple], dict[tuple, int], int]: # noqa: E501 */ - __pyx_t_8 = PyTuple_Pack(2, Py_None, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_8 = PyTuple_Pack(2, Py_None, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_validate, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_tuple_list_tuple_dict_tuple_int) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) - __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_23getSolutionsAsListDict, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsAsListDict, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 247, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_order, __pyx_mstate_global->__pyx_kp_u_list_str) < (0)) __PYX_ERR(0, 246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_validate, __pyx_mstate_global->__pyx_n_u_bool) < (0)) __PYX_ERR(0, 246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_tuple_list_tuple_dict_tuple_int) < (0)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_23getSolutionsAsListDict, 0, __pyx_mstate_global->__pyx_n_u_Problem_getSolutionsAsListDict, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); @@ -10609,38 +10582,38 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_11, __pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionsAsListDict, __pyx_t_11) < (0)) __PYX_ERR(0, 247, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getSolutionsAsListDict, __pyx_t_11) < (0)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "constraint/problem.py":269 + /* "constraint/problem.py":268 * ) * * def _getArgs(self, picklable=False): # <<<<<<<<<<<<<< * domains = self._variables.copy() * allvariables = domains.keys() */ - __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_25_getArgs, 0, __pyx_mstate_global->__pyx_n_u_Problem__getArgs, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10constraint_7problem_7Problem_25_getArgs, 0, __pyx_mstate_global->__pyx_n_u_Problem__getArgs, NULL, __pyx_mstate_global->__pyx_n_u_constraint_problem, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[2]); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getArgs, __pyx_t_11) < (0)) __PYX_ERR(0, 269, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_getArgs, __pyx_t_11) < (0)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "constraint/problem.py":21 + /* "constraint/problem.py":20 * * * class Problem: # <<<<<<<<<<<<<< * """Class used to define a problem and retrieve solutions.""" * */ - __pyx_t_11 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Problem, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_11 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Problem, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif - if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Problem, __pyx_t_11) < (0)) __PYX_ERR(0, 21, __pyx_L1_error) + if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Problem, __pyx_t_11) < (0)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -10651,15 +10624,15 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); */ __pyx_t_4 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_reset_line_44, __pyx_mstate_global->__pyx_kp_u_Reset_the_current_problem_defini) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_setSolver_line_57, __pyx_mstate_global->__pyx_kp_u_Change_the_problem_solver_curren) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolver_line_72, __pyx_mstate_global->__pyx_kp_u_Obtain_the_problem_solver_curren) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addVariable_line_86, __pyx_mstate_global->__pyx_kp_u_Add_a_variable_to_the_problem_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addVariables_line_118, __pyx_mstate_global->__pyx_kp_u_Add_one_or_more_variables_to_the) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addConstraint_line_141, __pyx_mstate_global->__pyx_kp_u_Add_a_constraint_to_the_problem) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolution_line_180, __pyx_mstate_global->__pyx_kp_u_Find_and_return_a_solution_to_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolutions_line_199, __pyx_mstate_global->__pyx_kp_u_Find_and_return_all_solutions_to) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolutionIter_line_218, __pyx_mstate_global->__pyx_kp_u_Return_an_iterator_to_the_soluti) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_reset_line_43, __pyx_mstate_global->__pyx_kp_u_Reset_the_current_problem_defini) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_setSolver_line_56, __pyx_mstate_global->__pyx_kp_u_Change_the_problem_solver_curren) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolver_line_71, __pyx_mstate_global->__pyx_kp_u_Obtain_the_problem_solver_curren) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addVariable_line_85, __pyx_mstate_global->__pyx_kp_u_Add_a_variable_to_the_problem_Ex) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addVariables_line_117, __pyx_mstate_global->__pyx_kp_u_Add_one_or_more_variables_to_the) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_addConstraint_line_140, __pyx_mstate_global->__pyx_kp_u_Add_a_constraint_to_the_problem) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolution_line_179, __pyx_mstate_global->__pyx_kp_u_Find_and_return_a_solution_to_th) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolutions_line_198, __pyx_mstate_global->__pyx_kp_u_Find_and_return_all_solutions_to) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Problem_getSolutionIter_line_217, __pyx_mstate_global->__pyx_kp_u_Return_an_iterator_to_the_soluti) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -10702,7 +10675,7 @@ __Pyx_RefNannySetupContext("PyInit_problem", 0); static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 252, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; @@ -10722,63 +10695,67 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "constraint/problem.py":54 + /* "constraint/problem.py":53 * >>> * """ * del self._constraints[:] # <<<<<<<<<<<<<< * self._variables.clear() * */ - __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_mstate_global->__pyx_slice[0] = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]); - /* "constraint/problem.py":303 + /* "constraint/problem.py":302 * domain.resetState() * if not domain: * return None, None, None # <<<<<<<<<<<<<< * # doArc8(getArcs(domains, constraints), domains, {}) * return domains, constraints, vconstraints */ - __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - /* "constraint/problem.py":24 + /* "constraint/problem.py":23 * """Class used to define a problem and retrieve solutions.""" * * def __init__(self, solver: Solver=None): # <<<<<<<<<<<<<< * """Initialization method. * */ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); - /* "constraint/problem.py":269 + /* "constraint/problem.py":268 * ) * * def _getArgs(self, picklable=False): # <<<<<<<<<<<<<< * domains = self._variables.copy() * allvariables = domains.keys() */ - __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<3; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -10788,16 +10765,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_slice; for (Py_ssize_t i=0; i<1; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -10814,39 +10795,39 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { - const struct { const unsigned int length: 10; } index[] = {{2},{1010},{514},{677},{335},{54},{13},{67},{15},{59},{19},{40},{373},{393},{4},{179},{327},{18},{127},{32},{29},{31},{34},{30},{31},{27},{23},{27},{235},{453},{36},{32},{94},{227},{2},{1},{1},{8},{21},{7},{43},{6},{2},{9},{9},{11},{45},{41},{8},{8},{28},{10},{6},{18},{8},{27},{8},{14},{7},{16},{16},{33},{21},{38},{19},{20},{19},{23},{20},{30},{48},{31},{17},{13},{17},{20},{8},{6},{5},{1},{13},{11},{12},{12},{6},{18},{4},{1},{5},{18},{5},{15},{22},{10},{22},{17},{17},{18},{18},{12},{11},{4},{5},{8},{7},{6},{7},{6},{13},{8},{7},{8},{11},{15},{12},{22},{23},{9},{12},{11},{8},{13},{15},{10},{5},{4},{8},{13},{10},{3},{8},{4},{8},{5},{6},{6},{9},{3},{10},{11},{13},{12},{17},{5},{10},{6},{4},{4},{9},{12},{10},{9},{9},{8},{9},{14},{14},{6},{7},{16},{3},{8},{5},{6},{1},{8},{5},{6},{8},{10},{9},{12},{4},{8},{3},{161},{22},{11},{55},{55},{60},{11},{175},{158},{2},{2},{2},{2},{25},{63},{278},{126}}; - #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2995 bytes) */ -const char* const cstring = "(\265/\375`\006 M]\000\252p\014\027G\340\2628\0070\314c-\306G\030B0\004\306\363D\236\2170\020\006\3020\004\331\022\203\376-E\332\02695H\333O!\023Wz\367\254jD\344\252\353Z\225M\260\302\2155\252\301\034\272\213\221\220\004\013X(\335y[\001>\001B\001`\001\033\274\247-\305G\035B\204\356[\377\214\273\277\370\273\357\276\253\256\364W\255\361\255\272\373]\367\303\320\270\354\327>z\353}\333G[W;;L\347\276\377\331al\356ql,=Y\241\377r\314\216\025\037\355 \271)e\246\344\010\211B\241}\347\316\330\353\300\331y~\232\361{\340\276\230\336\367\336\3053\373M\325Sp\243\277\271W\251\246\323\230D\377\265~\277\016\271+\263\266\332\370\236\237\235\256\327p1k\203/\242\220O\317\365\357D9}\372Y\356V\221\326\2373F\001nN\337\363f\266\361\337\270\373\251|DCc\322zZ\316\004z&Wa\177\356\316\032\322\253|\202\331\277j\361\272?\213\265\347wa\317\257\372\021}\235\247\347\240\265\223\253x\177\323G{v\031\253|u\253\333\271\357w5\277w\363^\301\335E(+\3362\3027z\247\243\250Loi\361\315M\233\217\246O\272u\323\206P3\035|\264\342#\222\214\217fP6\024\037\241L\024\231\220\2365\317\031\224\316L\024z\361\026\0371b\204\351\255\327\315\233\023~\340@\326\275\335p\366\374Y\333\361\366}\353\314[_\314\371tJO\231(\277\361\325(\235$2\037\211@\226\315t\315aZ\301v\233\365\033p\315\266o\225y\0336\230\264\2677\313_\324\242i\375\234~\327d\371\207md\371=\317X\177\223\333\377Y\345\373\303\254]m\374)\356\334b\374B\347gV\214_-cf\204\222\2712(\365\235\277\036\360\360\206\311\262l\353i\237\373\354[\343.\344\333s3\264o\376z!\025\316xW\277\323?\206\010\204\007]*\255\200p\205\010\301\201eE\005\013I\177`y\021\221J$\377\373\222\351\377\264\376\354\257\347\333\027\317\364T\325T{\277\221\256\366\255\235y\276\314\300\310\330\rF\366\332N\024\271RO\001\26767\276w\246\274\366\253\247\367\327?\014\272J\205g\372\326m\353\267\225XJ\032^N\274\370\235\240\375=\363o\325>E\375\306/N\372\353\214\314\214\214\265n\362\274\3319\230'Wi\214\035+\245\322_\374\302\365\364\233?z+\n\337x\345#\275yU\265'W\301\355u\357\333\247\365o\276\365\327\271\233t\366\256""\257y\177~\274\235\242l\376\305\324\325a\362\256\341\246\t\3728\265\253\333\203\341-\257?\320\356\3739\177\277\272\223\205\322>g*\021JO\311'l\302+\204l\215\"`\032^'\244\207l\021Y\302\235\243\000$F\nKb\244\312\007>btL0\020\354\344\025CbqB\270 \004\200\004\010)\321%\022\272\344\210\204\0000\371q\352q\032?b+d\221\363i\211@;'\221$\316\250\021\236B\023\221\030i\004\215'Sd\205\251\320\004\212\t\031|b10%\213\017\220\017\020:\033V\202\211^ \310\031\243\212H\"\342\344\224r\020\200\304R\342I\314\020NX\nf\002\363\300X\026\224\013>1\222\270CT\030\"\347\023\002\300\177\234F\013\003J\257\342\350\233\247\215\246\367\244\325N\227\313\006g\326\326\277u\336\232\246\367\265\312~\376=7\214\246?\327l\347\327z\355\345\263\347a\257\206\253\036\325\036\356\346\325o?\212\347\376N\3234\3705Z\263u\245iM\353~\327\215\357\247\3224\315a\252i\336?\335\367\303\034\350\351L3\ro\3559n\233\334[\213\271\327\330r[\343\362|\313q\026\343M\377\305\031s\031\256\334\005\365\244\367=\317\245\251>\306\276\371\027\332\rH\077\077\3150\\\266\256-\364\351\216\320\330\212\3104M\323RT\257\303\250\254\336\317g\366h$\023r]5\315\214\014\325\225[\335\377f\376\362\357\357<\327\225\202^\251\360\024\232\274,\274(\311\243\024zNc\006\221\316r\322\2244\2442\204\304!Z\030y\255\200`\246Oy\202\211\000\225\334\347GK\274\001wH\343\214\224\250r\032i\210\253p\205N\367\262A\252\324\204\r^2$\230\0162\006\271\032m\210\247\324(A\364|@vj\320(i\\(/\224\224\244\023\371\031\267\217\213(a$F\212\031E\346\230@|`\022k\211\027D=\202\243SO\312\223\021*&\330\361\220\333\210\241\244\33493\247\303\2136sd0\326\204\026\302\005 \261\226\260dt\340\n\035\220z40\266D\324\211\260$\374@\362r1\016\030\035d\007\244cBC\271j\2157>\241Gl\021\3721G\014\003J\317H2\246\306\2248\311\321\030`t \272 \031\347\016\010F\002\013\021\363\220-\"\220\304<\257\026\271aB9ad\347f\216\243\002?p\2248J\224%@%\310\201\010\211\203\0214R\216\214\026\303\217\0312J\025\037+Beh@)\362\211\205\200\354\270T0\211\331\232\262\246\226UU\252\276|\255\324R%\347\203\007\354\002\214\276L\274H/""\320K\223\223\264@\222\220\"\223\330\r\033\245\215\032e\215\n\345\202\021'\234a\003\223\230g\304\0216\030)Q\360\021 >\370\354\220\010\300XBekD\215\244q\213\024P\241\tHl\276R/\017\023J\023\361\004d\347@H\214\344\2053\2460(\031$\210\235z\220FB\000<\000\351\314\274T\220$2\202\232\250r\233\026\204\016!\022\031\021I\222$\215\001R\020\010\010\244\211\034i\263=R\231<\213\201 \245\0142\206(\"#\"\023\211\210\210\024\024$)\024:\006\202Z\231 \\\270Gs)\221\242\025*\300\020C{\265f.\026\376\3028\310(j%\361\213u2j^\272\265\331=\310\030!\026r'\266W\200\016\260UX\004\237\375 \000\242\267+w\034\374\333o\031\324\355L\316\257w\331\027\336\025\0173K\362\270\375!!\3710\341\236\2448>\\@-B\344}\364\203\350\246\266\265s\351\220\324\232\330d\007\350\"]&\215A\322O\205x6\223J8\004J\247\270.fC\n\006%\255]i\346\027k\005\306\202\364\270\222f(z\032\277U\202\316#q\272\307\275\336\312\n\253\212\330\330\274E^H\236{\373\237\350:@\003\256\224}\225\341\255#A\233\227\244\360\035\242q\371\317_l^\342s\362M}\007\323\217f@\317\327\255\227\357\274\3163\337Z\335\325_\030\2145\341\356\266\337\350\005\206\305\007\316D \311\250c\224\307`\323\373\347:\030`\270\241C\230\372\240\210\255\244\250\323~\n9CP\206\251\\\345\202\255\316dE\025bc\023\331\004\320\026t\322\226J$\2026J\035u\332\356 k\206\303$c\252~\327\212\025\220\271\220y\310X5p\356q\206:\311j\214>\323*\2337\236\212\316bL16\246C:M\251\025\323\025y\302\201a@\262*G\237\000\ny\272\320\2777\306\025+\0226\016\010V\014\366u\210\036\357[\001\036\372\321\0160\277\017i\324\242\035g\231\202\006]\333\006\034\002"; - PyObject *data = __Pyx_DecompressString(cstring, 2995, 3); + const struct { const unsigned int length: 10; } index[] = {{2},{1010},{514},{677},{335},{54},{27},{13},{67},{15},{59},{19},{40},{373},{393},{4},{179},{327},{127},{32},{29},{31},{34},{30},{31},{27},{23},{27},{235},{453},{15},{36},{94},{227},{2},{1},{1},{8},{21},{7},{43},{6},{2},{9},{9},{11},{45},{41},{8},{8},{28},{10},{6},{18},{8},{27},{14},{7},{16},{16},{33},{21},{38},{19},{20},{19},{23},{20},{30},{48},{31},{17},{13},{17},{20},{8},{6},{1},{13},{11},{12},{12},{6},{18},{4},{1},{5},{18},{5},{15},{22},{10},{22},{17},{17},{18},{18},{12},{11},{4},{5},{8},{7},{6},{7},{6},{13},{8},{7},{8},{11},{15},{12},{22},{23},{9},{12},{11},{8},{13},{15},{10},{5},{4},{8},{13},{10},{3},{8},{4},{8},{5},{6},{6},{9},{3},{10},{11},{13},{12},{17},{5},{10},{6},{4},{4},{9},{12},{10},{9},{9},{8},{9},{14},{14},{6},{7},{16},{3},{8},{5},{1},{8},{5},{6},{8},{10},{9},{12},{4},{8},{3},{161},{22},{11},{55},{55},{60},{11},{175},{158},{2},{2},{2},{2},{25},{63},{278},{126}}; + #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (2976 bytes) */ +const char* const cstring = "(\265/\375`\353\037\265\\\000Jp\370\026F\340\2628\0070\314c-\306G\030B0\004\306\363D\236\2170\020\006\3020\004\331\022\203\376-E\332\02695H\333O!\023Wz\367\254J\"\322\255\312\030\241\212\023\302\215Y\325`\016\335\305HH\202\005,\224\356\274\255=\001@\001`\001\327\264\245\370\310\203\210\320}\353\237q\367\027\177\367\335w\325\225\376\2525\276Uw\277\353\376\227\031\227\375\332Go\275o\373h\353jg\207\351\334\367?{\214\315}\216\215\245'+\364_\206\341\241\342#\036$/\245\314\024\035!Q(\264\357\334\031{\0358;\317O3~\017\334\027\323\373\336\273xf\277\251z\nn\3647\367*\325\364\231\222\350\277\326\357\327!we\326\326\032\337\363\263\323\365\033.fm\020%\n\371\364\\\377\316\223\323\247\237\345n\025i\3759\343\024\340\346\364=o\346\032\377\215\273\237\312G33%\255\247\345J\240Wr\025\366\347\356\254!\275\312\246\227\375\253\026\257\373\263X{~\027\366\374\252\037\321\327yz\016Z;\271\212\3677}\264g\227\261\312W\267\272\235\373~W\363{6\357\025\334]\204\242\342-$|\243w:\212\206\351--\276yi\363\321\364I\267n\332\320I\306\203\217T|D\212\361\221\014\312\206\342#\224\211\022\023\322\263\346I\203\322\231\211B(oq\022$H\224\336z\335\264A\341\007\016d\335\333\rg\317\237\265\035o\337\267\316\274\365\305\234O\247\324\224\211\002\033_\215\322Y\"\363\221\010d\325L\327\034\246\025l\267Y\317\001\327l\373V\231\307\201CI{{\263\374E-\232\326\317\351wM\226\177\370F\226\337\363\214\3657\271\375\237U\276?\314\332\265\306\237\342\316-\306(:?\263`\374\352\031\224\372\316_3\314\216\027\017\357\227,\313\266\236\366\271\317\2765\356B\276=7C\333\346\357\256^H\2053\336\325\357\364\227!\002\361A{X!\205p\261\210\020\021BeE\010\222\376\300\202\022uX!\371_T\246\377\323\372\263\277\236oQ\236\351\251\242\251\366~#]\355[;\363Dm1\262\327v\246\310\225z\n\270\265\271\361\2753\345\265_=\275\277\376a\320U+<\323\267n[\277m\205ee\003\n\005\312o\006\355\357\231\177\253\366\351\3517\206a\322_ebdb\254\365\222\347\315\316\301<\271Je\360PYY\371\213a\270\236~\363GoM\341\033\257|\2447\257\252\366\344*\270\275\356\267O\353\337|\353\257s""/\351\223\357\310\336\3655\357\317\217\267\323S\315\303\230\272\372K\3364\334!\000|\3074Z\030Pz\365F\337{\036\366h\270\352Q\355\341n^\375\366\243x\356\3574M\203O\2435[W\232\326\264\356w\335\370~*M\323\034\246\232\346\375\323}?\314\201\236\3164\323\360\326\236\343\266\311\275\265\230{\215-\2675.\317\267\034g1\336\364_\2341\227\341\312]POz\337\363\\\252\227\261m\036\206f\003\322\317Os\014\227\255\253\013m\272$4\266#2M\3234\025\325\353\360)\253\367s\231=\032\305\204\\W=##\023Cu\345V\367\277\231\277\374\373;\317u\245\240\367\001\251\320\024\232\274,\274(\331c%\364\230\306\014\"\235\345\234)gHe\010\231C\2640\362R\001\301J\237\322\004\033\001*\271\317NK\264\001uH#\215\224\250\3014\326\020W!\213\234\356u\203\324@\0236x\305\220`;H\031\344j\274!\232R\243\004\321\363\001\321\261Q\243\254q\241\274PR\222L\344g\334>.\242\204\221\030\tf\024\231c\002\361\201I\254%^\020\365\310MN=)OF\250\230@\307Cn#\206\222r\343L\034\017/\326\314\221\301H\023Z\010\027\200\304Z\302\222\321\201+t@\352\321\300\330\022O(\302\222\020\004\311\353\3058`t\020\035P\316\211\r\345\2525\342\370\204\036\321Ehg\216\030\006\224\236\221dL\215)q\222\2431\300\350@|A2N\035\020\214\004&\"\346!]D \211y^-\222\303\204r\302\210\216\315\034G\005vr\2249L\224&@%\310\201\010\211\203\0214R\216\214\026\303N\nU\306\344\240\010\225\241\001\245\310'\026\002\242\343R\301$fiJ\232ZVU\251\372\362\265RK\225\334\217\036\260\0130\372:\361""\"\275@/MN\322\002IB\212Lb8n\2247l\2246*\224\013\306\233p\206\rLb\2361G\330`\244D\301G\200\370\340\243C\"\000c\t\225\255\3614\222\306-R8\205& \261\371J\275>L(M\304\023\020\235\003!1\222\327\315\230\302\240d\220 f\362A\032\t\001\360\000\224#\363ZA\222\310\202\226\250\222\223\026\204\016\r\211\214\210$I\222\306R\020\010\210\244\201\234)\263=b\221\242\3448\022R\006\031C\024\221\021\221\211DDD\n\n\222\024\n\035\006\302\332\227Bt\261W\343B\"\324\212]\326P\244\275e\346\224\t\177w_m\024\362\222\365\305\247\214i^Cm[\217WG\350\007r;\266*@\007X\r,0\037\210\020\356Qv+K\016\265\355[\031D;s\326w\263\234\316o\025\217CJ\226\270\337\321\350\370)\341\rR\214\372(\200\352@\204\343\365{Q\266\366\204\307\342 \324>\272\345\003(!\335;\215\200\244\217\n\t6\023W\370\013\224g\360\021\263\201\r\0069[\333l\346\0253\004\306\n\351\321$\275\241 ox\243\216\236\227\307q\3005\275\r&\026\031\261\301\374M\274\220\034\367\364\317\314\365\217\006\314)KT\252V\207\204NSI\316;\304\374\022\201\337\373\374\226\317vg\304p\244\037\215@\317\3609\207\0205HZ\331Z\227\301\n\245\014.@?o7\001Ar\225\234l\025q\346/-\003\035\347\032\377\3560\302rn\246\354\362\n\nqOR\313h\204\001r1d\223\353\355\007\233\213\325RGB\026\203>Z,\361\323\230E\362BI@\375iW\244\003ba\342t\002\276\201\323\241\206D\332\305jO#yI\3455\2332?B\376\352Np\177R\363\357\2121\356\371\305\016t\006\020'\026\234\023\336\325\330\315\206\032-4\351\206\241\020m\274\340\372\025\343\351\244\335\210\020H\360\270'\250\0263\3328\317\231G\312t\350A\377\016\001\272\326a\"x.%\016\344k\266e|\266\325\264N\363\300\037\022\312\310\264f\007b\006\215\006\247\032\2776\353j\331-i\305\250\240\351HV\260\372\330H\034w<\006\247\000\276E\"\240\006\216\260\217\016\361\361\331\356\373\035%\333\343\262\271\223\330\311\370StW\251I\\\214\032(\351\223\034q\201'1\274\223\305\313\314\250l$\333H\034\360\242\251\223\2737\255\360\352V\327\212\006_-\326\022\327\311\023\024*\206\330%n\243\210\310\203\005\315\024cCm\364\264)\216\252h\215X6\231\302-\260\353K\324B\315\375\223Ek\3756\315\226\300SP""\037\031\343\314\221i\227\324\037\037\034N\213\351\005{\266\234D\2571\234\230-\002\355\371\203\247,\273\310\370<\302u\210&\323UC\240x?!\203\311\232>\306*x\214\201\341\264]g\021N\220\320j}m\034\017f\346\205{M\027\352D}\372p\323U\347\354(\312\361\305\223$\375Z\241\220\234\246\310\235\032\361\312\002\370!\360\002\204\351\374\000.\243\264X\272L\360\"[p\207\231\243\306;\242\334\034z?i\360\253\270c\363i\350\000M\355\246\220\261t2\216\356v\014\271\037*\035\357!e\314\247\342\274K\003L\034E\270c\252_\246}\236\263\304""\355\206\311\261#\004\324V\347iQ\200\240u\237\353\365\003\235\207w\346KQ\303\372\033\377\261V\335\331\373\365Kf.z\327\031\0054\031\036C\241\024\354\222\3775\212!\343\346\333a\264\203a[\205t]\317\251\313\rM\031\216v\335l\266>\017\024-\317MH\304C\000\250\200\303\2662\"t4Q\351\316g\013\016L3s\3448\363\265+L\252@(\224\350CFi(pW\010U^\2502\372iV\273c\361N\364T\343 \335\210FHY*Qy\r\237\247\262\014I\222\260\334\025\207b\311\010\010m\337H\254X\327a\326\200\255\300d]!\317\303\270UH\262\037\354\200\276\373\220j\215\344*\226\030\304\217\252\232\374!"; + PyObject *data = __Pyx_DecompressString(cstring, 2976, 3); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (3079 bytes) */ -const char* const cstring = "BZh91AY&SY\272\020\200\237\000\003)\177\377\377\377\377\376\377\377\377\367\377\177\377\372\377\377\377\376\300@@@@@@@@@@@@\000@\000`\014n\370\344\212;J\335\330\235:]\200\255P\001Dl\324\200\003\262\037^\r\t\010\204\363*z\003j`\223\303S\323\"\214\322yM=\010\304\320\323OQ\223\t\24024h\3044\336\244\0065\032i\351=A\240 &\201\024\324~\244\315C\t\246M\3514\324\362\232\003\020\000h4\000\000\000\000\000\014\201\352 \311\200\023\000\0010\004i\204`\000\000\000\2314\304\320`\004`\000\000\000\004\232\222S\325=OS\325?)\352z\217T\364\217Pzz\223\321\r\006\236\246\2314\323 \320\014\201\2404\000\323\023@\000\321\202yA\241\332&\t\200\32110\00110\004\320\300\002i\200&L\000\010\300\010`\230\t\2024\301\"@\204\320L\023Bz\232d\365\006\212=\023L#dC\3224\032\000\320\000\000\000\321\210\320\031\014\203\005,\347\337Hi\305\344\034\261\017\312\\\226\177C\366\\\277\300\240\261(\326E\"\220\355\002\206@\022\230\266J\354\366a\005\212*\351\022H\356@6\247o\350t\247\026\006\315s\355[\300}\250A\354\022\264\227\263\341\025\357\324I\201T\320\177G#\346\344\226GH\306\316v)8EfA\355\372\337\332\313\327\320\275\376\22096\241nc`\r\363r1\244TUK\256o:\322V(\212P8\"r\224\225\023ne\354M\336X\230\245P\270\341l\365\352jUY\314\247S\001\214\330!+\314-\252\006\346\334R\3023\221S\233\311\2114\347\264\254j\2479\013\234K|\253\030\343\221Vp\335@\242\014Y\024\003\t@i \010\020pH\005\276=4\373\021\326\201\364\357#\265\022\223'3\332\354T\225\250\035'\253\"L\220\306\240=\225\303\327'\220\340\201\340g=\205C\016\346K\347\242s\227\365\236\212O\007\234\320K\361\200b\002\370\026G\030\330\001\000\342\013NL\016+\020w\376\r\201\364\374\3751\025\317>\002\266I:9\304~\2103\223_\234\re\232\233\236qK9R\365\265\336T#q\301\372X\\\036\370,h\340\345\373\250\325^\327\033\211\361qE\027TM\3546\024N\303u\341\245D\341Gsa\236\244V\2674\245\211\014p\207\233*\311*J(\325\263d\222\243=\275\232r\240\214(@)\002\324FAl\311r\224)j\252Hc39\005\033\00288\234SD\262\006\341\220R\3160\2331A\204B42 \207&\214\215_\002vf9\031\\\r\233v)\023\006\346&\031\2616\270_h""\321\247\000\365\307\211\331\r\3768\332\344n\026\276g-_\227\264\223e\226\275\371\n$e\304Y@\310\351\200\323x\261Y\251\022$%\242\347\324\204\207!\246\201\177A24!\311\022\345\364>\347i0\233%6\311\256%$^*\246\t\316\025*Fj\361\235\246\206\031\003\006g\010 7\324\023N\222\201;\032\03302\312\301\345\030\251\351\331\036\214\271\365\266gO\234\202tbD\325y\347\333-\214\033\260\031\027\251(0\014\224\361\305U\376\002`\334\260\213\343 P\231\031\250'\312.>\321\014//\361t\3176\216\021NI\330\355\322\371\271\304\\\241\200K\315~Z\222H\212>\201@\217 \366a&\277\221\335\214:\240#Bl\324\021\3149$\t\"\254\232\325\224\300\\1m\024\r%\254\313\000ff\014\370hM\223_\2218\036\334\001PY\264wT\207\270\370\345qY\252=_\030\257\017\026\276\014X\365`h\223zrdiD\023z\201\277\223$\230&\236y\276\232\237\177\273d\217\0304\263k\255\022A\212\244$\203RH/\350\302<\362\247n\001\222\034J\212\220\274\324\267\320\266P\202\236\330\034~-\326;\014\340\272Pq\2256\2624\346\2422M2,pYj4\320\224\014\272\243\035\274H\t\320\302cj\265\306\240uO\201w\024\300\313\000a\010`xO\246w\336\231\231&\343P\276g\201\357\0378\305\214\200\336\215c\242\274c;\030\321\024t\241(p\342)k\336\336\3025B\323\033\371\311I67\022\303&\260\343\364C\017O\257\230\271\264\t\233W\244H\210\"8\240\3363\205^-.\336\243Vu\344/\347\242\376=\373\300QN\347\002\353\363p\255\264_\277\306\251\2145\310\226Z\240@\310\246\266\201\266\300\217\033\263$-_35\0008E\323|\315\360\355\251\277u\204N\027V\216\252]\340\367;\216\376\\.\265\\J\n9]\177\216Ttu6\365\240\300\254R\373Hd\241\214\223\351\302r\025FVc\357R\212e\216L\230u\270\272\223\023&p\265\325\330\260g\025\356\234a\262\273I\3023uqZ]<\362\261\206\331\007%\024\223-J\005\210\212\024\223Owq\236\372\252Nn\260D\345L\005\2723\214\342\034\304]%\030\265\307\007\033E\2232_y\203 \3034P\"\202*\346\\\305Y\301I\204\035\366\327\016=\234\346pc#\010\335\327\344\341\320\220\177\236,\031\310\312^@o(q3\227\217'rv.\004g\210\340\252\r\0049\2616jx0\210\246\347;\225\212#[\"\037\017|_\202g\302\313|\201\264\222\377\215d\224y\327\342\000h\300\241\013\260p\324\352\340'%\264\215\234\3662\033\354`\031w\014cn\032\203h\310~\021\344A\213\251\225\355\274#D\214\245\036\360\213Z\224\276\363\037\331\022\312\366\302\357\304) Li.\034z\003C\023i\030\214\000\356\306\215W\245\206bxO\210?\3304\331q\205hiw\217g;\343\272\3503\234\341\347l\352\013\3371\274\341\356WY\331\311\002\260\302\307\276\243\330\273l\353<\360fC\254\323\354F\335\27184\224a\244\003\2416\201\203[\360\221_@\302I\241\202\021sI\031K\226^L\250/\315\321|\315\376\237\245\320h2ylZ\232\017qe\200\327W\022b\240\220j`\203\260\021\250|\232I\002\021Db\305\323\244pG\230\360+\211\013)\334\211\3102\327\002\261\257\002\344\026\271Y\312\246\275\345\362\341\305*\2545W\332\204D(\240X\024\310\250\244(-\235\301\215ED\332g\231bb\224\r\023P\351\002\030\314\034\202\013L\230\"\221\t_\363\213\244\235-\311u\310\253\021r`8!4\014\0045{m+4\202R\"\350D$R\2334\010&<\002\200\210i\343\225+\271\013\244\r\261\237\\\3362\n\301\004H\212DDD\004dc\033\317\002\010\270M[\361N\022n\331*$\017\023\023\244ZB%\361""\0300\031\021Q\223F\215\030F\343\0042&\261\245Zz48x\211\r&\037\225\301\030\237\215\303\226\213\354\014\371E\212\257\t\006\256b,\373\374B\311\330?\007f\222\342g:\222\006+^J\016p\303\000\272w\330\231$\220t\261}\347\226U\335\350\013\037A,K^s\334\361\027\223\324-\276o\204d\217\030L\250\214\215\003\033PF0\231\242\033q\215Q8\226\204\206\352N\025\307j\226v\206\346%\323\353.>+.\311]t\236\364NKe\245\265g\216\226U\\\035\344\262\200\025\323\0211\203\220\313.A\300@\326\200\310\2021\021\202 \243\020`\212\250*]2\337|\033\302\352p\001khu\007U\262&\216\226\243,\334JH\202R\035&\241\315\226\245)@\242\033#D9C\206\232\211DO+K\264\252A\240\205Z\304\372[\331\204\333\231BM`\032\014[fM\021{gF\027\356\302{\n\327\020\245)\003{N\314n\031m\232cB\300\357\263I\\\211b\3472\335S<\246\025)\217\217>\030\211fL5\220c\252e\372\311U\315\240\255PJX\374\034h\002$)\215\032\025\226\027KOg\201\332\337\221_vm\330\024#D\347\025T\225\244X\345\242\207.\351\025+\005)2Ch!8\032\234J\215\000D\23124\022\2311\276\373R\003'\203\031\225\300\225]\344\213\321\207\237\026\265fLc\254i\327*V\272\322I\363\203\274\264X\350\016-&{RFA\242\320\020)X\221$\244\322\206\221H\250vr\0100\251\305\242\363>u_( \004b\333FC\021\215\243<\022$O/&d\311%\236F\035\336\362\\\275\356\374\267\031\375\354\271\321.P&($\303\232]\275\245\016\342\360\207\021\223p\274\253\216\231%\310\212\340\321\331.\014\302A3\321\344\2503\253\252KD\242CE\271hW\246\366P\014\030%\233\225W\257v\002\265\027g\325\021d.i\230\3623\020\311\312\340\233\346|\351x7Bi\245\001\021X\313\206\004[\260K\240\014\207t\251t\006\000\236\365\201\240fn8\254Mk\024D\231\274fpT_\265Q\021O_\342\016\227T\233D\253\025S\301z}\037\232\006\217\260E\007\242\037Ef\363g\327+\254n\266Z\233\025\375\356;\376E\266%\212\250\245\316~\246\241\355\r\030\254\242V~\250\030\377+KH\373\n\231\2507yv\240\302\340\026\205\227\272br\");\261\346\212j\333\336L\365\306w\204q\036\037\t9\276\355\243\332\253\301)Of?c\251\254\340|&P\177\301F'3\233\331\0327\017\273F\004\224\350\341\274u\343\024N~G\0370\366\236\347;\274\370\260P""\030yT\034w\035\321\\\353\212\027\342d\251=_9/\036e\275\301}\004mC\313\305\273.k\313\315LK8\324\357\254\215\332W\274Ts\213E\221tZ8L\333\232\321R\267\246;]\020\177\215'\271z\256\272\004\013\007\30090\024\335d\255\006H\331h\023\302<\365$\340\372\023&\202\336\007\244\31425\230+\3178\005\303H1\177\255O\341\007^\300\337\0242\307\210/\257\330*\025dWPl\321e\221\203\0160\220\304%\225\t\300\332\005\314BB-?4\336\220\242\021\353h\3123IF\251\033\215\032(\220*W\310\253\354\177s\224\335Uav.*\344^\025\277\361w$S\205\t\013\241\010\t\360"; - PyObject *data = __Pyx_DecompressString(cstring, 3079, 2); + #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (3063 bytes) */ +const char* const cstring = "BZh91AY&SY\034\376\326\351\000\003+\177\377\377\377\377\376\377\377\377\367\377\177\377\372\377\377\377\376\300@@@@@@@@@@@@\000@\000`\014[\276<\220s\335+\262\026\346=\260^\261\320\000\024\353Ji\320\016x\036\r\t\020CO$i\244\362\236\322\231<\023\323B'\246\247\224\3651\224\364\236\221\246\236\221\211\352i\352i\241\223L\214CG\224\0320\215=LA\246\211\240\0221&\224\331O\325\036\246A\246\203\324\362\215\003&\200\000\001\352\000\000\000\000\000\000\032\r\001\010\221\251\342\206\236\246\233\325=G\246S\332\246\217S@z\206\200\000\000\006\200\000\000\000\000\r\r4\022j\222S\365F\324=&j\000\001\240\321\352\000\000h\000\006\200\000\000\003@\000\000=A\242\014\230\0010\000\023\000F\230F\000\000\000\t\223LM\006\000F\000\000\000\000H\220A4\t\201&&\236\215#B2OL\247\244\332\020h\365\r\000d\003@\000\003F#\324dd\310\020+Gw\023\032\265\347\306;B]B\373}\377\003\362_\254\300\241\211M\221QP\377\240\244@\022\3038\224\305\305\204\026(\253\214$\221\311\200^\031\256\026$\333@\273O\005T\320\203\344\204\036\321+$\275\277\020\256\177A&\005SA\375\234\217\243\212X\235#\013\034\354)8EfA\357{\036\345\213\331\314\274\276\0008u\241mc`\r\361p\261\244TUK\252r\034rV\024E(\033\3219JJ\211\2672\346&\356,&)T-6t{\314Y,\324\242R\304\010\023\000\250\317@\330X\016\277\202K\200\225&\225\341\345I!Jo\264\0131\244\305\334O\236\226\224\261\311-H\362\3240\214\023$\210\200\234F\322\000\201\003z@.H\361\247\326\2168\0377!\035\021)2s<\235j\222\262\201\314z\322$\311\014j\003\333[\375\222x\215\350\035\346S\332T>\036\234WO<\347/ry\351;\355\214\306qO\302B\010\006\210\246FR\314\001\020\342-n\252&M t\375\360\304\361y\332\344-\253V\333C%\245\\\310~j3\2344g\022\323\315\213\234\344\270:WCa\177&2\271\213\370\372n\037DZUpg\3730\335\267/\033\243\342\342\254/aG\300m\260\246\003\261x\3550\244j\356`4\304,c2\210\327\nAT\007F\tfvW)-\026dr?\215y\340\200-]\000d\t\270\205\003a\005\273$k\205\231f1\2413\0146\306\314\\VK\265<\301p\310'\252\342\264\314\305\006\021\010\320\260A\016M\031\032\275bvf9\031V\006\315\262\212D\301\271\211\2035sl!W\0163\264""\320\017R\274\030c\336\031\332\201\223N\300\265\232\333\352\367\362Q\352\312y\347\303 \341\031q\025Pdx\3403\017&\375\212\017\237;Z\377B\203\2646\231d\027\370\023\002\303\316\241\305\313\271\364\364&\023d\246\3315\235I\027\n\251\202s\205J\221\222\273\016\206@\301\2200fn\302\003\232\240\226g(\023x\017\030\270\303\013\007\024c_\325\2603vi\354l\307\221\035\004|\002D\2652d\"\274\205|\003\200\332\013\203,)f\371Pp\322\035\343\244^\202(u\237\261r;K^\362\030\\]\351n\236L\334\361M\263\260\350\245\323s\210\265C\000\227\305}\365$\221\013\270\201@\2170\375\216\323[\321[e\272 #\"4d\020\214Ih\006\205\026\251RS\240\270u\322\212\005f\006\220I \235\205Q\272\3341H\001\355\270J\013\311\365v\3342\250s\247\036\035\017s\327\360\021\350a\303\213\014\233\220s\245\274\371\2118l`\315\354\016\224\262\245j\341\330\273\013\217\361t\330\221\351\203K&\232\321$\030*BH4$\202\355\327\307\236T\353\300\0211\310\260\262\r\005\223\236\251\274\250\030\360\001\323\364\327\300\3403\213m;\006;\370\225\341U\202\365\313\222c\245\247\270WR\324A\267%.\014P\nW\220\241\262\321x`X\017\350\355\340\203- \205A\244\351\237\021\300\340u\024Z'\312\335\013\254N\262.P\016\302u\226R\343\223r2\222\227p\312T\252\274\250u\340\203%LWw`fBA*\334k_05\366\340Y\274y\013\033@\231\361\227\246H\210\"\031\237\210\203\232\256m-\372\r\031\027qy-\343\002\2757p^?M\304Z\307\032\242\272}\310\234\257\244\0202\003\006\000\020\030\301\251\332\013\323\255\232\200\032\020z\307r\335\302c\3150\021\220\251\246\227\226\2572\341\315\213<\243\003E@\346\262]\332\241\261\270\273B\t\204\021\345\025\006\025\014\030S\267\206\312\n\000\304\030\035.\344\302#zE>\373k\310\260ik\003\316\024\244\031~\014\355d~\251\227\325\225\030\311\302\314\244B\021C\3040\376a\301\244\304\215L$\322\227\260\3159x\202\254M\227\000\210?\347\025\007\355\016\210\321\006\206\277\245\211p\032\025\234\250\036\242\374X\013\033 S\331)W%O\n5\263=\213\234\256\232O\221\023\222\325d\265\254\261\314\312\253C\264\2260\002\274\021\023\032\036S:\233\007h\203\256\201\244\301\030\210\301\020Q\2100ET\025,K\352\353\203P\234;@\224\271\337\030\36791\231\271\232\214sq)\"\tHt\232\2076YJR\201D6Fhr\207\r5\022\210\2366\227B\251\006b\025k\023\346']`L\003\206)P1\027$\213b\264$q\353N5a\254F7\001\335\324\027\254\347\215\243,\325\301\031\225\347\373g\001\\I`\3472\316\314\316\363\n\224\303\345e\277\001,\211\206\222\0144L\273I*\271\264\025\252\tK\0177\n\000\211\ncFe\022\236Kc\036\340\273EB\232Ul\316\034%fd\201:\305DF+\222\030ZB@A\036\223$6\202\023\201\251\304\250\320\004I\223#1)\223\033\355\265 1w0\231[\311U\334H\271\027\371\361e\225\2311\216\261\301\246T\255t\244\223\345\007qdXn\014\374\006[)#\020\321d\004\nPBP\322\206\2218\240s\342\020_S>k\214\271U{\301\000#\006\3321\030\014m\031 \221\"x\370r&I,\322/\355%\303\332\355\313a\223\376\341\221\022\341\002b\202L:\222\350\324P\353\257\020f1l\027z\323t\222\332\212\336\321\314Z\031\004\202g\245\266\240\316\236\231,\322\211\r\026p\320\256\353\231@/`\227w\211W\253m\342\262\213\237\326\021b\027\034\314:\214\3001q8&\370\337*]\315\260\263f\222\307.\375\n\2314\n\220\031N\317\323\362\3606\235\024\2270\3162\27085kz\030w\014\346\007\325`\250\276uDE9]p\304\373\023\032\224\250\245&\255\371x{p0<\242(> \357R\336\372y%>\346S\366\322]\247\362\376\345U\177IA\020\214\302\307\007\216 \262\r\014RQ+\301\345\002\237\313\235h\237\201\223]\006\3676\325\274[c\234r\271\216#\242\"\223>\024a9[\233\351\242\270\316\320\034G\215p\245p7\316{T~\221T\347rf\216F\254\2410%A3\305-\365\331[\371zOf7.""\332El\\\200\333\206%\234\214\276+\243l\367z\033\350\237nH\306\251&St\333\031G\224$\341\214H\255vu\311xX\235;\242\r\274\013'Z~\t]\201\002\317c\216\204\350<\203zn\027\352^qi0/KK\025\216h\314\224\336\237 \256\374\037\016\237{\357\003z\263\362\323\333\305(\257\333\3523\356I9\231\005\254+\3523W\023\257\017\252{\357\336\303\260\306\325)\3343\355\024\373\3463\365g|-\323\321\034\002Ea\250\027\265P\244\321\211\224\241\014\321h,H\344\305f%\006\227$n\250r#1(S\210\275cUC\326BS\225\026r\262\312\345a%X\245m\342\331\366\377\272N\216\314\321\276.,\350\217\177\374]\311\024\341B@s\373[\244"; + PyObject *data = __Pyx_DecompressString(cstring, 3063, 2); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2997 bytes) */ -const char* const cstring = "x\332\335Y\315s\333\306\025\267Z\267\225\\*\221,\371\253\211\247K\177\304dD\323\245\242\304\262&r\303\310\311\324ibK\226\374\025\215\006Z\002K\t\026\010@XP2\335f\222\243\2168\342\210#\217<\362\350\243\2178\362\250?\301\177B\337\333\005@\360C\262\223i\234N=\266\264\330\335\367\375{\357\355\256\363\305\262\246\021JT\313\344\256Cu\323%\256E\334mFl\307\252\030\254Vn\303fb\316r4\360b\2156\204\317k\266\345\000\026\334\256}2\343c1\357.\337s\"3E\236\037\223\233\251\004\310\345\021)\271\177]\243\327\026H\351\207\002\221\243\331\037z\251\327\234:;.1\022Ks\333\224o\313\304\254<\203\360@\364\356\213\001q\030\002\005\222\034QCc]\006\234\036s\352Y\320\000C\250\246\241s\200\253[\007\227\025\000-\256@\346\021\211xG\320l\202\002\253\210\256*\321]V\343\003\362\000\031\272\211*\211\000Y\200dT\036Q\016\300\024\210\306\205-}\217\231]+!\360\003\214@h\275\306z\020`\231\210\024R\263\034\226B\373\377^\361\377\371E\222\030\314\314%d\275\313\267\0066KL}R \327*\002e\010\271\204\370\027\341L\324\214n""\261\350\003\035\326\214\262\331\210\276\006\"\005\t\355R\031t\332Ss\"\352\030\252\002\251o\302)\1773P\177\023\214\016r\301j\325\007\322\245mjn\2614\0341.\242\243\326\035\007r\025z.\230S\347\354m`\032\221.\222\373\266\253\327\364\027L\373\222\252;P:\325\035P~U\254\036\215\334\024\272%\2437\325/\301\215\350<\222\373\263p\024\251\332\323\304i:2\222?F\346\036\333?\022\004}\222\227\220\026\275\245a\222\213\250\261n\251\023G\037\207A\333d{\254\213\377b\267\023\363\205T[\346\244V\347\256\354\351RI\216Z\362zE\250(\2770r\2513\200X\221\240B\307\260\232\3556\344\347[s\213\250%'\300/tnW\364\300\252\016N\204\340\333\242\351\246\272\"\217\216\036\362@\300\013d\313r\311\327:\236\363\244\301u\307\304D\213\014\376\225\353__o\343\344\036T\341Al\274u\371\304\3129\367\326\315\264g\227,{s\263?tM| \274\321\007FM\027'.\3524 Gm\033\023\275\247[\310D\207\032\021{\020\016\307i\027&\314\006\234\016G\235nm\177g~\207~\201\247\375\365\215w\344\366\376\376\264\2368~\343\r\236\3072\215\300O\"\240\203\307\217\215A\271\307\245G\005\0021w\317r\231,\316K\342\350\214X\324\230\241W\340\342\3422(\254\230/\220J\310\001\316\346\313_-_\237\233\237\213\302'\373PovV\352\272\341\342\261\036\016\241\274H\356VI\303\252\023\223\311jcc\351I\021\200Z&\036\221\204~\327\250iZ.E\245\025 \007\353\256\201\315\016\010\201\236\201\324_S\003j\374\375\n\366\305\377\373v0\024\no\352\004\211oE\036\016\363I\302\016\355\0050\031\353\253\321\331bc\231:\220\213\314\210(A\311.q\372\366[\020\341\257\233\206\276\203\010\221u\265Jy\202\222c\\Y$\313\006\243\234\341\351\005\256#\300\t\024\203v\017XY\036v'\307C\n\264\247\322\\)\277<\230\205\321\352\374g\303\026yL[\232O\226S\371x\027\325\225;f\207\357\210\351\347\3776l5a\177\353V\337\362^\302\370\346l\262$\216j\321\364\334\\2\315\373(>\275\231\177\300\342\204\210\334\237\200M\236\260P\370o~9\023\346\344~I\277\301\307\213^\214\003\010\360H\t\005\007\013\225\254\377\335\352\025u\374\377rC\300\232\232\263\207\243\"\227\377\025;\003\032:\374\002#E\017\020\230\354\271\233C\252\243\332\366[""\022\254A\036\262\n\344\"\311\325,\2167]\025\261\205O\036\004*\206;\344\335\246X\354}\013Yu-\373\256\010\024\250{\252\313X\227\305\035\212\023\203\224\326\342\363\230\326\275\212>4\201b=\375\232\263\024\275\345\024\260\303l<\344\361\305\241\277\010\231dm\333aT[\266,\003\356\250\032#\373:4\252\272K\252\016c\256XCZ\361\242\243R\250pp\367\000\034A\271\022\257sP\330\212O\241\003mS\350!\342\320;\370\222\305\005\317>\321\210\0168\177r\005\205.b\364\363I\361B)\321\313R\372\204\211\325\031\324\301[\037#\333\256k\363\205\0337l\371$\325\335W\334\002a\365JQ\267\006\327n\210'C\254\306\305m\267f\\NQ\3659F\263T\016\027%\364\373\376v#_ \305\277\003\010\025h\240,\305.\206\231\335\320t.\"\221D\007\337\276h\215!\034\345\271\271.\343\n\031W\027\307\rf\"\301\226\252s9\3220g\3261Zb \256\215\033\233\342Z\255(X}\025%\371\206\344\305K[\377w\361s\303\202\264\342\267!\273M|y\034\332\331\206N\036G\032\027\230a\255nH\177:\242\345\r\353d\303\346\312\374[\210\323\035\010\317\260\325\373\370\262\3104\334r\244\312G\354\037\350\225=\035r\240/\202\273\033\317\341\037j\242\334\203\322\366\200U\343\023\213\334!j\213\322\343\306\224k\322^\202\320&\307e|\34365\312\033\246\252[E\325r\000\365\320\200y\005\352\214\252\002\235\243bC\206\220+n\\9U\303\342\220]\000\020U^\212iEU\0054\231\342ZJ\252\024t\207\251\014\036\272^\224\2171\251\t\361&\355\244'\244OR32\351\370p\2110\264\033\252U7]\2151\033?\024\005\252\005\376@I\362'\007O\202\375=5TQ\360Y]Q\2428\306pN\305\261\017K\351\010\017\307\316\021\030Hb\017\003\364\260x\250F\301.>-)J\234i\212\2166F\241\301\217-\335P\242j\204;\201\000\324\020\317Q;\254\301\025\005MCr\250kT\324\035\361aiu\210\220R\343`\242\t5\017~\202\371\226-\217\034B\270(\206\\\376w\200\255\253;\242\330\330\226m;\230o\242\017(0\206\r@\255\244[\203\242\354\326\251!\331:\000L\270\260pE\260\000\227\nL\213\037\253p\261a\362\306\313""\231Q\205\232\252\2450\016\303H3\030E\377\r\300\241T)X\037\305\000\253fr(\212\177'\003\271/\371\2126#\353\370\227\353\244\321\302\321Y.\343\340c\010\277\265/\257[{p\177\3245\320S\334#\345e2N\030%\311\234\356 \305p\237:&\376\303\267\225\027\272\035\236\274\022\224_\223\023c\231\203[\336\222\347\372\245N\346txz\276=\322\236n\257\264)|y\037\373e\177\2453\372\347\203\271\203\027\376\244?\023\353Q\357Ep:\274\374$|\3624|\372}g:\337\234l^i\322&oe[\245\326\227-\255}\265\375\343+5\\QB\205\205\254\032V\365P\337\tw\214\316\364e\020v\007E\211\330\037\216\216u2\343\362ox2\027\346\276y5\023>|\364\372#\304\n\206\330\010 \200\023\341D68\007N\235\304\235\343\347d\320:\231l\230\375\"\374\342Y\370L\260\356\335\366\372\217\310B\202\251\020P\264\3429\032|8q1\274x\243\271\333\032\351L~\000\366}\333\034\351\340\324\255\366d;{\010&\322\310\316`\022\201\360\235\177.\370]PhR\177%X\t&\203\221\360\344G\001}\235C\\|\013\356\313Lx\031\000\323\367\340>X\330\n\257\177\3712{8J\202\223\301w\340tp\344g\336\224\367\025\270o\311\337\r\376\024\360&\230s\016\301\325\031=\207N\004\330\216Ny\213\310\027\314\352\214\236\366\256x;\301\031P\030\326\367}\206\353\0201i\315'\007\364\300\r\247>\n*\315\221C\220\374\236\257\201{&.\204\027\204A\000\035\375\345\013D\311""\004F\227\373W\375\335\316\364y\377\275\200\242`\344\201J\217\007k\350!\004N\2513\361\241\177G\330\232Aq\225 \323,KY\220\242S\341\324\325\360\352\343\360\361\223\303Q\241\\F\232|\336\037\361?\014V\344\3678\014\244\023\220W\331\177\032l5\0374\377\335.\305\313\353\340\351\314Y0j2\230i>m\325^\212\225o\274-\3771\306\360\2647\203\031\033i\203\256y\024\224\016\001\326\rd\215^y\356\357\276\316\310<\334\367\3250\373y\033R9\023f\026\332Y\361\033\240/~\317\266\204\211\023\"\344W\374g\315\261\260\264\031n\322\220J\010\"N\244m\010,\315\377\030\305Ox#^\344\2149\220\364cSk]\201\364\230\300R\262\362\037\371\313\032I"; - PyObject *data = __Pyx_DecompressString(cstring, 2997, 1); + #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2982 bytes) */ +const char* const cstring = "x\332\335X\315s\333\306\025\267Z\267\225R*\221,\371\253\211\247K\177\304dL\323\245-\307\262&r\303\310\316\324\255cK\226\352\330\321h\240%\260\224`\201\000\204\005%\323u&9\352\210#\2168\362\310#\217:\372\210#\217\372\023\374'\344\275]\000\004?$\333\231&\351TcK\213\335}\337\277\367\336\356\346\213eM#\224\250\226\311]\207\352\246K\\\213\270\233\214\330\216U1X\255\370\301\007$\372\271\367\202\326l\203\315%\023\370s\347\316\235x+\231'\213r\224\313\037\266\247H5\355\tut\n\037<\267z\236\236/\220\363\225\363k\005\262Z*\220\353\005rc\355H\332\205D\317\234Ak\025\215\022Z \2259R!\363\363\204^\001\036]\236\357\312\350|LL\250\t\276\270R!w\346\311\365\363y \272@\330\013\2339z\215\231.5\010P\350\346\006\251ZN\215\272\005B\353\256\005\003]\245\206\321 6u8\323\n \204U\231\203\006\022k\2079\004W\205\271\003\352p\313\250\273:(\002\236\213U\333`\356r<=\350\306n0\312\316\006\357\215D*\2049\035\206\324TA\203*\231\263\033s\252A9\237[\357\032\275^ \325\272\251\242\030\014x\205\221]\207\3326\323H\245\221\246\370:\332\324Ci9\261'\300;\016\343\0346\344{\225\301\237\205\036L\201\010\335T\215\272\0062t\263\007bd\201\232\270\316t\230u\000\215]\312\002b3r \311%*\203\0062\374y\241\315b\303\335\264\314\253l\207\032u\261s@=\220G]\262\253\033\006\n\222\241\352\215_\261G\377\235\030\243$\307\231+,f\333u\026\2714Y\315\317\245\235\225\000{\235\320j\225\251.\323\006\234\002\356E\323\323\301\322X\225\326\r\341$P$\305\274H\3562\233\231\032\2302\300\3072\373\371\270\r\233\2119\313\321\300\2135\332\020>\257\331\226\003Xp\273\366\311\214\217\305\374z\371\236\023\231)\362\374\210\334L%@.\217H\311\375\3472\275 \017\220\241\233\250\222\010\220\005HF\345\021\345\000L\201h\\\330\320w\230\331\265\022\002?\300\010\204\326k\254\007\001\226\211H!5\313a)\264\377\357\025\377\367/""\222\304`f.!\353]\276=\260Yb\352F\201\\\256\010\224!\344\022\342\237\2053Q3\272\305\242\017tX3\312f#\372\032\210\024$\264Ke\320iO\315\211\250c\250\n\244\276\r\247\374\355@\375M0:\310\005\253U\037H\0276\251\271\301\322p\304\270\210\216Zw\034\310U\350\271`N\235\263w\201iD:O\036\331\256^\323_2\355+\252nA\351T\267@\371e\261z8rS\350\226\214\336V\277\0047\242\363H\356{\341(R\265\247\211\323td$\177\214\314C\266{(\010\372$/ -zK\303$\027Qc\335R'\216>\016\203\266\311vX\027\377\305T\017\177\005m:j\304\257\260\301v\227\370\\\252csR\253sW\266{\251?G\003x\275\"\264\227_\030\324\024k\261\"\361\206>c5\333m\310\317w\346\026QKN\000mh\352\256h\217U\035\374\013\270\260E?N5L\036\235J\344Y\201\027\310\206\345\222\257u<\002J_\324\035\023s0\362\305/\\\032\373\332\036'\017\241@\017\302\346\235++\026\325\231w\356\263=\273dE\234\271\376}\327\304\307\302\033}8\325tq\030\243N\003\322\327\266\261\006\3644\022Y\003\240|\304\036\204ss\332\205\t\263\001\247\303)\250[\366\1775\277C+\301\213\300\352\332\257\344\366\376\326\265\2328~\355-\236\307\n\216\300O\"\240\203\307\217\214A\271\307\245\207\005\0021\367\320r\231\254\333\013\342T\215X\324\230\241W\340N\3432\250\271\230/\220J\310\001\216\355\213\367\026\257\316\314\316D\341\223-\2527;+u\335p\361\304\017\347S^$\367\253\244a\325\211\311d!\262\261*\245\010@-\023OOB\277\313\3244-\227\242\322\n\220\203u\227\301f\007\204@;A\352\257\251\001\345\377Q\005[\346\377}\247\030\n\205\2675\211\304\267\"\017\207\371$a\267H\035\310\203\366\262I\241A\210\303\356\340\013\026\027<\373D#\030\340p\311\025\024:\217\301\316'\265\n\245D/J\351\343#\226^P\007o{\214l\272\256\315\347\256]\263\345STw_q\003\204\325+E\335\032\\\273&\236\n\321y\305M\267f\\HQ\3659F\263T\016\027$\364\353\356f#_ \305\277\003\346\024\350\216,\305.F\225\335\320t.<\235x\037\337\274h\215!\372\344\241\270.\303\010\tV\027g\tf\"\301\206\252s9\3220EV\201\363\232\030\210\353\342\332:\217\272\n4\007\220\335\323}\342\366\"\356\0319\330 HVS\324\005q`Y\215n\236\240\360\232\374\r\275D\007\014\025\343\373\305\202U\263u1\032\014^w$O\374\203;\376\021\335\267\217\350B\275\316\215\252D\\\222\025\005\213\254\242$\337\220\243xI\353\377.~aX\220=\374\016$\261\211/\215C\033\330\320\311\243H\343:2\254\243\riC\207t\266a\rk\330\\\231?\200\370\334\205\260\014[}\204/\211L\303-\207\252|\310\376\201\226\330\323\010\007\332\037\270\273\361\002\376\243&\312C\250`\217Y5.,\321\216\036\017\246\274\222v\020D59\376\342s\266\251Q\3360U\335*\252\226\003@\207\026\313+PZT\025\350\034\025[.D[q\343\332\250\032\026\207\204\002l\250\362\376K+\252*\320\310\024\327RR\331\337\035\246\222v\350zQ\276\273\244&\304\363\263\223\236\220\356H\315\310<\343\303%\302\320n\250V\335t5\306l\374P\024(\020\370\013%\311\337\034\234\010\366\367\224ME\301\027tE\211B\030#9\025\302>\030\245\203;\0346\207\204?\t;\014\320\303\342M\032\005\273\370\212\244(q\222):\332\030\205\006?6tC\211\n\020\356\004\002PC\274=\030\025\312e\244\311g\374\021\377\223`I~\217\303@:\001y\225\375g\301F\363q\363U\273\024/\257\202\2473\247\300\250\311\340J\363Y\253\266/V\376\351m\370\337b\014OxW0c#m\3205O\202\322\001\300\272\201\254\321+/\374\3557\031\231\207\273\276\032f\277hC*g\302\314\\;+\376\002\364\305\337\353-a\342\204\010\371E\377ys,,\255\207\3534\244\022\202\210\023i\033\002K\363?C\361\023\336\210\0279c\006$\375\320\324Z\027!=&\260\224,\375\004|\210\016\345"; + PyObject *data = __Pyx_DecompressString(cstring, 2982, 1); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif - #else /* compression: none (8454 bytes) */ -const char* const bytes = ").Add a constraint to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2, 3])\n >>> problem.addConstraint(lambda a, b: b == a+1, [\"a\", \"b\"])\n >>> problem.addConstraint(\"b == a+1 and a+b >= 2\") # experimental string format, automatically parsed, preferable over callables\n >>> solutions = problem.getSolutions()\n >>>\n\n Args:\n constraint (instance of :py:class:`Constraint`, function to be wrapped by :py:class:`FunctionConstraint`, or string expression):\n Constraint to be included in the problem. Can be either a Constraint, a callable (function or lambda), or Python-evaluable string expression that will be parsed automatically.\n variables (set or sequence of variables): :py:class:`Variables` affected\n by the constraint (default to all variables). Depending\n on the constraint type the order may be important.\n Add a variable to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariable(\"a\", [1, 2])\n >>> problem.getSolution() in ({'a': 1}, {'a': 2})\n True\n\n Args:\n variable (hashable object): Object representing a problem\n variable\n domain (list, tuple, set, or instance of :py:class:`Domain`): Set of items\n defining the possible values that the given variable may\n assume\n Add one or more variables to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2, 3])\n >>> solutions = problem.getSolutions()\n >>> len(solutions)\n 9\n >>> {'a': 3, 'b': 1} in solutions\n True\n\n Args:\n variables (sequence of hashable objects): Any object\n cont""aining a sequence of objects represeting problem\n variables\n domain (list, tuple, or instance of :py:class:`Domain`): Set of items\n defining the possible values that the given variables\n may assume\n Change the problem solver currently in use.\n\n Example:\n >>> solver = OptimizedBacktrackingSolver()\n >>> problem = Problem(solver)\n >>> problem.getSolver() is solver\n True\n\n Args:\n solver (instance of a :py:class:`Solver`): New problem\n solver\n Class used to define a problem and retrieve solutions.Constraints: Constraints must be instances of subclasses of the Constraint classDomain is emptyDomains must be instances of subclasses of the Domain classDuplicate configs: Expected constraints to be strings, got Find and return a solution to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.getSolution() is None\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> problem.getSolution()\n {'a': 42}\n\n Returns:\n dictionary mapping variables to values: Solution for the problem\n Find and return all solutions to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.getSolutions() == []\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> problem.getSolutions()\n [{'a': 42}]\n\n Returns:\n list of dictionaries mapping variables to values: All solutions for the problem\n NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Obtain the problem solver currently in use.\n\n Example:\n >>> solver = OptimizedBacktrackingSolver()\n >>> proble""m = Problem(solver)\n >>> problem.getSolver() is solver\n True\n\n Returns:\n instance of a :py:class:`Solver` subclass: Solver currently in use\n Optional[Sequence]ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.Problem.addConstraint (line 141)Problem.addVariable (line 86)Problem.addVariables (line 118)Problem.getSolutionIter (line 218)Problem.getSolution (line 180)Problem.getSolutions (line 199)Problem.getSolver (line 72)Problem.reset (line 44)Problem.setSolver (line 57)Reset the current problem definition.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariable(\"a\", [1, 2])\n >>> problem.reset()\n >>> problem.getSolution()\n >>>\n Return an iterator to the solutions of the problem.\n\n Example:\n >>> problem = Problem()\n >>> list(problem.getSolutionIter()) == []\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> iter = problem.getSolutionIter()\n >>> next(iter)\n {'a': 42}\n >>> next(iter)\n Traceback (most recent call last):\n ...\n StopIteration\n Tried to insert duplicated variable Union[Constraint, Callable, str]Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why), .?add_noteconstraint/problem.pydisable duplicate parameter configurations out of enablegcisenabledlist[str]list[tuple]`solver` is not instance of Solver class (is tuple[list[tuple], dict[tuple, int], int] unique.CallableCompilableFunctionConstraintConstraintDomainFunctionConstraintHashableOp""timizedBacktrackingSolverOptionalParallelSolverProblemProblem.__init__Problem._getArgsProblem._getArgs..genexprProblem.addConstraintProblem.addConstraint..genexprProblem.addVariableProblem.addVariablesProblem.getSolutionProblem.getSolutionIterProblem.getSolutionsProblem.getSolutionsAsListDictProblem.getSolutionsOrderedList..genexprProblem.getSolutionsOrderedListProblem.getSolverProblem.resetProblem.setSolver__Pyx_PyDict_NextRefSequenceSolverUnion_addConstraintaddVariableaddVariablesallvariablesappendasyncio.coroutinesboolcclearcline_in_tracebackclosecollections.abccompile_to_constraintsconstraintconstraint.constraintsconstraint.domainconstraint.parserconstraint.problemconstraint.solvers_constraintsconstraintscopycountdeepcopy__doc__domaindomainsextendfreethreading__func__genexpr_getArgsgetSolutiongetSolutionItergetSolutionsgetSolutionsAsListDictgetSolutionsOrderedListgetSolverget_in_order__getitem____init___is_coroutine_is_gil_enableditemgetteritemskeys__main____metaclass____module__msg__name__nextoperatororderparamsparsedpicklablepoppreProcess__prepare___process_mode__qualname__requires_picklingresetresetStatereturnselfsendsetSolver__set_name__setdefaultsize_dictsize_listsolutionsolutionssolutions_dictsolutions_listsolver_solver_str_constraintssys__test__throwtypingvvalidatevaluevaluesvariable_variablesvariablesvconstraintswarnwarningszip\320\004$\240A\360 \000\t\014\2109\220C\220t\2301\330\014\022\320\0228\270\001\270\024\270Q\270a\330\014\022\220*\230A\230Q\330\010\013\2104\210z\230\021\230+\240V\2507\260)\2704\270t\3007\310!\3108\320ST\330\014\025\220T\230\021\230!\330\010\013\210:\220Q\220h\230a\330\014\025\220T\230\031\240!\2401\330\r\024\220A\220X\230Q\330\014\025\220V\2301\230A\340\014\022\220!\330\014\022\220)\2301\230A\330\010\013\2104\210q\330\014\022\220*\230A\230Q\330\010\014\210K\220q\230\014\240A\200A\360\024\000\t\r\210D\220\r\230Q\330\010\014\210K\220v\230Q\200A\360\032\000\t\r\210K\220q\200A\360\034\000\t\022\220\035\230o""\250T\260\031\270!\270:\300T\310\030\320QR\330\010\013\2104\210q\330\014\023\2201\330\010\017\210t\2208\230=\250\001\250\031\260-\270q\200A\360\034\000\t\022\220\035\230o\250T\260\031\270!\270:\300T\310\030\320QR\330\010\013\2104\210q\330\014\023\2201\330\010\017\210t\2208\230<\240q\250\t\260\035\270a\200A\360 \000\t\022\220\035\230o\250T\260\031\270!\270:\300T\310\030\320QR\330\010\013\2104\210q\330\014\023\2204\220q\230\001\330\010\017\210t\2208\320\033+\2501\250I\260]\300!\200A\360\030\000\t\020\210t\2201\200A\330\016\025\320\025'\240z\260\021\330\t\n\340\010\031\230\024\320\0355\260Q\260a\330\010\024\220C\220q\230\001\330\010\037\230t\2401\240C\240q\320(8\270\005\270Q\270a\330\010\013\2101\340\014\030\230\003\2301\230A\330\014\017\210z\230\023\230A\330\020\026\220j\240\001\330\024\026\220a\220z\240\022\320#X\320XY\320YZ\330\024)\250\021\250$\250a\250s\260!\2601\260B\260d\270%\270\177\310c\320Q_\320_e\320ef\320fi\320ik\320kl\330\024#\2401\240D\320(8\270\001\270\024\270Q\340\010\t\330\014\r\330\014\r\330\014\r\320\004(\320(J\310+\320UV\360&\000\t\014\210:\220Q\220l\240!\330\014\020\320\020!\240\027\250\001\250\021\330\014\r\330\r\027\220q\230\014\240A\330\014!\320!@\320@j\320jk\320kl\330\014\020\320\020!\240\027\250\001\250\021\330\014\r\360\006\000\t\014\2104\210z\230\021\230,\240a\330\014\017\210x\220q\230\001\340\020\035\320\035/\250q\260\001\330\021\033\2301\230L\250\001\330\020\035\320\0359\270\021\270!\340\020\026\220a\330\020\026\220j\240\001\240\021\330\010\014\210M\230\027\240\002\240,\250a\230Q\240Q\240\021\240\001\320\004&\240a\360(\000\t\r\210L\230\001\330\014\020\220\014\230A\230Z\240q\320\004&\240g\320-B\300!\340\010 \240\004\240M\260\021\330\010\013\2106\220\023\220E\230\023\230C\230q\240\007\240s\250!\330\014\027\220v\230Q\330\010\027\220z\240\022\2401\330\010\023\220=\240\001\320\004\027\220q\330\010\022\220$\220k\240\025\240a\330\010\027\220w\230e\2401\330\0105\260Q\360\006\000\t\014\2103\210a\210t\320\023&\240b\250\001\340\014\020\220\016\230d""\240!\330\020\031\320\031/\250q\260\001\260\035\270i\300z\320QR\330\020\024\220C\220s\230%\230q\330\024\030\230\016\240a\240s\250!\360\006\000\t\r\210L\230\r\240T\250\021\330\014\017\210t\2201\330\020\034\230D\240\001\240\021\330\014\027\220w\230b\240\014\250A\360\006\000\t\014\2101\330\014\023\320\023%\320%W\320WX\340\010\027\220q\330\010\014\210L\230\001\330\014\030\230\001\230\034\240Q\330\010\014\210L\230\r\240Q\330\014\020\220\014\230A\330\020\034\230A\230Y\240g\250R\250|\2701\330\010\014\210L\230\r\240[\260\001\330\014\026\220k\240\021\240+\250Y\260m\3001\330\010\014\210J\220g\230W\240A\330\014\022\220+\230Q\330\014\017\210t\2201\330\020\027\220v\230V\2401\340\010\017\210y\230\r\240Q\320\004\027\220x\230q\360\014\000\t\r\210K\220w\230c\320!<\270A\330\010\014\320\014:\270!\330\010\014\320\014+\2501\330\010\014\320\0142\260!\360\006\000\t\020\210z\230\021\230$\230j\250\t\3201`\320`a\320ae\320ef\320fj\320jk\360\006\000\t\014\210:\220Q\220d\230*\240A\330\014\020\220\001\220\021\330\014\017\210t\2204\220x\230\177\250d\260$\260a\330\020\024\220A\220Q"; + #else /* compression: none (8427 bytes) */ +const char* const bytes = ").Add a constraint to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2, 3])\n >>> problem.addConstraint(lambda a, b: b == a+1, [\"a\", \"b\"])\n >>> problem.addConstraint(\"b == a+1 and a+b >= 2\") # experimental string format, automatically parsed, preferable over callables\n >>> solutions = problem.getSolutions()\n >>>\n\n Args:\n constraint (instance of :py:class:`Constraint`, function to be wrapped by :py:class:`FunctionConstraint`, or string expression):\n Constraint to be included in the problem. Can be either a Constraint, a callable (function or lambda), or Python-evaluable string expression that will be parsed automatically.\n variables (set or sequence of variables): :py:class:`Variables` affected\n by the constraint (default to all variables). Depending\n on the constraint type the order may be important.\n Add a variable to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariable(\"a\", [1, 2])\n >>> problem.getSolution() in ({'a': 1}, {'a': 2})\n True\n\n Args:\n variable (hashable object): Object representing a problem\n variable\n domain (list, tuple, set, or instance of :py:class:`Domain`): Set of items\n defining the possible values that the given variable may\n assume\n Add one or more variables to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariables([\"a\", \"b\"], [1, 2, 3])\n >>> solutions = problem.getSolutions()\n >>> len(solutions)\n 9\n >>> {'a': 3, 'b': 1} in solutions\n True\n\n Args:\n variables (sequence of hashable objects): Any object\n cont""aining a sequence of objects represeting problem\n variables\n domain (list, tuple, or instance of :py:class:`Domain`): Set of items\n defining the possible values that the given variables\n may assume\n Change the problem solver currently in use.\n\n Example:\n >>> solver = OptimizedBacktrackingSolver()\n >>> problem = Problem(solver)\n >>> problem.getSolver() is solver\n True\n\n Args:\n solver (instance of a :py:class:`Solver`): New problem\n solver\n Class used to define a problem and retrieve solutions.Constraint | Callable | strConstraints: Constraints must be instances of subclasses of the Constraint classDomain is emptyDomains must be instances of subclasses of the Domain classDuplicate configs: Expected constraints to be strings, got Find and return a solution to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.getSolution() is None\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> problem.getSolution()\n {'a': 42}\n\n Returns:\n dictionary mapping variables to values: Solution for the problem\n Find and return all solutions to the problem.\n\n Example:\n >>> problem = Problem()\n >>> problem.getSolutions() == []\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> problem.getSolutions()\n [{'a': 42}]\n\n Returns:\n list of dictionaries mapping variables to values: All solutions for the problem\n NoneNote that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.Obtain the problem solver currently in use.\n\n Example:\n >>> solver = OptimizedBacktrackingSolve""r()\n >>> problem = Problem(solver)\n >>> problem.getSolver() is solver\n True\n\n Returns:\n instance of a :py:class:`Solver` subclass: Solver currently in use\n ParallelSolver is currently experimental, and unlikely to be faster than OptimizedBacktrackingSolver. Please report any issues.Problem.addConstraint (line 140)Problem.addVariable (line 85)Problem.addVariables (line 117)Problem.getSolutionIter (line 217)Problem.getSolution (line 179)Problem.getSolutions (line 198)Problem.getSolver (line 71)Problem.reset (line 43)Problem.setSolver (line 56)Reset the current problem definition.\n\n Example:\n >>> problem = Problem()\n >>> problem.addVariable(\"a\", [1, 2])\n >>> problem.reset()\n >>> problem.getSolution()\n >>>\n Return an iterator to the solutions of the problem.\n\n Example:\n >>> problem = Problem()\n >>> list(problem.getSolutionIter()) == []\n True\n >>> problem.addVariables([\"a\"], [42])\n >>> iter = problem.getSolutionIter()\n >>> next(iter)\n {'a': 42}\n >>> next(iter)\n Traceback (most recent call last):\n ...\n StopIteration\n Sequence | NoneTried to insert duplicated variable Using the ParallelSolver in ThreadPool mode without freethreading will cause poor performance.You have used FunctionConstraints with ParallelSolver(process_mode=True). Please use string constraints instead (see https://python-constraint.github.io/python-constraint/reference.html#constraint.ParallelSolver docs as to why), .?add_noteconstraint/problem.pydisable duplicate parameter configurations out of enablegcisenabledlist[str]list[tuple]`solver` is not instance of Solver class (is tuple[list[tuple], dict[tuple, int], int] unique.CallableCompilableFunctionConstraintConstraintDomainFunctionConstraintHashableOptimizedB""acktrackingSolverParallelSolverProblemProblem.__init__Problem._getArgsProblem._getArgs..genexprProblem.addConstraintProblem.addConstraint..genexprProblem.addVariableProblem.addVariablesProblem.getSolutionProblem.getSolutionIterProblem.getSolutionsProblem.getSolutionsAsListDictProblem.getSolutionsOrderedList..genexprProblem.getSolutionsOrderedListProblem.getSolverProblem.resetProblem.setSolver__Pyx_PyDict_NextRefSequenceSolver_addConstraintaddVariableaddVariablesallvariablesappendasyncio.coroutinesboolcclearcline_in_tracebackclosecollections.abccompile_to_constraintsconstraintconstraint.constraintsconstraint.domainconstraint.parserconstraint.problemconstraint.solvers_constraintsconstraintscopycountdeepcopy__doc__domaindomainsextendfreethreading__func__genexpr_getArgsgetSolutiongetSolutionItergetSolutionsgetSolutionsAsListDictgetSolutionsOrderedListgetSolverget_in_order__getitem____init___is_coroutine_is_gil_enableditemgetteritemskeys__main____metaclass____module__msg__name__nextoperatororderparamsparsedpicklablepoppreProcess__prepare___process_mode__qualname__requires_picklingresetresetStatereturnselfsendsetSolver__set_name__setdefaultsize_dictsize_listsolutionsolutionssolutions_dictsolutions_listsolver_solver_str_constraintssys__test__throwvvalidatevaluevaluesvariable_variablesvariablesvconstraintswarnwarningszip\320\004$\240A\360 \000\t\014\2109\220C\220t\2301\330\014\022\320\0228\270\001\270\024\270Q\270a\330\014\022\220*\230A\230Q\330\010\013\2104\210z\230\021\230+\240V\2507\260)\2704\270t\3007\310!\3108\320ST\330\014\025\220T\230\021\230!\330\010\013\210:\220Q\220h\230a\330\014\025\220T\230\031\240!\2401\330\r\024\220A\220X\230Q\330\014\025\220V\2301\230A\340\014\022\220!\330\014\022\220)\2301\230A\330\010\013\2104\210q\330\014\022\220*\230A\230Q\330\010\014\210K\220q\230\014\240A\200A\360\024\000\t\r\210D\220\r\230Q\330\010\014\210K\220v\230Q\200A\360\032\000\t\r\210K\220q\200A\360\034\000\t\022\220\035\230o\250T\260\031\270!\270:\300T""\310\030\320QR\330\010\013\2104\210q\330\014\023\2201\330\010\017\210t\2208\230=\250\001\250\031\260-\270q\200A\360\034\000\t\022\220\035\230o\250T\260\031\270!\270:\300T\310\030\320QR\330\010\013\2104\210q\330\014\023\2201\330\010\017\210t\2208\230<\240q\250\t\260\035\270a\200A\360 \000\t\022\220\035\230o\250T\260\031\270!\270:\300T\310\030\320QR\330\010\013\2104\210q\330\014\023\2204\220q\230\001\330\010\017\210t\2208\320\033+\2501\250I\260]\300!\200A\360\030\000\t\020\210t\2201\200A\330\016\025\320\025'\240z\260\021\330\t\n\340\010\031\230\024\320\0355\260Q\260a\330\010\024\220C\220q\230\001\330\010\037\230t\2401\240C\240q\320(8\270\005\270Q\270a\330\010\013\2101\340\014\030\230\003\2301\230A\330\014\017\210z\230\023\230A\330\020\026\220j\240\001\330\024\026\220a\220z\240\022\320#X\320XY\320YZ\330\024)\250\021\250$\250a\250s\260!\2601\260B\260d\270%\270\177\310c\320Q_\320_e\320ef\320fi\320ik\320kl\330\024#\2401\240D\320(8\270\001\270\024\270Q\340\010\t\330\014\r\330\014\r\330\014\r\320\004(\320(E\300[\320PQ\360&\000\t\014\210:\220Q\220l\240!\330\014\020\320\020!\240\027\250\001\250\021\330\014\r\330\r\027\220q\230\014\240A\330\014!\320!@\320@j\320jk\320kl\330\014\020\320\020!\240\027\250\001\250\021\330\014\r\360\006\000\t\014\2104\210z\230\021\230,\240a\330\014\017\210x\220q\230\001\340\020\035\320\035/\250q\260\001\330\021\033\2301\230L\250\001\330\020\035\320\0359\270\021\270!\340\020\026\220a\330\020\026\220j\240\001\240\021\330\010\014\210M\230\027\240\002\240,\250a\230Q\240Q\240\021\240\001\320\004&\240a\360(\000\t\r\210L\230\001\330\014\020\220\014\230A\230Z\240q\320\004&\240g\320-B\300!\340\010 \240\004\240M\260\021\330\010\013\2106\220\023\220E\230\023\230C\230q\240\007\240s\250!\330\014\027\220v\230Q\330\010\027\220z\240\022\2401\330\010\023\220=\240\001\320\004\027\220q\330\010\022\220$\220k\240\025\240a\330\010\027\220w\230e\2401\330\0105\260Q\360\006\000\t\014\2103\210a\210t\320\023&\240b\250\001\340\014\020\220\016\230d\240!\330\020\031\320\031/""\250q\260\001\260\035\270i\300z\320QR\330\020\024\220C\220s\230%\230q\330\024\030\230\016\240a\240s\250!\360\006\000\t\r\210L\230\r\240T\250\021\330\014\017\210t\2201\330\020\034\230D\240\001\240\021\330\014\027\220w\230b\240\014\250A\360\006\000\t\014\2101\330\014\023\320\023%\320%W\320WX\340\010\027\220q\330\010\014\210L\230\001\330\014\030\230\001\230\034\240Q\330\010\014\210L\230\r\240Q\330\014\020\220\014\230A\330\020\034\230A\230Y\240g\250R\250|\2701\330\010\014\210L\230\r\240[\260\001\330\014\026\220k\240\021\240+\250Y\260m\3001\330\010\014\210J\220g\230W\240A\330\014\022\220+\230Q\330\014\017\210t\2201\330\020\027\220v\230V\2401\340\010\017\210y\230\r\240Q\320\004\027\220x\230q\360\014\000\t\r\210K\220w\230c\320!<\270A\330\010\014\320\014:\270!\330\010\014\320\014+\2501\330\010\014\320\0142\260!\360\006\000\t\020\210z\230\021\230$\230j\250\t\3201`\320`a\320ae\320ef\320fj\320jk\360\006\000\t\014\210:\220Q\220d\230*\240A\330\014\020\220\001\220\021\330\014\017\210t\2204\220x\230\177\250d\260$\260a\330\020\024\220A\220Q"; PyObject *data = NULL; CYTHON_UNUSED_VAR(__Pyx_DecompressString); #endif PyObject **stringtab = __pyx_mstate->__pyx_string_tab; Py_ssize_t pos = 0; - for (int i = 0; i < 175; i++) { + for (int i = 0; i < 172; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); if (likely(string) && i >= 49) PyUnicode_InternInPlace(&string); @@ -10857,7 +10838,7 @@ const char* const bytes = ").Add a constraint to the problem.\n\n Example stringtab[i] = string; pos += bytes_length; } - for (int i = 175; i < 192; i++) { + for (int i = 172; i < 189; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; @@ -10868,25 +10849,29 @@ const char* const bytes = ").Add a constraint to the problem.\n\n Example } } Py_XDECREF(data); - for (Py_ssize_t i = 0; i < 192; i++) { + for (Py_ssize_t i = 0; i < 189; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { - PyObject **table = stringtab + 175; + PyObject **table = stringtab + 172; for (Py_ssize_t i=0; i<17; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -10905,16 +10890,20 @@ const char* const bytes = ").Add a constraint to the problem.\n\n Example { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<1; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -10948,87 +10937,87 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 164}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 163}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 243}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 242}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_solution}; __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 245}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 244}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_params}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 290}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 289}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u__7}; __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 24}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 23}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_solver}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_xq_Kwc_A_1_2_z_j_1_aaeeffjjk_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 44}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_A_D_Q_KvQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 57}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 56}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_solver}; __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_setSolver, __pyx_mstate->__pyx_kp_b_iso88591_A_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 72}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 71}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolver, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 86}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 85}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_msg}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_addVariable, __pyx_mstate->__pyx_kp_b_iso88591_A_9Ct1_8_Qa_AQ_4z_V7_4t7_8ST_T, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 118}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 117}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_variables_2, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_variable}; __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_addVariables, __pyx_mstate->__pyx_kp_b_iso88591_a_L_AZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 141}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 140}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_constraint, __pyx_mstate->__pyx_n_u_variables_2, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; - __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_addConstraint, __pyx_mstate->__pyx_kp_b_iso88591_J_UV_Ql_q_A_jjkkl_4z_a_xq_q_1L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_addConstraint, __pyx_mstate->__pyx_kp_b_iso88591_E_PQ_Ql_q_A_jjkkl_4z_a_xq_q_1L, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 180}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 179}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints_2, __pyx_mstate->__pyx_n_u_vconstraints}; __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolution, __pyx_mstate->__pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 199}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 198}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints_2, __pyx_mstate->__pyx_n_u_vconstraints}; __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolutions, __pyx_mstate->__pyx_kp_b_iso88591_A_oT_T_QR_4q_1_t8_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 217}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_constraints_2, __pyx_mstate->__pyx_n_u_vconstraints}; __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolutionIter, __pyx_mstate->__pyx_kp_b_iso88591_A_oT_T_QR_4q_4q_t8_1I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 239}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 238}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_solutions, __pyx_mstate->__pyx_n_u_get_in_order, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolutionsOrderedList, __pyx_mstate->__pyx_kp_b_iso88591_g_B_M_6_E_Cq_s_vQ_z_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 247}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 246}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_order, __pyx_mstate->__pyx_n_u_validate, __pyx_mstate->__pyx_n_u_solutions_list, __pyx_mstate->__pyx_n_u_size_list, __pyx_mstate->__pyx_n_u_solutions_dict, __pyx_mstate->__pyx_n_u_size_dict, __pyx_mstate->__pyx_n_u_c}; __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getSolutionsAsListDict, __pyx_mstate->__pyx_kp_b_iso88591_A_z_5Qa_Cq_t1Cq_8_Qa_1_1A_z_A_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 269}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 16, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 268}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_picklable, __pyx_mstate->__pyx_n_u_domains, __pyx_mstate->__pyx_n_u_allvariables, __pyx_mstate->__pyx_n_u_constraints_2, __pyx_mstate->__pyx_n_u_constraint, __pyx_mstate->__pyx_n_u_parsed, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_v, __pyx_mstate->__pyx_n_u__7, __pyx_mstate->__pyx_n_u_variables_2, __pyx_mstate->__pyx_n_u_vconstraints, __pyx_mstate->__pyx_n_u_variable, __pyx_mstate->__pyx_n_u_domain, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_constraint_problem_py, __pyx_mstate->__pyx_n_u_getArgs, __pyx_mstate->__pyx_kp_b_iso88591_q_k_a_we1_5Q_3at_b_d_q_izQR_Cs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } @@ -11281,11 +11270,11 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { + Py_INCREF(src[i]); if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } - Py_INCREF(src[i]); } return res; } @@ -12437,8 +12426,8 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); for (i=0; i__pyx_empty_unicode, value_tuple); bad: @@ -12793,6 +12782,7 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { } PyException_SetCause(new_exc, val); // steals ref to val PyErr_SetObject(PyExc_RuntimeError, new_exc); + Py_DECREF(new_exc); } /* PyObjectCall2Args (used by PyObjectCallMethod1) */ @@ -12937,8 +12927,8 @@ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; - if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; args[n] = value; return 0; } @@ -13264,7 +13254,7 @@ static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyOb } /* dict_iter */ -#if CYTHON_COMPILING_IN_PYPY +#if CYTHON_AVOID_BORROWED_REFS #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, @@ -13272,7 +13262,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; @@ -13301,7 +13291,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif @@ -14697,6 +14687,48 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { __Pyx_END_CRITICAL_SECTION(); return result; } +static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) { + CYTHON_UNUSED_VAR(args); + if (unlikely(!self)) { + PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument"); + } + Py_XINCREF(self); + return self; +} +static PyMethodDef __Pyx_CyFunction_annotate_method = { + "__annotate__", + (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl, + METH_VARARGS, + "Placeholder __annotate__ function to allow 'functools.wraps' to work " + "on Cython functions." +}; +static PyObject * +__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *annotations = __Pyx_CyFunction_get_annotations((__pyx_CyFunctionObject *) op_in, NULL); + if (unlikely(!annotations)) return NULL; + PyObject *method = PyCFunction_New( + &__Pyx_CyFunction_annotate_method, + annotations); + Py_DECREF(annotations); + return method; +} +static int +__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted"); + return -1; + } + if (value == Py_None) { + return 0; + } + PyObject *annotations = PyObject_CallObject(value, NULL); + if (!annotations) return -1; + int result = __Pyx_CyFunction_set_annotations((__pyx_CyFunctionObject *) op_in, annotations, NULL); + Py_DECREF(annotations); + return result; +} static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; @@ -14709,7 +14741,6 @@ __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { - Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } @@ -14812,6 +14843,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, @@ -14950,8 +14982,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API -#if PY_VERSION_HEX < 0x030900B1 +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { @@ -14959,7 +14990,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } -#endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); @@ -15011,11 +15041,10 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); -#endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_annotations); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; @@ -17294,7 +17323,8 @@ static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; - ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + size_t nargs = 1U + (val != NULL) + (tb != NULL); + ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } @@ -17491,14 +17521,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } -static PyObject * -__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) -{ #if !CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) { PyObject *frame; - #if PY_VERSION_HEX >= 0x030d0000 - Py_BEGIN_CRITICAL_SECTION(self); - #endif frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { @@ -17523,9 +17549,17 @@ __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) } } Py_INCREF(frame); - #if PY_VERSION_HEX >= 0x030d0000 - Py_END_CRITICAL_SECTION(); - #endif + return frame; +} +#endif +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self); + frame = __Pyx__Coroutine_get_frame_locked(self); + __Pyx_END_CRITICAL_SECTION(); return frame; #else CYTHON_UNUSED_VAR(self); @@ -17586,35 +17620,23 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; gen->is_running = 1; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); assert(gen->is_running); gen->is_running = 0; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); } static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { diff --git a/constraint/problem.py b/constraint/problem.py index 881dc9d..8863248 100644 --- a/constraint/problem.py +++ b/constraint/problem.py @@ -1,15 +1,14 @@ """Module containing the code for problem definitions.""" import copy -from warnings import warn +from collections.abc import Callable, Hashable, Sequence from operator import itemgetter -from typing import Callable, Optional, Union -from collections.abc import Sequence, Hashable +from warnings import warn -from constraint.constraints import Constraint, FunctionConstraint, CompilableFunctionConstraint +from constraint.constraints import CompilableFunctionConstraint, Constraint, FunctionConstraint from constraint.domain import Domain -from constraint.solvers import Solver, OptimizedBacktrackingSolver, ParallelSolver from constraint.parser import compile_to_constraints +from constraint.solvers import OptimizedBacktrackingSolver, ParallelSolver, Solver try: from sys import _is_gil_enabled @@ -138,7 +137,7 @@ def addVariables(self, variables: Sequence, domain): for variable in variables: self.addVariable(variable, domain) - def addConstraint(self, constraint: Union[Constraint, Callable, str], variables: Optional[Sequence] = None): + def addConstraint(self, constraint: Constraint | Callable | str, variables: Sequence | None = None): """Add a constraint to the problem. Example: diff --git a/constraint/solvers.c b/constraint/solvers.c index f9b549a..de9dbef 100644 --- a/constraint/solvers.c +++ b/constraint/solvers.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.2.4 */ +/* Generated by Cython 3.2.6 */ /* BEGIN: Cython Metadata { @@ -37,8 +37,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else -#define __PYX_ABI_VERSION "3_2_4" -#define CYTHON_HEX_VERSION 0x030204F0 +#define __PYX_ABI_VERSION "3_2_6" +#define CYTHON_HEX_VERSION 0x030206F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include @@ -3492,7 +3492,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraints,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, 13, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 13, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -3916,7 +3916,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_arcs,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_assignments,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, 28, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 28, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -4893,7 +4893,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 77, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 77, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -5096,7 +5096,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 89, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 89, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -5299,7 +5299,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 101, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 101, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -5500,7 +5500,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 143, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 143, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -5648,7 +5648,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 153, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 153, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -5774,7 +5774,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,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, 162, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 162, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -7369,7 +7369,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 223, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 223, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -7648,7 +7648,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 230, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 230, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -7832,7 +7832,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 266, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 266, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -7980,7 +7980,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 276, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 276, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -9515,7 +9515,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domains,&__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, 344, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 344, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -10393,7 +10393,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 401, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 401, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -10623,7 +10623,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 406, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 406, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -10902,7 +10902,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domains,&__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, 413, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 413, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -11020,7 +11020,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,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, 425, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 425, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -11410,7 +11410,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 456, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 456, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -11560,7 +11560,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_solutions,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_vconstraints,&__pyx_mstate_global->__pyx_n_u_assignments,&__pyx_mstate_global->__pyx_n_u_single,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, 466, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 466, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: @@ -11688,7 +11688,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,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, 480, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 480, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -12788,7 +12788,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 519, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 519, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -13013,7 +13013,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 523, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 523, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -13205,7 +13205,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_steps,&__pyx_mstate_global->__pyx_n_u_rand,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, 554, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 554, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -13372,7 +13372,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 566, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 566, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -14512,7 +14512,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_process_mode,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, 644, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 644, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: @@ -14713,7 +14713,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 650, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 650, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -14915,7 +14915,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_domains,&__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, 662, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 662, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -15033,7 +15033,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_v,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, 668, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 668, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -15894,7 +15894,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__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, 688, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 688, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -16076,7 +16076,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_assignment,&__pyx_mstate_global->__pyx_n_u_constraints_lookup,&__pyx_mstate_global->__pyx_n_u_domains,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, 693, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 693, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: @@ -16745,7 +16745,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_constraint,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, 701, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 701, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: @@ -16993,7 +16993,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_assignment,&__pyx_mstate_global->__pyx_n_u_unassigned_vars,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraint_lookup,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, 708, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 708, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -17435,7 +17435,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_assignment,&__pyx_mstate_global->__pyx_n_u_unassigned_vars,&__pyx_mstate_global->__pyx_n_u_domains,&__pyx_mstate_global->__pyx_n_u_constraint_lookup,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, 724, __pyx_L3_error) + if (unlikely(__pyx_kwds_len < 0)) __PYX_ERR(0, 724, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: @@ -18273,7 +18273,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_args,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, 774, __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 1: @@ -21745,16 +21745,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<4; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -21764,16 +21768,20 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { { PyObject **table = __pyx_mstate->__pyx_slice; for (Py_ssize_t i=0; i<1; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -21853,16 +21861,20 @@ const char* const bytes = ".Abstract base class for solvers.Can't happenNote tha { PyObject **table = stringtab + 214; for (Py_ssize_t i=0; i<30; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -21882,16 +21894,20 @@ const char* const bytes = ".Abstract base class for solvers.Can't happenNote tha { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<3; ++i) { - #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + #if PY_VERSION_HEX >= 0x030F0000 + PyUnstable_SetImmortal(table[i]); + #elif CYTHON_COMPILING_IN_CPYTHON_FREETHREADING + if ((PY_SSIZE_T_MAX <= _Py_IMMORTAL_REFCNT_LOCAL)) break; #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { - Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); + Py_SET_REFCNT(table[i], ((Py_ssize_t)_Py_IMMORTAL_REFCNT_LOCAL + 1)); } #else + if ((PY_SSIZE_T_MAX < _Py_IMMORTAL_INITIAL_REFCNT)) break; Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } @@ -22353,11 +22369,11 @@ __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { + Py_INCREF(src[i]); if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } - Py_INCREF(src[i]); } return res; } @@ -24167,7 +24183,7 @@ static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyOb } /* dict_iter */ -#if CYTHON_COMPILING_IN_PYPY +#if CYTHON_AVOID_BORROWED_REFS #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, @@ -24175,7 +24191,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; @@ -24204,7 +24220,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; -#if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_AVOID_BORROWED_REFS if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif @@ -25150,6 +25166,48 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { __Pyx_END_CRITICAL_SECTION(); return result; } +static PyObject *__Pyx_CyFunction_annotate_impl(PyObject *self, PyObject *args) { + CYTHON_UNUSED_VAR(args); + if (unlikely(!self)) { + PyErr_SetString(PyExc_SystemError, "cython __annotate__ called without 'self' argument"); + } + Py_XINCREF(self); + return self; +} +static PyMethodDef __Pyx_CyFunction_annotate_method = { + "__annotate__", + (PyCFunction)(void (*)(void))__Pyx_CyFunction_annotate_impl, + METH_VARARGS, + "Placeholder __annotate__ function to allow 'functools.wraps' to work " + "on Cython functions." +}; +static PyObject * +__Pyx_CyFunction_get_annotate(PyObject *op_in, void *context) { + CYTHON_UNUSED_VAR(context); + PyObject *annotations = __Pyx_CyFunction_get_annotations((__pyx_CyFunctionObject *) op_in, NULL); + if (unlikely(!annotations)) return NULL; + PyObject *method = PyCFunction_New( + &__Pyx_CyFunction_annotate_method, + annotations); + Py_DECREF(annotations); + return method; +} +static int +__Pyx_CyFunction_set_annotate(PyObject *op_in, PyObject* value, void *context) { + CYTHON_UNUSED_VAR(context); + if (value == NULL) { + PyErr_SetString(PyExc_TypeError, "__annotate__ cannot be deleted"); + return -1; + } + if (value == Py_None) { + return 0; + } + PyObject *annotations = PyObject_CallObject(value, NULL); + if (!annotations) return -1; + int result = __Pyx_CyFunction_set_annotations((__pyx_CyFunctionObject *) op_in, annotations, NULL); + Py_DECREF(annotations); + return result; +} static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; @@ -25162,7 +25220,6 @@ __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { - Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } @@ -25265,6 +25322,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, + {"__annotate__", (getter)__Pyx_CyFunction_get_annotate, (setter)__Pyx_CyFunction_set_annotate, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, @@ -25403,8 +25461,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API -#if PY_VERSION_HEX < 0x030900B1 +#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { @@ -25412,7 +25469,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } -#endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); @@ -25464,11 +25520,10 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); -#if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); -#endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); + Py_VISIT(m->func_annotations); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; @@ -25847,8 +25902,8 @@ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qual #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; - if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); + if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; args[n] = value; return 0; } @@ -26036,6 +26091,7 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { } PyException_SetCause(new_exc, val); // steals ref to val PyErr_SetObject(PyExc_RuntimeError, new_exc); + Py_DECREF(new_exc); } /* IterNextPlain (used by IterNext) */ @@ -28962,7 +29018,8 @@ static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; - ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); + size_t nargs = 1U + (val != NULL) + (tb != NULL); + ret = __Pyx_PyObject_FastCall(meth, cargs+1, nargs | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } @@ -29159,14 +29216,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } -static PyObject * -__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) -{ #if !CYTHON_COMPILING_IN_LIMITED_API +static PyObject * +__Pyx__Coroutine_get_frame_locked(__pyx_CoroutineObject *self) { PyObject *frame; - #if PY_VERSION_HEX >= 0x030d0000 - Py_BEGIN_CRITICAL_SECTION(self); - #endif frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { @@ -29191,9 +29244,17 @@ __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) } } Py_INCREF(frame); - #if PY_VERSION_HEX >= 0x030d0000 - Py_END_CRITICAL_SECTION(); - #endif + return frame; +} +#endif +static PyObject * +__Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) +{ +#if !CYTHON_COMPILING_IN_LIMITED_API + PyObject *frame; + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)self); + frame = __Pyx__Coroutine_get_frame_locked(self); + __Pyx_END_CRITICAL_SECTION(); return frame; #else CYTHON_UNUSED_VAR(self); @@ -29254,35 +29315,23 @@ static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( } static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; gen->is_running = 1; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); assert(gen->is_running); gen->is_running = 0; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); } static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { char result; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_BEGIN_CRITICAL_SECTION(gen); - #endif + __Pyx_BEGIN_CRITICAL_SECTION((PyObject*)gen); result = gen->is_running; - #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API - Py_END_CRITICAL_SECTION(); - #endif + __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { diff --git a/docs/requirements.txt b/docs/requirements.txt index 686294c..3a45531 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,33 +1,31 @@ -alabaster==0.7.16 ; python_version >= "3.9" -babel==2.17.0 ; python_version >= "3.9" -certifi==2025.1.31 ; python_version >= "3.9" -charset-normalizer==3.4.1 ; python_version >= "3.9" -colorama==0.4.6 ; python_version >= "3.9" and sys_platform == "win32" -docutils==0.21.2 ; python_version >= "3.9" -dom-toml==2.0.1 ; python_version >= "3.9" -domdf-python-tools==3.10.0 ; python_version >= "3.9" -idna==3.10 ; python_version >= "3.9" -imagesize==1.4.1 ; python_version >= "3.9" -importlib-metadata==8.6.1 ; python_version >= "3.9" and python_version < "3.10" -jinja2==3.1.6 ; python_version >= "3.9" -markupsafe==3.0.2 ; python_version >= "3.9" -natsort==8.4.0 ; python_version >= "3.9" -packaging==24.2 ; python_version >= "3.9" -pygments==2.19.1 ; python_version >= "3.9" -requests==2.32.4 ; python_version >= "3.9" -snowballstemmer==2.2.0 ; python_version >= "3.9" -sphinx-autodoc-typehints==2.3.0 ; python_version >= "3.9" -sphinx-pyproject==0.3.0 ; python_version >= "3.9" -sphinx-rtd-theme==3.0.2 ; python_version >= "3.9" -sphinx==7.4.7 ; python_version >= "3.9" -sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.9" -sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.9" -sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.9" -sphinxcontrib-jquery==4.1 ; python_version >= "3.9" -sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" -sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" -sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" -tomli==2.2.1 ; python_version >= "3.9" -typing-extensions==4.13.1 ; python_version >= "3.9" -urllib3==2.6.3 ; python_version >= "3.9" -zipp==3.21.0 ; python_version >= "3.9" and python_version < "3.10" +alabaster==1.0.0 ; python_version >= "3.11" +babel==2.18.0 ; python_version >= "3.11" +certifi==2026.6.17 ; python_version >= "3.11" +charset-normalizer==3.4.7 ; python_version >= "3.11" +colorama==0.4.6 ; python_version >= "3.11" and sys_platform == "win32" +docutils==0.22.4 ; python_version >= "3.11" +dom-toml==2.3.0 ; python_version >= "3.11" +domdf-python-tools==3.10.0 ; python_version >= "3.11" +idna==3.18 ; python_version >= "3.11" +imagesize==1.5.0 ; python_version >= "3.11" +jinja2==3.1.6 ; python_version >= "3.11" +markupsafe==3.0.3 ; python_version >= "3.11" +natsort==8.4.0 ; python_version >= "3.11" +packaging==26.2 ; python_version >= "3.11" +pygments==2.20.0 ; python_version >= "3.11" +requests==2.34.2 ; python_version >= "3.11" +roman-numerals==4.1.0 ; python_version >= "3.11" +snowballstemmer==3.1.1 ; python_version >= "3.11" +sphinx-autodoc-typehints==3.6.1 ; python_version >= "3.11" +sphinx-pyproject==0.3.0 ; python_version >= "3.11" +sphinx-rtd-theme==3.1.0 ; python_version >= "3.11" +sphinx==9.0.4 ; python_version >= "3.11" +sphinxcontrib-applehelp==2.0.0 ; python_version >= "3.11" +sphinxcontrib-devhelp==2.0.0 ; python_version >= "3.11" +sphinxcontrib-htmlhelp==2.1.0 ; python_version >= "3.11" +sphinxcontrib-jquery==4.1 ; python_version >= "3.11" +sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.11" +sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.11" +sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.11" +typing-extensions==4.15.0 ; python_version >= "3.11" +urllib3==2.7.0 ; python_version >= "3.11" diff --git a/noxfile.py b/noxfile.py index b045a79..b2cda3c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -5,15 +5,14 @@ Be aware that the general setup of tests is left to pyproject.toml. """ +from pathlib import Path + import nox from nox import Session, session -from pathlib import Path # from nox_poetry import Session, session # nox_poetry is a better option, but <=1.0.3 has a bug with filename-URLs python_versions_to_test = [ - "3.9", - "3.10", "3.11", "3.12", "3.13", diff --git a/pyproject.toml b/pyproject.toml index ebef04c..40483e3 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.5.0" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55 +version = "2.6.0" # adhere to PEP440 versioning: https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#id55 authors = [ {name = "Floris-Jan Willemsen", email = "fjwillemsen97@gmail.com"}, {name = "Sébastien Celles", email = "s.celles@gmail.com"}, @@ -33,8 +33,6 @@ classifiers = [ "Programming Language :: Cython", "Topic :: Scientific/Engineering", "Topic :: Software Development", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -42,7 +40,7 @@ classifiers = [ ] # ATTENTION: if anything is changed here, run `poetry update` -requires-python = ">= 3.9" # when changing the Python versions, also change the test versions in the Noxfile and GitHub Actions +requires-python = ">= 3.11" # when changing the Python versions, also change the test versions in the Noxfile and GitHub Actions [project.urls] Homepage = "http://python-constraint.github.io/python-constraint/" @@ -66,9 +64,11 @@ script = "cythonize_build.py" # ATTENTION: if anything is changed here, run `poetry update` and `poetry export --with docs --without-hashes --format=requirements.txt > docs/requirements.txt` [tool.poetry.group.docs] optional = true +[tool.poetry.requires-plugins] +poetry-plugin-export = ">=1.10" [tool.poetry.group.docs.dependencies] -sphinx = "^7.4.7" # can be updated to >=8.*.* when Python 3.9 is dropped -sphinx-autodoc-typehints = "^2.3.0" # can be updated to >=3.*.* when Python 3.9 is dropped +sphinx = ">=8.0.0" # can be updated to >=8.*.* when Python 3.9 is dropped +sphinx-autodoc-typehints = ">=3.0.0" # can be updated to >=3.*.* when Python 3.9 is dropped sphinx_rtd_theme = "^3.0.2" sphinx-pyproject = "^0.3.0" diff --git a/tests/test_constraint.py b/tests/test_constraint.py index 863e167..675e03c 100644 --- a/tests/test_constraint.py +++ b/tests/test_constraint.py @@ -125,3 +125,21 @@ def test_multipliers(): solutions = problem.getSolutions() for solution in solutions: assert solution in possible_solutions + +def test_pruning_constraint(): + """Test that the VariableExactSumConstraint prunes the domain correctly.""" + from constraint import VariableExactSumConstraint + + problem = constraint.Problem() + problem.addVariable("a", [1, 2, -1, 3]) + problem.addVariable("b", [1, 2, -1, 3]) + problem.addVariable("c", [3]) + problem.addConstraint(VariableExactSumConstraint("c", ["a", "b"])) + + possible_solutions = [{"a": 2, "b": 1, "c": 3}, {"a": 1, "b": 2, "c": 3}] + + # get the solutions + solutions = problem.getSolutions() + assert len(solutions) == len(possible_solutions) + for solution in solutions: + assert solution in possible_solutions