jijmodeling 0.10.15__cp310-cp310-win_amd64.whl → 1.11.0__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of jijmodeling might be problematic. Click here for more details.

Files changed (270) hide show
  1. jijmodeling/__init__.py +1 -146
  2. jijmodeling/__init__.pyi +5152 -0
  3. jijmodeling/_jijmodeling.cp310-win_amd64.pyd +0 -0
  4. jijmodeling/dataset.py +5 -0
  5. jijmodeling/dataset.pyi +106 -0
  6. jijmodeling/experimental.py +13 -0
  7. jijmodeling/experimental.pyi +302 -0
  8. jijmodeling/py.typed +0 -0
  9. jijmodeling/range/__init__.py +14 -0
  10. jijmodeling/range/__init__.pyi +56 -0
  11. jijmodeling/range/size.py +14 -0
  12. jijmodeling/range/size.pyi +54 -0
  13. jijmodeling/range/value.py +14 -0
  14. jijmodeling/range/value.pyi +54 -0
  15. jijmodeling-1.11.0.dist-info/METADATA +235 -0
  16. jijmodeling-1.11.0.dist-info/RECORD +18 -0
  17. {jijmodeling-0.10.15.dist-info → jijmodeling-1.11.0.dist-info}/WHEEL +1 -2
  18. {jijmodeling-0.10.15.dist-info → jijmodeling-1.11.0.dist-info/licenses}/LICENSE.txt +1 -1
  19. jijmodeling/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  20. jijmodeling/__pycache__/__init__.cpython-310.pyc +0 -0
  21. jijmodeling/__pycache__/_version.cpython-310.opt-1.pyc +0 -0
  22. jijmodeling/__pycache__/_version.cpython-310.pyc +0 -0
  23. jijmodeling/_version.py +0 -4
  24. jijmodeling/exceptions/__init__.py +0 -26
  25. jijmodeling/exceptions/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  26. jijmodeling/exceptions/__pycache__/__init__.cpython-310.pyc +0 -0
  27. jijmodeling/exceptions/__pycache__/exceptions.cpython-310.opt-1.pyc +0 -0
  28. jijmodeling/exceptions/__pycache__/exceptions.cpython-310.pyc +0 -0
  29. jijmodeling/exceptions/exceptions.py +0 -37
  30. jijmodeling/expression/__init__.py +0 -74
  31. jijmodeling/expression/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  32. jijmodeling/expression/__pycache__/__init__.cpython-310.pyc +0 -0
  33. jijmodeling/expression/__pycache__/condition.cpython-310.opt-1.pyc +0 -0
  34. jijmodeling/expression/__pycache__/condition.cpython-310.pyc +0 -0
  35. jijmodeling/expression/__pycache__/constraint.cpython-310.opt-1.pyc +0 -0
  36. jijmodeling/expression/__pycache__/constraint.cpython-310.pyc +0 -0
  37. jijmodeling/expression/__pycache__/expression.cpython-310.opt-1.pyc +0 -0
  38. jijmodeling/expression/__pycache__/expression.cpython-310.pyc +0 -0
  39. jijmodeling/expression/__pycache__/extract.cpython-310.opt-1.pyc +0 -0
  40. jijmodeling/expression/__pycache__/extract.cpython-310.pyc +0 -0
  41. jijmodeling/expression/__pycache__/from_old_serializable.cpython-310.opt-1.pyc +0 -0
  42. jijmodeling/expression/__pycache__/from_old_serializable.cpython-310.pyc +0 -0
  43. jijmodeling/expression/__pycache__/mathfunc.cpython-310.opt-1.pyc +0 -0
  44. jijmodeling/expression/__pycache__/mathfunc.cpython-310.pyc +0 -0
  45. jijmodeling/expression/__pycache__/prod.cpython-310.opt-1.pyc +0 -0
  46. jijmodeling/expression/__pycache__/prod.cpython-310.pyc +0 -0
  47. jijmodeling/expression/__pycache__/serializable.cpython-310.opt-1.pyc +0 -0
  48. jijmodeling/expression/__pycache__/serializable.cpython-310.pyc +0 -0
  49. jijmodeling/expression/__pycache__/sum.cpython-310.opt-1.pyc +0 -0
  50. jijmodeling/expression/__pycache__/sum.cpython-310.pyc +0 -0
  51. jijmodeling/expression/__pycache__/type_annotations.cpython-310.opt-1.pyc +0 -0
  52. jijmodeling/expression/__pycache__/type_annotations.cpython-310.pyc +0 -0
  53. jijmodeling/expression/__pycache__/utils.cpython-310.opt-1.pyc +0 -0
  54. jijmodeling/expression/__pycache__/utils.cpython-310.pyc +0 -0
  55. jijmodeling/expression/condition.py +0 -362
  56. jijmodeling/expression/constraint.py +0 -340
  57. jijmodeling/expression/expression.py +0 -706
  58. jijmodeling/expression/extract.py +0 -139
  59. jijmodeling/expression/from_old_serializable.py +0 -133
  60. jijmodeling/expression/mathfunc.py +0 -269
  61. jijmodeling/expression/prod.py +0 -117
  62. jijmodeling/expression/serializable.py +0 -132
  63. jijmodeling/expression/sum.py +0 -197
  64. jijmodeling/expression/type_annotations.py +0 -50
  65. jijmodeling/expression/utils.py +0 -175
  66. jijmodeling/expression/variables/__init__.py +0 -35
  67. jijmodeling/expression/variables/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  68. jijmodeling/expression/variables/__pycache__/__init__.cpython-310.pyc +0 -0
  69. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-310.opt-1.pyc +0 -0
  70. jijmodeling/expression/variables/__pycache__/deci_vars.cpython-310.pyc +0 -0
  71. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-310.opt-1.pyc +0 -0
  72. jijmodeling/expression/variables/__pycache__/jagged_array.cpython-310.pyc +0 -0
  73. jijmodeling/expression/variables/__pycache__/placeholders.cpython-310.opt-1.pyc +0 -0
  74. jijmodeling/expression/variables/__pycache__/placeholders.cpython-310.pyc +0 -0
  75. jijmodeling/expression/variables/__pycache__/variable.cpython-310.opt-1.pyc +0 -0
  76. jijmodeling/expression/variables/__pycache__/variable.cpython-310.pyc +0 -0
  77. jijmodeling/expression/variables/deci_vars.py +0 -136
  78. jijmodeling/expression/variables/jagged_array.py +0 -73
  79. jijmodeling/expression/variables/placeholders.py +0 -107
  80. jijmodeling/expression/variables/variable.py +0 -485
  81. jijmodeling/latex_repr/__init__.py +0 -11
  82. jijmodeling/latex_repr/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  83. jijmodeling/latex_repr/__pycache__/__init__.cpython-310.pyc +0 -0
  84. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-310.opt-1.pyc +0 -0
  85. jijmodeling/latex_repr/__pycache__/latex_repr.cpython-310.pyc +0 -0
  86. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-310.opt-1.pyc +0 -0
  87. jijmodeling/latex_repr/__pycache__/problem_latex_repr.cpython-310.pyc +0 -0
  88. jijmodeling/latex_repr/latex_repr.py +0 -243
  89. jijmodeling/latex_repr/problem_latex_repr.py +0 -209
  90. jijmodeling/marker/__marker__.cp310-win_amd64.pyd +0 -0
  91. jijmodeling/match/__init__.py +0 -19
  92. jijmodeling/match/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  93. jijmodeling/match/__pycache__/__init__.cpython-310.pyc +0 -0
  94. jijmodeling/match/__pycache__/condition_same.cpython-310.opt-1.pyc +0 -0
  95. jijmodeling/match/__pycache__/condition_same.cpython-310.pyc +0 -0
  96. jijmodeling/match/__pycache__/constraint_same.cpython-310.opt-1.pyc +0 -0
  97. jijmodeling/match/__pycache__/constraint_same.cpython-310.pyc +0 -0
  98. jijmodeling/match/__pycache__/expr_same.cpython-310.opt-1.pyc +0 -0
  99. jijmodeling/match/__pycache__/expr_same.cpython-310.pyc +0 -0
  100. jijmodeling/match/__pycache__/is_same_expr.cpython-310.opt-1.pyc +0 -0
  101. jijmodeling/match/__pycache__/is_same_expr.cpython-310.pyc +0 -0
  102. jijmodeling/match/__pycache__/penalty_same.cpython-310.opt-1.pyc +0 -0
  103. jijmodeling/match/__pycache__/penalty_same.cpython-310.pyc +0 -0
  104. jijmodeling/match/__pycache__/problem_same.cpython-310.opt-1.pyc +0 -0
  105. jijmodeling/match/__pycache__/problem_same.cpython-310.pyc +0 -0
  106. jijmodeling/match/condition_same.py +0 -44
  107. jijmodeling/match/constraint_same.py +0 -53
  108. jijmodeling/match/expr_same.py +0 -23
  109. jijmodeling/match/is_same_expr.py +0 -288
  110. jijmodeling/match/penalty_same.py +0 -31
  111. jijmodeling/match/problem_same.py +0 -44
  112. jijmodeling/problem/__init__.py +0 -9
  113. jijmodeling/problem/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  114. jijmodeling/problem/__pycache__/__init__.cpython-310.pyc +0 -0
  115. jijmodeling/problem/__pycache__/problem.cpython-310.opt-1.pyc +0 -0
  116. jijmodeling/problem/__pycache__/problem.cpython-310.pyc +0 -0
  117. jijmodeling/problem/problem.py +0 -166
  118. jijmodeling/protobuf/__init__.py +0 -8
  119. jijmodeling/protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  120. jijmodeling/protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  121. jijmodeling/protobuf/from_protobuf/__init__.py +0 -47
  122. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  123. jijmodeling/protobuf/from_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  124. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.opt-1.pyc +0 -0
  125. jijmodeling/protobuf/from_protobuf/__pycache__/extract_attribute_value_from_header.cpython-310.pyc +0 -0
  126. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.opt-1.pyc +0 -0
  127. jijmodeling/protobuf/from_protobuf/__pycache__/from_protobuf.cpython-310.pyc +0 -0
  128. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.opt-1.pyc +0 -0
  129. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_array_shape.cpython-310.pyc +0 -0
  130. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.opt-1.pyc +0 -0
  131. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_op.cpython-310.pyc +0 -0
  132. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.opt-1.pyc +0 -0
  133. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_binary_var.cpython-310.pyc +0 -0
  134. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.opt-1.pyc +0 -0
  135. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_constraint.cpython-310.pyc +0 -0
  136. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.opt-1.pyc +0 -0
  137. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_element.cpython-310.pyc +0 -0
  138. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.opt-1.pyc +0 -0
  139. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_expression.cpython-310.pyc +0 -0
  140. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.opt-1.pyc +0 -0
  141. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_forall.cpython-310.pyc +0 -0
  142. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.opt-1.pyc +0 -0
  143. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_integer_var.cpython-310.pyc +0 -0
  144. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.opt-1.pyc +0 -0
  145. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_jagged_array.cpython-310.pyc +0 -0
  146. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.opt-1.pyc +0 -0
  147. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_number_lit.cpython-310.pyc +0 -0
  148. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.opt-1.pyc +0 -0
  149. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_penalty.cpython-310.pyc +0 -0
  150. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.opt-1.pyc +0 -0
  151. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_placeholder.cpython-310.pyc +0 -0
  152. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.opt-1.pyc +0 -0
  153. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_problem.cpython-310.pyc +0 -0
  154. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.opt-1.pyc +0 -0
  155. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_reduction_op.cpython-310.pyc +0 -0
  156. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.opt-1.pyc +0 -0
  157. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_subscript_op.cpython-310.pyc +0 -0
  158. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.opt-1.pyc +0 -0
  159. jijmodeling/protobuf/from_protobuf/__pycache__/message_to_unary_op.cpython-310.pyc +0 -0
  160. jijmodeling/protobuf/from_protobuf/extract_attribute_value_from_header.py +0 -26
  161. jijmodeling/protobuf/from_protobuf/from_protobuf.py +0 -38
  162. jijmodeling/protobuf/from_protobuf/message_to_array_shape.py +0 -35
  163. jijmodeling/protobuf/from_protobuf/message_to_binary_op.py +0 -83
  164. jijmodeling/protobuf/from_protobuf/message_to_binary_var.py +0 -46
  165. jijmodeling/protobuf/from_protobuf/message_to_constraint.py +0 -48
  166. jijmodeling/protobuf/from_protobuf/message_to_element.py +0 -30
  167. jijmodeling/protobuf/from_protobuf/message_to_expression.py +0 -92
  168. jijmodeling/protobuf/from_protobuf/message_to_forall.py +0 -33
  169. jijmodeling/protobuf/from_protobuf/message_to_integer_var.py +0 -54
  170. jijmodeling/protobuf/from_protobuf/message_to_jagged_array.py +0 -25
  171. jijmodeling/protobuf/from_protobuf/message_to_number_lit.py +0 -41
  172. jijmodeling/protobuf/from_protobuf/message_to_penalty.py +0 -36
  173. jijmodeling/protobuf/from_protobuf/message_to_placeholder.py +0 -47
  174. jijmodeling/protobuf/from_protobuf/message_to_problem.py +0 -51
  175. jijmodeling/protobuf/from_protobuf/message_to_reduction_op.py +0 -52
  176. jijmodeling/protobuf/from_protobuf/message_to_subscript_op.py +0 -46
  177. jijmodeling/protobuf/from_protobuf/message_to_unary_op.py +0 -47
  178. jijmodeling/protobuf/to_protobuf/__init__.py +0 -43
  179. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  180. jijmodeling/protobuf/to_protobuf/__pycache__/__init__.cpython-310.pyc +0 -0
  181. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.opt-1.pyc +0 -0
  182. jijmodeling/protobuf/to_protobuf/__pycache__/add_header_to_message.cpython-310.pyc +0 -0
  183. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.opt-1.pyc +0 -0
  184. jijmodeling/protobuf/to_protobuf/__pycache__/array_shape_to_message.cpython-310.pyc +0 -0
  185. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.opt-1.pyc +0 -0
  186. jijmodeling/protobuf/to_protobuf/__pycache__/binary_op_to_message.cpython-310.pyc +0 -0
  187. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.opt-1.pyc +0 -0
  188. jijmodeling/protobuf/to_protobuf/__pycache__/binary_var_to_message.cpython-310.pyc +0 -0
  189. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.opt-1.pyc +0 -0
  190. jijmodeling/protobuf/to_protobuf/__pycache__/constraint_to_message.cpython-310.pyc +0 -0
  191. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.opt-1.pyc +0 -0
  192. jijmodeling/protobuf/to_protobuf/__pycache__/element_to_message.cpython-310.pyc +0 -0
  193. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.opt-1.pyc +0 -0
  194. jijmodeling/protobuf/to_protobuf/__pycache__/expression_to_message.cpython-310.pyc +0 -0
  195. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.opt-1.pyc +0 -0
  196. jijmodeling/protobuf/to_protobuf/__pycache__/forall_to_message.cpython-310.pyc +0 -0
  197. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.opt-1.pyc +0 -0
  198. jijmodeling/protobuf/to_protobuf/__pycache__/integer_var_to_message.cpython-310.pyc +0 -0
  199. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.opt-1.pyc +0 -0
  200. jijmodeling/protobuf/to_protobuf/__pycache__/jagged_array_to_message.cpython-310.pyc +0 -0
  201. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.opt-1.pyc +0 -0
  202. jijmodeling/protobuf/to_protobuf/__pycache__/number_lit_to_message.cpython-310.pyc +0 -0
  203. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.opt-1.pyc +0 -0
  204. jijmodeling/protobuf/to_protobuf/__pycache__/penalty_to_message.cpython-310.pyc +0 -0
  205. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.opt-1.pyc +0 -0
  206. jijmodeling/protobuf/to_protobuf/__pycache__/placeholder_to_message.cpython-310.pyc +0 -0
  207. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.opt-1.pyc +0 -0
  208. jijmodeling/protobuf/to_protobuf/__pycache__/problem_to_message.cpython-310.pyc +0 -0
  209. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.opt-1.pyc +0 -0
  210. jijmodeling/protobuf/to_protobuf/__pycache__/reduction_op_to_message.cpython-310.pyc +0 -0
  211. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.opt-1.pyc +0 -0
  212. jijmodeling/protobuf/to_protobuf/__pycache__/subscript_op_to_message.cpython-310.pyc +0 -0
  213. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.opt-1.pyc +0 -0
  214. jijmodeling/protobuf/to_protobuf/__pycache__/to_protobuf.cpython-310.pyc +0 -0
  215. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.opt-1.pyc +0 -0
  216. jijmodeling/protobuf/to_protobuf/__pycache__/unary_op_to_message.cpython-310.pyc +0 -0
  217. jijmodeling/protobuf/to_protobuf/add_header_to_message.py +0 -35
  218. jijmodeling/protobuf/to_protobuf/array_shape_to_message.py +0 -43
  219. jijmodeling/protobuf/to_protobuf/binary_op_to_message.py +0 -101
  220. jijmodeling/protobuf/to_protobuf/binary_var_to_message.py +0 -49
  221. jijmodeling/protobuf/to_protobuf/constraint_to_message.py +0 -52
  222. jijmodeling/protobuf/to_protobuf/element_to_message.py +0 -43
  223. jijmodeling/protobuf/to_protobuf/expression_to_message.py +0 -89
  224. jijmodeling/protobuf/to_protobuf/forall_to_message.py +0 -32
  225. jijmodeling/protobuf/to_protobuf/integer_var_to_message.py +0 -54
  226. jijmodeling/protobuf/to_protobuf/jagged_array_to_message.py +0 -37
  227. jijmodeling/protobuf/to_protobuf/number_lit_to_message.py +0 -52
  228. jijmodeling/protobuf/to_protobuf/penalty_to_message.py +0 -42
  229. jijmodeling/protobuf/to_protobuf/placeholder_to_message.py +0 -58
  230. jijmodeling/protobuf/to_protobuf/problem_to_message.py +0 -54
  231. jijmodeling/protobuf/to_protobuf/reduction_op_to_message.py +0 -64
  232. jijmodeling/protobuf/to_protobuf/subscript_op_to_message.py +0 -48
  233. jijmodeling/protobuf/to_protobuf/to_protobuf.py +0 -36
  234. jijmodeling/protobuf/to_protobuf/unary_op_to_message.py +0 -58
  235. jijmodeling/sampleset/__init__.py +0 -33
  236. jijmodeling/sampleset/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  237. jijmodeling/sampleset/__pycache__/__init__.cpython-310.pyc +0 -0
  238. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.opt-1.pyc +0 -0
  239. jijmodeling/sampleset/__pycache__/evaluation.cpython-310.pyc +0 -0
  240. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.opt-1.pyc +0 -0
  241. jijmodeling/sampleset/__pycache__/measuring_time.cpython-310.pyc +0 -0
  242. jijmodeling/sampleset/__pycache__/record.cpython-310.opt-1.pyc +0 -0
  243. jijmodeling/sampleset/__pycache__/record.cpython-310.pyc +0 -0
  244. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.opt-1.pyc +0 -0
  245. jijmodeling/sampleset/__pycache__/sampleset.cpython-310.pyc +0 -0
  246. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.opt-1.pyc +0 -0
  247. jijmodeling/sampleset/__pycache__/solving_time.cpython-310.pyc +0 -0
  248. jijmodeling/sampleset/__pycache__/system_time.cpython-310.opt-1.pyc +0 -0
  249. jijmodeling/sampleset/__pycache__/system_time.cpython-310.pyc +0 -0
  250. jijmodeling/sampleset/evaluation.py +0 -198
  251. jijmodeling/sampleset/measuring_time.py +0 -59
  252. jijmodeling/sampleset/record.py +0 -158
  253. jijmodeling/sampleset/sampleset.py +0 -381
  254. jijmodeling/sampleset/solving_time.py +0 -38
  255. jijmodeling/sampleset/system_time.py +0 -48
  256. jijmodeling/type_annotations/__init__.py +0 -38
  257. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  258. jijmodeling/type_annotations/__pycache__/__init__.cpython-310.pyc +0 -0
  259. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.opt-1.pyc +0 -0
  260. jijmodeling/type_annotations/__pycache__/type_annotations.cpython-310.pyc +0 -0
  261. jijmodeling/type_annotations/type_annotations.py +0 -44
  262. jijmodeling/utils/__init__.py +0 -28
  263. jijmodeling/utils/__pycache__/__init__.cpython-310.opt-1.pyc +0 -0
  264. jijmodeling/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  265. jijmodeling/utils/__pycache__/utils.cpython-310.opt-1.pyc +0 -0
  266. jijmodeling/utils/__pycache__/utils.cpython-310.pyc +0 -0
  267. jijmodeling/utils/utils.py +0 -146
  268. jijmodeling-0.10.15.dist-info/METADATA +0 -59
  269. jijmodeling-0.10.15.dist-info/RECORD +0 -255
  270. jijmodeling-0.10.15.dist-info/top_level.txt +0 -1
