memory-graph 0.3.34__tar.gz → 0.3.36__tar.gz

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.
Files changed (238) hide show
  1. {memory_graph-0.3.34/memory_graph.egg-info → memory_graph-0.3.36}/PKG-INFO +22 -5
  2. {memory_graph-0.3.34 → memory_graph-0.3.36}/README.md +21 -4
  3. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/add_one.gv +18 -18
  4. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_key_value.gv +12 -12
  5. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_leaf.gv +5 -5
  6. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_linear.gv +12 -12
  7. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_table.gv +12 -12
  8. memory_graph-0.3.36/images/bin_search.py +31 -0
  9. memory_graph-0.3.36/images/bin_tree.gif +0 -0
  10. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/bin_tree.gv +35 -35
  11. memory_graph-0.3.36/images/call_stack.txt +24 -0
  12. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copies.gv +20 -20
  13. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copy_method.gv +16 -16
  14. memory_graph-0.3.36/images/debug.gv +15 -0
  15. memory_graph-0.3.36/images/debug.pdf +0 -0
  16. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging01.gv +8 -8
  17. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging01.png +0 -0
  18. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging02.gv +11 -11
  19. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging02.png +0 -0
  20. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging03.gv +13 -13
  21. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging03.png +0 -0
  22. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging04.gv +15 -15
  23. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging04.png +0 -0
  24. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging05.gv +17 -17
  25. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging05.png +0 -0
  26. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging06.gv +17 -17
  27. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging06.png +0 -0
  28. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_numpy.gv +8 -8
  29. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_pandas.gv +8 -8
  30. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial0.gv +3 -3
  31. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial0.png +0 -0
  32. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial1.gv +6 -6
  33. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial1.png +0 -0
  34. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial2.gv +8 -8
  35. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial2.png +0 -0
  36. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial3.gv +10 -10
  37. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial3.png +0 -0
  38. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial4.gv +10 -10
  39. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial4.png +0 -0
  40. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial5.gv +8 -8
  41. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial5.png +0 -0
  42. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial6.gv +6 -6
  43. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial6.png +0 -0
  44. memory_graph-0.3.36/images/hash_set.gif +0 -0
  45. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hash_set.gv +29 -29
  46. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/highlight.gv +16 -16
  47. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/immutable1.gv +4 -4
  48. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/immutable2.gv +6 -6
  49. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/introspect_depth.gv +56 -56
  50. memory_graph-0.3.36/images/linked_list.gif +0 -0
  51. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/linked_list.gv +20 -20
  52. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/many_types.gv +12 -12
  53. memory_graph-0.3.36/images/memory_graph.gv +43 -0
  54. memory_graph-0.3.36/images/memory_graph.pdf +0 -0
  55. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/mutable1.gv +4 -4
  56. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/mutable2.gv +4 -4
  57. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types1.gv +6 -6
  58. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types2.gv +14 -14
  59. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set0.gv +11 -11
  60. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set0.png +0 -0
  61. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set1.gv +17 -17
  62. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set1.png +0 -0
  63. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set10.gv +36 -36
  64. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set10.png +0 -0
  65. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set11.gv +31 -31
  66. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set11.png +0 -0
  67. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set12.gv +31 -31
  68. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set12.png +0 -0
  69. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set13.gv +36 -36
  70. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set13.png +0 -0
  71. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set14.gv +41 -41
  72. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set14.png +0 -0
  73. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set15.gv +43 -43
  74. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set15.png +0 -0
  75. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set16.gv +40 -40
  76. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set16.png +0 -0
  77. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set17.gv +40 -40
  78. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set17.png +0 -0
  79. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set18.gv +45 -45
  80. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set18.png +0 -0
  81. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set19.gv +47 -47
  82. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set19.png +0 -0
  83. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set2.gv +22 -22
  84. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set2.png +0 -0
  85. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set20.gv +44 -44
  86. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set20.png +0 -0
  87. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set21.gv +39 -39
  88. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set21.png +0 -0
  89. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set22.gv +34 -34
  90. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set22.png +0 -0
  91. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set23.gv +28 -28
  92. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set23.png +0 -0
  93. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set3.gv +27 -27
  94. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set3.png +0 -0
  95. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set4.gv +32 -32
  96. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set4.png +0 -0
  97. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set5.gv +34 -34
  98. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set5.png +0 -0
  99. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set6.gv +32 -32
  100. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set6.png +0 -0
  101. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set7.gv +32 -32
  102. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set7.png +0 -0
  103. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set8.gv +37 -37
  104. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set8.png +0 -0
  105. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set9.gv +39 -39
  106. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set9.png +0 -0
  107. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/rebinding1.gv +4 -4
  108. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/rebinding2.gv +6 -6
  109. memory_graph-0.3.36/images/stack.txt +21 -0
  110. memory_graph-0.3.36/images/test.py +20 -0
  111. memory_graph-0.3.36/images/test.py~ +18 -0
  112. memory_graph-0.3.36/images/vsc.py +23 -0
  113. memory_graph-0.3.36/images/vsc.py~ +22 -0
  114. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/__init__.py +71 -42
  115. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/utils.py +0 -17
  116. {memory_graph-0.3.34 → memory_graph-0.3.36/memory_graph.egg-info}/PKG-INFO +22 -5
  117. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph.egg-info/SOURCES.txt +12 -0
  118. {memory_graph-0.3.34 → memory_graph-0.3.36}/pyproject.toml +1 -1
  119. memory_graph-0.3.34/images/memory_graph.gv +0 -70
  120. memory_graph-0.3.34/images/memory_graph.pdf +0 -0
  121. {memory_graph-0.3.34 → memory_graph-0.3.36}/LICENSE.txt +0 -0
  122. {memory_graph-0.3.34 → memory_graph-0.3.36}/MANIFEST.in +0 -0
  123. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/-0 +0 -0
  124. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/.gif +0 -0
  125. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/add_one.png +0 -0
  126. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/add_one.py +0 -0
  127. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree.py +0 -0
  128. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree.py~ +0 -0
  129. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_dir.gv +0 -0
  130. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_dir.png +0 -0
  131. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_fail.gv +0 -0
  132. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_fail.png +0 -0
  133. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_key_value.png +0 -0
  134. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_leaf.png +0 -0
  135. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_linear.png +0 -0
  136. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/avltree_table.png +0 -0
  137. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/bin_tree.png +0 -0
  138. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/bin_tree.py +0 -0
  139. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/bin_tree2.py +0 -0
  140. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/bin_tree2.py~ +0 -0
  141. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/colab_example.png +0 -0
  142. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copies.png +0 -0
  143. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copies.py +0 -0
  144. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copy_method.png +0 -0
  145. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/copy_method.py +0 -0
  146. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/create_gif.sh +0 -0
  147. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/create_images.sh +0 -0
  148. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debug_vscode.png +0 -0
  149. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging.gif +0 -0
  150. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/debugging.py +0 -0
  151. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/depth.gv +0 -0
  152. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/depth.png +0 -0
  153. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_numpy.png +0 -0
  154. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_numpy.py +0 -0
  155. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_pandas.png +0 -0
  156. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/extension_pandas.py +0 -0
  157. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial.gif +0 -0
  158. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial.py +0 -0
  159. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial01.gv +0 -0
  160. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial02.gv +0 -0
  161. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial03.gv +0 -0
  162. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial04.gv +0 -0
  163. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial05.gv +0 -0
  164. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial06.gv +0 -0
  165. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/factorial07.gv +0 -0
  166. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hash_set.png +0 -0
  167. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hash_set.py +0 -0
  168. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hidden_edges.gv +0 -0
  169. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hidden_edges.png +0 -0
  170. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hidden_edges.py +0 -0
  171. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/hidden_edges.py~ +0 -0
  172. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/highlight.png +0 -0
  173. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/highlight.py +0 -0
  174. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/immutable.py +0 -0
  175. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/immutable1.png +0 -0
  176. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/immutable2.png +0 -0
  177. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/introspect_depth.png +0 -0
  178. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/introspect_depth.py +0 -0
  179. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/introspect_depth.py~ +0 -0
  180. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/ipython.png +0 -0
  181. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/jupyter_example.png +0 -0
  182. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/linked_list.png +0 -0
  183. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/linked_list.py +0 -0
  184. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/log.txt +0 -0
  185. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/many_types.png +0 -0
  186. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/many_types.py +0 -0
  187. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/memory_graph.gv.pdf +0 -0
  188. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/mutable.py +0 -0
  189. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/mutable1.png +0 -0
  190. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/mutable2.png +0 -0
  191. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/my_graph.gv +0 -0
  192. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/my_graph.pdf +0 -0
  193. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/name_rebinding.py +0 -0
  194. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types.py +0 -0
  195. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types.py~ +0 -0
  196. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types1.png +0 -0
  197. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/not_node_types2.png +0 -0
  198. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set.gif +0 -0
  199. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set.py +0 -0
  200. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set19.png~ +0 -0
  201. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/power_set8.png~ +0 -0
  202. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/pyodide.png +0 -0
  203. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/rebinding1.png +0 -0
  204. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/rebinding2.png +0 -0
  205. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/uva.png +0 -0
  206. {memory_graph-0.3.34 → memory_graph-0.3.36}/images/vscode_copying.gif +0 -0
  207. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/call_stack.py +0 -0
  208. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/config.py +0 -0
  209. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/config_default.py +0 -0
  210. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/config_helpers.py +0 -0
  211. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/extension_numpy.py +0 -0
  212. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/extension_pandas.py +0 -0
  213. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/html_table.py +0 -0
  214. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/list_view.py +0 -0
  215. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/memory_to_nodes.py +0 -0
  216. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/node_base.py +0 -0
  217. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/node_key_value.py +0 -0
  218. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/node_leaf.py +0 -0
  219. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/node_linear.py +0 -0
  220. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/node_table.py +0 -0
  221. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/sequence.py +0 -0
  222. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/slicer.py +0 -0
  223. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/slices.py +0 -0
  224. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/slices_iterator.py +0 -0
  225. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/slices_table_iterator.py +0 -0
  226. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test.py +0 -0
  227. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_max_graph_depth.py +0 -0
  228. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_memory_graph.py +0 -0
  229. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_memory_to_nodes.py +0 -0
  230. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_sequence.py +0 -0
  231. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_slicer.py +0 -0
  232. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_slices.py +0 -0
  233. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph/test_slices_iterator.py +0 -0
  234. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph.egg-info/dependency_links.txt +0 -0
  235. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph.egg-info/requires.txt +0 -0
  236. {memory_graph-0.3.34 → memory_graph-0.3.36}/memory_graph.egg-info/top_level.txt +0 -0
  237. {memory_graph-0.3.34 → memory_graph-0.3.36}/setup.cfg +0 -0
  238. {memory_graph-0.3.34 → memory_graph-0.3.36}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memory_graph
