tag:github.com,2008:https://github.com/root-11/graph-theory/releases Release notes from graph-theory 2025-02-02T21:31:44Z tag:github.com,2008:Repository/172258600/2023.7.8 2025-02-02T21:41:21Z Bug fix <h1>Bug fix for shortest path.</h1> <p>In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2825950023" data-permission-text="Title is private" data-url="https://github.com/root-11/graph-theory/issues/42" data-hovercard-type="issue" data-hovercard-url="/root-11/graph-theory/issues/42/hovercard" href="https://github.com/root-11/graph-theory/issues/42">#42</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/joshinils/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/joshinils">@joshinils</a> discovered that a call to shortest path with <code>0</code> as starting node, would result a call to <code>graph.edges(from_node=0)</code> which python interprets as <code>False</code> in the function selection in <a href="https://github.com/root-11/graph-theory/blob/235c7e06b420bc2235ea7e8fbb13cedbcd5e9d82/graph/base.py#L268"><code>if from_node: ...</code></a></p> <p>This bug is now solved with commit: <a href="https://github.com/root-11/graph-theory/commit/21e9d376b824b5b2185e6a5cb803abeaf94dabe0">#21e9d376</a>.</p> <p>There are no other changes.</p> root-11 tag:github.com,2008:Repository/172258600/2023.7.7 2024-04-29T21:41:32Z Bug fix <p>This is a maintenance release with bugfix for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2269668644" data-permission-text="Title is private" data-url="https://github.com/root-11/graph-theory/issues/41" data-hovercard-type="issue" data-hovercard-url="/root-11/graph-theory/issues/41/hovercard" href="https://github.com/root-11/graph-theory/issues/41">#41</a>, where the variable <code>_edges</code> creates a key (which is default behaviour in <code>collections.defaultdict</code>). This causes the graph to grow and can cause divergence when attempting to compare two otherwise identical graphs.</p> root-11 tag:github.com,2008:Repository/172258600/2023.7.6 2024-03-13T20:03:03Z Maintenance release <p>Bug fix release for <code>__eq__</code> with credit to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Sappique/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Sappique">@Sappique</a> (bug <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2169599612" data-permission-text="Title is private" data-url="https://github.com/root-11/graph-theory/issues/40" data-hovercard-type="issue" data-hovercard-url="/root-11/graph-theory/issues/40/hovercard" href="https://github.com/root-11/graph-theory/issues/40">#40</a>).</p> <p>Changes:</p> <ul> <li><a href="https://github.com/root-11/graph-theory/commit/5b52a0942c22b33b7eaabcf3ed5ab0ab18529533">new tests</a></li> <li><a href="https://github.com/root-11/graph-theory/commit/5b52a0942c22b33b7eaabcf3ed5ab0ab18529533">code changes</a></li> </ul> root-11 tag:github.com,2008:Repository/172258600/2023.7.5 2024-02-27T11:21:32Z Maintenance release <p>Bug fix release for error when <a href="#39">detecting cycles</a> with credit to <a href="https://github.com/Sappique">Sappique</a>.</p> <p>the method <code>g.has_cycle()</code> now uses topological sort instead of phaselines.</p> <p>Changes:</p> <ul> <li>new test <a href="https://github.com/root-11/graph-theory/commit/87e812907a0b602ec864b2f49e9f7fbbea5109a0">1</a></li> <li>change: <a href="https://github.com/root-11/graph-theory/commit/65ab8b5d5c5461671bb93dfd3df82fdc3e735731">2</a></li> </ul> root-11 tag:github.com,2008:Repository/172258600/2023.7.4 2023-10-14T21:38:45Z Maintenance release <p>matplotlib is no longer a requirement.<br> no api changes other wise.</p> root-11 tag:github.com,2008:Repository/172258600/2023.7.3 2023-09-26T11:15:50Z Maintenance release <p>Patches a speed improvement for TSP.</p> root-11 tag:github.com,2008:Repository/172258600/2023.7.2 2023-08-18T19:56:00Z bugfix release <p>This maintenance release contains a bug fix for shortest path with memorize (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1853174806" data-permission-text="Title is private" data-url="https://github.com/root-11/graph-theory/issues/33" data-hovercard-type="pull_request" data-hovercard-url="/root-11/graph-theory/pull/33/hovercard" href="https://github.com/root-11/graph-theory/pull/33">#33</a> for details)<br> Otherwise no changes.</p> root-11 tag:github.com,2008:Repository/172258600/2023.7.1 2023-07-03T18:11:10Z Maintenance release <p>This maintenance release refactors all of the modules, so they're easier to navigate.<br> None of the APIs (should) have changed, but should you be missing anything please raise a ticket.</p> <p>Some may also find that the TSP solver is better and/or faster.</p> root-11 tag:github.com,2008:Repository/172258600/2023.1.1 2023-06-26T22:25:14Z Maintenance release <p>This is a minor maintenance release.</p> <p>The only changes are:</p> <ul> <li>bug fix for <code>solve_tsp</code> for a rare case where the search runs into a infinite cycle.</li> <li>change of name of module <code>hash</code> to <code>hash_methods</code> to avoid name-space collision with python's built-in <code>hash</code></li> </ul> <p>The version was updated to 2023.1.1 due to the breaking change of the name changes only.</p> root-11 tag:github.com,2008:Repository/172258600/2022.4.3 2023-05-23T14:52:51Z Maintenance release <p>This maintenance release delivers a new algorithm for the detection of phaselines in graphs which reduces the runtime from O(V*E) to O(V+E).</p> <p>From the docs string:</p> <p>Detecting phaselines is useful for determining which tasks can be performed in parallel.<br> Each phase in the phaselines must be completed to assure that the tasks in the next phase can be performed with complete input.</p> <p>This is in contrast to Topological sort that only generates a queue of tasks, may be fine for a single processor, but has no mechanism for coordination that all inputs for a task have been completed so that multiple processors can work on them.</p> <p>Here is an example of a DAG with tasks:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" u1 u4 u2 u3 \ \ \_______\ csg cs3 append \ \ \ op1 \ op3 \ \ \ op2 \ cs2 \ \___________\ cs1 join \ \ map1 map2 \___________\ save"><pre class="notranslate"><code> u1 u4 u2 u3 \ \ \_______\ csg cs3 append \ \ \ op1 \ op3 \ \ \ op2 \ cs2 \ \___________\ cs1 join \ \ map1 map2 \___________\ save </code></pre></div> <p>The phaselines would be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" phaselines = { &quot;u1&quot;: 0, &quot;u4&quot;: 0, &quot;u2&quot;: 0, &quot;u3&quot;: 0, &quot;csg&quot;: 1, &quot;cs3&quot;: 1, &quot;append&quot;: 1, &quot;op1&quot;: 2, &quot;op3&quot;: 2, &quot;op2&quot;: 3, &quot;cs2&quot;: 3, &quot;cs1&quot;: 4, &quot;join&quot;: 4, &quot;map1&quot;: 5, &quot;map2&quot;: 5, &quot;save&quot;: 6, } "><pre class="notranslate"><code> phaselines = { "u1": 0, "u4": 0, "u2": 0, "u3": 0, "csg": 1, "cs3": 1, "append": 1, "op1": 2, "op3": 2, "op2": 3, "cs2": 3, "cs1": 4, "join": 4, "map1": 5, "map2": 5, "save": 6, } </code></pre></div> <p>From this example it is visible that processing the 4 'uN' (uploads) is the highest degree of concurrency. This can be determined as follows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" d = defaultdict(int) for _, pl in graph.phaselines(): d[pl] += 1 max_processors = max(d, key=d.get)"><pre class="notranslate"><code> d = defaultdict(int) for _, pl in graph.phaselines(): d[pl] += 1 max_processors = max(d, key=d.get) </code></pre></div> root-11