@@ -1,243 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from jijmodeling.expression.condition import (
4
- AndOperator,
5
- CompareCondition,
6
- Condition,
7
- ConditionOperator,
8
- Equal,
9
- LessThan,
10
- LessThanEqual,
11
- NoneCondition,
12
- NotEqual,
13
- OrOperator,
14
- XorOperator,
15
- )
16
- from jijmodeling.expression.expression import (
17
- Add,
18
- BinaryOperator,
19
- Div,
20
- Expression,
21
- Mod,
22
- Mul,
23
- Number,
24
- Power,
25
- )
26
- from jijmodeling.expression.mathfunc import (
27
- AbsoluteValue,
28
- Ceil,
29
- Floor,
30
- Log2,
31
- UnaryOperator,
32
- )
33
- from jijmodeling.expression.prod import ProdOperator
34
- from jijmodeling.expression.sum import ReductionOperator, SumOperator
35
- from jijmodeling.expression.variables.placeholders import ArrayShape
36
- from jijmodeling.expression.variables.variable import Range, Subscripts, Variable
37
-
38
-
39
- def condition_latex_repr(expr: Condition) -> str:
40
- if isinstance(expr, CompareCondition):
41
- left = expr_latex_repr(expr.left)
42
- right = expr_latex_repr(expr.right)
43
- mark = r" \cdot "
44
- if isinstance(expr, Equal):
45
- mark = "="
46
- elif isinstance(expr, NotEqual):
47
- mark = r"\neq"
48
- elif isinstance(expr, LessThan):
49
- mark = "<"
50
- elif isinstance(expr, LessThanEqual):
51
- mark = r"\leq"
52
- return left + f" {mark} " + right
53
- elif isinstance(expr, ConditionOperator):
54
- left = condition_latex_repr(expr.left)
55
- right = condition_latex_repr(expr.right)
56
- mark = r" \cdot "
57
- if isinstance(expr, AndOperator):
58
- mark = r" \ \land \ "
59
- elif isinstance(expr, OrOperator):
60
- mark = r" \ \lor \ "
61
- elif isinstance(expr, XorOperator):
62
- mark = r" \ \veebar \ "
63
- return left + f"{mark}" + right
64
- else:
65
- return ""
66
-
67
-
68
- def expr_latex_repr(expr: Expression) -> str:
69
- if expr._latex_repr is not None:
70
- return expr._latex_repr
71
- if isinstance(expr, Number):
72
- return str(expr.value)
73
- elif isinstance(expr, UnaryOperator):
74
- return _unary_latex_repr(expr)
75
- elif isinstance(expr, BinaryOperator):
76
- return _binary_latex_repr(expr)
77
- elif isinstance(expr, Variable):
78
- if isinstance(expr, ArrayShape):
79
- array = expr_latex_repr(expr.array)
80
- axis = str(expr.dimension)
81
- return rf"{array}_{{\mathrm{{shape}}({axis})}}"
82
- label = expr.label.replace("_", r"\_").replace("^", r"\_")
83
- if "_" in label:
84
- label = r"\mathrm{" + label + r"}"
85
- return label
86
- elif isinstance(expr, Subscripts):
87
- label = expr_latex_repr(expr.variable)
88
- subs = ",".join([expr_latex_repr(x) for x in expr.subscripts])
89
- return label + r"_{" + subs + r"}"
90
- elif isinstance(expr, ReductionOperator):
91
- return _reduction_latex_repr(expr)
92
-
93
- return rf"\mathrm{{ {str(expr)} }}"
94
-
95
-
96
- def _unary_latex_repr(expr: UnaryOperator) -> str:
97
- operand = expr_latex_repr(expr.operand)
98
- if isinstance(expr, Ceil):
99
- return rf"\left\lceil {operand} \right\rceil"
100
- elif isinstance(expr, Floor):
101
- return rf"\left\lfloor {operand} \right\rfloor"
102
- elif isinstance(expr, AbsoluteValue):
103
- return rf"\left| {operand} \right|"
104
- elif isinstance(expr, Log2):
105
- return rf"\log_2 \left( {operand} \right)"
106
-
107
-
108
- def _binary_latex_repr(expr: BinaryOperator) -> str:
109
- left = expr_latex_repr(expr.left)
110
- right = expr_latex_repr(expr.right)
111
-
112
- if isinstance(expr, Add):
113
- return _add_latex_repr(expr, left, right)
114
- elif isinstance(expr, Mul):
115
- return _mul_latex_repr(expr, left, right)
116
- elif isinstance(expr, Power):
117
- # Check if the base needs parentheses
118
- if isinstance(expr.left, (BinaryOperator, ReductionOperator)):
119
- left = rf"\left( {left} \right)"
120
- return rf"{left} ^ {{ {right} }}"
121
- elif isinstance(expr, Mod):
122
- # Check if the left hand side needs parentheses
123
- if isinstance(expr.left, BinaryOperator):
124
- left = rf"\left( {left} \right)"
125
- # Check if the left hand side needs parentheses
126
- if isinstance(expr.right, BinaryOperator):
127
- right = rf"\left( {right} \right)"
128
- return rf"{left} \mod {right}"
129
- elif isinstance(expr, Div):
130
- return rf"\frac{{ {left} }}{{ {right} }}"
131
- else:
132
- return r"\left(" + str(expr) + r"\right)"
133
-
134
-
135
- def _add_latex_repr(expr: Add, left: str, right: str) -> str:
136
- symbol = "+"
137
- is_right_negative = False
138
- # check if the right hand side has a negative sign
139
- if (
140
- isinstance(expr.right, Mul)
141
- and isinstance(expr.right.left, Number)
142
- and expr.right.left.value == -1.0
143
- ):
144
- right = right[2:]
145
- symbol = "-"
146
- is_right_negative = True
147
-
148
- if isinstance(expr.right, Number) and expr.right.value < 0.0:
149
- num_abs = Number(expr.right.value * -1, dtype=expr.right.dtype)
150
- return f"{left} - {num_abs}"
151
-
152
- # check if the left hand side needs parentheses
153
- # ex: (a mod b) + right
154
- # ex: (a mod b) - right
155
- if isinstance(expr.left, Mod):
156
- left = rf"\left( {left} \right)"
157
- # check if the right hand side needs parentheses
158
- # ex: left + (a mod b)
159
- # ex: left - (a mod b)
160
- if isinstance(expr.right, Mod) or (
161
- is_right_negative and isinstance(expr.right.right, Mod)
162
- ):
163
- right = rf"\left( {right} \right)"
164
-
165
- return f"{left} {symbol} {right}"
166
-
167
-
168
- def _mul_latex_repr(expr: Mul, left: str, right: str) -> str:
169
- if isinstance(expr.left, Number):
170
- coeff = expr.left.value
171
- if coeff == -1:
172
- # check if the right hand side needs parentheses
173
- if isinstance(expr.right, Add):
174
- return rf"- \left( {right} \right)"
175
- else:
176
- return f"- {right}"
177
- if coeff < 0:
178
- # check if the right hand side needs parentheses
179
- if isinstance(expr.right, Add):
180
- return rf"\left( {left} \right) \cdot \left( {right} \right)"
181
- else:
182
- return rf"\left( {left} \right) \cdot {right}"
183
- if isinstance(expr.right, Number):
184
- coeff = expr.right.value
185
- if coeff == -1:
186
- return f"- {right}"
187
- if coeff < 0:
188
- return rf"\left( {right} \right) \cdot {left}"
189
-
190
- # put coefficient in front of variable terms
191
- return rf"{right} \cdot {left}"
192
-
193
- parentheses_required_type = (Add, Mod)
194
- # check if the left hand side needs parentheses
195
- if isinstance(expr.left, parentheses_required_type):
196
- left = rf"\left( {left} \right)"
197
- # check if the right hand side needs parentheses
198
- if isinstance(expr.right, parentheses_required_type):
199
- right = rf"\left( {right} \right)"
200
-
201
- if left[0] == "-":
202
- left = rf"\left( {left} \right)"
203
- if right[0] == "-":
204
- right = rf"\left( {right} \right)"
205
-
206
- return left + r" \cdot " + right
207
-
208
-
209
- def _reduction_latex_repr(expr: ReductionOperator) -> str:
210
- # select operator symbol in LaTeX
211
- if isinstance(expr, SumOperator):
212
- operator = r"\sum"
213
- elif isinstance(expr, ProdOperator):
214
- operator = r"\prod"
215
- # NOTE: When is this needed?
216
- else:
217
- operator = r"\Otimes"
218
-
219
- # make condition string in LaTeX
220
- condition = ""
221
- if not isinstance(expr.condition, NoneCondition):
222
- condition = rf",\ {condition_latex_repr(expr.condition)}"
223
- index = expr_latex_repr(expr.sum_index)
224
-
225
- # make index string in LaTeX
226
- # case: index belongs to range
227
- if isinstance(expr.sum_index.parent, Range):
228
- start = expr_latex_repr(expr.sum_index.parent.start)
229
- end = expr_latex_repr(expr.sum_index.parent.last - 1)
230
- operator = rf"{operator}_{{ {index} = {start}{condition} }}^{{ {end} }}"
231
- # case: index belongs to a set
232
- else:
233
- parent = expr_latex_repr(expr.sum_index.parent)
234
- operator = rf"{operator}_{{ {index} \in {parent}{condition} }}"
235
-
236
- operand = expr_latex_repr(expr.operand)
237
-
238
- # check if the operand needs parentheses
239
- parentheses_required_type = (Add, Mod)
240
- if isinstance(expr.operand, parentheses_required_type):
241
- return rf"{operator} \left( {operand} \right)"
242
- else:
243
- return rf"{operator} {operand}"
@@ -1,209 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import re
4
-
5
- from itertools import zip_longest
6
-
7
- from jijmodeling.expression.condition import NoneCondition
8
- from jijmodeling.expression.constraint import Constraint, Penalty
9
- from jijmodeling.expression.extract import extract_vars_from_problem
10
- from jijmodeling.expression.variables.deci_vars import Binary, DecisionVariable, Integer
11
- from jijmodeling.expression.variables.variable import Range
12
- from jijmodeling.latex_repr.latex_repr import condition_latex_repr, expr_latex_repr
13
- from jijmodeling.problem.problem import Problem, ProblemSense
14
-
15
-
16
- def range_latex_repr(el_range: Range):
17
- start_str = expr_latex_repr(el_range.start)
18
- last_str = expr_latex_repr(el_range.last - 1)
19
- latex_str: str = rf"\left\{{ {start_str} ,\ldots , {last_str} \right\}}"
20
- return latex_str
21
-
22
-
23
- def escape_latex_special_character(text: str) -> str:
24
- """
25
- Replace characters that matches with the 10 latex special characters.
26
-
27
- There are 10 latex special characters:
28
- 1. tilde (~)
29
- 2. circumflex (^)
30
- 3. backslash (\\)
31
- 4. percent sign (%)
32
- 5. ampersand (&)
33
- 6. dollar sign ($)
34
- 7. number sign (#)
35
- 8. underscore (_)
36
- 9. left brace ({)
37
- 10. right brace (})
38
- https://tex.stackexchange.com/questions/34580/escape-character-in-latex/34586#34586
39
-
40
- If `latex` has some latex special characters, then replace the characters into other strings by following the below table:
41
-
42
- | name | src | dst |
43
- | ------------ | ---- | -------------------- |
44
- | backslash | "\\" | "\textbackslash{}" |
45
- | tilde | "~" | "\textasciitilde{}" |
46
- | circumflex | "^" | "\textasciicircum{}" |
47
- | ampersand | "&" | "\\&" |
48
- | percent sign | "%" | "\\%" |
49
- | dollar sign | "$" | "\\$" |
50
- | number sign | "#" | "\\#" |
51
- | underscore | "_" | "\\_" |
52
- | left brace | "{" | "\\{" |
53
- | right brace | "}" | "\\}" |
54
-
55
- Args:
56
- text (str): string
57
-
58
- Returns:
59
- str: string without 10 latex special characters
60
- """
61
- latex_special_chars = "|".join(
62
- [r"\\", "~", r"\^", "&", "%", r"\$", "#", "_", "{", "}"]
63
- )
64
-
65
- replaced_special_chars = []
66
- for c in re.findall(latex_special_chars, text):
67
- if c == "\\":
68
- replaced_special_chars.append(r"\textbackslash{}")
69
- elif c == "~":
70
- replaced_special_chars.append(r"\textasciitilde{}")
71
- elif c == "^":
72
- replaced_special_chars.append(r"\textasciicircum{}")
73
- else:
74
- replaced_special_chars.append(rf"\{c}")
75
-
76
- text_without_special_chars = re.split(latex_special_chars, text)
77
- result = "".join(
78
- [
79
- no_special_char + replaced_special_char
80
- for no_special_char, replaced_special_char in zip_longest(
81
- text_without_special_chars, replaced_special_chars, fillvalue=""
82
- )
83
- ]
84
- )
85
- return result
86
-
87
-
88
- def constraint_latex_repr(constraint: Constraint) -> str:
89
- name = escape_latex_special_character(constraint.label)
90
- latex_str = rf"\text{{{name}}} :\\ &\quad \quad "
91
- latex_str += condition_latex_repr(constraint.condition)
92
- latex_str += ","
93
- # case: condition has a forall condition
94
- if len(constraint.forall) > 0:
95
- for_all_str = ""
96
- condition_str = ""
97
- for index, condition in constraint.forall:
98
- parent_str = (
99
- range_latex_repr(index.parent)
100
- if isinstance(index.parent, Range)
101
- else expr_latex_repr(index.parent)
102
- )
103
- for_all_str += rf"\forall {expr_latex_repr(index)} \in {parent_str} "
104
- condition_str += (
105
- ""
106
- if isinstance(condition, NoneCondition)
107
- else condition_latex_repr(condition) + r"\land "
108
- )
109
- # for_all_str = for_all_str.rstrip(', ')
110
- latex_str += rf"\ {for_all_str}"
111
-
112
- condition_str = condition_str.rstrip(r"\land ")
113
- if condition_str != "":
114
- latex_str += rf" \ {condition_str}"
115
- return latex_str
116
-
117
-
118
- def penalty_latex_repr(penalty: Penalty) -> str:
119
- name = escape_latex_special_character(penalty.label)
120
- latex_str = rf"\text{{{name}}} :\\ &\quad \quad "
121
- latex_str += expr_latex_repr(penalty.penalty_term)
122
- latex_str += ","
123
-
124
- # case: penalty has a forall condition
125
- if len(penalty.forall) > 0:
126
- for_all_str = ""
127
- condition_str = ""
128
- for index, condition in penalty.forall:
129
- parent_str = (
130
- range_latex_repr(index.parent)
131
- if isinstance(index.parent, Range)
132
- else expr_latex_repr(index.parent)
133
- )
134
- for_all_str += rf"\forall {expr_latex_repr(index)} \in {parent_str} "
135
- condition_str += (
136
- ""
137
- if isinstance(condition, NoneCondition)
138
- else condition_latex_repr(condition) + r"\land "
139
- )
140
- # for_all_str = for_all_str.rstrip(', ')
141
- latex_str += rf"\ {for_all_str}"
142
-
143
- condition_str = condition_str.rstrip(r"\land ")
144
- if condition_str != "":
145
- latex_str += rf" \ {condition_str}"
146
-
147
- return latex_str
148
-
149
-
150
- def problem_latex_repr(problem: Problem) -> str:
151
- name = escape_latex_special_character(problem.name)
152
- latex_str = rf"\text{{Problem}} & \text{{: {name}}} \\"
153
- if problem.sense == ProblemSense.MAXIMUM:
154
- latex_str += rf"\max & \quad {problem.objective._make_latex()} \\"
155
- else:
156
- latex_str += rf"\min & \quad {problem.objective._make_latex()} \\"
157
-
158
- # case: Problem has more than one penalties.
159
- if len(problem.penalties) > 0:
160
- latex_str += r"\text{Penalties} & \\"
161
- # Shows all penalties.
162
- for penalty in problem.penalties.values():
163
- latex_str += rf"& {penalty_latex_repr(penalty)}\\[8pt]"
164
-
165
- # case: Problem has more than one constraints.
166
- if len(problem.constraints) > 0:
167
- latex_str += r"\text{s.t.} & \\"
168
- # show all constraints
169
- for _, constraint in problem.constraints.items():
170
- latex_str += rf"& {constraint_latex_repr(constraint)}\\[8pt]"
171
-
172
- latex_str += "&"
173
-
174
- # Extracts all decision variables from the Problem object.
175
- deci_var_list = {
176
- var.label: var
177
- for var in extract_vars_from_problem(problem)
178
- if isinstance(var, DecisionVariable)
179
- }
180
-
181
- # Checks if the problem does not have any decision variable
182
- if deci_var_list == {}:
183
- return latex_str
184
-
185
- used_decision_variable = ""
186
- for deci_var in deci_var_list.values():
187
- label = deci_var._make_latex()
188
- has_subscripts = deci_var.dim > 0
189
- if has_subscripts:
190
- subscripts = ""
191
- for i in range(deci_var.dim):
192
- subscripts += rf"i_{{{format(str(i))}}},"
193
- subscripts = subscripts.rstrip(",")
194
-
195
- used_decision_variable += rf"{label}_{{{subscripts}}}"
196
- else:
197
- used_decision_variable += label
198
-
199
- # case: Binary
200
- if isinstance(deci_var, Binary):
201
- used_decision_variable += r" \in \{0, 1\}"
202
- # case: Integer
203
- elif isinstance(deci_var, Integer):
204
- used_decision_variable += r" \in \mathbb{Z}"
205
-
206
- used_decision_variable += r",\ "
207
- used_decision_variable = used_decision_variable.rstrip(r",\ ")
208
-
209
- return rf"{latex_str} {used_decision_variable}"
@@ -1,19 +0,0 @@
1
- from pkgutil import extend_path
2
-
3
- __path__ = extend_path(__path__, __name__)
4
-
5
- import jijmodeling.match.condition_same as condition_same
6
- import jijmodeling.match.constraint_same as constraint_same
7
- import jijmodeling.match.expr_same as expr_same
8
- import jijmodeling.match.is_same_expr as is_same_expr
9
- import jijmodeling.match.penalty_same as penalty_same
10
- import jijmodeling.match.problem_same as problem_same
11
-
12
- __all__ = [
13
- "condition_same",
14
- "constraint_same",
15
- "expr_same",
16
- "is_same_expr",
17
- "penalty_same",
18
- "problem_same",
19
- ]
@@ -1,44 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling.expression.condition as _condition
4
-
5
- from jijmodeling.match.expr_same import expr_same
6
-
7
-
8
- def condition_same(
9
- target: _condition.Condition, pattern: _condition.Condition, check_id: bool = True
10
- ) -> bool:
11
- if target.uuid == pattern.uuid:
12
- return True
13
- if not isinstance(target, type(pattern)):
14
- return False
15
-
16
- # case: CompareCondition
17
- if isinstance(target, _condition.CompareCondition) and isinstance(
18
- pattern, _condition.CompareCondition
19
- ):
20
- # Check the equality of left hand side
21
- is_left_same = expr_same(target.left, pattern.left, check_id)
22
- if is_left_same is False:
23
- return False
24
-
25
- # Check the equality of right hand side
26
- is_right_same = expr_same(target.right, pattern.right, check_id)
27
- if is_right_same is False:
28
- return False
29
- return True
30
-
31
- # case: ConditionOperator
32
- elif isinstance(target, _condition.ConditionOperator) and isinstance(
33
- pattern, _condition.ConditionOperator
34
- ):
35
- return condition_same(target.left, pattern.left, check_id) & condition_same(
36
- target.right, pattern.left, check_id
37
- )
38
-
39
- elif isinstance(target, _condition.NoneCondition) and isinstance(
40
- pattern, _condition.NoneCondition
41
- ):
42
- return True
43
-
44
- return False
@@ -1,53 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import jijmodeling.expression.constraint as _constraint
4
- import jijmodeling.expression.expression as _expression
5
-
6
- from jijmodeling.match.condition_same import condition_same
7
- from jijmodeling.match.expr_same import expr_same
8
-
9
-
10
- def constraint_same(
11
- target: _constraint.Constraint,
12
- pattern: _constraint.Constraint,
13
- check_id: bool = True,
14
- ) -> bool:
15
- # Is the same label?
16
- if target.label != pattern.label:
17
- return False
18
- # Is the same `with_penalty`?
19
- if target.with_penalty != pattern.with_penalty:
20
- return False
21
- # Is the same `with_multiplier`?
22
- if target.with_multiplier != pattern.with_multiplier:
23
- return False
24
- # Is the same `auto_qubo`?
25
- if target.auto_qubo != pattern.auto_qubo:
26
- return False
27
- # Is the same `condition`?
28
- if condition_same(target.condition, pattern.condition, check_id) is False:
29
- return False
30
- # Is the same `left_lower`?
31
- if target.left_lower is None and pattern.left_lower is None:
32
- is_same_left_lower = True
33
- elif isinstance(target.left_lower, _expression.Expression) and isinstance(
34
- pattern.left_lower, _expression.Expression
35
- ):
36
- is_same_left_lower = expr_same(target.left_lower, pattern.left_lower, check_id)
37
- else:
38
- return False
39
- if is_same_left_lower is False:
40
- return False
41
- # Is the same `forall`?
42
- if len(target.forall) != len(pattern.forall):
43
- return False
44
- for target_forall, pattern_forall in zip(target.forall, pattern.forall):
45
- target_element, target_condition = target_forall
46
- pattern_element, pattern_condition = pattern_forall
47
- is_same_forall = expr_same(
48
- target_element, pattern_element, check_id
49
- ) and condition_same(target_condition, pattern_condition, check_id)
50
-
51
- if is_same_forall is False:
52
- return False
53
- return True
@@ -1,23 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Union
4
-
5
- from jijmodeling.expression.condition import Condition
6
- from jijmodeling.expression.expression import Expression
7
- from jijmodeling.expression.variables.variable import Range
8
- from jijmodeling.match.is_same_expr import ExpressionType, is_same_cond, is_same_expr
9
-
10
-
11
- def expr_same(
12
- target: Union[ExpressionType, Condition],
13
- pattern: Union[ExpressionType, Condition],
14
- check_id: bool = True,
15
- ) -> bool:
16
- if isinstance(target, (Expression, Range)) and isinstance(
17
- pattern, (Expression, Range)
18
- ):
19
- return is_same_expr(target, pattern, check_id)
20
- elif isinstance(target, Condition) and isinstance(pattern, Condition):
21
- return is_same_cond(target, pattern, check_id)
22
- else:
23
- return False