3
- Version: 0.3.34
3
+ Version: 0.3.36
4
4
  Summary: Teaching tool and debugging aid in context of references, mutable data types, and shallow and deep copy.
5
5
  Author-email: Bas Terwijn <bterwijn@gmail.com>
6
6
  License-Expression: BSD-2-Clause
@@ -381,12 +381,16 @@ For other debuggers, invoke this function within the *watch* context. Then, in t
381
381
  ```
382
382
  mg.save_call_stack("call_stack.txt")
383
383
  ```
384
- Choose the list of `after_functions` after any of which the slice start. Then choose the `through_function` at which the slice ends. The optional `drop` argument can be used to drop a number of stack frames at the start:
384
+ Then to get the call stack use:
385
385
  ```
386
- mg.stack_after_through(after_functions : list[str],
387
- through_function : str = "<module>",
388
- drop : int = 0)
386
+ mg.stack_after_through(after_functions : list[(str,int)],
387
+ through_functions : list[str] = ["<module>"],
388
+ stack_index: int = 0)
389
389
  ```
390
+ with parameters:
391
+ * after_functions: list of (function-name, offset), begins at the index of the first 'function-name' that is found in the call stack with additional 'offset'
392
+ * through_functions: list of function-names, ends at the index of the first 'function-name' that is found in the call stack after begin index, inclusive
393
+ * stack_index: number of frames removed at the beginning
390
394
 
