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,198 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import asdict, dataclass
4
- from typing import Dict, List, Optional, Tuple, Union
5
-
6
- import numpy as np
7
- import pandas as pd
8
-
9
-
10
- @dataclass
11
- class Evaluation:
12
- """Schema for results of evaluating solutions.
13
-
14
- Attributes:
15
- energy (List[float]): a list of values of energy.
16
- objective (Optional[List[float]], optional): a list of values of objective function. Defaults to None.
17
- constraint_violations (Optional[Dict[str, List[float]]], optional): a list of constraint violations. A key is the name of a constraint. A value is cost of a constraint. Defaults to None.
18
- penalty (Optional[Dict[str, List[float]]], optional): a list of costs of penalty terms. A key is the name of a penalty. A value is cost of a penalty term. Defaults to None.
19
- """
20
-
21
- energy: Optional[List[float]] = None
22
- objective: Optional[List[float]] = None
23
- constraint_violations: Optional[Dict[str, List[float]]] = None
24
- penalty: Optional[Dict[str, List[float]]] = None
25
-
26
- def __post_init__(self):
27
- self._current_index = 0
28
-
29
- def __iter__(self):
30
- return self
31
-
32
- def __next__(self):
33
- if self.energy is not None:
34
- if self._current_index == len(self.energy):
35
- self._current_index = 0
36
- raise StopIteration()
37
- ret = self[self._current_index]
38
- self._current_index += 1
39
- return ret
40
- else:
41
- raise StopIteration()
42
-
43
- def __getitem__(
44
- self, item: Union[int, slice, List[int], Tuple[int], np.ndarray]
45
- ) -> Evaluation:
46
- """Perform the operation __getitem__.
47
-
48
- Args:
49
- item (Union[int, slice, List[int], Tuple[int], np.ndarray]): Index of evaluation metrics.
50
-
51
- Returns:
52
- Evaluation: Evaluation object.
53
- """
54
-
55
- def _slice(start: int, stop: int, step: Optional[int] = None) -> Evaluation:
56
- energy = None if self.energy is None else self.energy[start:stop:step]
57
- objective = (
58
- None if self.objective is None else self.objective[start:stop:step]
59
- )
60
- constraint_violations = (
61
- None
62
- if self.constraint_violations is None
63
- else {
64
- label: constraint_violations[start:stop:step]
65
- for label, constraint_violations in self.constraint_violations.items()
66
- }
67
- )
68
- penalty = (
69
- None
70
- if self.penalty is None
71
- else {
72
- label: penalty[start:stop:step]
73
- for label, penalty in self.penalty.items()
74
- }
75
- )
76
- return Evaluation(
77
- energy=energy,
78
- objective=objective,
79
- constraint_violations=constraint_violations,
80
- penalty=penalty,
81
- )
82
-
83
- if isinstance(item, int):
84
- start, stop, step = item, item + 1, None
85
- return _slice(start, stop, step)
86
- elif isinstance(item, slice):
87
- start, stop, step = item.start, item.stop, item.step
88
- return _slice(start, stop, step)
89
- elif isinstance(item, (list, tuple, np.ndarray)):
90
- item = np.array(item) if len(item) else np.array([], dtype=int)
91
- if item.dtype == int or item.dtype == bool:
92
- energy = (
93
- None
94
- if self.energy is None
95
- else np.array(self.energy)[item].tolist()
96
- )
97
- objective = (
98
- None
99
- if self.objective is None
100
- else np.array(self.objective)[item].tolist()
101
- )
102
- constraint_violations = (
103
- None
104
- if self.constraint_violations is None
105
- else {
106
- label: np.array(constraint_violations)[item].tolist()
107
- for label, constraint_violations in self.constraint_violations.items()
108
- }
109
- )
110
- penalty = (
111
- None
112
- if self.penalty is None
113
- else {
114
- label: np.array(penalty)[item].tolist()
115
- for label, penalty in self.penalty.items()
116
- }
117
- )
118
- return Evaluation(
119
- energy=energy,
120
- objective=objective,
121
- constraint_violations=constraint_violations,
122
- penalty=penalty,
123
- )
124
- else:
125
- raise IndexError(f'Element of "{item}" must be int or bool.')
126
- else:
127
- raise IndexError(
128
- f'Type of index "{item}" must be int or slice or List[int] or Tuple[int] or 1d numpy.ndarray.'
129
- )
130
-
131
- def to_pandas_dataframe(self) -> pd.DataFrame:
132
- """Convert Evaluation object to pandas.DataFrame object.
133
-
134
- Returns:
135
- pandas.DataFrame: pandas.DataFrame object.
136
- """
137
-
138
- evaluation = asdict(self)
139
-
140
- if evaluation["constraint_violations"]:
141
- constraint_violations = {
142
- f"constraint_violation[{k}]": v
143
- for k, v in evaluation.pop("constraint_violations").items()
144
- }
145
- else:
146
- constraint_violations = {}
147
- del evaluation["constraint_violations"]
148
- evaluation.update(constraint_violations)
149
-
150
- if self.penalty:
151
- penalty = {f"penalty[{k}]": v for k, v in evaluation.pop("penalty").items()}
152
- else:
153
- penalty = {}
154
- del evaluation["penalty"]
155
- evaluation.update(penalty)
156
-
157
- return pd.DataFrame(evaluation)
158
-
159
- @classmethod
160
- def from_serializable(cls, obj: dict):
161
- """To Evaluation object from Dict of SampleSet.
162
-
163
- Args:
164
- obj (Dict): Dict of Evaluation.
165
-
166
- Returns:
167
- Evaluation: Evaluation obj.
168
- """
169
-
170
- return cls(
171
- energy=obj.get("energy"),
172
- objective=obj.get("objective"),
173
- constraint_violations=obj.get("constraint_violations"),
174
- penalty=obj.get("penalty"),
175
- )
176
-
177
- def to_serializable(self):
178
- return asdict(self)
179
-
180
- def _extend(self, other):
181
- # Concatenate energy
182
- self.energy.extend(other.energy)
183
-
184
- # Concatenate objective
185
- if isinstance(other.objective, list):
186
- self.objective.extend(other.objective)
187
-
188
- # Concatenate constraint_violations
189
- if isinstance(other.constraint_violations, dict):
190
- for (
191
- con_label,
192
- constraint_violation,
193
- ) in other.constraint_violations.items():
194
- self.constraint_violations[con_label].extend(constraint_violation)
195
-
196
- # Concatenate penalty
197
- if isinstance(other.penalty, list):
198
- self.penalty.extend(other.penalty)
@@ -1,59 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- from typing import Dict, Optional
5
-
6
- from jijmodeling.exceptions import SerializeSampleSetError
7
- from jijmodeling.sampleset.solving_time import SolvingTime
8
- from jijmodeling.sampleset.system_time import SystemTime
9
-
10
-
11
- @dataclass
12
- class MeasuringTime:
13
- """Schema for measuring time.
14
-
15
- Attributes:
16
- solve (Optional[SolvingTime], optional): Instance of SolvingTime. This means solver running time. Defaults to None.
17
- system (Optional[SystemTime], optional): Instance of SystemTime. This means time about jijzept system. Defaults to None.
18
- total (Optional[float], optional): Total time from submitting problem to obtaining solution. Defaults to None.
19
- """
20
-
21
- solve: Optional[SolvingTime] = None
22
- system: Optional[SystemTime] = None
23
- total: Optional[float] = None
24
-
25
- def __post_init__(self):
26
- if self.solve is None:
27
- self.solve = SolvingTime()
28
- if self.system is None:
29
- self.system = SystemTime()
30
-
31
- @classmethod
32
- def from_serializable(cls, obj: Dict):
33
- """To MeasuringTime object from Dict of SampleSet.
34
-
35
- Args:
36
- obj (Dict): Dict of MeasuringTime.
37
-
38
- Returns:
39
- MeasuringTime: MeasuringTime obj.
40
- """
41
-
42
- for key in ["solve", "system", "total"]:
43
- if key not in obj.keys():
44
- raise SerializeSampleSetError(f'"obj" does not contain "{key}" key')
45
-
46
- if obj["solve"] is None:
47
- solving_time = None
48
- else:
49
- solving_time = SolvingTime.from_serializable(obj["solve"])
50
-
51
- if obj["system"] is None:
52
- system_time = None
53
- else:
54
- system_time = SystemTime.from_serializable(obj["system"])
55
- return cls(
56
- solve=solving_time,
57
- system=system_time,
58
- total=obj["total"],
59
- )
@@ -1,158 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from dataclasses import dataclass
4
- from typing import Dict, List, Tuple, Union
5
-
6
- import numpy as np
7
- import pandas as pd
8
-
9
- from jijmodeling.exceptions import SerializeSampleSetError
10
- from jijmodeling.type_annotations import DenseSolution, SparseSolution
11
-
12
-
13
- @dataclass
14
- class Record:
15
- """Represents the Schema for solutions obtained by a solver.
16
-
17
- Attributes:
18
- solution (Dict[str, Union[List[SparseSolution], List[DenseSolution]]]): Solution. A key is the label of a decision variable. There are two type in value:
19
- - SparseSolution is tuple of length 3, where each element means (nonzero index, nonzero value, shape) for solution.
20
- - DenseSolution is numpy.ndarray which dimension is shape of decision variable.
21
- num_occurrences (List[int]): Number of occurrences for each sample.
22
- """
23
-
24
- solution: Dict[str, Union[List[SparseSolution], List[DenseSolution]]]
25
- num_occurrences: List[int]
26
-
27
- def __post_init__(self):
28
- self._is_dense = False
29
- self._current_index = 0
30
-
31
- def __len__(self) -> int:
32
- """
33
- Perform the operation __len__.
34
- """
35
- return len(self.num_occurrences)
36
-
37
- def __iter__(self):
38
- return self
39
-
40
- def __next__(self):
41
- if self._current_index == len(self):
42
- self._current_index = 0
43
- raise StopIteration()
44
- ret = self[self._current_index]
45
- self._current_index += 1
46
- return ret
47
-
48
- def __getitem__(
49
- self, item: Union[int, slice, List[int], Tuple[int], np.ndarray]
50
- ) -> Record:
51
- """Perform the operation __getitem__.
52
-
53
- Args:
54
- item (Union[int, slice, List[int], Tuple[int], np.ndarray]): Index of solution and num_occurrences.
55
-
56
- Returns:
57
- Record: Record object.
58
- """
59
-
60
- if isinstance(item, int):
61
- start, stop, step = item, item + 1, None
62
- solution = {
63
- label: solution[start:stop:step]
64
- for label, solution in self.solution.items()
65
- }
66
- return Record(
67
- solution=solution,
68
- num_occurrences=self.num_occurrences[start:stop:step],
69
- )
70
- elif isinstance(item, slice):
71
- start, stop, step = item.start, item.stop, item.step
72
- solution = {
73
- label: solution[start:stop:step]
74
- for label, solution in self.solution.items()
75
- }
76
- return Record(
77
- solution=solution,
78
- num_occurrences=self.num_occurrences[start:stop:step],
79
- )
80
- elif isinstance(item, (list, tuple, np.ndarray)):
81
- item = np.array(item) if len(item) else np.array([], dtype=int)
82
- if item.dtype == int or item.dtype == bool:
83
- index = np.arange(len(item))[item] if item.dtype == bool else item
84
- solution = {
85
- label: [solution[i] for i in index]
86
- for label, solution in self.solution.items()
87
- }
88
- num_occurrences = np.array(self.num_occurrences)[item].tolist()
89
- return Record(solution=solution, num_occurrences=num_occurrences)
90
- else:
91
- raise IndexError(f'Element of "{item}" must be int or bool.')
92
- else:
93
- raise IndexError(
94
- f'Type of index "{item}" must be one of int or slice or List[int] or Tuple[int] or 1d numpy.ndarray.'
95
- )
96
-
97
- @property
98
- def is_dense(self) -> bool:
99
- """SparseSolution or DenseSolution:
100
- - If True, DenseSolution,
101
- - Else, SparseSolution.
102
-
103
- Returns:
104
- bool: True or False.
105
- """
106
- return self._is_dense
107
-
108
- @is_dense.setter
109
- def is_dense(self, b: bool):
110
- self._is_dense = b
111
-
112
- @classmethod
113
- def from_serializable(cls, obj: Dict):
114
- """To Record object from Dict of SampleSet.
115
-
116
- Args:
117
- obj (Dict): Dict of Record.
118
-
119
- Returns:
120
- Record: Record obj.
121
- """
122
-
123
- for key in ["solution", "num_occurrences"]:
124
- if key not in obj.keys():
125
- raise SerializeSampleSetError(f'"obj" does not contain "{key}" key')
126
- return cls(**obj)
127
-
128
- def to_pandas_dataframe(self) -> pd.DataFrame:
129
- """Convert Record object to pandas.DataFrame object.
130
-
131
- Returns:
132
- pandas.DataFrame: pandas.DataFrame object.
133
- """
134
- solution = pd.DataFrame({f"solution[{k}]": v for k, v in self.solution.items()})
135
- num_occurrences = pd.DataFrame({"num_occurrences": self.num_occurrences})
136
- return pd.concat([solution, num_occurrences], axis=1)
137
-
138
- def to_dense(self, inplace: bool = False):
139
- solution = {}
140
- for label, si in self.solution.items():
141
- array_list = []
142
- for nonzero_index, values, shape in si:
143
- array = np.zeros(shape)
144
- if array.ndim:
145
- array[nonzero_index] = values
146
- else:
147
- array = np.array(values)
148
- array_list.append(array)
149
- solution[label] = array_list
150
- if inplace:
151
- self.solution = solution
152
- self._solution_type = DenseSolution
153
- return Record(solution=solution, num_occurrences=self.num_occurrences)
154
-
155
- def _extend(self, other):
156
- for var_label, solution in other.solution.items():
157
- self.solution[var_label].extend(solution)
158
- self.num_occurrences.extend(other.num_occurrences)