tag:github.com,2008:https://github.com/root-11/graph-theory/releasesRelease notes from graph-theory2025-02-02T21:31:44Ztag:github.com,2008:Repository/172258600/2023.7.82025-02-02T21:41:21ZBug 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-11tag:github.com,2008:Repository/172258600/2023.7.72024-04-29T21:41:32ZBug 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-11tag:github.com,2008:Repository/172258600/2023.7.62024-03-13T20:03:03ZMaintenance 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-11tag:github.com,2008:Repository/172258600/2023.7.52024-02-27T11:21:32ZMaintenance 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-11tag:github.com,2008:Repository/172258600/2023.7.42023-10-14T21:38:45ZMaintenance release<p>matplotlib is no longer a requirement.<br>
no api changes other wise.</p>root-11tag:github.com,2008:Repository/172258600/2023.7.32023-09-26T11:15:50ZMaintenance release <p>Patches a speed improvement for TSP.</p>root-11tag:github.com,2008:Repository/172258600/2023.7.22023-08-18T19:56:00Zbugfix 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-11tag:github.com,2008:Repository/172258600/2023.7.12023-07-03T18:11:10ZMaintenance 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-11tag:github.com,2008:Repository/172258600/2023.1.12023-06-26T22:25:14ZMaintenance 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-11tag:github.com,2008:Repository/172258600/2022.4.32023-05-23T14:52:51ZMaintenance 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 = {
"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,
} "><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