391
395
  ## Debugging without Debugger Tool ##
392
396
 
@@ -458,6 +462,10 @@ for i in range(n):
458
462
  ```
459
463
  ![linked_list.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.png)
460
464
 
465
+ ### Linked List in Cursor AI ###
466
+ Here we show values being added to a Linked List in Cursor AI. When adding the last value '5' we "Step Into" the code to show more of the details.
467
+ ![linked_list.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.gif)
468
+
461
469
  ## Binary Tree ##
462
470
  ```python
463
471
  import memory_graph as mg
@@ -494,6 +502,11 @@ for i in range(n):
494
502
  ```
495
503
  ![bin_tree.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/bin_tree.png)
496
504
 
505
+ ### Binary Tree in Visual Studio Code ###
506
+ Here we show values being inserted in a Binary Tree in Visual Studio Code. When inserting the last value '29' we "Step Into" the code to show the recursive implementation.
507
+ ![images/bin_tree.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/bin_tree.gif)
508
+
509
+
497
510
  ## Hash Set ##
498
511
  ```python
499
512
  import memory_graph as mg
@@ -532,6 +545,10 @@ for i in range(n):
532
545
  ```
533
546
  ![hash_set.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hash_set.png)
534
547
 
548
+ ### Hash Set in PyCharm ###
549
+ Here we show values being inserted in a HashSet in PyCharm. When inserting the last value '44' we "Step Into" the code to show more of the details.
550
+ ![images/hash_set.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hash_set.gif)
551
+
535
552
 
536
553
  # Configuration #
537
554
  Different aspects of memory_graph can be configured. The default configuration is reset by importing 'memory_graph.config_default'.
@@ -361,12 +361,16 @@ For other debuggers, invoke this function within the *watch* context. Then, in t
361
361
  ```
362
362
  mg.save_call_stack("call_stack.txt")
363
363
  ```
364
- Choose the list of `after_functions` after any of which the slice start. Then choose the `through_function` at which the slice ends. The optional `drop` argument can be used to drop a number of stack frames at the start:
364
+ Then to get the call stack use:
365
365
  ```
366
- mg.stack_after_through(after_functions : list[str],
367
- through_function : str = "<module>",
368
- drop : int = 0)
366
+ mg.stack_after_through(after_functions : list[(str,int)],
367
+ through_functions : list[str] = ["<module>"],
368
+ stack_index: int = 0)
369
369
  ```
370
+ with parameters:
371
+ * after_functions: list of (function-name, offset), begins at the index of the first 'function-name' that is found in the call stack with additional 'offset'
372
+ * through_functions: list of function-names, ends at the index of the first 'function-name' that is found in the call stack after begin index, inclusive
373
+ * stack_index: number of frames removed at the beginning
370
374
 
371
375
  ## Debugging without Debugger Tool ##
372
376
 
@@ -438,6 +442,10 @@ for i in range(n):
438
442
  ```
439
443
  ![linked_list.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.png)
440
444
 
445
+ ### Linked List in Cursor AI ###
446
+ Here we show values being added to a Linked List in Cursor AI. When adding the last value '5' we "Step Into" the code to show more of the details.
447
+ ![linked_list.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/linked_list.gif)
448
+
441
449
  ## Binary Tree ##
442
450
  ```python
443
451
  import memory_graph as mg
@@ -474,6 +482,11 @@ for i in range(n):
474
482
  ```
475
483
  ![bin_tree.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/bin_tree.png)
476
484
 
485
+ ### Binary Tree in Visual Studio Code ###
486
+ Here we show values being inserted in a Binary Tree in Visual Studio Code. When inserting the last value '29' we "Step Into" the code to show the recursive implementation.
487
+ ![images/bin_tree.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/bin_tree.gif)
488
+
489
+
477
490
  ## Hash Set ##
478
491
  ```python
479
492
  import memory_graph as mg
@@ -512,6 +525,10 @@ for i in range(n):
512
525
  ```
513
526
  ![hash_set.png](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hash_set.png)
514
527
 
