Skip to content

Commit 6772d6b

Browse files
committed
prepare v0.2.0
1 parent 70213d0 commit 6772d6b

26 files changed

+2699
-5457
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ Tests done with [benchmark](https://www.npmjs.com/package/benchmark). Compared w
8282
sort with `graphlib` (via `alg.isAcyclic(graph)`) each time a vertex is added. Measured time is the time that
8383
was needed for creating a new graph and adding `n` vertices, checking for a cycle after each edge insertion.
8484

85-
```
86-
// 200 vertices, 15000 random (same for each algorithm) edges added
87-
incremental-cycle-detection(insert 15000, RandomSource) x 36.51 ops/sec ±4.53% (59 runs sampled)
88-
graphlib(insert15000, RandomSource) x 0.18 ops/sec ±2.78% (5 runs sampled)
89-
```
85+
> **incremental-cycle-detection**(insert 15000, RandomSource) x **36.43** ops/sec ±0.79% (58 runs sampled)
86+
>
87+
> **incremental-cycle-detection-multi**(insert 15000, RandomSource) x **25.71** ops/sec ±10.12% (45 runs sampled)
88+
>
89+
> **graphlib**(insert15000, RandomSource) x **0.17** ops/sec ±1.63% (5 runs sampled)
90+
91+
(200 vertices, 15000 random (same for each algorithm) edges added)
9092

9193
# JavaScript environment
9294

@@ -140,8 +142,10 @@ I use the following keywords:
140142
From newest to oldest:
141143

142144
# 0.2.0
145+
- Added the method `getOrder` to the graph adapters. It allows you to access the topological order of each vertex.
143146
- Added a `MultiGraphAdapter` data structure that allows for multiple edges between two vertices.
144-
- Changed `GenericGraphAdapter, it now only allows for one kind of edge data.
147+
- Changed `GenericGraphAdapter`, it now only allows for one kind of edge data to be compatible with the `CommonAdapter` interface. You can use objects if you need to store more data.
148+
- Added more test cases for the `MultiGraphAdapter` and fixed some bugs, updated dependencies.
145149

146150
# 0.1.1
147151
- 0.1.1 Fixed package.json and dependencies (was missing tslib).

docs/assets/js/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/genericgraphadapter.html

Lines changed: 67 additions & 21 deletions
Large diffs are not rendered by default.

docs/classes/graphlibadapter.html

Lines changed: 70 additions & 28 deletions
Large diffs are not rendered by default.

docs/classes/multigraphadapter.html

Lines changed: 208 additions & 57 deletions
Large diffs are not rendered by default.

docs/classes/pearcekellydetector.html

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,9 @@
972972
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
973973
<a href="../globals.html#assign" class="tsd-kind-icon">assign</a>
974974
</li>
975+
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
976+
<a href="../globals.html#cancontractedge" class="tsd-kind-icon">can<wbr>Contract<wbr>Edge</a>
977+
</li>
975978
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
976979
<a href="../globals.html#contractedge" class="tsd-kind-icon">contract<wbr>Edge</a>
977980
</li>
@@ -981,9 +984,18 @@
981984
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
982985
<a href="../globals.html#createfilterediterator" class="tsd-kind-icon">create<wbr>Filtered<wbr>Iterator</a>
983986
</li>
987+
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
988+
<a href="../globals.html#createflatmappediterator" class="tsd-kind-icon">create<wbr>Flat<wbr>Mapped<wbr>Iterator</a>
989+
</li>
984990
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
985991
<a href="../globals.html#createmappedarrayiterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Array<wbr>Iterator</a>
986992
</li>
993+
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
994+
<a href="../globals.html#createmappediterator" class="tsd-kind-icon">create<wbr>Mapped<wbr>Iterator</a>
995+
</li>
996+
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
997+
<a href="../globals.html#takefirst" class="tsd-kind-icon">take<wbr>First</a>
998+
</li>
987999
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-private">
9881000
<a href="../globals.html#toarray" class="tsd-kind-icon">to<wbr>Array</a>
9891001
</li>
@@ -1075,7 +1087,7 @@ <h3>constructor</h3>
10751087
<li class="tsd-description">
10761088
<aside class="tsd-sources">
10771089
<ul>
1078-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li>
1090+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L68">PearceKellyDetector.ts:68</a></li>
10791091
</ul>
10801092
</aside>
10811093
<h4 class="tsd-returns-title">Returns <a href="pearcekellydetector.html" class="tsd-signature-type">PearceKellyDetector</a></h4>
@@ -1096,7 +1108,7 @@ <h3>can<wbr>Add<wbr>Edge</h3>
10961108
<aside class="tsd-sources">
10971109
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#canaddedge">canAddEdge</a></p>
10981110
<ul>
1099-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L113">PearceKellyDetector.ts:113</a></li>
1111+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L111">PearceKellyDetector.ts:111</a></li>
11001112
</ul>
11011113
</aside>
11021114
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -1126,7 +1138,7 @@ <h3>create<wbr>Vertex<wbr>Data</h3>
11261138
<aside class="tsd-sources">
11271139
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#createvertexdata">createVertexData</a></p>
11281140
<ul>
1129-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L99">PearceKellyDetector.ts:99</a></li>
1141+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L97">PearceKellyDetector.ts:97</a></li>
11301142
</ul>
11311143
</aside>
11321144
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -1153,7 +1165,7 @@ <h3>get<wbr>Order</h3>
11531165
<aside class="tsd-sources">
11541166
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#getorder">getOrder</a></p>
11551167
<ul>
1156-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L125">PearceKellyDetector.ts:125</a></li>
1168+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L123">PearceKellyDetector.ts:123</a></li>
11571169
</ul>
11581170
</aside>
11591171
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -1180,7 +1192,7 @@ <h3>is<wbr>Reachable</h3>
11801192
<aside class="tsd-sources">
11811193
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#isreachable">isReachable</a></p>
11821194
<ul>
1183-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li>
1195+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L78">PearceKellyDetector.ts:78</a></li>
11841196
</ul>
11851197
</aside>
11861198
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -1210,7 +1222,7 @@ <h3>on<wbr>Vertex<wbr>Deletion</h3>
12101222
<aside class="tsd-sources">
12111223
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#onvertexdeletion">onVertexDeletion</a></p>
12121224
<ul>
1213-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L107">PearceKellyDetector.ts:107</a></li>
1225+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L105">PearceKellyDetector.ts:105</a></li>
12141226
</ul>
12151227
</aside>
12161228
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -1237,7 +1249,7 @@ <h3>supports<wbr>Order</h3>
12371249
<aside class="tsd-sources">
12381250
<p>Implementation of <a href="../interfaces/cycledetector.html">CycleDetector</a>.<a href="../interfaces/cycledetector.html#supportsorder">supportsOrder</a></p>
12391251
<ul>
1240-
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/b264f4b/src/PearceKellyDetector.ts#L121">PearceKellyDetector.ts:121</a></li>
1252+
<li>Defined in <a href="https://github.com/blutorange/js-incremental-cycle-detect/blob/70213d0/src/PearceKellyDetector.ts#L119">PearceKellyDetector.ts:119</a></li>
12411253
</ul>
12421254
</aside>
12431255
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>

0 commit comments

Comments
 (0)