Skip to content

Commit

Permalink
bugfixes MultiGraphAdapter for 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
blutorange committed Sep 22, 2018
1 parent 8fc44a3 commit 566f08e
Show file tree
Hide file tree
Showing 24 changed files with 889 additions and 328 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ I use the following keywords:

From newest to oldest:

# 0.4.0
- Fixed bug with `MultiGraphAdapter`: `#getLabelledEdge()` updated incorrectly.
- Added an additional method `#contractLabeledEdge`, While `#contractEdge` contract all edges (irrespective of their label) between two vertices, `#contractEdge` contracts just one particular edge with a specific label. Note that since cycle are forbidden, a certain labeled edge between two vertices can only be contracted if it is the only edge between those two vertices. `#contractLabeled` refuses two contract in such a case, while `#contractVertices` contract all edges. You can check with `#canContractEdge` and `#canContractLabeledEdge`.
- Removed deprecated `MultiGraphAdapter#addLabeledEdge(from: TVertex, to: TVertex, label?: TEdgeLabel, data?: TEdgeData): boolean`

# 0.3.0
- Added `Algorithm#findWeaklyConnectedComponents`.
- Added a `getEdgesWithData`, `getEdgesWithDataFrom`, `getEdgesWithDataTo` method when both the edge and its data are needed.
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions docs/classes/algorithm.html
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,9 @@
<li class=" tsd-kind-type-alias">
<a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a>
</li>
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
<a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a>
</li>
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
<a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a>
</li>
Expand All @@ -978,6 +981,9 @@
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter">
<a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a>
</li>
Expand All @@ -999,6 +1005,9 @@
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter">
<a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a>
</li>
Expand Down Expand Up @@ -1057,7 +1066,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> find<wbr>Weakly<wbr>Conne
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Algorithm.ts#L15">Algorithm.ts:15</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Algorithm.ts#L15">Algorithm.ts:15</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1104,7 +1113,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Neighbors</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/Algorithm.ts#L63">Algorithm.ts:63</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/Algorithm.ts#L63">Algorithm.ts:63</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
70 changes: 39 additions & 31 deletions docs/classes/genericgraphadapter.html

Large diffs are not rendered by default.

69 changes: 39 additions & 30 deletions docs/classes/graphlibadapter.html

Large diffs are not rendered by default.

253 changes: 180 additions & 73 deletions docs/classes/multigraphadapter.html

Large diffs are not rendered by default.

30 changes: 19 additions & 11 deletions docs/classes/pearcekellydetector.html
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,9 @@
<li class=" tsd-kind-type-alias">
<a href="../globals.html#graphlibconstructor" class="tsd-kind-icon">Graphlib<wbr>Constructor</a>
</li>
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
<a href="../globals.html#labelgenerator" class="tsd-kind-icon">Label<wbr>Generator</a>
</li>
<li class=" tsd-kind-type-alias tsd-has-type-parameter">
<a href="../globals.html#multigraphedgedata" class="tsd-kind-icon">Multi<wbr>Graph<wbr>Edge<wbr>Data</a>
</li>
Expand All @@ -996,6 +999,9 @@
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter">
<a href="../globals.html#combineiterators" class="tsd-kind-icon">combine<wbr>Iterators</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a>
</li>
Expand All @@ -1017,6 +1023,9 @@
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter">
<a href="../globals.html#foreach" class="tsd-kind-icon">for<wbr>Each</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
<a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a>
</li>
Expand All @@ -1039,13 +1048,12 @@
<p>Performs a cycle detection while edges are added. You must call
the methods when edges are added etc. as described in @see <a href="../interfaces/cycledetector.html">CycleDetector</a>.</p>
</div>
<pre><code class="lang-text">Based on the paper
<pre><code class="language-text">Based on the paper
A Dynamic Topological Sort Algorithm for Directed Acyclic Graphs
DAVID J. PEARCE / PAUL H. J. KELLY
Journal of Experimental Algorithmics (JEA)
Volume 11, 2006, Article No. 1.7
ACM New York, NY, USA
</code></pre>
ACM New York, NY, USA</code></pre>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="../interfaces/cycledetector.html">CycleDetector</a></p>
Expand Down Expand Up @@ -1112,7 +1120,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="pearcekellydetector.html" class="tsd-signature-type">PearceKellyDetector</a></h4>
Expand All @@ -1133,7 +1141,7 @@ <h3>can<wbr>Add<wbr>Edge</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#canaddedge">canAddEdge</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L122">PearceKellyDetector.ts:122</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L122">PearceKellyDetector.ts:122</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1163,7 +1171,7 @@ <h3>create<wbr>Vertex<wbr>Data</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#createvertexdata">createVertexData</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L108">PearceKellyDetector.ts:108</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L108">PearceKellyDetector.ts:108</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1187,7 +1195,7 @@ <h3>get<wbr>Order</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#getorder">getOrder</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L134">PearceKellyDetector.ts:134</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L134">PearceKellyDetector.ts:134</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1214,7 +1222,7 @@ <h3>is<wbr>Reachable</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#isreachable">isReachable</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L89">PearceKellyDetector.ts:89</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L89">PearceKellyDetector.ts:89</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down Expand Up @@ -1244,7 +1252,7 @@ <h3>map</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#map">map</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li>
</ul>
</aside>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
Expand All @@ -1268,7 +1276,7 @@ <h3>on<wbr>Vertex<wbr>Deletion</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#onvertexdeletion">onVertexDeletion</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L116">PearceKellyDetector.ts:116</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L116">PearceKellyDetector.ts:116</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1295,7 +1303,7 @@ <h3>supports<wbr>Order</h3>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#supportsorder">supportsOrder</a></p>
<ul>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/3f1c472/src/PearceKellyDetector.ts#L130">PearceKellyDetector.ts:130</a></li>
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/8fc44a3/src/PearceKellyDetector.ts#L130">PearceKellyDetector.ts:130</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
Expand Down
Loading

0 comments on commit 566f08e

Please sign in to comment.