528
+ ### Hash Set in PyCharm ###
529
+ Here we show values being inserted in a HashSet in PyCharm. When inserting the last value '44' we "Step Into" the code to show more of the details.
530
+ ![images/hash_set.gif](https://raw.githubusercontent.com/bterwijn/memory_graph/main/images/hash_set.gif)
531
+
515
532
 
516
533
  # Configuration #
517
534
  Different aspects of memory_graph can be configured. The default configuration is reset by importing 'memory_graph.config_default'.
@@ -1,6 +1,6 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node128708527869504 [label=<
3
+ node139538407968320 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
5
5
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
6
6
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -8,30 +8,30 @@ digraph memory_graph {
8
8
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
9
9
  </TABLE>
10
10
  > xlabel=list]
11
- node128708517705152 [label=<
11
+ node139538406700608 [label=<
12
12
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="orange" PORT="table">
13
13
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
14
14
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
15
15
  <TR><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="1"> 2 </TD></TR>
16
16
  </TABLE>
17
17
  > xlabel=tuple]
18
- node128708517061760 [label=<
18
+ node139538406057088 [label=<
19
19
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
20
20
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
21
21
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
22
22
  <TR><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="1"> 2 </TD></TR>
23
23
  </TABLE>
24
24
  > xlabel=list]
25
- node128708517824128 [label=<
25
+ node139538406615744 [label=<
26
26
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
27
27
  <TR><TD BORDER="1" STYLE="ROUNDED"> a </TD><TD BORDER="1" STYLE="ROUNDED"> b </TD><TD BORDER="1" STYLE="ROUNDED"> c </TD></TR>
28
28
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1" PORT="ref2"> </TD></TR>
29
29
  </TABLE>
30
30
  > xlabel=dict]
31
- node128708517824128:ref0 -> node128708527869504:table [style=solid]
32
- node128708517824128:ref1 -> node128708517705152:table [style=solid]
33
- node128708517824128:ref2 -> node128708517061760:table [style=solid]
34
- node128708527812464 [label=<
31
+ node139538406615744:ref0 -> node139538407968320:table [style=solid]
32
+ node139538406615744:ref1 -> node139538406700608:table [style=solid]
33
+ node139538406615744:ref2 -> node139538406057088:table [style=solid]
34
+ node139538407911280 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="orange" PORT="table">
36
36
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
37
37
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -39,7 +39,7 @@ digraph memory_graph {
39
39
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
40
40
  </TABLE>
41
41
  > xlabel=tuple]
42
- node128708513131968 [label=<
42
+ node139538406699840 [label=<
43
43
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="lightcoral" PORT="table">
44
44
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 4 </TD></TR>
45
45
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> 3 </TD></TR>
@@ -47,23 +47,23 @@ digraph memory_graph {
47
47
  <TR><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="1"> 1 </TD></TR>
48
48
  </TABLE>
49
49
  > xlabel=list]
50
- node128708517619328 [label=<
50
+ node139538407070464 [label=<
51
51
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
52
52
  <TR><TD BORDER="1" STYLE="ROUNDED"> a </TD><TD BORDER="1" STYLE="ROUNDED"> b </TD><TD BORDER="1" STYLE="ROUNDED"> c </TD></TR>
53
53
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1" PORT="ref2"> </TD></TR>
54
54
  </TABLE>
55
55
  > xlabel=dict]
56
- node128708517619328:ref0 -> node128708527869504:table [style=solid]
57
- node128708517619328:ref1 -> node128708527812464:table [style=solid]
58
- node128708517619328:ref2 -> node128708513131968:table [style=solid]
59
- node128708513164544 [label=<
56
+ node139538407070464:ref0 -> node139538407968320:table [style=solid]
57
+ node139538407070464:ref1 -> node139538407911280:table [style=solid]
58
+ node139538407070464:ref2 -> node139538406699840:table [style=solid]
59
+ node139538402161472 [label=<
60
60
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="khaki" PORT="table">
61
61
  <TR><TD BORDER="1" STYLE="ROUNDED"> 0: &lt;module&gt; </TD><TD BORDER="1" STYLE="ROUNDED"> 1: add_one </TD></TR>
62
62
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
63
63
  </TABLE>
64
64
  > xlabel=call_stack]
65
- node128708513164544:ref0 -> node128708517824128:table [style=solid]
66
- node128708513164544:ref1 -> node128708517619328:table [style=solid]
67
- subgraph { rank=same; node128708517824128 -> node128708517619328[weight=10, style=invis]; }
68
- subgraph { rank=same; node128708527869504 -> node128708517705152 -> node128708517061760 -> node128708527812464 -> node128708513131968[weight=10, style=invis]; }
65
+ node139538402161472:ref0 -> node139538406615744:table [style=solid]
66
+ node139538402161472:ref1 -> node139538407070464:table [style=solid]
67
+ subgraph { rank=same; node139538406615744 -> node139538407070464[weight=10, style=invis]; }
68
+ subgraph { rank=same; node139538407968320 -> node139538406700608 -> node139538406057088 -> node139538407911280 -> node139538406699840[weight=10, style=invis]; }
69
69
  }
@@ -1,6 +1,6 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node131165615065344 [label=<
3
+ node139129545607584 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
5
5
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1"> None </TD></TR>
6
6
  <TR><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1"> 5 </TD></TR>
@@ -8,7 +8,7 @@ digraph memory_graph {
8
8
  <TR><TD BORDER="1" STYLE="ROUNDED"> right </TD><TD BORDER="1"> None </TD></TR>
9
9
  </TABLE>
10
10
  > xlabel="Node"]
11
- node131165615261552 [label=<
11
+ node139129545787328 [label=<
12
12
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
13
13
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1"> None </TD></TR>
14
14
  <TR><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1"> 15 </TD></TR>
@@ -16,34 +16,34 @@ digraph memory_graph {
16
16
  <TR><TD BORDER="1" STYLE="ROUNDED"> right </TD><TD BORDER="1"> None </TD></TR>
17
17
  </TABLE>
18
18
  > xlabel="Node"]
19
- node131165615261632 [label=<
19
+ node139129545787408 [label=<
20
20
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
21
21
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> right </TD></TR>
22
22
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 20 </TD><TD BORDER="1"> twenty </TD><TD BORDER="1"> None </TD></TR>
23
23
  </TABLE>
24
24
  > xlabel="Node"]
25
- node131165615261632:ref0 -> node131165615261552:table [style=solid]
26
- node131165620825968 [label=<
25
+ node139129545787408:ref0 -> node139129545787328:table [style=solid]
26
+ node139129551351664 [label=<
27
27
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
28
28
  <TR><TD BORDER="1" STYLE="ROUNDED"> left </TD><TD BORDER="1" STYLE="ROUNDED"> key </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> right </TD></TR>
29
29
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 10 </TD><TD BORDER="1"> ten </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
30
30
  </TABLE>
31
31
  > xlabel="Node"]
32
- node131165620825968:ref0 -> node131165615065344:table [style=solid]
33
- node131165620825968:ref1 -> node131165615261632:table [style=solid]
34
- node131165616458784 [label=<
32
+ node139129551351664:ref0 -> node139129545607584:table [style=solid]
33
+ node139129551351664:ref1 -> node139129545787408:table [style=solid]
34
+ node139129546984480 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
36
36
  <TR><TD BORDER="1" STYLE="ROUNDED"> _root </TD><TD BORDER="1" STYLE="ROUNDED"> _count </TD></TR>
37
37
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 4 </TD></TR>
38
38
  </TABLE>
39
39
  > xlabel=AVLTree]
40
- node131165616458784:ref0 -> node131165620825968:table [style=solid]
41
- node131165619177344 [label=<
40
+ node139129546984480:ref0 -> node139129551351664:table [style=solid]
41
+ node139129549703040 [label=<
42
42
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
43
43
  <TR><TD BORDER="1" STYLE="ROUNDED"> tree </TD></TR>
44
44
  <TR><TD BORDER="1" PORT="ref0"> </TD></TR>
45
45
  </TABLE>
46
46
  > xlabel=dict]
47
- node131165619177344:ref0 -> node131165616458784:table [style=solid]
48
- subgraph { rank=same; node131165615065344 -> node131165615261632[weight=10, style=invis]; }
47
+ node139129549703040:ref0 -> node139129546984480:table [style=solid]
48
+ subgraph { rank=same; node139129545607584 -> node139129545787408[weight=10, style=invis]; }
49
49
  }
@@ -1,22 +1,22 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node131165620825968 [label=<
3
+ node139129551351664 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
5
5
  <TR><TD BORDER="1"> key:10 value:ten </TD></TR>
6
6
  </TABLE>
7
7
  > xlabel="Node"]
8
- node131165616458784 [label=<
8
+ node139129546984480 [label=<
9
9
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
10
10
  <TR><TD BORDER="1" STYLE="ROUNDED"> _root </TD><TD BORDER="1" STYLE="ROUNDED"> _count </TD></TR>
11
11
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 4 </TD></TR>
12
12
  </TABLE>
13
13
  > xlabel=AVLTree]
14
- node131165616458784:ref0 -> node131165620825968:table [style=solid]
15
- node131165619177344 [label=<
14
+ node139129546984480:ref0 -> node139129551351664:table [style=solid]
15
+ node139129549703040 [label=<
16
16
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
17
17
  <TR><TD BORDER="1" STYLE="ROUNDED"> tree </TD></TR>
18
18
  <TR><TD BORDER="1" PORT="ref0"> </TD></TR>
19
19
  </TABLE>
20
20
  > xlabel=dict]
21
- node131165619177344:ref0 -> node131165616458784:table [style=solid]
21
+ node139129549703040:ref0 -> node139129546984480:table [style=solid]
22
22
  }
@@ -1,6 +1,6 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node131165615065344 [label=<
3
+ node139129545607584 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
5
5
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> left: </TD></TR>
6
6
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> None </TD></TR>
@@ -12,7 +12,7 @@ digraph memory_graph {
12
12
  <TR><TD BORDER="0"><font color="#505050">7</font></TD><TD BORDER="1"> None </TD></TR>
13
13
  </TABLE>
14
14
  > xlabel="Node"]
15
- node131165615261552 [label=<
15
+ node139129545787328 [label=<
16
16
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
17
17
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> left: </TD></TR>
18
18
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> None </TD></TR>
@@ -24,34 +24,34 @@ digraph memory_graph {
24
24
  <TR><TD BORDER="0"><font color="#505050">7</font></TD><TD BORDER="1"> None </TD></TR>
25
25
  </TABLE>
26
26
  > xlabel="Node"]
27
- node131165615261632 [label=<
27
+ node139129545787408 [label=<
28
28
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
29
29
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="0"><font color="#505050">4</font></TD><TD BORDER="0"><font color="#505050">5</font></TD><TD BORDER="0"><font color="#505050">6</font></TD><TD BORDER="0"><font color="#505050">7</font></TD></TR>
30
30
  <TR><TD BORDER="1"> left: </TD><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> key: </TD><TD BORDER="1"> 20 </TD><TD BORDER="1"> value: </TD><TD BORDER="1"> twenty </TD><TD BORDER="1"> right: </TD><TD BORDER="1"> None </TD></TR>
31
31
  </TABLE>
32
32
  > xlabel="Node"]
33
- node131165615261632:ref0 -> node131165615261552:table [style=solid]
34
- node131165620825968 [label=<
33
+ node139129545787408:ref0 -> node139129545787328:table [style=solid]
34
+ node139129551351664 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
36
36
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="0"><font color="#505050">2</font></TD><TD BORDER="0"><font color="#505050">3</font></TD><TD BORDER="0"><font color="#505050">4</font></TD><TD BORDER="0"><font color="#505050">5</font></TD><TD BORDER="0"><font color="#505050">6</font></TD><TD BORDER="0"><font color="#505050">7</font></TD></TR>
37
37
  <TR><TD BORDER="1"> left: </TD><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> key: </TD><TD BORDER="1"> 10 </TD><TD BORDER="1"> value: </TD><TD BORDER="1"> ten </TD><TD BORDER="1"> right: </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
38
38
  </TABLE>
39
39
  > xlabel="Node"]
40
- node131165620825968:ref0 -> node131165615065344:table [style=solid]
41
- node131165620825968:ref1 -> node131165615261632:table [style=solid]
42
- node131165616458784 [label=<
40
+ node139129551351664:ref0 -> node139129545607584:table [style=solid]
41
+ node139129551351664:ref1 -> node139129545787408:table [style=solid]
42
+ node139129546984480 [label=<
43
43
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
44
44
  <TR><TD BORDER="1" STYLE="ROUNDED"> _root </TD><TD BORDER="1" STYLE="ROUNDED"> _count </TD></TR>
45
45
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 4 </TD></TR>
46
46
  </TABLE>
47
47
  > xlabel=AVLTree]
48
- node131165616458784:ref0 -> node131165620825968:table [style=solid]
49
- node131165619177344 [label=<
48
+ node139129546984480:ref0 -> node139129551351664:table [style=solid]
49
+ node139129549703040 [label=<
50
50
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
51
51
  <TR><TD BORDER="1" STYLE="ROUNDED"> tree </TD></TR>
52
52
  <TR><TD BORDER="1" PORT="ref0"> </TD></TR>
53
53
  </TABLE>
54
54
  > xlabel=dict]
55
- node131165619177344:ref0 -> node131165616458784:table [style=solid]
56
- subgraph { rank=same; node131165615065344 -> node131165615261632[weight=10, style=invis]; }
55
+ node139129549703040:ref0 -> node139129546984480:table [style=solid]
56
+ subgraph { rank=same; node139129545607584 -> node139129545787408[weight=10, style=invis]; }
57
57
  }
@@ -1,49 +1,49 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node131165615065344 [label=<
3
+ node139129545607584 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
5
5
  <TR><TD BORDER="0"> </TD><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD></TR>
6
6
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 5 </TD><TD BORDER="1"> five </TD></TR>
7
7
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> None </TD><TD BORDER="1"> None </TD></TR>
8
8
  </TABLE>
9
9
  > xlabel="Node 2⨯2"]
10
- node131165615261552 [label=<
10
+ node139129545787328 [label=<
11
11
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
12
12
  <TR><TD BORDER="0"> </TD><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD></TR>
13
13
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 15 </TD><TD BORDER="1"> fifteen </TD></TR>
14
14
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1"> None </TD><TD BORDER="1"> None </TD></TR>
15
15
  </TABLE>
16
16
  > xlabel="Node 2⨯2"]
17
- node131165615261632 [label=<
17
+ node139129545787408 [label=<
18
18
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
19
19
  <TR><TD BORDER="0"> </TD><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD></TR>
20
20
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 20 </TD><TD BORDER="1"> twenty </TD></TR>
21
21
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> None </TD></TR>
22
22
  </TABLE>
23
23
  > xlabel="Node 2⨯2"]
24
- node131165615261632:ref0 -> node131165615261552:table [style=solid]
25
- node131165620825968 [label=<
24
+ node139129545787408:ref0 -> node139129545787328:table [style=solid]
25
+ node139129551351664 [label=<
26
26
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="sandybrown" PORT="table">
27
27
  <TR><TD BORDER="0"> </TD><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="0"><font color="#505050">1</font></TD></TR>
28
28
  <TR><TD BORDER="0"><font color="#505050">0</font></TD><TD BORDER="1"> 10 </TD><TD BORDER="1"> ten </TD></TR>
29
29
  <TR><TD BORDER="0"><font color="#505050">1</font></TD><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
30
30
  </TABLE>
31
31
  > xlabel="Node 2⨯2"]
32
- node131165620825968:ref0 -> node131165615065344:table [style=solid]
33
- node131165620825968:ref1 -> node131165615261632:table [style=solid]
34
- node131165616458784 [label=<
32
+ node139129551351664:ref0 -> node139129545607584:table [style=solid]
33
+ node139129551351664:ref1 -> node139129545787408:table [style=solid]
34
+ node139129546984480 [label=<
35
35
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
36
36
  <TR><TD BORDER="1" STYLE="ROUNDED"> _root </TD><TD BORDER="1" STYLE="ROUNDED"> _count </TD></TR>
37
37
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 4 </TD></TR>
38
38
  </TABLE>
39
39
  > xlabel=AVLTree]
40
- node131165616458784:ref0 -> node131165620825968:table [style=solid]
41
- node131165619177344 [label=<
40
+ node139129546984480:ref0 -> node139129551351664:table [style=solid]
41
+ node139129549703040 [label=<
42
42
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
43
43
  <TR><TD BORDER="1" STYLE="ROUNDED"> tree </TD></TR>
44
44
  <TR><TD BORDER="1" PORT="ref0"> </TD></TR>
45
45
  </TABLE>
46
46
  > xlabel=dict]
47
- node131165619177344:ref0 -> node131165616458784:table [style=solid]
48
- subgraph { rank=same; node131165615065344 -> node131165615261632[weight=10, style=invis]; }
47
+ node139129549703040:ref0 -> node139129546984480:table [style=solid]
48
+ subgraph { rank=same; node139129545607584 -> node139129545787408[weight=10, style=invis]; }
49
49
  }
@@ -0,0 +1,31 @@
1
+ import memory_graph as mg
2
+
3
+ class View:
4
+
5
+ def __init__(self, lst, begin, end):
6
+ self.lst = lst
7
+ self.begin = begin
8
+ self.end = end
9
+
10
+ def __getitem__(self, index):
11
+ return self.lst[index]
12
+
13
+ def get_mid(self):
14
+ return (self.begin + self.end) // 2
15
+
16
+ def bin_search(view, value):
17
+ mid = view.get_mid()
18
+ mid_value = view[mid]
19
+ if value < mid_value:
20
+ return bin_search(View(view.lst, view.begin, mid), value)
21
+ elif value > mid_value:
22
+ return bin_search(View(view.lst, mid, view.end), value)
23
+ else:
24
+ return mid
25
+
26
+
27
+ n = 15
28
+ data = [i for i in range(n)]
29
+ value = n//3
30
+ index = bin_search(View(data, 0, len(data)), value)
31
+ print(f'{index=}')
Binary file
@@ -1,110 +1,110 @@
1
1
  digraph memory_graph {
2
2
  node [shape=plaintext]
3
- node82431472 [label=<
3
+ node307374992 [label=<
4
4
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="0" CELLPADDING="0" BGCOLOR="seagreen3" PORT="table">
5
5
  <TR><TD BORDER="0"> </TD></TR>
6
6
  </TABLE>
7
7
  > xlabel=type]
8
- node133874545035728 [label=<
8
+ node137103008811472 [label=<
9
9
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
10
10
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1"> None </TD></TR>
11
11
  <TR><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1"> 33 </TD></TR>
12
12
  <TR><TD BORDER="1" STYLE="ROUNDED"> larger </TD><TD BORDER="1"> None </TD></TR>
13
13
  </TABLE>
14
14
  > xlabel=BinTree]
15
- node133874545035424 [label=<
15
+ node137103008811168 [label=<
16
16
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
17
17
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> larger </TD></TR>
18
18
  <TR><TD BORDER="1"> None </TD><TD BORDER="1"> 5 </TD><TD BORDER="1" PORT="ref0"> </TD></TR>
19
19
  </TABLE>
20
20
  > xlabel=BinTree]
21
- node133874545035424:ref0 -> node133874545035728:table [style=solid]
22
- node133874546146800 [label=<
21
+ node137103008811168:ref0 -> node137103008811472:table [style=solid]
22
+ node137103009955040 [label=<
23
23
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
24
24
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1"> None </TD></TR>
25
25
  <TR><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1"> 51 </TD></TR>
26
26
  <TR><TD BORDER="1" STYLE="ROUNDED"> larger </TD><TD BORDER="1"> None </TD></TR>
27
27
  </TABLE>
28
28
  > xlabel=BinTree]
29
- node133874546146528 [label=<
29
+ node137103009954768 [label=<
30
30
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
31
31
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1"> None </TD></TR>
32
32
  <TR><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1"> 62 </TD></TR>
33
33
  <TR><TD BORDER="1" STYLE="ROUNDED"> larger </TD><TD BORDER="1"> None </TD></TR>
34
34
  </TABLE>
35
35
  > xlabel=BinTree]
36
- node133874544960304 [label=<
36
+ node137103008736048 [label=<
37
37
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
38
38
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> larger </TD></TR>
39
39
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 65 </TD><TD BORDER="1"> None </TD></TR>
40
40
  </TABLE>
41
41
  > xlabel=BinTree]
42
- node133874544960304:ref0 -> node133874546146528:table [style=solid]
43
- node133874546306064 [label=<
42
+ node137103008736048:ref0 -> node137103009954768:table [style=solid]
43
+ node137103010049360 [label=<
44
44
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
45
45
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> larger </TD></TR>
46
46
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 53 </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
47
47
  </TABLE>
48
48
  > xlabel=BinTree]
49
- node133874546306064:ref0 -> node133874546146800:table [style=solid]
50
- node133874546306064:ref1 -> node133874544960304:table [style=solid]
51
- node133874546305744 [label=<
49
+ node137103010049360:ref0 -> node137103009955040:table [style=solid]
50
+ node137103010049360:ref1 -> node137103008736048:table [style=solid]
51
+ node137103010049040 [label=<
52
52
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
53
53
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> larger </TD></TR>
54
54
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 97 </TD><TD BORDER="1"> None </TD></TR>
55
55
  </TABLE>
56
56
  > xlabel=BinTree]
57
- node133874546305744:ref0 -> node133874546306064:table [style=solid]
58
- node133874546510544 [label=<
57
+ node137103010049040:ref0 -> node137103010049360:table [style=solid]
58
+ node137103010269904 [label=<
59
59
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="seagreen1" PORT="table">
60
60
  <TR><TD BORDER="1" STYLE="ROUNDED"> smaller </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD><TD BORDER="1" STYLE="ROUNDED"> larger </TD></TR>
61
61
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 49 </TD><TD BORDER="1" PORT="ref1"> </TD></TR>
62
62
  </TABLE>
63
63
  > xlabel=BinTree]
64
- node133874546510544:ref0 -> node133874545035424:table [style=solid]
65
- node133874546510544:ref1 -> node133874546305744:table [style=solid]
66
- node133874545194368 [label=<
64
+ node137103010269904:ref0 -> node137103008811168:table [style=solid]
65
+ node137103010269904:ref1 -> node137103010049040:table [style=solid]
66
+ node137103008956160 [label=<
67
67
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
68
68
  <TR><TD BORDER="1" STYLE="ROUNDED"> BinTree </TD><TD BORDER="1" STYLE="ROUNDED"> tree </TD><TD BORDER="1" STYLE="ROUNDED"> n </TD><TD BORDER="1" STYLE="ROUNDED"> i </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD></TR>
69
69
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1"> 100 </TD><TD BORDER="1"> 7 </TD><TD BORDER="1"> 51 </TD></TR>
70
70
  </TABLE>
71
71
  > xlabel=dict]
72
- node133874545194368:ref0 -> node82431472:table [style=solid]
73
- node133874545194368:ref1 -> node133874546510544:table [style=solid]
74
- node133874545194240 [label=<
72
+ node137103008956160:ref0 -> node307374992:table [style=solid]
73
+ node137103008956160:ref1 -> node137103010269904:table [style=solid]
74
+ node137103009055040 [label=<
75
75
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
76
76
  <TR><TD BORDER="1" STYLE="ROUNDED"> self </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD></TR>
77
77
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 51 </TD></TR>
78
78
  </TABLE>
79
79
  > xlabel=dict]
80
- node133874545194240:ref0 -> node133874546510544:table [style=solid]
81
- node133874545194688 [label=<
80
+ node137103009055040:ref0 -> node137103010269904:table [style=solid]
81
+ node137103009055104 [label=<
82
82
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
83
83
  <TR><TD BORDER="1" STYLE="ROUNDED"> self </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD></TR>
84
84
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 51 </TD></TR>
85
85
  </TABLE>
86
86
  > xlabel=dict]
87
- node133874545194688:ref0 -> node133874546305744:table [style=solid]
88
- node133874545194816 [label=<
87
+ node137103009055104:ref0 -> node137103010049040:table [style=solid]
88
+ node137103009055232 [label=<
89
89
  <TABLE BORDER="1" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="#60a5ff" PORT="table">
90
90
  <TR><TD BORDER="1" STYLE="ROUNDED"> self </TD><TD BORDER="1" STYLE="ROUNDED"> value </TD></TR>
91
91
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1"> 51 </TD></TR>
92
92
  </TABLE>
93
93
  > xlabel=dict]
94
- node133874545194816:ref0 -> node133874546306064:table [style=solid]
95
- node133874545247328 [label=<
94
+ node137103009055232:ref0 -> node137103010049360:table [style=solid]
95
+ node137103009025552 [label=<
96
96
  <TABLE BORDER="3" CELLBORDER="1" CELLSPACING="5" CELLPADDING="0" BGCOLOR="khaki" PORT="table">
97
97
  <TR><TD BORDER="1" STYLE="ROUNDED"> 0: &lt;module&gt; </TD><TD BORDER="1" STYLE="ROUNDED"> 1: BinTree.add </TD><TD BORDER="1" STYLE="ROUNDED"> 2: BinTree.add </TD><TD BORDER="1" STYLE="ROUNDED"> 3: BinTree.add </TD></TR>
98
98
  <TR><TD BORDER="1" PORT="ref0"> </TD><TD BORDER="1" PORT="ref1"> </TD><TD BORDER="1" PORT="ref2"> </TD><TD BORDER="1" PORT="ref3"> </TD></TR>
99
99
  </TABLE>
100
100
  > xlabel=call_stack]
101
- node133874545247328:ref0 -> node133874545194368:table [style=solid]
102
- node133874545247328:ref1 -> node133874545194240:table [style=solid]
103
- node133874545247328:ref2 -> node133874545194688:table [style=solid]
104
- node133874545247328:ref3 -> node133874545194816:table [style=solid]
105
- subgraph { rank=same; node133874545194368 -> node133874545194240 -> node133874545194688 -> node133874545194816[weight=10, style=invis]; }
106
- subgraph { rank=same; node82431472 -> node133874546510544[weight=10, style=invis]; }
107
- subgraph { rank=same; node133874545035424 -> node133874546305744[weight=10, style=invis]; }
108
- subgraph { rank=same; node133874545035728 -> node133874546306064[weight=10, style=invis]; }
109
- subgraph { rank=same; node133874546146800 -> node133874544960304[weight=10, style=invis]; }
101
+ node137103009025552:ref0 -> node137103008956160:table [style=solid]
102
+ node137103009025552:ref1 -> node137103009055040:table [style=solid]
103
+ node137103009025552:ref2 -> node137103009055104:table [style=solid]
104
+ node137103009025552:ref3 -> node137103009055232:table [style=solid]
105
+ subgraph { rank=same; node137103008956160 -> node137103009055040 -> node137103009055104 -> node137103009055232[weight=10, style=invis]; }
106
+ subgraph { rank=same; node307374992 -> node137103010269904[weight=10, style=invis]; }
107
+ subgraph { rank=same; node137103008811168 -> node137103010049040[weight=10, style=invis]; }
108
+ subgraph { rank=same; node137103008811472 -> node137103010049360[weight=10, style=invis]; }
109
+ subgraph { rank=same; node137103009955040 -> node137103008736048[weight=10, style=invis]; }
110
110
  }